]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090321
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.469 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-rcs-ids          compile-in RCS identifiers
759 Options to Specify How Manpages are Installed:
760   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
761                           optionally formatted/catonly, e.g., gzip,formatted
762   --with-manpage-renames  specify manpage-renaming
763   --with-manpage-aliases  specify manpage-aliases using .so
764   --with-manpage-symlinks specify manpage-aliases using symlinks
765   --with-manpage-tbl      specify manpage processing with tbl
766 Extensions:
767   --disable-ext-funcs     disable function-extensions
768   --enable-sp-funcs       disable experimental SCREEN-extensions
769   --enable-const          compile with extra/non-standard const
770   --enable-ext-colors     compile for 256-color support
771   --enable-ext-mouse      compile for extended mouse-encoding
772   --enable-no-padding     compile with $NCURSES_NO_PADDING code
773   --enable-signed-char    compile using signed Boolean's in term.h
774   --enable-sigwinch       compile with SIGWINCH handler
775   --enable-tcap-names     compile with user-definable terminal capabilities
776 Development Code:
777   --without-develop       disable development options
778   --enable-hard-tabs      compile with hard-tabs code
779   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
780 Experimental Code:
781   --disable-assumed-color do not assume anything about default-colors
782   --disable-hashmap       compile without hashmap scrolling-optimization
783   --enable-colorfgbg      compile with $COLORFGBG code
784   --with-pthread          use POSIX thread library
785   --enable-weak-symbols   enable weak-symbols for pthreads
786   --enable-reentrant      compile with experimental reentrant code
787   --with-wrap-prefix=XXX  override prefix used for public variables
788   --enable-safe-sprintf   compile with experimental safe-sprintf code
789   --disable-scroll-hints  compile without scroll-hints code
790   --enable-wgetch-events  compile with experimental wgetch-events code
791 Testing/development Options:
792   --enable-echo           build: display "compiling" commands (default)
793   --enable-warnings       build: turn on GCC compiler warnings
794   --enable-assertions     test: turn on generation of assertion code
795   --with-dmalloc          test: use Gray Watson's dmalloc library
796   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
797   --with-valgrind         test: use valgrind
798   --disable-leaks         test: free permanent memory, analyze leaks
799   --enable-expanded       test: generate functions for certain macros
800   --disable-macros        test: use functions rather than macros
801   --with-trace            test: add trace() function to all models of ncurses
802 Ada95 Binding Options:
803   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
804   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
805   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
806
807 Some influential environment variables:
808   CC          C compiler command
809   CFLAGS      C compiler flags
810   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
811               nonstandard directory <lib dir>
812   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
813               headers in a nonstandard directory <include dir>
814   CPP         C preprocessor
815   CXX         C++ compiler command
816   CXXFLAGS    C++ compiler flags
817   CXXCPP      C++ preprocessor
818
819 Use these variables to override the choices made by `configure' or to help
820 it to find libraries and programs with nonstandard names/locations.
821
822 EOF
823 fi
824
825 if test "$ac_init_help" = "recursive"; then
826   # If there are subdirs, report their specific --help.
827   ac_popdir=`pwd`
828   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
829     cd $ac_subdir
830     # A "../" for each directory in /$ac_subdir.
831     ac_dots=`echo $ac_subdir |
832              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
833
834     case $srcdir in
835     .) # No --srcdir option.  We are building in place.
836       ac_sub_srcdir=$srcdir ;;
837     [\\/]* | ?:[\\/]* ) # Absolute path.
838       ac_sub_srcdir=$srcdir/$ac_subdir ;;
839     *) # Relative path.
840       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
841     esac
842
843     # Check for guested configure; otherwise get Cygnus style configure.
844     if test -f $ac_sub_srcdir/configure.gnu; then
845       echo
846       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
847     elif test -f $ac_sub_srcdir/configure; then
848       echo
849       $SHELL $ac_sub_srcdir/configure  --help=recursive
850     elif test -f $ac_sub_srcdir/configure.ac ||
851            test -f $ac_sub_srcdir/configure.in; then
852       echo
853       $ac_configure --help
854     else
855       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
856     fi
857     cd $ac_popdir
858   done
859 fi
860
861 test -n "$ac_init_help" && exit 0
862 if $ac_init_version; then
863   cat <<\EOF
864
865 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
866 Free Software Foundation, Inc.
867 This configure script is free software; the Free Software Foundation
868 gives unlimited permission to copy, distribute and modify it.
869 EOF
870   exit 0
871 fi
872 exec 5>config.log
873 cat >&5 <<EOF
874 This file contains any messages produced by compilers while
875 running configure, to aid debugging if configure makes a mistake.
876
877 It was created by $as_me, which was
878 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
879
880   $ $0 $@
881
882 EOF
883 {
884 cat <<_ASUNAME
885 ## ---------- ##
886 ## Platform.  ##
887 ## ---------- ##
888
889 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
890 uname -m = `(uname -m) 2>/dev/null || echo unknown`
891 uname -r = `(uname -r) 2>/dev/null || echo unknown`
892 uname -s = `(uname -s) 2>/dev/null || echo unknown`
893 uname -v = `(uname -v) 2>/dev/null || echo unknown`
894
895 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
896 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
897
898 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
899 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
900 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
901 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
902 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
903 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
904 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
905
906 PATH = $PATH
907
908 _ASUNAME
909 } >&5
910
911 cat >&5 <<EOF
912 ## ------------ ##
913 ## Core tests.  ##
914 ## ------------ ##
915
916 EOF
917
918 # Keep a trace of the command line.
919 # Strip out --no-create and --no-recursion so they do not pile up.
920 # Also quote any args containing shell meta-characters.
921 ac_configure_args=
922 ac_sep=
923 for ac_arg
924 do
925   case $ac_arg in
926   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
927   | --no-cr | --no-c) ;;
928   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
929   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
930   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
931     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
932     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
933     ac_sep=" " ;;
934   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
935      ac_sep=" " ;;
936   esac
937   # Get rid of the leading space.
938 done
939
940 # When interrupted or exit'd, cleanup temporary files, and complete
941 # config.log.  We remove comments because anyway the quotes in there
942 # would cause problems or look ugly.
943 trap 'exit_status=$?
944   # Save into config.log some information that might help in debugging.
945   echo >&5
946   echo "## ----------------- ##" >&5
947   echo "## Cache variables.  ##" >&5
948   echo "## ----------------- ##" >&5
949   echo >&5
950   # The following way of writing the cache mishandles newlines in values,
951 {
952   (set) 2>&1 |
953     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
954     *ac_space=\ *)
955       sed -n \
956         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
957           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
958       ;;
959     *)
960       sed -n \
961         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
962       ;;
963     esac;
964 } >&5
965   sed "/^$/d" confdefs.h >conftest.log
966   if test -s conftest.log; then
967     echo >&5
968     echo "## ------------ ##" >&5
969     echo "## confdefs.h.  ##" >&5
970     echo "## ------------ ##" >&5
971     echo >&5
972     cat conftest.log >&5
973   fi
974   (echo; echo) >&5
975   test "$ac_signal" != 0 &&
976     echo "$as_me: caught signal $ac_signal" >&5
977   echo "$as_me: exit $exit_status" >&5
978   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
979     exit $exit_status
980      ' 0
981 for ac_signal in 1 2 13 15; do
982   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
983 done
984 ac_signal=0
985
986 # confdefs.h avoids OS command line length limits that DEFS can exceed.
987 rm -rf conftest* confdefs.h
988 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
989 echo >confdefs.h
990
991 # Let the site file select an alternate cache file if it wants to.
992 # Prefer explicitly selected file to automatically selected ones.
993 if test -z "$CONFIG_SITE"; then
994   if test "x$prefix" != xNONE; then
995     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
996   else
997     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
998   fi
999 fi
1000 for ac_site_file in $CONFIG_SITE; do
1001   if test -r "$ac_site_file"; then
1002     { echo "$as_me:1002: loading site script $ac_site_file" >&5
1003 echo "$as_me: loading site script $ac_site_file" >&6;}
1004     cat "$ac_site_file" >&5
1005     . "$ac_site_file"
1006   fi
1007 done
1008
1009 if test -r "$cache_file"; then
1010   # Some versions of bash will fail to source /dev/null (special
1011   # files actually), so we avoid doing that.
1012   if test -f "$cache_file"; then
1013     { echo "$as_me:1013: loading cache $cache_file" >&5
1014 echo "$as_me: loading cache $cache_file" >&6;}
1015     case $cache_file in
1016       [\\/]* | ?:[\\/]* ) . $cache_file;;
1017       *)                      . ./$cache_file;;
1018     esac
1019   fi
1020 else
1021   { echo "$as_me:1021: creating cache $cache_file" >&5
1022 echo "$as_me: creating cache $cache_file" >&6;}
1023   >$cache_file
1024 fi
1025
1026 # Check that the precious variables saved in the cache have kept the same
1027 # value.
1028 ac_cache_corrupted=false
1029 for ac_var in `(set) 2>&1 |
1030                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1031   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1032   eval ac_new_set=\$ac_env_${ac_var}_set
1033   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1034   eval ac_new_val="\$ac_env_${ac_var}_value"
1035   case $ac_old_set,$ac_new_set in
1036     set,)
1037       { echo "$as_me:1037: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1038 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1039       ac_cache_corrupted=: ;;
1040     ,set)
1041       { echo "$as_me:1041: error: \`$ac_var' was not set in the previous run" >&5
1042 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1043       ac_cache_corrupted=: ;;
1044     ,);;
1045     *)
1046       if test "x$ac_old_val" != "x$ac_new_val"; then
1047         { echo "$as_me:1047: error: \`$ac_var' has changed since the previous run:" >&5
1048 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1049         { echo "$as_me:1049:   former value:  $ac_old_val" >&5
1050 echo "$as_me:   former value:  $ac_old_val" >&2;}
1051         { echo "$as_me:1051:   current value: $ac_new_val" >&5
1052 echo "$as_me:   current value: $ac_new_val" >&2;}
1053         ac_cache_corrupted=:
1054       fi;;
1055   esac
1056   # Pass precious variables to config.status.  It doesn't matter if
1057   # we pass some twice (in addition to the command line arguments).
1058   if test "$ac_new_set" = set; then
1059     case $ac_new_val in
1060     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1061       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1062       ac_configure_args="$ac_configure_args '$ac_arg'"
1063       ;;
1064     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1065        ;;
1066     esac
1067   fi
1068 done
1069 if $ac_cache_corrupted; then
1070   { echo "$as_me:1070: error: changes in the environment can compromise the build" >&5
1071 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1072   { { echo "$as_me:1072: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1073 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1074    { (exit 1); exit 1; }; }
1075 fi
1076
1077 ac_ext=c
1078 ac_cpp='$CPP $CPPFLAGS'
1079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1082 ac_main_return=return
1083
1084 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1085   *c*,-n*) ECHO_N= ECHO_C='
1086 ' ECHO_T='      ' ;;
1087   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1088   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1089 esac
1090 echo "#! $SHELL" >conftest.sh
1091 echo  "exit 0"   >>conftest.sh
1092 chmod +x conftest.sh
1093 if { (echo "$as_me:1093: PATH=\".;.\"; conftest.sh") >&5
1094   (PATH=".;."; conftest.sh) 2>&5
1095   ac_status=$?
1096   echo "$as_me:1096: \$? = $ac_status" >&5
1097   (exit $ac_status); }; then
1098   ac_path_separator=';'
1099 else
1100   ac_path_separator=:
1101 fi
1102 PATH_SEPARATOR="$ac_path_separator"
1103 rm -f conftest.sh
1104
1105 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1106
1107 top_builddir=`pwd`
1108
1109 echo "$as_me:1109: checking for egrep" >&5
1110 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1111 if test "${ac_cv_prog_egrep+set}" = set; then
1112   echo $ECHO_N "(cached) $ECHO_C" >&6
1113 else
1114   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1115     then ac_cv_prog_egrep='grep -E'
1116     else ac_cv_prog_egrep='egrep'
1117     fi
1118 fi
1119 echo "$as_me:1119: result: $ac_cv_prog_egrep" >&5
1120 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1121  EGREP=$ac_cv_prog_egrep
1122
1123 test -z "$EGREP" && { { echo "$as_me:1123: error: No egrep program found" >&5
1124 echo "$as_me: error: No egrep program found" >&2;}
1125    { (exit 1); exit 1; }; }
1126
1127 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1128 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1129 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1130 cf_cv_abi_version=${NCURSES_MAJOR}
1131 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1132 cf_cv_timestamp=`date`
1133 echo "$as_me:1133: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1134 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1135
1136 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1137
1138 # Check whether --with-rel-version or --without-rel-version was given.
1139 if test "${with_rel_version+set}" = set; then
1140   withval="$with_rel_version"
1141   { echo "$as_me:1141: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1142 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1143  cf_cv_rel_version=$withval
1144 fi;
1145
1146  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1147  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1148
1149 if test -n "$NCURSES_MAJOR" ; then
1150   case $NCURSES_MAJOR in #(vi
1151   [0-9]*) #(vi
1152         ;;
1153   *)
1154         { { echo "$as_me:1154: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1155 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1156    { (exit 1); exit 1; }; }
1157         ;;
1158   esac
1159 else
1160   { { echo "$as_me:1160: error: Release major-version value is empty" >&5
1161 echo "$as_me: error: Release major-version value is empty" >&2;}
1162    { (exit 1); exit 1; }; }
1163 fi
1164
1165 if test -n "$NCURSES_MINOR" ; then
1166   case $NCURSES_MINOR in #(vi
1167   [0-9]*) #(vi
1168         ;;
1169   *)
1170         { { echo "$as_me:1170: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1171 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1172    { (exit 1); exit 1; }; }
1173         ;;
1174   esac
1175 else
1176   { { echo "$as_me:1176: error: Release minor-version value is empty" >&5
1177 echo "$as_me: error: Release minor-version value is empty" >&2;}
1178    { (exit 1); exit 1; }; }
1179 fi
1180
1181 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1182
1183 # Check whether --with-abi-version or --without-abi-version was given.
1184 if test "${with_abi_version+set}" = set; then
1185   withval="$with_abi_version"
1186   { echo "$as_me:1186: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1187 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1188  cf_cv_abi_version=$withval
1189 fi;
1190
1191 if test -n "$cf_cv_abi_version" ; then
1192   case $cf_cv_abi_version in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: ABI version is not a number: $cf_cv_abi_version" >&5
1197 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: ABI version value is empty" >&5
1203 echo "$as_me: error: ABI version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 ac_aux_dir=
1208 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1209   if test -f $ac_dir/install-sh; then
1210     ac_aux_dir=$ac_dir
1211     ac_install_sh="$ac_aux_dir/install-sh -c"
1212     break
1213   elif test -f $ac_dir/install.sh; then
1214     ac_aux_dir=$ac_dir
1215     ac_install_sh="$ac_aux_dir/install.sh -c"
1216     break
1217   elif test -f $ac_dir/shtool; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/shtool install -c"
1220     break
1221   fi
1222 done
1223 if test -z "$ac_aux_dir"; then
1224   { { echo "$as_me:1224: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1225 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1229 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1230 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1231
1232 # Make sure we can run config.sub.
1233 $ac_config_sub sun4 >/dev/null 2>&1 ||
1234   { { echo "$as_me:1234: error: cannot run $ac_config_sub" >&5
1235 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1236    { (exit 1); exit 1; }; }
1237
1238 echo "$as_me:1238: checking build system type" >&5
1239 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1240 if test "${ac_cv_build+set}" = set; then
1241   echo $ECHO_N "(cached) $ECHO_C" >&6
1242 else
1243   ac_cv_build_alias=$build_alias
1244 test -z "$ac_cv_build_alias" &&
1245   ac_cv_build_alias=`$ac_config_guess`
1246 test -z "$ac_cv_build_alias" &&
1247   { { echo "$as_me:1247: error: cannot guess build type; you must specify one" >&5
1248 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1249    { (exit 1); exit 1; }; }
1250 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1251   { { echo "$as_me:1251: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1252 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1253    { (exit 1); exit 1; }; }
1254
1255 fi
1256 echo "$as_me:1256: result: $ac_cv_build" >&5
1257 echo "${ECHO_T}$ac_cv_build" >&6
1258 build=$ac_cv_build
1259 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1260 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1261 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1262
1263 echo "$as_me:1263: checking host system type" >&5
1264 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1265 if test "${ac_cv_host+set}" = set; then
1266   echo $ECHO_N "(cached) $ECHO_C" >&6
1267 else
1268   ac_cv_host_alias=$host_alias
1269 test -z "$ac_cv_host_alias" &&
1270   ac_cv_host_alias=$ac_cv_build_alias
1271 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1272   { { echo "$as_me:1272: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1273 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1274    { (exit 1); exit 1; }; }
1275
1276 fi
1277 echo "$as_me:1277: result: $ac_cv_host" >&5
1278 echo "${ECHO_T}$ac_cv_host" >&6
1279 host=$ac_cv_host
1280 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1281 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1282 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1283
1284 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1285         echo "$as_me:1285: checking target system type" >&5
1286 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1287 if test "${ac_cv_target+set}" = set; then
1288   echo $ECHO_N "(cached) $ECHO_C" >&6
1289 else
1290   ac_cv_target_alias=$target_alias
1291 test "x$ac_cv_target_alias" = "x" &&
1292   ac_cv_target_alias=$ac_cv_host_alias
1293 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1294   { { echo "$as_me:1294: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1295 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1296    { (exit 1); exit 1; }; }
1297
1298 fi
1299 echo "$as_me:1299: result: $ac_cv_target" >&5
1300 echo "${ECHO_T}$ac_cv_target" >&6
1301 target=$ac_cv_target
1302 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1303 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1304 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1305
1306 # The aliases save the names the user supplied, while $host etc.
1307 # will get canonicalized.
1308 test -n "$target_alias" &&
1309   test "$program_prefix$program_suffix$program_transform_name" = \
1310     NONENONEs,x,x, &&
1311   program_prefix=${target_alias}-
1312         system_name="$host_os"
1313 else
1314         system_name="`(uname -s -r) 2>/dev/null`"
1315         if test -z "$system_name" ; then
1316                 system_name="`(hostname) 2>/dev/null`"
1317         fi
1318 fi
1319 test -n "$system_name" && cat >>confdefs.h <<EOF
1320 #define SYSTEM_NAME "$system_name"
1321 EOF
1322
1323 if test "${cf_cv_system_name+set}" = set; then
1324   echo $ECHO_N "(cached) $ECHO_C" >&6
1325 else
1326   cf_cv_system_name="$system_name"
1327 fi
1328
1329 test -z "$system_name" && system_name="$cf_cv_system_name"
1330 test -n "$cf_cv_system_name" && echo "$as_me:1330: result: Configuring for $cf_cv_system_name" >&5
1331 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1332
1333 if test ".$system_name" != ".$cf_cv_system_name" ; then
1334         echo "$as_me:1334: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1335 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1336         { { echo "$as_me:1336: error: \"Please remove config.cache and try again.\"" >&5
1337 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1338    { (exit 1); exit 1; }; }
1339 fi
1340
1341 # Check whether --with-system-type or --without-system-type was given.
1342 if test "${with_system_type+set}" = set; then
1343   withval="$with_system_type"
1344   { echo "$as_me:1344: WARNING: overriding system type to $withval" >&5
1345 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1346  cf_cv_system_name=$withval
1347 fi;
1348
1349 ###     Save the given $CFLAGS to allow user-override.
1350 cf_user_CFLAGS="$CFLAGS"
1351
1352 ###     Default install-location
1353
1354 echo "$as_me:1354: checking for prefix" >&5
1355 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1356 if test "x$prefix" = "xNONE" ; then
1357         case "$cf_cv_system_name" in
1358                 # non-vendor systems don't have a conflict
1359         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1360                 prefix=/usr
1361                 ;;
1362         *)      prefix=$ac_default_prefix
1363                 ;;
1364         esac
1365 fi
1366 echo "$as_me:1366: result: $prefix" >&5
1367 echo "${ECHO_T}$prefix" >&6
1368
1369 if test "x$prefix" = "xNONE" ; then
1370 echo "$as_me:1370: checking for default include-directory" >&5
1371 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1372 test -n "$verbose" && echo 1>&6
1373 for cf_symbol in \
1374         $includedir \
1375         $includedir/ncurses \
1376         $prefix/include \
1377         $prefix/include/ncurses \
1378         /usr/local/include \
1379         /usr/local/include/ncurses \
1380         /usr/include \
1381         /usr/include/ncurses
1382 do
1383         cf_dir=`eval echo $cf_symbol`
1384         if test -f $cf_dir/curses.h ; then
1385         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1386                 includedir="$cf_symbol"
1387                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1388                 break
1389         fi
1390         fi
1391         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1392 done
1393 echo "$as_me:1393: result: $includedir" >&5
1394 echo "${ECHO_T}$includedir" >&6
1395 fi
1396
1397 ###     Checks for programs.
1398 ac_ext=c
1399 ac_cpp='$CPP $CPPFLAGS'
1400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1403 ac_main_return=return
1404 if test -n "$ac_tool_prefix"; then
1405   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1406 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1407 echo "$as_me:1407: checking for $ac_word" >&5
1408 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1409 if test "${ac_cv_prog_CC+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   if test -n "$CC"; then
1413   ac_cv_prog_CC="$CC" # Let the user override the test.
1414 else
1415   ac_save_IFS=$IFS; IFS=$ac_path_separator
1416 ac_dummy="$PATH"
1417 for ac_dir in $ac_dummy; do
1418   IFS=$ac_save_IFS
1419   test -z "$ac_dir" && ac_dir=.
1420   $as_executable_p "$ac_dir/$ac_word" || continue
1421 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1422 echo "$as_me:1422: found $ac_dir/$ac_word" >&5
1423 break
1424 done
1425
1426 fi
1427 fi
1428 CC=$ac_cv_prog_CC
1429 if test -n "$CC"; then
1430   echo "$as_me:1430: result: $CC" >&5
1431 echo "${ECHO_T}$CC" >&6
1432 else
1433   echo "$as_me:1433: result: no" >&5
1434 echo "${ECHO_T}no" >&6
1435 fi
1436
1437 fi
1438 if test -z "$ac_cv_prog_CC"; then
1439   ac_ct_CC=$CC
1440   # Extract the first word of "gcc", so it can be a program name with args.
1441 set dummy gcc; ac_word=$2
1442 echo "$as_me:1442: checking for $ac_word" >&5
1443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1444 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1445   echo $ECHO_N "(cached) $ECHO_C" >&6
1446 else
1447   if test -n "$ac_ct_CC"; then
1448   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1449 else
1450   ac_save_IFS=$IFS; IFS=$ac_path_separator
1451 ac_dummy="$PATH"
1452 for ac_dir in $ac_dummy; do
1453   IFS=$ac_save_IFS
1454   test -z "$ac_dir" && ac_dir=.
1455   $as_executable_p "$ac_dir/$ac_word" || continue
1456 ac_cv_prog_ac_ct_CC="gcc"
1457 echo "$as_me:1457: found $ac_dir/$ac_word" >&5
1458 break
1459 done
1460
1461 fi
1462 fi
1463 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1464 if test -n "$ac_ct_CC"; then
1465   echo "$as_me:1465: result: $ac_ct_CC" >&5
1466 echo "${ECHO_T}$ac_ct_CC" >&6
1467 else
1468   echo "$as_me:1468: result: no" >&5
1469 echo "${ECHO_T}no" >&6
1470 fi
1471
1472   CC=$ac_ct_CC
1473 else
1474   CC="$ac_cv_prog_CC"
1475 fi
1476
1477 if test -z "$CC"; then
1478   if test -n "$ac_tool_prefix"; then
1479   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1480 set dummy ${ac_tool_prefix}cc; ac_word=$2
1481 echo "$as_me:1481: checking for $ac_word" >&5
1482 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1483 if test "${ac_cv_prog_CC+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   if test -n "$CC"; then
1487   ac_cv_prog_CC="$CC" # Let the user override the test.
1488 else
1489   ac_save_IFS=$IFS; IFS=$ac_path_separator
1490 ac_dummy="$PATH"
1491 for ac_dir in $ac_dummy; do
1492   IFS=$ac_save_IFS
1493   test -z "$ac_dir" && ac_dir=.
1494   $as_executable_p "$ac_dir/$ac_word" || continue
1495 ac_cv_prog_CC="${ac_tool_prefix}cc"
1496 echo "$as_me:1496: found $ac_dir/$ac_word" >&5
1497 break
1498 done
1499
1500 fi
1501 fi
1502 CC=$ac_cv_prog_CC
1503 if test -n "$CC"; then
1504   echo "$as_me:1504: result: $CC" >&5
1505 echo "${ECHO_T}$CC" >&6
1506 else
1507   echo "$as_me:1507: result: no" >&5
1508 echo "${ECHO_T}no" >&6
1509 fi
1510
1511 fi
1512 if test -z "$ac_cv_prog_CC"; then
1513   ac_ct_CC=$CC
1514   # Extract the first word of "cc", so it can be a program name with args.
1515 set dummy cc; ac_word=$2
1516 echo "$as_me:1516: checking for $ac_word" >&5
1517 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1518 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1519   echo $ECHO_N "(cached) $ECHO_C" >&6
1520 else
1521   if test -n "$ac_ct_CC"; then
1522   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1523 else
1524   ac_save_IFS=$IFS; IFS=$ac_path_separator
1525 ac_dummy="$PATH"
1526 for ac_dir in $ac_dummy; do
1527   IFS=$ac_save_IFS
1528   test -z "$ac_dir" && ac_dir=.
1529   $as_executable_p "$ac_dir/$ac_word" || continue
1530 ac_cv_prog_ac_ct_CC="cc"
1531 echo "$as_me:1531: found $ac_dir/$ac_word" >&5
1532 break
1533 done
1534
1535 fi
1536 fi
1537 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1538 if test -n "$ac_ct_CC"; then
1539   echo "$as_me:1539: result: $ac_ct_CC" >&5
1540 echo "${ECHO_T}$ac_ct_CC" >&6
1541 else
1542   echo "$as_me:1542: result: no" >&5
1543 echo "${ECHO_T}no" >&6
1544 fi
1545
1546   CC=$ac_ct_CC
1547 else
1548   CC="$ac_cv_prog_CC"
1549 fi
1550
1551 fi
1552 if test -z "$CC"; then
1553   # Extract the first word of "cc", so it can be a program name with args.
1554 set dummy cc; ac_word=$2
1555 echo "$as_me:1555: checking for $ac_word" >&5
1556 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1557 if test "${ac_cv_prog_CC+set}" = set; then
1558   echo $ECHO_N "(cached) $ECHO_C" >&6
1559 else
1560   if test -n "$CC"; then
1561   ac_cv_prog_CC="$CC" # Let the user override the test.
1562 else
1563   ac_prog_rejected=no
1564   ac_save_IFS=$IFS; IFS=$ac_path_separator
1565 ac_dummy="$PATH"
1566 for ac_dir in $ac_dummy; do
1567   IFS=$ac_save_IFS
1568   test -z "$ac_dir" && ac_dir=.
1569   $as_executable_p "$ac_dir/$ac_word" || continue
1570 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1571   ac_prog_rejected=yes
1572   continue
1573 fi
1574 ac_cv_prog_CC="cc"
1575 echo "$as_me:1575: found $ac_dir/$ac_word" >&5
1576 break
1577 done
1578
1579 if test $ac_prog_rejected = yes; then
1580   # We found a bogon in the path, so make sure we never use it.
1581   set dummy $ac_cv_prog_CC
1582   shift
1583   if test $# != 0; then
1584     # We chose a different compiler from the bogus one.
1585     # However, it has the same basename, so the bogon will be chosen
1586     # first if we set CC to just the basename; use the full file name.
1587     shift
1588     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1589     shift
1590     ac_cv_prog_CC="$@"
1591   fi
1592 fi
1593 fi
1594 fi
1595 CC=$ac_cv_prog_CC
1596 if test -n "$CC"; then
1597   echo "$as_me:1597: result: $CC" >&5
1598 echo "${ECHO_T}$CC" >&6
1599 else
1600   echo "$as_me:1600: result: no" >&5
1601 echo "${ECHO_T}no" >&6
1602 fi
1603
1604 fi
1605 if test -z "$CC"; then
1606   if test -n "$ac_tool_prefix"; then
1607   for ac_prog in cl
1608   do
1609     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1611 echo "$as_me:1611: checking for $ac_word" >&5
1612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1613 if test "${ac_cv_prog_CC+set}" = set; then
1614   echo $ECHO_N "(cached) $ECHO_C" >&6
1615 else
1616   if test -n "$CC"; then
1617   ac_cv_prog_CC="$CC" # Let the user override the test.
1618 else
1619   ac_save_IFS=$IFS; IFS=$ac_path_separator
1620 ac_dummy="$PATH"
1621 for ac_dir in $ac_dummy; do
1622   IFS=$ac_save_IFS
1623   test -z "$ac_dir" && ac_dir=.
1624   $as_executable_p "$ac_dir/$ac_word" || continue
1625 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1626 echo "$as_me:1626: found $ac_dir/$ac_word" >&5
1627 break
1628 done
1629
1630 fi
1631 fi
1632 CC=$ac_cv_prog_CC
1633 if test -n "$CC"; then
1634   echo "$as_me:1634: result: $CC" >&5
1635 echo "${ECHO_T}$CC" >&6
1636 else
1637   echo "$as_me:1637: result: no" >&5
1638 echo "${ECHO_T}no" >&6
1639 fi
1640
1641     test -n "$CC" && break
1642   done
1643 fi
1644 if test -z "$CC"; then
1645   ac_ct_CC=$CC
1646   for ac_prog in cl
1647 do
1648   # Extract the first word of "$ac_prog", so it can be a program name with args.
1649 set dummy $ac_prog; ac_word=$2
1650 echo "$as_me:1650: checking for $ac_word" >&5
1651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1652 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1653   echo $ECHO_N "(cached) $ECHO_C" >&6
1654 else
1655   if test -n "$ac_ct_CC"; then
1656   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1657 else
1658   ac_save_IFS=$IFS; IFS=$ac_path_separator
1659 ac_dummy="$PATH"
1660 for ac_dir in $ac_dummy; do
1661   IFS=$ac_save_IFS
1662   test -z "$ac_dir" && ac_dir=.
1663   $as_executable_p "$ac_dir/$ac_word" || continue
1664 ac_cv_prog_ac_ct_CC="$ac_prog"
1665 echo "$as_me:1665: found $ac_dir/$ac_word" >&5
1666 break
1667 done
1668
1669 fi
1670 fi
1671 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1672 if test -n "$ac_ct_CC"; then
1673   echo "$as_me:1673: result: $ac_ct_CC" >&5
1674 echo "${ECHO_T}$ac_ct_CC" >&6
1675 else
1676   echo "$as_me:1676: result: no" >&5
1677 echo "${ECHO_T}no" >&6
1678 fi
1679
1680   test -n "$ac_ct_CC" && break
1681 done
1682
1683   CC=$ac_ct_CC
1684 fi
1685
1686 fi
1687
1688 test -z "$CC" && { { echo "$as_me:1688: error: no acceptable cc found in \$PATH" >&5
1689 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1690    { (exit 1); exit 1; }; }
1691
1692 # Provide some information about the compiler.
1693 echo "$as_me:1693:" \
1694      "checking for C compiler version" >&5
1695 ac_compiler=`set X $ac_compile; echo $2`
1696 { (eval echo "$as_me:1696: \"$ac_compiler --version </dev/null >&5\"") >&5
1697   (eval $ac_compiler --version </dev/null >&5) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }
1701 { (eval echo "$as_me:1701: \"$ac_compiler -v </dev/null >&5\"") >&5
1702   (eval $ac_compiler -v </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706 { (eval echo "$as_me:1706: \"$ac_compiler -V </dev/null >&5\"") >&5
1707   (eval $ac_compiler -V </dev/null >&5) 2>&5
1708   ac_status=$?
1709   echo "$as_me:1709: \$? = $ac_status" >&5
1710   (exit $ac_status); }
1711
1712 cat >conftest.$ac_ext <<_ACEOF
1713 #line 1713 "configure"
1714 #include "confdefs.h"
1715
1716 int
1717 main ()
1718 {
1719
1720   ;
1721   return 0;
1722 }
1723 _ACEOF
1724 ac_clean_files_save=$ac_clean_files
1725 ac_clean_files="$ac_clean_files a.out a.exe"
1726 # Try to create an executable without -o first, disregard a.out.
1727 # It will help us diagnose broken compilers, and finding out an intuition
1728 # of exeext.
1729 echo "$as_me:1729: checking for C compiler default output" >&5
1730 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1731 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1732 if { (eval echo "$as_me:1732: \"$ac_link_default\"") >&5
1733   (eval $ac_link_default) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); }; then
1737   # Find the output, starting from the most likely.  This scheme is
1738 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1739 # resort.
1740 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1741                 ls a.out conftest 2>/dev/null;
1742                 ls a.* conftest.* 2>/dev/null`; do
1743   case $ac_file in
1744     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1745     a.out ) # We found the default executable, but exeext='' is most
1746             # certainly right.
1747             break;;
1748     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1749           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1750           export ac_cv_exeext
1751           break;;
1752     * ) break;;
1753   esac
1754 done
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 { { echo "$as_me:1758: error: C compiler cannot create executables" >&5
1759 echo "$as_me: error: C compiler cannot create executables" >&2;}
1760    { (exit 77); exit 77; }; }
1761 fi
1762
1763 ac_exeext=$ac_cv_exeext
1764 echo "$as_me:1764: result: $ac_file" >&5
1765 echo "${ECHO_T}$ac_file" >&6
1766
1767 # Check the compiler produces executables we can run.  If not, either
1768 # the compiler is broken, or we cross compile.
1769 echo "$as_me:1769: checking whether the C compiler works" >&5
1770 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1771 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1772 # If not cross compiling, check that we can run a simple program.
1773 if test "$cross_compiling" != yes; then
1774   if { ac_try='./$ac_file'
1775   { (eval echo "$as_me:1775: \"$ac_try\"") >&5
1776   (eval $ac_try) 2>&5
1777   ac_status=$?
1778   echo "$as_me:1778: \$? = $ac_status" >&5
1779   (exit $ac_status); }; }; then
1780     cross_compiling=no
1781   else
1782     if test "$cross_compiling" = maybe; then
1783         cross_compiling=yes
1784     else
1785         { { echo "$as_me:1785: error: cannot run C compiled programs.
1786 If you meant to cross compile, use \`--host'." >&5
1787 echo "$as_me: error: cannot run C compiled programs.
1788 If you meant to cross compile, use \`--host'." >&2;}
1789    { (exit 1); exit 1; }; }
1790     fi
1791   fi
1792 fi
1793 echo "$as_me:1793: result: yes" >&5
1794 echo "${ECHO_T}yes" >&6
1795
1796 rm -f a.out a.exe conftest$ac_cv_exeext
1797 ac_clean_files=$ac_clean_files_save
1798 # Check the compiler produces executables we can run.  If not, either
1799 # the compiler is broken, or we cross compile.
1800 echo "$as_me:1800: checking whether we are cross compiling" >&5
1801 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1802 echo "$as_me:1802: result: $cross_compiling" >&5
1803 echo "${ECHO_T}$cross_compiling" >&6
1804
1805 echo "$as_me:1805: checking for executable suffix" >&5
1806 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1807 if { (eval echo "$as_me:1807: \"$ac_link\"") >&5
1808   (eval $ac_link) 2>&5
1809   ac_status=$?
1810   echo "$as_me:1810: \$? = $ac_status" >&5
1811   (exit $ac_status); }; then
1812   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1813 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1814 # work properly (i.e., refer to `conftest.exe'), while it won't with
1815 # `rm'.
1816 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1817   case $ac_file in
1818     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1819     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1820           export ac_cv_exeext
1821           break;;
1822     * ) break;;
1823   esac
1824 done
1825 else
1826   { { echo "$as_me:1826: error: cannot compute EXEEXT: cannot compile and link" >&5
1827 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1828    { (exit 1); exit 1; }; }
1829 fi
1830
1831 rm -f conftest$ac_cv_exeext
1832 echo "$as_me:1832: result: $ac_cv_exeext" >&5
1833 echo "${ECHO_T}$ac_cv_exeext" >&6
1834
1835 rm -f conftest.$ac_ext
1836 EXEEXT=$ac_cv_exeext
1837 ac_exeext=$EXEEXT
1838 echo "$as_me:1838: checking for object suffix" >&5
1839 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1840 if test "${ac_cv_objext+set}" = set; then
1841   echo $ECHO_N "(cached) $ECHO_C" >&6
1842 else
1843   cat >conftest.$ac_ext <<_ACEOF
1844 #line 1844 "configure"
1845 #include "confdefs.h"
1846
1847 int
1848 main ()
1849 {
1850
1851   ;
1852   return 0;
1853 }
1854 _ACEOF
1855 rm -f conftest.o conftest.obj
1856 if { (eval echo "$as_me:1856: \"$ac_compile\"") >&5
1857   (eval $ac_compile) 2>&5
1858   ac_status=$?
1859   echo "$as_me:1859: \$? = $ac_status" >&5
1860   (exit $ac_status); }; then
1861   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1862   case $ac_file in
1863     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1864     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1865        break;;
1866   esac
1867 done
1868 else
1869   echo "$as_me: failed program was:" >&5
1870 cat conftest.$ac_ext >&5
1871 { { echo "$as_me:1871: error: cannot compute OBJEXT: cannot compile" >&5
1872 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1873    { (exit 1); exit 1; }; }
1874 fi
1875
1876 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1877 fi
1878 echo "$as_me:1878: result: $ac_cv_objext" >&5
1879 echo "${ECHO_T}$ac_cv_objext" >&6
1880 OBJEXT=$ac_cv_objext
1881 ac_objext=$OBJEXT
1882 echo "$as_me:1882: checking whether we are using the GNU C compiler" >&5
1883 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1884 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1885   echo $ECHO_N "(cached) $ECHO_C" >&6
1886 else
1887   cat >conftest.$ac_ext <<_ACEOF
1888 #line 1888 "configure"
1889 #include "confdefs.h"
1890
1891 int
1892 main ()
1893 {
1894 #ifndef __GNUC__
1895        choke me
1896 #endif
1897
1898   ;
1899   return 0;
1900 }
1901 _ACEOF
1902 rm -f conftest.$ac_objext
1903 if { (eval echo "$as_me:1903: \"$ac_compile\"") >&5
1904   (eval $ac_compile) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); } &&
1908          { ac_try='test -s conftest.$ac_objext'
1909   { (eval echo "$as_me:1909: \"$ac_try\"") >&5
1910   (eval $ac_try) 2>&5
1911   ac_status=$?
1912   echo "$as_me:1912: \$? = $ac_status" >&5
1913   (exit $ac_status); }; }; then
1914   ac_compiler_gnu=yes
1915 else
1916   echo "$as_me: failed program was:" >&5
1917 cat conftest.$ac_ext >&5
1918 ac_compiler_gnu=no
1919 fi
1920 rm -f conftest.$ac_objext conftest.$ac_ext
1921 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1922
1923 fi
1924 echo "$as_me:1924: result: $ac_cv_c_compiler_gnu" >&5
1925 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1926 GCC=`test $ac_compiler_gnu = yes && echo yes`
1927 ac_test_CFLAGS=${CFLAGS+set}
1928 ac_save_CFLAGS=$CFLAGS
1929 CFLAGS="-g"
1930 echo "$as_me:1930: checking whether $CC accepts -g" >&5
1931 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1932 if test "${ac_cv_prog_cc_g+set}" = set; then
1933   echo $ECHO_N "(cached) $ECHO_C" >&6
1934 else
1935   cat >conftest.$ac_ext <<_ACEOF
1936 #line 1936 "configure"
1937 #include "confdefs.h"
1938
1939 int
1940 main ()
1941 {
1942
1943   ;
1944   return 0;
1945 }
1946 _ACEOF
1947 rm -f conftest.$ac_objext
1948 if { (eval echo "$as_me:1948: \"$ac_compile\"") >&5
1949   (eval $ac_compile) 2>&5
1950   ac_status=$?
1951   echo "$as_me:1951: \$? = $ac_status" >&5
1952   (exit $ac_status); } &&
1953          { ac_try='test -s conftest.$ac_objext'
1954   { (eval echo "$as_me:1954: \"$ac_try\"") >&5
1955   (eval $ac_try) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); }; }; then
1959   ac_cv_prog_cc_g=yes
1960 else
1961   echo "$as_me: failed program was:" >&5
1962 cat conftest.$ac_ext >&5
1963 ac_cv_prog_cc_g=no
1964 fi
1965 rm -f conftest.$ac_objext conftest.$ac_ext
1966 fi
1967 echo "$as_me:1967: result: $ac_cv_prog_cc_g" >&5
1968 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1969 if test "$ac_test_CFLAGS" = set; then
1970   CFLAGS=$ac_save_CFLAGS
1971 elif test $ac_cv_prog_cc_g = yes; then
1972   if test "$GCC" = yes; then
1973     CFLAGS="-g -O2"
1974   else
1975     CFLAGS="-g"
1976   fi
1977 else
1978   if test "$GCC" = yes; then
1979     CFLAGS="-O2"
1980   else
1981     CFLAGS=
1982   fi
1983 fi
1984 # Some people use a C++ compiler to compile C.  Since we use `exit',
1985 # in C++ we need to declare it.  In case someone uses the same compiler
1986 # for both compiling C and C++ we need to have the C++ compiler decide
1987 # the declaration of exit, since it's the most demanding environment.
1988 cat >conftest.$ac_ext <<_ACEOF
1989 #ifndef __cplusplus
1990   choke me
1991 #endif
1992 _ACEOF
1993 rm -f conftest.$ac_objext
1994 if { (eval echo "$as_me:1994: \"$ac_compile\"") >&5
1995   (eval $ac_compile) 2>&5
1996   ac_status=$?
1997   echo "$as_me:1997: \$? = $ac_status" >&5
1998   (exit $ac_status); } &&
1999          { ac_try='test -s conftest.$ac_objext'
2000   { (eval echo "$as_me:2000: \"$ac_try\"") >&5
2001   (eval $ac_try) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); }; }; then
2005   for ac_declaration in \
2006    ''\
2007    '#include <stdlib.h>' \
2008    'extern "C" void std::exit (int) throw (); using std::exit;' \
2009    'extern "C" void std::exit (int); using std::exit;' \
2010    'extern "C" void exit (int) throw ();' \
2011    'extern "C" void exit (int);' \
2012    'void exit (int);'
2013 do
2014   cat >conftest.$ac_ext <<_ACEOF
2015 #line 2015 "configure"
2016 #include "confdefs.h"
2017 #include <stdlib.h>
2018 $ac_declaration
2019 int
2020 main ()
2021 {
2022 exit (42);
2023   ;
2024   return 0;
2025 }
2026 _ACEOF
2027 rm -f conftest.$ac_objext
2028 if { (eval echo "$as_me:2028: \"$ac_compile\"") >&5
2029   (eval $ac_compile) 2>&5
2030   ac_status=$?
2031   echo "$as_me:2031: \$? = $ac_status" >&5
2032   (exit $ac_status); } &&
2033          { ac_try='test -s conftest.$ac_objext'
2034   { (eval echo "$as_me:2034: \"$ac_try\"") >&5
2035   (eval $ac_try) 2>&5
2036   ac_status=$?
2037   echo "$as_me:2037: \$? = $ac_status" >&5
2038   (exit $ac_status); }; }; then
2039   :
2040 else
2041   echo "$as_me: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 continue
2044 fi
2045 rm -f conftest.$ac_objext conftest.$ac_ext
2046   cat >conftest.$ac_ext <<_ACEOF
2047 #line 2047 "configure"
2048 #include "confdefs.h"
2049 $ac_declaration
2050 int
2051 main ()
2052 {
2053 exit (42);
2054   ;
2055   return 0;
2056 }
2057 _ACEOF
2058 rm -f conftest.$ac_objext
2059 if { (eval echo "$as_me:2059: \"$ac_compile\"") >&5
2060   (eval $ac_compile) 2>&5
2061   ac_status=$?
2062   echo "$as_me:2062: \$? = $ac_status" >&5
2063   (exit $ac_status); } &&
2064          { ac_try='test -s conftest.$ac_objext'
2065   { (eval echo "$as_me:2065: \"$ac_try\"") >&5
2066   (eval $ac_try) 2>&5
2067   ac_status=$?
2068   echo "$as_me:2068: \$? = $ac_status" >&5
2069   (exit $ac_status); }; }; then
2070   break
2071 else
2072   echo "$as_me: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2074 fi
2075 rm -f conftest.$ac_objext conftest.$ac_ext
2076 done
2077 rm -f conftest*
2078 if test -n "$ac_declaration"; then
2079   echo '#ifdef __cplusplus' >>confdefs.h
2080   echo $ac_declaration      >>confdefs.h
2081   echo '#endif'             >>confdefs.h
2082 fi
2083
2084 else
2085   echo "$as_me: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 fi
2088 rm -f conftest.$ac_objext conftest.$ac_ext
2089 ac_ext=c
2090 ac_cpp='$CPP $CPPFLAGS'
2091 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2092 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2093 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2094 ac_main_return=return
2095
2096 GCC_VERSION=none
2097 if test "$GCC" = yes ; then
2098         echo "$as_me:2098: checking version of $CC" >&5
2099 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2100         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2101         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2102         echo "$as_me:2102: result: $GCC_VERSION" >&5
2103 echo "${ECHO_T}$GCC_VERSION" >&6
2104 fi
2105
2106 ac_ext=c
2107 ac_cpp='$CPP $CPPFLAGS'
2108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2111 ac_main_return=return
2112 echo "$as_me:2112: checking how to run the C preprocessor" >&5
2113 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2114 # On Suns, sometimes $CPP names a directory.
2115 if test -n "$CPP" && test -d "$CPP"; then
2116   CPP=
2117 fi
2118 if test -z "$CPP"; then
2119   if test "${ac_cv_prog_CPP+set}" = set; then
2120   echo $ECHO_N "(cached) $ECHO_C" >&6
2121 else
2122       # Double quotes because CPP needs to be expanded
2123     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2124     do
2125       ac_preproc_ok=false
2126 for ac_c_preproc_warn_flag in '' yes
2127 do
2128   # Use a header file that comes with gcc, so configuring glibc
2129   # with a fresh cross-compiler works.
2130   # On the NeXT, cc -E runs the code through the compiler's parser,
2131   # not just through cpp. "Syntax error" is here to catch this case.
2132   cat >conftest.$ac_ext <<_ACEOF
2133 #line 2133 "configure"
2134 #include "confdefs.h"
2135 #include <assert.h>
2136                      Syntax error
2137 _ACEOF
2138 if { (eval echo "$as_me:2138: \"$ac_cpp conftest.$ac_ext\"") >&5
2139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2140   ac_status=$?
2141   egrep -v '^ *\+' conftest.er1 >conftest.err
2142   rm -f conftest.er1
2143   cat conftest.err >&5
2144   echo "$as_me:2144: \$? = $ac_status" >&5
2145   (exit $ac_status); } >/dev/null; then
2146   if test -s conftest.err; then
2147     ac_cpp_err=$ac_c_preproc_warn_flag
2148   else
2149     ac_cpp_err=
2150   fi
2151 else
2152   ac_cpp_err=yes
2153 fi
2154 if test -z "$ac_cpp_err"; then
2155   :
2156 else
2157   echo "$as_me: failed program was:" >&5
2158   cat conftest.$ac_ext >&5
2159   # Broken: fails on valid input.
2160 continue
2161 fi
2162 rm -f conftest.err conftest.$ac_ext
2163
2164   # OK, works on sane cases.  Now check whether non-existent headers
2165   # can be detected and how.
2166   cat >conftest.$ac_ext <<_ACEOF
2167 #line 2167 "configure"
2168 #include "confdefs.h"
2169 #include <ac_nonexistent.h>
2170 _ACEOF
2171 if { (eval echo "$as_me:2171: \"$ac_cpp conftest.$ac_ext\"") >&5
2172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2173   ac_status=$?
2174   egrep -v '^ *\+' conftest.er1 >conftest.err
2175   rm -f conftest.er1
2176   cat conftest.err >&5
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit $ac_status); } >/dev/null; then
2179   if test -s conftest.err; then
2180     ac_cpp_err=$ac_c_preproc_warn_flag
2181   else
2182     ac_cpp_err=
2183   fi
2184 else
2185   ac_cpp_err=yes
2186 fi
2187 if test -z "$ac_cpp_err"; then
2188   # Broken: success on invalid input.
2189 continue
2190 else
2191   echo "$as_me: failed program was:" >&5
2192   cat conftest.$ac_ext >&5
2193   # Passes both tests.
2194 ac_preproc_ok=:
2195 break
2196 fi
2197 rm -f conftest.err conftest.$ac_ext
2198
2199 done
2200 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2201 rm -f conftest.err conftest.$ac_ext
2202 if $ac_preproc_ok; then
2203   break
2204 fi
2205
2206     done
2207     ac_cv_prog_CPP=$CPP
2208
2209 fi
2210   CPP=$ac_cv_prog_CPP
2211 else
2212   ac_cv_prog_CPP=$CPP
2213 fi
2214 echo "$as_me:2214: result: $CPP" >&5
2215 echo "${ECHO_T}$CPP" >&6
2216 ac_preproc_ok=false
2217 for ac_c_preproc_warn_flag in '' yes
2218 do
2219   # Use a header file that comes with gcc, so configuring glibc
2220   # with a fresh cross-compiler works.
2221   # On the NeXT, cc -E runs the code through the compiler's parser,
2222   # not just through cpp. "Syntax error" is here to catch this case.
2223   cat >conftest.$ac_ext <<_ACEOF
2224 #line 2224 "configure"
2225 #include "confdefs.h"
2226 #include <assert.h>
2227                      Syntax error
2228 _ACEOF
2229 if { (eval echo "$as_me:2229: \"$ac_cpp conftest.$ac_ext\"") >&5
2230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2231   ac_status=$?
2232   egrep -v '^ *\+' conftest.er1 >conftest.err
2233   rm -f conftest.er1
2234   cat conftest.err >&5
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit $ac_status); } >/dev/null; then
2237   if test -s conftest.err; then
2238     ac_cpp_err=$ac_c_preproc_warn_flag
2239   else
2240     ac_cpp_err=
2241   fi
2242 else
2243   ac_cpp_err=yes
2244 fi
2245 if test -z "$ac_cpp_err"; then
2246   :
2247 else
2248   echo "$as_me: failed program was:" >&5
2249   cat conftest.$ac_ext >&5
2250   # Broken: fails on valid input.
2251 continue
2252 fi
2253 rm -f conftest.err conftest.$ac_ext
2254
2255   # OK, works on sane cases.  Now check whether non-existent headers
2256   # can be detected and how.
2257   cat >conftest.$ac_ext <<_ACEOF
2258 #line 2258 "configure"
2259 #include "confdefs.h"
2260 #include <ac_nonexistent.h>
2261 _ACEOF
2262 if { (eval echo "$as_me:2262: \"$ac_cpp conftest.$ac_ext\"") >&5
2263   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2264   ac_status=$?
2265   egrep -v '^ *\+' conftest.er1 >conftest.err
2266   rm -f conftest.er1
2267   cat conftest.err >&5
2268   echo "$as_me:2268: \$? = $ac_status" >&5
2269   (exit $ac_status); } >/dev/null; then
2270   if test -s conftest.err; then
2271     ac_cpp_err=$ac_c_preproc_warn_flag
2272   else
2273     ac_cpp_err=
2274   fi
2275 else
2276   ac_cpp_err=yes
2277 fi
2278 if test -z "$ac_cpp_err"; then
2279   # Broken: success on invalid input.
2280 continue
2281 else
2282   echo "$as_me: failed program was:" >&5
2283   cat conftest.$ac_ext >&5
2284   # Passes both tests.
2285 ac_preproc_ok=:
2286 break
2287 fi
2288 rm -f conftest.err conftest.$ac_ext
2289
2290 done
2291 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2292 rm -f conftest.err conftest.$ac_ext
2293 if $ac_preproc_ok; then
2294   :
2295 else
2296   { { echo "$as_me:2296: error: C preprocessor \"$CPP\" fails sanity check" >&5
2297 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2298    { (exit 1); exit 1; }; }
2299 fi
2300
2301 ac_ext=c
2302 ac_cpp='$CPP $CPPFLAGS'
2303 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2304 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2305 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2306 ac_main_return=return
2307
2308 if test $ac_cv_c_compiler_gnu = yes; then
2309     echo "$as_me:2309: checking whether $CC needs -traditional" >&5
2310 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2311 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2312   echo $ECHO_N "(cached) $ECHO_C" >&6
2313 else
2314     ac_pattern="Autoconf.*'x'"
2315   cat >conftest.$ac_ext <<_ACEOF
2316 #line 2316 "configure"
2317 #include "confdefs.h"
2318 #include <sgtty.h>
2319 int Autoconf = TIOCGETP;
2320 _ACEOF
2321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2322   egrep "$ac_pattern" >/dev/null 2>&1; then
2323   ac_cv_prog_gcc_traditional=yes
2324 else
2325   ac_cv_prog_gcc_traditional=no
2326 fi
2327 rm -f conftest*
2328
2329   if test $ac_cv_prog_gcc_traditional = no; then
2330     cat >conftest.$ac_ext <<_ACEOF
2331 #line 2331 "configure"
2332 #include "confdefs.h"
2333 #include <termio.h>
2334 int Autoconf = TCGETA;
2335 _ACEOF
2336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2337   egrep "$ac_pattern" >/dev/null 2>&1; then
2338   ac_cv_prog_gcc_traditional=yes
2339 fi
2340 rm -f conftest*
2341
2342   fi
2343 fi
2344 echo "$as_me:2344: result: $ac_cv_prog_gcc_traditional" >&5
2345 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2346   if test $ac_cv_prog_gcc_traditional = yes; then
2347     CC="$CC -traditional"
2348   fi
2349 fi
2350
2351 echo "$as_me:2351: checking whether $CC understands -c and -o together" >&5
2352 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2353 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2354   echo $ECHO_N "(cached) $ECHO_C" >&6
2355 else
2356
2357 cat > conftest.$ac_ext <<CF_EOF
2358 #include <stdio.h>
2359 int main()
2360 {
2361         ${cf_cv_main_return:-return}(0);
2362 }
2363 CF_EOF
2364 # We do the test twice because some compilers refuse to overwrite an
2365 # existing .o file with -o, though they will create one.
2366 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2367 if { (eval echo "$as_me:2367: \"$ac_try\"") >&5
2368   (eval $ac_try) 2>&5
2369   ac_status=$?
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); } &&
2372   test -f conftest2.$ac_objext && { (eval echo "$as_me:2372: \"$ac_try\"") >&5
2373   (eval $ac_try) 2>&5
2374   ac_status=$?
2375   echo "$as_me:2375: \$? = $ac_status" >&5
2376   (exit $ac_status); };
2377 then
2378   eval cf_cv_prog_CC_c_o=yes
2379 else
2380   eval cf_cv_prog_CC_c_o=no
2381 fi
2382 rm -f conftest*
2383
2384 fi
2385 if test $cf_cv_prog_CC_c_o = yes; then
2386   echo "$as_me:2386: result: yes" >&5
2387 echo "${ECHO_T}yes" >&6
2388 else
2389   echo "$as_me:2389: result: no" >&5
2390 echo "${ECHO_T}no" >&6
2391 fi
2392
2393 echo "$as_me:2393: checking for POSIXized ISC" >&5
2394 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2395 if test -d /etc/conf/kconfig.d &&
2396    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2397 then
2398   echo "$as_me:2398: result: yes" >&5
2399 echo "${ECHO_T}yes" >&6
2400   ISC=yes # If later tests want to check for ISC.
2401
2402 cat >>confdefs.h <<\EOF
2403 #define _POSIX_SOURCE 1
2404 EOF
2405
2406   if test "$GCC" = yes; then
2407     CC="$CC -posix"
2408   else
2409     CC="$CC -Xp"
2410   fi
2411 else
2412   echo "$as_me:2412: result: no" >&5
2413 echo "${ECHO_T}no" >&6
2414   ISC=
2415 fi
2416
2417 echo "$as_me:2417: checking for ${CC-cc} option to accept ANSI C" >&5
2418 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2419 if test "${cf_cv_ansi_cc+set}" = set; then
2420   echo $ECHO_N "(cached) $ECHO_C" >&6
2421 else
2422
2423 cf_cv_ansi_cc=no
2424 cf_save_CFLAGS="$CFLAGS"
2425 cf_save_CPPFLAGS="$CPPFLAGS"
2426 # Don't try gcc -ansi; that turns off useful extensions and
2427 # breaks some systems' header files.
2428 # AIX                   -qlanglvl=ansi
2429 # Ultrix and OSF/1      -std1
2430 # HP-UX                 -Aa -D_HPUX_SOURCE
2431 # SVR4                  -Xc
2432 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2433 for cf_arg in "-DCC_HAS_PROTOS" \
2434         "" \
2435         -qlanglvl=ansi \
2436         -std1 \
2437         -Ae \
2438         "-Aa -D_HPUX_SOURCE" \
2439         -Xc
2440 do
2441
2442 cf_fix_cppflags=no
2443 cf_new_cflags=
2444 cf_new_cppflags=
2445 cf_new_extra_cppflags=
2446
2447 for cf_add_cflags in $cf_arg
2448 do
2449 case $cf_fix_cppflags in
2450 no)
2451         case $cf_add_cflags in #(vi
2452         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2453                 case $cf_add_cflags in
2454                 -D*)
2455                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2456
2457                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2458                         && test -z "${cf_tst_cflags}" \
2459                         && cf_fix_cppflags=yes
2460
2461                         if test $cf_fix_cppflags = yes ; then
2462                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2463                                 continue
2464                         elif test "${cf_tst_cflags}" = "\"'" ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         fi
2468                         ;;
2469                 esac
2470                 case "$CPPFLAGS" in
2471                 *$cf_add_cflags) #(vi
2472                         ;;
2473                 *) #(vi
2474                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2475                         ;;
2476                 esac
2477                 ;;
2478         *)
2479                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2480                 ;;
2481         esac
2482         ;;
2483 yes)
2484         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2485
2486         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2487
2488         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2489         && test -z "${cf_tst_cflags}" \
2490         && cf_fix_cppflags=no
2491         ;;
2492 esac
2493 done
2494
2495 if test -n "$cf_new_cflags" ; then
2496
2497         CFLAGS="$CFLAGS $cf_new_cflags"
2498 fi
2499
2500 if test -n "$cf_new_cppflags" ; then
2501
2502         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2503 fi
2504
2505 if test -n "$cf_new_extra_cppflags" ; then
2506
2507         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2508 fi
2509
2510         cat >conftest.$ac_ext <<_ACEOF
2511 #line 2511 "configure"
2512 #include "confdefs.h"
2513
2514 #ifndef CC_HAS_PROTOS
2515 #if !defined(__STDC__) || (__STDC__ != 1)
2516 choke me
2517 #endif
2518 #endif
2519
2520 int
2521 main ()
2522 {
2523
2524         int test (int i, double x);
2525         struct s1 {int (*f) (int a);};
2526         struct s2 {int (*f) (double a);};
2527   ;
2528   return 0;
2529 }
2530 _ACEOF
2531 rm -f conftest.$ac_objext
2532 if { (eval echo "$as_me:2532: \"$ac_compile\"") >&5
2533   (eval $ac_compile) 2>&5
2534   ac_status=$?
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); } &&
2537          { ac_try='test -s conftest.$ac_objext'
2538   { (eval echo "$as_me:2538: \"$ac_try\"") >&5
2539   (eval $ac_try) 2>&5
2540   ac_status=$?
2541   echo "$as_me:2541: \$? = $ac_status" >&5
2542   (exit $ac_status); }; }; then
2543   cf_cv_ansi_cc="$cf_arg"; break
2544 else
2545   echo "$as_me: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2547 fi
2548 rm -f conftest.$ac_objext conftest.$ac_ext
2549 done
2550 CFLAGS="$cf_save_CFLAGS"
2551 CPPFLAGS="$cf_save_CPPFLAGS"
2552
2553 fi
2554 echo "$as_me:2554: result: $cf_cv_ansi_cc" >&5
2555 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2556
2557 if test "$cf_cv_ansi_cc" != "no"; then
2558 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2559
2560 cf_fix_cppflags=no
2561 cf_new_cflags=
2562 cf_new_cppflags=
2563 cf_new_extra_cppflags=
2564
2565 for cf_add_cflags in $cf_cv_ansi_cc
2566 do
2567 case $cf_fix_cppflags in
2568 no)
2569         case $cf_add_cflags in #(vi
2570         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2571                 case $cf_add_cflags in
2572                 -D*)
2573                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2574
2575                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2576                         && test -z "${cf_tst_cflags}" \
2577                         && cf_fix_cppflags=yes
2578
2579                         if test $cf_fix_cppflags = yes ; then
2580                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2584                                 continue
2585                         fi
2586                         ;;
2587                 esac
2588                 case "$CPPFLAGS" in
2589                 *$cf_add_cflags) #(vi
2590                         ;;
2591                 *) #(vi
2592                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2593                         ;;
2594                 esac
2595                 ;;
2596         *)
2597                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2598                 ;;
2599         esac
2600         ;;
2601 yes)
2602         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2603
2604         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2605
2606         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2607         && test -z "${cf_tst_cflags}" \
2608         && cf_fix_cppflags=no
2609         ;;
2610 esac
2611 done
2612
2613 if test -n "$cf_new_cflags" ; then
2614
2615         CFLAGS="$CFLAGS $cf_new_cflags"
2616 fi
2617
2618 if test -n "$cf_new_cppflags" ; then
2619
2620         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2621 fi
2622
2623 if test -n "$cf_new_extra_cppflags" ; then
2624
2625         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2626 fi
2627
2628 else
2629         cat >>confdefs.h <<\EOF
2630 #define CC_HAS_PROTOS 1
2631 EOF
2632
2633 fi
2634 fi
2635
2636 if test "$cf_cv_ansi_cc" = "no"; then
2637         { { echo "$as_me:2637: error: Your compiler does not appear to recognize prototypes.
2638 You have the following choices:
2639         a. adjust your compiler options
2640         b. get an up-to-date compiler
2641         c. use a wrapper such as unproto" >&5
2642 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2643 You have the following choices:
2644         a. adjust your compiler options
2645         b. get an up-to-date compiler
2646         c. use a wrapper such as unproto" >&2;}
2647    { (exit 1); exit 1; }; }
2648 fi
2649
2650 case $cf_cv_system_name in
2651 os2*)
2652     CFLAGS="$CFLAGS -Zmt"
2653     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2654     CXXFLAGS="$CXXFLAGS -Zmt"
2655     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2656     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2657     ac_cv_exeext=.exe
2658     ;;
2659 esac
2660
2661 PROG_EXT="$EXEEXT"
2662
2663 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2664 #define PROG_EXT "$PROG_EXT"
2665 EOF
2666
2667 if test "$cross_compiling" = yes ; then
2668   LDCONFIG=:
2669 else
2670 case "$cf_cv_system_name" in #(vi
2671 dragonfly*|freebsd*) #(vi
2672   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2673   ;;
2674 *) LDPATH=$PATH:/sbin:/usr/sbin
2675   # Extract the first word of "ldconfig", so it can be a program name with args.
2676 set dummy ldconfig; ac_word=$2
2677 echo "$as_me:2677: checking for $ac_word" >&5
2678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2679 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2680   echo $ECHO_N "(cached) $ECHO_C" >&6
2681 else
2682   case $LDCONFIG in
2683   [\\/]* | ?:[\\/]*)
2684   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2685   ;;
2686   *)
2687   ac_save_IFS=$IFS; IFS=$ac_path_separator
2688 ac_dummy="$LDPATH"
2689 for ac_dir in $ac_dummy; do
2690   IFS=$ac_save_IFS
2691   test -z "$ac_dir" && ac_dir=.
2692   if $as_executable_p "$ac_dir/$ac_word"; then
2693    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2694    echo "$as_me:2694: found $ac_dir/$ac_word" >&5
2695    break
2696 fi
2697 done
2698
2699   ;;
2700 esac
2701 fi
2702 LDCONFIG=$ac_cv_path_LDCONFIG
2703
2704 if test -n "$LDCONFIG"; then
2705   echo "$as_me:2705: result: $LDCONFIG" >&5
2706 echo "${ECHO_T}$LDCONFIG" >&6
2707 else
2708   echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2710 fi
2711
2712   ;;
2713 esac
2714 fi
2715
2716 echo "$as_me:2716: checking if you want to ensure bool is consistent with C++" >&5
2717 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2718
2719 # Check whether --with-cxx or --without-cxx was given.
2720 if test "${with_cxx+set}" = set; then
2721   withval="$with_cxx"
2722   cf_with_cxx=$withval
2723 else
2724   cf_with_cxx=yes
2725 fi;
2726 echo "$as_me:2726: result: $cf_with_cxx" >&5
2727 echo "${ECHO_T}$cf_with_cxx" >&6
2728 if test "X$cf_with_cxx" = Xno ; then
2729         CXX=""
2730         GXX=""
2731 else
2732         # with autoconf 2.13, we can change the error to a warning:
2733                 ac_ext=cc
2734 ac_cpp='$CXXCPP $CPPFLAGS'
2735 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2736 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2737 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2738 ac_main_return=return
2739 if test -n "$ac_tool_prefix"; then
2740   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2741   do
2742     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2743 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2744 echo "$as_me:2744: checking for $ac_word" >&5
2745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2746 if test "${ac_cv_prog_CXX+set}" = set; then
2747   echo $ECHO_N "(cached) $ECHO_C" >&6
2748 else
2749   if test -n "$CXX"; then
2750   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2751 else
2752   ac_save_IFS=$IFS; IFS=$ac_path_separator
2753 ac_dummy="$PATH"
2754 for ac_dir in $ac_dummy; do
2755   IFS=$ac_save_IFS
2756   test -z "$ac_dir" && ac_dir=.
2757   $as_executable_p "$ac_dir/$ac_word" || continue
2758 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2759 echo "$as_me:2759: found $ac_dir/$ac_word" >&5
2760 break
2761 done
2762
2763 fi
2764 fi
2765 CXX=$ac_cv_prog_CXX
2766 if test -n "$CXX"; then
2767   echo "$as_me:2767: result: $CXX" >&5
2768 echo "${ECHO_T}$CXX" >&6
2769 else
2770   echo "$as_me:2770: result: no" >&5
2771 echo "${ECHO_T}no" >&6
2772 fi
2773
2774     test -n "$CXX" && break
2775   done
2776 fi
2777 if test -z "$CXX"; then
2778   ac_ct_CXX=$CXX
2779   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2780 do
2781   # Extract the first word of "$ac_prog", so it can be a program name with args.
2782 set dummy $ac_prog; ac_word=$2
2783 echo "$as_me:2783: checking for $ac_word" >&5
2784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2785 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2786   echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788   if test -n "$ac_ct_CXX"; then
2789   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2790 else
2791   ac_save_IFS=$IFS; IFS=$ac_path_separator
2792 ac_dummy="$PATH"
2793 for ac_dir in $ac_dummy; do
2794   IFS=$ac_save_IFS
2795   test -z "$ac_dir" && ac_dir=.
2796   $as_executable_p "$ac_dir/$ac_word" || continue
2797 ac_cv_prog_ac_ct_CXX="$ac_prog"
2798 echo "$as_me:2798: found $ac_dir/$ac_word" >&5
2799 break
2800 done
2801
2802 fi
2803 fi
2804 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2805 if test -n "$ac_ct_CXX"; then
2806   echo "$as_me:2806: result: $ac_ct_CXX" >&5
2807 echo "${ECHO_T}$ac_ct_CXX" >&6
2808 else
2809   echo "$as_me:2809: result: no" >&5
2810 echo "${ECHO_T}no" >&6
2811 fi
2812
2813   test -n "$ac_ct_CXX" && break
2814 done
2815 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2816
2817   CXX=$ac_ct_CXX
2818 fi
2819
2820 # Provide some information about the compiler.
2821 echo "$as_me:2821:" \
2822      "checking for C++ compiler version" >&5
2823 ac_compiler=`set X $ac_compile; echo $2`
2824 { (eval echo "$as_me:2824: \"$ac_compiler --version </dev/null >&5\"") >&5
2825   (eval $ac_compiler --version </dev/null >&5) 2>&5
2826   ac_status=$?
2827   echo "$as_me:2827: \$? = $ac_status" >&5
2828   (exit $ac_status); }
2829 { (eval echo "$as_me:2829: \"$ac_compiler -v </dev/null >&5\"") >&5
2830   (eval $ac_compiler -v </dev/null >&5) 2>&5
2831   ac_status=$?
2832   echo "$as_me:2832: \$? = $ac_status" >&5
2833   (exit $ac_status); }
2834 { (eval echo "$as_me:2834: \"$ac_compiler -V </dev/null >&5\"") >&5
2835   (eval $ac_compiler -V </dev/null >&5) 2>&5
2836   ac_status=$?
2837   echo "$as_me:2837: \$? = $ac_status" >&5
2838   (exit $ac_status); }
2839
2840 echo "$as_me:2840: checking whether we are using the GNU C++ compiler" >&5
2841 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2842 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2843   echo $ECHO_N "(cached) $ECHO_C" >&6
2844 else
2845   cat >conftest.$ac_ext <<_ACEOF
2846 #line 2846 "configure"
2847 #include "confdefs.h"
2848
2849 int
2850 main ()
2851 {
2852 #ifndef __GNUC__
2853        choke me
2854 #endif
2855
2856   ;
2857   return 0;
2858 }
2859 _ACEOF
2860 rm -f conftest.$ac_objext
2861 if { (eval echo "$as_me:2861: \"$ac_compile\"") >&5
2862   (eval $ac_compile) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); } &&
2866          { ac_try='test -s conftest.$ac_objext'
2867   { (eval echo "$as_me:2867: \"$ac_try\"") >&5
2868   (eval $ac_try) 2>&5
2869   ac_status=$?
2870   echo "$as_me:2870: \$? = $ac_status" >&5
2871   (exit $ac_status); }; }; then
2872   ac_compiler_gnu=yes
2873 else
2874   echo "$as_me: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
2876 ac_compiler_gnu=no
2877 fi
2878 rm -f conftest.$ac_objext conftest.$ac_ext
2879 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2880
2881 fi
2882 echo "$as_me:2882: result: $ac_cv_cxx_compiler_gnu" >&5
2883 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2884 GXX=`test $ac_compiler_gnu = yes && echo yes`
2885 ac_test_CXXFLAGS=${CXXFLAGS+set}
2886 ac_save_CXXFLAGS=$CXXFLAGS
2887 CXXFLAGS="-g"
2888 echo "$as_me:2888: checking whether $CXX accepts -g" >&5
2889 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2890 if test "${ac_cv_prog_cxx_g+set}" = set; then
2891   echo $ECHO_N "(cached) $ECHO_C" >&6
2892 else
2893   cat >conftest.$ac_ext <<_ACEOF
2894 #line 2894 "configure"
2895 #include "confdefs.h"
2896
2897 int
2898 main ()
2899 {
2900
2901   ;
2902   return 0;
2903 }
2904 _ACEOF
2905 rm -f conftest.$ac_objext
2906 if { (eval echo "$as_me:2906: \"$ac_compile\"") >&5
2907   (eval $ac_compile) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); } &&
2911          { ac_try='test -s conftest.$ac_objext'
2912   { (eval echo "$as_me:2912: \"$ac_try\"") >&5
2913   (eval $ac_try) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }; }; then
2917   ac_cv_prog_cxx_g=yes
2918 else
2919   echo "$as_me: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 ac_cv_prog_cxx_g=no
2922 fi
2923 rm -f conftest.$ac_objext conftest.$ac_ext
2924 fi
2925 echo "$as_me:2925: result: $ac_cv_prog_cxx_g" >&5
2926 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2927 if test "$ac_test_CXXFLAGS" = set; then
2928   CXXFLAGS=$ac_save_CXXFLAGS
2929 elif test $ac_cv_prog_cxx_g = yes; then
2930   if test "$GXX" = yes; then
2931     CXXFLAGS="-g -O2"
2932   else
2933     CXXFLAGS="-g"
2934   fi
2935 else
2936   if test "$GXX" = yes; then
2937     CXXFLAGS="-O2"
2938   else
2939     CXXFLAGS=
2940   fi
2941 fi
2942 for ac_declaration in \
2943    ''\
2944    '#include <stdlib.h>' \
2945    'extern "C" void std::exit (int) throw (); using std::exit;' \
2946    'extern "C" void std::exit (int); using std::exit;' \
2947    'extern "C" void exit (int) throw ();' \
2948    'extern "C" void exit (int);' \
2949    'void exit (int);'
2950 do
2951   cat >conftest.$ac_ext <<_ACEOF
2952 #line 2952 "configure"
2953 #include "confdefs.h"
2954 #include <stdlib.h>
2955 $ac_declaration
2956 int
2957 main ()
2958 {
2959 exit (42);
2960   ;
2961   return 0;
2962 }
2963 _ACEOF
2964 rm -f conftest.$ac_objext
2965 if { (eval echo "$as_me:2965: \"$ac_compile\"") >&5
2966   (eval $ac_compile) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); } &&
2970          { ac_try='test -s conftest.$ac_objext'
2971   { (eval echo "$as_me:2971: \"$ac_try\"") >&5
2972   (eval $ac_try) 2>&5
2973   ac_status=$?
2974   echo "$as_me:2974: \$? = $ac_status" >&5
2975   (exit $ac_status); }; }; then
2976   :
2977 else
2978   echo "$as_me: failed program was:" >&5
2979 cat conftest.$ac_ext >&5
2980 continue
2981 fi
2982 rm -f conftest.$ac_objext conftest.$ac_ext
2983   cat >conftest.$ac_ext <<_ACEOF
2984 #line 2984 "configure"
2985 #include "confdefs.h"
2986 $ac_declaration
2987 int
2988 main ()
2989 {
2990 exit (42);
2991   ;
2992   return 0;
2993 }
2994 _ACEOF
2995 rm -f conftest.$ac_objext
2996 if { (eval echo "$as_me:2996: \"$ac_compile\"") >&5
2997   (eval $ac_compile) 2>&5
2998   ac_status=$?
2999   echo "$as_me:2999: \$? = $ac_status" >&5
3000   (exit $ac_status); } &&
3001          { ac_try='test -s conftest.$ac_objext'
3002   { (eval echo "$as_me:3002: \"$ac_try\"") >&5
3003   (eval $ac_try) 2>&5
3004   ac_status=$?
3005   echo "$as_me:3005: \$? = $ac_status" >&5
3006   (exit $ac_status); }; }; then
3007   break
3008 else
3009   echo "$as_me: failed program was:" >&5
3010 cat conftest.$ac_ext >&5
3011 fi
3012 rm -f conftest.$ac_objext conftest.$ac_ext
3013 done
3014 rm -f conftest*
3015 if test -n "$ac_declaration"; then
3016   echo '#ifdef __cplusplus' >>confdefs.h
3017   echo $ac_declaration      >>confdefs.h
3018   echo '#endif'             >>confdefs.h
3019 fi
3020
3021 ac_ext=c
3022 ac_cpp='$CPP $CPPFLAGS'
3023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3026 ac_main_return=return
3027
3028                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3029         if test "$CXX" = "g++" ; then
3030                 # Extract the first word of "g++", so it can be a program name with args.
3031 set dummy g++; ac_word=$2
3032 echo "$as_me:3032: checking for $ac_word" >&5
3033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3034 if test "${ac_cv_path_CXX+set}" = set; then
3035   echo $ECHO_N "(cached) $ECHO_C" >&6
3036 else
3037   case $CXX in
3038   [\\/]* | ?:[\\/]*)
3039   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3040   ;;
3041   *)
3042   ac_save_IFS=$IFS; IFS=$ac_path_separator
3043 ac_dummy="$PATH"
3044 for ac_dir in $ac_dummy; do
3045   IFS=$ac_save_IFS
3046   test -z "$ac_dir" && ac_dir=.
3047   if $as_executable_p "$ac_dir/$ac_word"; then
3048    ac_cv_path_CXX="$ac_dir/$ac_word"
3049    echo "$as_me:3049: found $ac_dir/$ac_word" >&5
3050    break
3051 fi
3052 done
3053
3054   ;;
3055 esac
3056 fi
3057 CXX=$ac_cv_path_CXX
3058
3059 if test -n "$CXX"; then
3060   echo "$as_me:3060: result: $CXX" >&5
3061 echo "${ECHO_T}$CXX" >&6
3062 else
3063   echo "$as_me:3063: result: no" >&5
3064 echo "${ECHO_T}no" >&6
3065 fi
3066
3067         fi
3068         if test "$CXX" = "g++" ; then
3069                 { echo "$as_me:3069: WARNING: ignoring hardcoded g++" >&5
3070 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3071                 cf_with_cxx=no; CXX=""; GXX="";
3072         fi
3073 fi
3074
3075 GXX_VERSION=none
3076 if test "$GXX" = yes; then
3077         echo "$as_me:3077: checking version of g++" >&5
3078 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3079         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3080         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3081         echo "$as_me:3081: result: $GXX_VERSION" >&5
3082 echo "${ECHO_T}$GXX_VERSION" >&6
3083 fi
3084
3085 case $GXX_VERSION in
3086 1*|2.[0-6]*)
3087         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3088         # cf_cxx_library=no
3089         { echo "$as_me:3089: WARNING: templates do not work" >&5
3090 echo "$as_me: WARNING: templates do not work" >&2;}
3091         ;;
3092 esac
3093
3094 echo "$as_me:3094: checking if you want to build C++ binding and demo" >&5
3095 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3096
3097 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3098 if test "${with_cxx_binding+set}" = set; then
3099   withval="$with_cxx_binding"
3100   cf_with_cxx_binding=$withval
3101 else
3102   cf_with_cxx_binding=$cf_with_cxx
3103 fi;
3104 echo "$as_me:3104: result: $cf_with_cxx_binding" >&5
3105 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3106
3107 echo "$as_me:3107: checking if you want to build with Ada95" >&5
3108 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3109
3110 # Check whether --with-ada or --without-ada was given.
3111 if test "${with_ada+set}" = set; then
3112   withval="$with_ada"
3113   cf_with_ada=$withval
3114 else
3115   cf_with_ada=yes
3116 fi;
3117 echo "$as_me:3117: result: $cf_with_ada" >&5
3118 echo "${ECHO_T}$cf_with_ada" >&6
3119
3120 echo "$as_me:3120: checking if you want to install manpages" >&5
3121 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3122
3123 # Check whether --with-manpages or --without-manpages was given.
3124 if test "${with_manpages+set}" = set; then
3125   withval="$with_manpages"
3126   cf_with_manpages=$withval
3127 else
3128   cf_with_manpages=yes
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_manpages" >&5
3131 echo "${ECHO_T}$cf_with_manpages" >&6
3132
3133 echo "$as_me:3133: checking if you want to build programs such as tic" >&5
3134 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3135
3136 # Check whether --with-progs or --without-progs was given.
3137 if test "${with_progs+set}" = set; then
3138   withval="$with_progs"
3139   cf_with_progs=$withval
3140 else
3141   cf_with_progs=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_progs" >&5
3144 echo "${ECHO_T}$cf_with_progs" >&6
3145
3146 echo "$as_me:3146: checking if you wish to install curses.h" >&5
3147 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3148
3149 # Check whether --with-curses-h or --without-curses-h was given.
3150 if test "${with_curses_h+set}" = set; then
3151   withval="$with_curses_h"
3152   with_curses_h=$withval
3153 else
3154   with_curses_h=yes
3155 fi;
3156 echo "$as_me:3156: result: $with_curses_h" >&5
3157 echo "${ECHO_T}$with_curses_h" >&6
3158
3159 modules_to_build="ncurses"
3160 if test "X$cf_with_progs" != Xno ; then
3161 modules_to_build="$modules_to_build progs tack"
3162 fi
3163 modules_to_build="$modules_to_build panel menu form"
3164
3165 test "$program_prefix" != NONE &&
3166   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3167 # Use a double $ so make ignores it.
3168 test "$program_suffix" != NONE &&
3169   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3170 # Double any \ or $.  echo might interpret backslashes.
3171 # By default was `s,x,x', remove it if useless.
3172 cat <<\_ACEOF >conftest.sed
3173 s/[\\$]/&&/g;s/;s,x,x,$//
3174 _ACEOF
3175 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3176 rm conftest.sed
3177
3178 for ac_prog in mawk gawk nawk awk
3179 do
3180   # Extract the first word of "$ac_prog", so it can be a program name with args.
3181 set dummy $ac_prog; ac_word=$2
3182 echo "$as_me:3182: checking for $ac_word" >&5
3183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3184 if test "${ac_cv_prog_AWK+set}" = set; then
3185   echo $ECHO_N "(cached) $ECHO_C" >&6
3186 else
3187   if test -n "$AWK"; then
3188   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3189 else
3190   ac_save_IFS=$IFS; IFS=$ac_path_separator
3191 ac_dummy="$PATH"
3192 for ac_dir in $ac_dummy; do
3193   IFS=$ac_save_IFS
3194   test -z "$ac_dir" && ac_dir=.
3195   $as_executable_p "$ac_dir/$ac_word" || continue
3196 ac_cv_prog_AWK="$ac_prog"
3197 echo "$as_me:3197: found $ac_dir/$ac_word" >&5
3198 break
3199 done
3200
3201 fi
3202 fi
3203 AWK=$ac_cv_prog_AWK
3204 if test -n "$AWK"; then
3205   echo "$as_me:3205: result: $AWK" >&5
3206 echo "${ECHO_T}$AWK" >&6
3207 else
3208   echo "$as_me:3208: result: no" >&5
3209 echo "${ECHO_T}no" >&6
3210 fi
3211
3212   test -n "$AWK" && break
3213 done
3214
3215 test -z "$AWK" && { { echo "$as_me:3215: error: No awk program found" >&5
3216 echo "$as_me: error: No awk program found" >&2;}
3217    { (exit 1); exit 1; }; }
3218
3219 echo "$as_me:3219: checking for egrep" >&5
3220 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3221 if test "${ac_cv_prog_egrep+set}" = set; then
3222   echo $ECHO_N "(cached) $ECHO_C" >&6
3223 else
3224   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3225     then ac_cv_prog_egrep='grep -E'
3226     else ac_cv_prog_egrep='egrep'
3227     fi
3228 fi
3229 echo "$as_me:3229: result: $ac_cv_prog_egrep" >&5
3230 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3231  EGREP=$ac_cv_prog_egrep
3232
3233 test -z "$EGREP" && { { echo "$as_me:3233: error: No egrep program found" >&5
3234 echo "$as_me: error: No egrep program found" >&2;}
3235    { (exit 1); exit 1; }; }
3236
3237 # Find a good install program.  We prefer a C program (faster),
3238 # so one script is as good as another.  But avoid the broken or
3239 # incompatible versions:
3240 # SysV /etc/install, /usr/sbin/install
3241 # SunOS /usr/etc/install
3242 # IRIX /sbin/install
3243 # AIX /bin/install
3244 # AmigaOS /C/install, which installs bootblocks on floppy discs
3245 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3246 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3247 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3248 # ./install, which can be erroneously created by make from ./install.sh.
3249 echo "$as_me:3249: checking for a BSD compatible install" >&5
3250 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3251 if test -z "$INSTALL"; then
3252 if test "${ac_cv_path_install+set}" = set; then
3253   echo $ECHO_N "(cached) $ECHO_C" >&6
3254 else
3255     ac_save_IFS=$IFS; IFS=$ac_path_separator
3256   for ac_dir in $PATH; do
3257     IFS=$ac_save_IFS
3258     # Account for people who put trailing slashes in PATH elements.
3259     case $ac_dir/ in
3260     / | ./ | .// | /cC/* \
3261     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3262     | /usr/ucb/* ) ;;
3263     *)
3264       # OSF1 and SCO ODT 3.0 have their own names for install.
3265       # Don't use installbsd from OSF since it installs stuff as root
3266       # by default.
3267       for ac_prog in ginstall scoinst install; do
3268         if $as_executable_p "$ac_dir/$ac_prog"; then
3269           if test $ac_prog = install &&
3270             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3271             # AIX install.  It has an incompatible calling convention.
3272             :
3273           elif test $ac_prog = install &&
3274             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3275             # program-specific install script used by HP pwplus--don't use.
3276             :
3277           else
3278             ac_cv_path_install="$ac_dir/$ac_prog -c"
3279             break 2
3280           fi
3281         fi
3282       done
3283       ;;
3284     esac
3285   done
3286
3287 fi
3288   if test "${ac_cv_path_install+set}" = set; then
3289     INSTALL=$ac_cv_path_install
3290   else
3291     # As a last resort, use the slow shell script.  We don't cache a
3292     # path for INSTALL within a source directory, because that will
3293     # break other packages using the cache if that directory is
3294     # removed, or if the path is relative.
3295     INSTALL=$ac_install_sh
3296   fi
3297 fi
3298 echo "$as_me:3298: result: $INSTALL" >&5
3299 echo "${ECHO_T}$INSTALL" >&6
3300
3301 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3302 # It thinks the first close brace ends the variable substitution.
3303 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3304
3305 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3306
3307 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3308
3309 case $INSTALL in
3310 /*)
3311   ;;
3312 *)
3313   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3314   test -z "$cf_dir" && cf_dir=.
3315   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3316   ;;
3317 esac
3318
3319 for ac_prog in tdlint lint alint
3320 do
3321   # Extract the first word of "$ac_prog", so it can be a program name with args.
3322 set dummy $ac_prog; ac_word=$2
3323 echo "$as_me:3323: checking for $ac_word" >&5
3324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3325 if test "${ac_cv_prog_LINT+set}" = set; then
3326   echo $ECHO_N "(cached) $ECHO_C" >&6
3327 else
3328   if test -n "$LINT"; then
3329   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3330 else
3331   ac_save_IFS=$IFS; IFS=$ac_path_separator
3332 ac_dummy="$PATH"
3333 for ac_dir in $ac_dummy; do
3334   IFS=$ac_save_IFS
3335   test -z "$ac_dir" && ac_dir=.
3336   $as_executable_p "$ac_dir/$ac_word" || continue
3337 ac_cv_prog_LINT="$ac_prog"
3338 echo "$as_me:3338: found $ac_dir/$ac_word" >&5
3339 break
3340 done
3341
3342 fi
3343 fi
3344 LINT=$ac_cv_prog_LINT
3345 if test -n "$LINT"; then
3346   echo "$as_me:3346: result: $LINT" >&5
3347 echo "${ECHO_T}$LINT" >&6
3348 else
3349   echo "$as_me:3349: result: no" >&5
3350 echo "${ECHO_T}no" >&6
3351 fi
3352
3353   test -n "$LINT" && break
3354 done
3355
3356 echo "$as_me:3356: checking whether ln -s works" >&5
3357 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3358 LN_S=$as_ln_s
3359 if test "$LN_S" = "ln -s"; then
3360   echo "$as_me:3360: result: yes" >&5
3361 echo "${ECHO_T}yes" >&6
3362 else
3363   echo "$as_me:3363: result: no, using $LN_S" >&5
3364 echo "${ECHO_T}no, using $LN_S" >&6
3365 fi
3366
3367 echo "$as_me:3367: checking for long file names" >&5
3368 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3369 if test "${ac_cv_sys_long_file_names+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   ac_cv_sys_long_file_names=yes
3373 # Test for long file names in all the places we know might matter:
3374 #      .                the current directory, where building will happen
3375 #      $prefix/lib      where we will be installing things
3376 #      $exec_prefix/lib likewise
3377 # eval it to expand exec_prefix.
3378 #      $TMPDIR          if set, where it might want to write temporary files
3379 # if $TMPDIR is not set:
3380 #      /tmp             where it might want to write temporary files
3381 #      /var/tmp         likewise
3382 #      /usr/tmp         likewise
3383 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3384   ac_tmpdirs=$TMPDIR
3385 else
3386   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3387 fi
3388 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3389   test -d $ac_dir || continue
3390   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3391   ac_xdir=$ac_dir/cf$$
3392   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3393   ac_tf1=$ac_xdir/conftest9012345
3394   ac_tf2=$ac_xdir/conftest9012346
3395   (echo 1 >$ac_tf1) 2>/dev/null
3396   (echo 2 >$ac_tf2) 2>/dev/null
3397   ac_val=`cat $ac_tf1 2>/dev/null`
3398   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3399     ac_cv_sys_long_file_names=no
3400     rm -rf $ac_xdir 2>/dev/null
3401     break
3402   fi
3403   rm -rf $ac_xdir 2>/dev/null
3404 done
3405 fi
3406 echo "$as_me:3406: result: $ac_cv_sys_long_file_names" >&5
3407 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3408 if test $ac_cv_sys_long_file_names = yes; then
3409
3410 cat >>confdefs.h <<\EOF
3411 #define HAVE_LONG_FILE_NAMES 1
3412 EOF
3413
3414 fi
3415
3416 # if we find pkg-config, check if we should install the ".pc" files.
3417
3418 echo "$as_me:3418: checking if you want to use pkg-config" >&5
3419 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3420
3421 # Check whether --with-pkg-config or --without-pkg-config was given.
3422 if test "${with_pkg_config+set}" = set; then
3423   withval="$with_pkg_config"
3424   cf_pkg_config=$withval
3425 else
3426   cf_pkg_config=yes
3427 fi;
3428 echo "$as_me:3428: result: $cf_pkg_config" >&5
3429 echo "${ECHO_T}$cf_pkg_config" >&6
3430
3431 case $cf_pkg_config in #(vi
3432 no) #(vi
3433         PKG_CONFIG=none
3434         ;;
3435 yes) #(vi
3436         # Extract the first word of "pkg-config", so it can be a program name with args.
3437 set dummy pkg-config; ac_word=$2
3438 echo "$as_me:3438: checking for $ac_word" >&5
3439 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3440 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3441   echo $ECHO_N "(cached) $ECHO_C" >&6
3442 else
3443   case $PKG_CONFIG in
3444   [\\/]* | ?:[\\/]*)
3445   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3446   ;;
3447   *)
3448   ac_save_IFS=$IFS; IFS=$ac_path_separator
3449 ac_dummy="$PATH"
3450 for ac_dir in $ac_dummy; do
3451   IFS=$ac_save_IFS
3452   test -z "$ac_dir" && ac_dir=.
3453   if $as_executable_p "$ac_dir/$ac_word"; then
3454    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3455    echo "$as_me:3455: found $ac_dir/$ac_word" >&5
3456    break
3457 fi
3458 done
3459
3460   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3461   ;;
3462 esac
3463 fi
3464 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3465
3466 if test -n "$PKG_CONFIG"; then
3467   echo "$as_me:3467: result: $PKG_CONFIG" >&5
3468 echo "${ECHO_T}$PKG_CONFIG" >&6
3469 else
3470   echo "$as_me:3470: result: no" >&5
3471 echo "${ECHO_T}no" >&6
3472 fi
3473
3474         ;;
3475 *)
3476         PKG_CONFIG=$withval
3477         ;;
3478 esac
3479
3480 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3481 if test "$PKG_CONFIG" != none ; then
3482
3483 if test "x$prefix" != xNONE; then
3484   cf_path_syntax="$prefix"
3485 else
3486   cf_path_syntax="$ac_default_prefix"
3487 fi
3488
3489 case ".$PKG_CONFIG" in #(vi
3490 .\$\(*\)*|.\'*\'*) #(vi
3491   ;;
3492 ..|./*|.\\*) #(vi
3493   ;;
3494 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3495   ;;
3496 .\${*prefix}*) #(vi
3497   eval PKG_CONFIG="$PKG_CONFIG"
3498   case ".$PKG_CONFIG" in #(vi
3499   .NONE/*)
3500     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3501     ;;
3502   esac
3503   ;; #(vi
3504 .no|.NONE/*)
3505   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3506   ;;
3507 *)
3508   { { echo "$as_me:3508: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3509 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3510    { (exit 1); exit 1; }; }
3511   ;;
3512 esac
3513
3514 fi
3515
3516 if test "$PKG_CONFIG" != no ; then
3517         echo "$as_me:3517: checking if we should install .pc files for $PKG_CONFIG" >&5
3518 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3519
3520         # Leave this as something that can be overridden in the environment.
3521         if test -z "$PKG_CONFIG_LIBDIR" ; then
3522                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3523         fi
3524
3525         if test -d "$PKG_CONFIG_LIBDIR" ; then
3526
3527 # Check whether --enable-pc-files or --disable-pc-files was given.
3528 if test "${enable_pc_files+set}" = set; then
3529   enableval="$enable_pc_files"
3530   enable_pc_files=$enableval
3531 else
3532   enable_pc_files=no
3533 fi;
3534                 echo "$as_me:3534: result: $enable_pc_files" >&5
3535 echo "${ECHO_T}$enable_pc_files" >&6
3536         else
3537                 echo "$as_me:3537: result: no" >&5
3538 echo "${ECHO_T}no" >&6
3539                 { echo "$as_me:3539: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3540 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3541                 enable_pc_files=no
3542         fi
3543 fi
3544
3545 echo "$as_me:3545: checking if we should assume mixed-case filenames" >&5
3546 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3547
3548 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3549 if test "${enable_mixed_case+set}" = set; then
3550   enableval="$enable_mixed_case"
3551   enable_mixedcase=$enableval
3552 else
3553   enable_mixedcase=auto
3554 fi;
3555 echo "$as_me:3555: result: $enable_mixedcase" >&5
3556 echo "${ECHO_T}$enable_mixedcase" >&6
3557 if test "$enable_mixedcase" = "auto" ; then
3558
3559 echo "$as_me:3559: checking if filesystem supports mixed-case filenames" >&5
3560 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3561 if test "${cf_cv_mixedcase+set}" = set; then
3562   echo $ECHO_N "(cached) $ECHO_C" >&6
3563 else
3564
3565 if test "$cross_compiling" = yes ; then
3566         case $target_alias in #(vi
3567         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3568                 cf_cv_mixedcase=no
3569                 ;;
3570         *)
3571                 cf_cv_mixedcase=yes
3572                 ;;
3573         esac
3574 else
3575         rm -f conftest CONFTEST
3576         echo test >conftest
3577         if test -f CONFTEST ; then
3578                 cf_cv_mixedcase=no
3579         else
3580                 cf_cv_mixedcase=yes
3581         fi
3582         rm -f conftest CONFTEST
3583 fi
3584
3585 fi
3586 echo "$as_me:3586: result: $cf_cv_mixedcase" >&5
3587 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3588 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3589 #define MIXEDCASE_FILENAMES 1
3590 EOF
3591
3592 else
3593     cf_cv_mixedcase=$enable_mixedcase
3594     if test "$enable_mixedcase" = "yes" ; then
3595         cat >>confdefs.h <<\EOF
3596 #define MIXEDCASE_FILENAMES 1
3597 EOF
3598
3599     fi
3600 fi
3601
3602 # do this after mixed-case option (tags/TAGS is not as important as tic).
3603 echo "$as_me:3603: checking whether ${MAKE-make} sets \${MAKE}" >&5
3604 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3605 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3606 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3607   echo $ECHO_N "(cached) $ECHO_C" >&6
3608 else
3609   cat >conftest.make <<\EOF
3610 all:
3611         @echo 'ac_maketemp="${MAKE}"'
3612 EOF
3613 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3614 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3615 if test -n "$ac_maketemp"; then
3616   eval ac_cv_prog_make_${ac_make}_set=yes
3617 else
3618   eval ac_cv_prog_make_${ac_make}_set=no
3619 fi
3620 rm -f conftest.make
3621 fi
3622 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3623   echo "$as_me:3623: result: yes" >&5
3624 echo "${ECHO_T}yes" >&6
3625   SET_MAKE=
3626 else
3627   echo "$as_me:3627: result: no" >&5
3628 echo "${ECHO_T}no" >&6
3629   SET_MAKE="MAKE=${MAKE-make}"
3630 fi
3631
3632 # Extract the first word of "ctags", so it can be a program name with args.
3633 set dummy ctags; ac_word=$2
3634 echo "$as_me:3634: checking for $ac_word" >&5
3635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3636 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3637   echo $ECHO_N "(cached) $ECHO_C" >&6
3638 else
3639   if test -n "$MAKE_LOWER_TAGS"; then
3640   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3641 else
3642   ac_save_IFS=$IFS; IFS=$ac_path_separator
3643 ac_dummy="$PATH"
3644 for ac_dir in $ac_dummy; do
3645   IFS=$ac_save_IFS
3646   test -z "$ac_dir" && ac_dir=.
3647   $as_executable_p "$ac_dir/$ac_word" || continue
3648 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3649 echo "$as_me:3649: found $ac_dir/$ac_word" >&5
3650 break
3651 done
3652
3653   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3654 fi
3655 fi
3656 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3657 if test -n "$MAKE_LOWER_TAGS"; then
3658   echo "$as_me:3658: result: $MAKE_LOWER_TAGS" >&5
3659 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665 if test "$cf_cv_mixedcase" = yes ; then
3666         # Extract the first word of "etags", so it can be a program name with args.
3667 set dummy etags; ac_word=$2
3668 echo "$as_me:3668: checking for $ac_word" >&5
3669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3670 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3671   echo $ECHO_N "(cached) $ECHO_C" >&6
3672 else
3673   if test -n "$MAKE_UPPER_TAGS"; then
3674   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3675 else
3676   ac_save_IFS=$IFS; IFS=$ac_path_separator
3677 ac_dummy="$PATH"
3678 for ac_dir in $ac_dummy; do
3679   IFS=$ac_save_IFS
3680   test -z "$ac_dir" && ac_dir=.
3681   $as_executable_p "$ac_dir/$ac_word" || continue
3682 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3683 echo "$as_me:3683: found $ac_dir/$ac_word" >&5
3684 break
3685 done
3686
3687   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3688 fi
3689 fi
3690 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3691 if test -n "$MAKE_UPPER_TAGS"; then
3692   echo "$as_me:3692: result: $MAKE_UPPER_TAGS" >&5
3693 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3694 else
3695   echo "$as_me:3695: result: no" >&5
3696 echo "${ECHO_T}no" >&6
3697 fi
3698
3699 else
3700         MAKE_UPPER_TAGS=no
3701 fi
3702
3703 if test "$MAKE_UPPER_TAGS" = yes ; then
3704         MAKE_UPPER_TAGS=
3705 else
3706         MAKE_UPPER_TAGS="#"
3707 fi
3708
3709 if test "$MAKE_LOWER_TAGS" = yes ; then
3710         MAKE_LOWER_TAGS=
3711 else
3712         MAKE_LOWER_TAGS="#"
3713 fi
3714
3715 echo "$as_me:3715: checking for makeflags variable" >&5
3716 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3717 if test "${cf_cv_makeflags+set}" = set; then
3718   echo $ECHO_N "(cached) $ECHO_C" >&6
3719 else
3720
3721         cf_cv_makeflags=''
3722         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3723         do
3724                 cat >cf_makeflags.tmp <<CF_EOF
3725 SHELL = /bin/sh
3726 all :
3727         @ echo '.$cf_option'
3728 CF_EOF
3729                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3730                 case "$cf_result" in
3731                 .*k)
3732                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3733                         case "$cf_result" in
3734                         .*CC=*) cf_cv_makeflags=
3735                                 ;;
3736                         *)      cf_cv_makeflags=$cf_option
3737                                 ;;
3738                         esac
3739                         break
3740                         ;;
3741                 .-)     ;;
3742                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3743                         ;;
3744                 esac
3745         done
3746         rm -f cf_makeflags.tmp
3747
3748 fi
3749 echo "$as_me:3749: result: $cf_cv_makeflags" >&5
3750 echo "${ECHO_T}$cf_cv_makeflags" >&6
3751
3752 if test -n "$ac_tool_prefix"; then
3753   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3754 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_RANLIB+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$RANLIB"; then
3761   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 RANLIB=$ac_cv_prog_RANLIB
3777 if test -n "$RANLIB"; then
3778   echo "$as_me:3778: result: $RANLIB" >&5
3779 echo "${ECHO_T}$RANLIB" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785 fi
3786 if test -z "$ac_cv_prog_RANLIB"; then
3787   ac_ct_RANLIB=$RANLIB
3788   # Extract the first word of "ranlib", so it can be a program name with args.
3789 set dummy ranlib; ac_word=$2
3790 echo "$as_me:3790: checking for $ac_word" >&5
3791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3792 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3793   echo $ECHO_N "(cached) $ECHO_C" >&6
3794 else
3795   if test -n "$ac_ct_RANLIB"; then
3796   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3797 else
3798   ac_save_IFS=$IFS; IFS=$ac_path_separator
3799 ac_dummy="$PATH"
3800 for ac_dir in $ac_dummy; do
3801   IFS=$ac_save_IFS
3802   test -z "$ac_dir" && ac_dir=.
3803   $as_executable_p "$ac_dir/$ac_word" || continue
3804 ac_cv_prog_ac_ct_RANLIB="ranlib"
3805 echo "$as_me:3805: found $ac_dir/$ac_word" >&5
3806 break
3807 done
3808
3809   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3810 fi
3811 fi
3812 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3813 if test -n "$ac_ct_RANLIB"; then
3814   echo "$as_me:3814: result: $ac_ct_RANLIB" >&5
3815 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3816 else
3817   echo "$as_me:3817: result: no" >&5
3818 echo "${ECHO_T}no" >&6
3819 fi
3820
3821   RANLIB=$ac_ct_RANLIB
3822 else
3823   RANLIB="$ac_cv_prog_RANLIB"
3824 fi
3825
3826 if test -n "$ac_tool_prefix"; then
3827   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3828 set dummy ${ac_tool_prefix}ld; ac_word=$2
3829 echo "$as_me:3829: checking for $ac_word" >&5
3830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3831 if test "${ac_cv_prog_LD+set}" = set; then
3832   echo $ECHO_N "(cached) $ECHO_C" >&6
3833 else
3834   if test -n "$LD"; then
3835   ac_cv_prog_LD="$LD" # Let the user override the test.
3836 else
3837   ac_save_IFS=$IFS; IFS=$ac_path_separator
3838 ac_dummy="$PATH"
3839 for ac_dir in $ac_dummy; do
3840   IFS=$ac_save_IFS
3841   test -z "$ac_dir" && ac_dir=.
3842   $as_executable_p "$ac_dir/$ac_word" || continue
3843 ac_cv_prog_LD="${ac_tool_prefix}ld"
3844 echo "$as_me:3844: found $ac_dir/$ac_word" >&5
3845 break
3846 done
3847
3848 fi
3849 fi
3850 LD=$ac_cv_prog_LD
3851 if test -n "$LD"; then
3852   echo "$as_me:3852: result: $LD" >&5
3853 echo "${ECHO_T}$LD" >&6
3854 else
3855   echo "$as_me:3855: result: no" >&5
3856 echo "${ECHO_T}no" >&6
3857 fi
3858
3859 fi
3860 if test -z "$ac_cv_prog_LD"; then
3861   ac_ct_LD=$LD
3862   # Extract the first word of "ld", so it can be a program name with args.
3863 set dummy ld; ac_word=$2
3864 echo "$as_me:3864: checking for $ac_word" >&5
3865 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3866 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3867   echo $ECHO_N "(cached) $ECHO_C" >&6
3868 else
3869   if test -n "$ac_ct_LD"; then
3870   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3871 else
3872   ac_save_IFS=$IFS; IFS=$ac_path_separator
3873 ac_dummy="$PATH"
3874 for ac_dir in $ac_dummy; do
3875   IFS=$ac_save_IFS
3876   test -z "$ac_dir" && ac_dir=.
3877   $as_executable_p "$ac_dir/$ac_word" || continue
3878 ac_cv_prog_ac_ct_LD="ld"
3879 echo "$as_me:3879: found $ac_dir/$ac_word" >&5
3880 break
3881 done
3882
3883   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3884 fi
3885 fi
3886 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3887 if test -n "$ac_ct_LD"; then
3888   echo "$as_me:3888: result: $ac_ct_LD" >&5
3889 echo "${ECHO_T}$ac_ct_LD" >&6
3890 else
3891   echo "$as_me:3891: result: no" >&5
3892 echo "${ECHO_T}no" >&6
3893 fi
3894
3895   LD=$ac_ct_LD
3896 else
3897   LD="$ac_cv_prog_LD"
3898 fi
3899
3900 if test -n "$ac_tool_prefix"; then
3901   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3902 set dummy ${ac_tool_prefix}ar; ac_word=$2
3903 echo "$as_me:3903: checking for $ac_word" >&5
3904 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3905 if test "${ac_cv_prog_AR+set}" = set; then
3906   echo $ECHO_N "(cached) $ECHO_C" >&6
3907 else
3908   if test -n "$AR"; then
3909   ac_cv_prog_AR="$AR" # Let the user override the test.
3910 else
3911   ac_save_IFS=$IFS; IFS=$ac_path_separator
3912 ac_dummy="$PATH"
3913 for ac_dir in $ac_dummy; do
3914   IFS=$ac_save_IFS
3915   test -z "$ac_dir" && ac_dir=.
3916   $as_executable_p "$ac_dir/$ac_word" || continue
3917 ac_cv_prog_AR="${ac_tool_prefix}ar"
3918 echo "$as_me:3918: found $ac_dir/$ac_word" >&5
3919 break
3920 done
3921
3922 fi
3923 fi
3924 AR=$ac_cv_prog_AR
3925 if test -n "$AR"; then
3926   echo "$as_me:3926: result: $AR" >&5
3927 echo "${ECHO_T}$AR" >&6
3928 else
3929   echo "$as_me:3929: result: no" >&5
3930 echo "${ECHO_T}no" >&6
3931 fi
3932
3933 fi
3934 if test -z "$ac_cv_prog_AR"; then
3935   ac_ct_AR=$AR
3936   # Extract the first word of "ar", so it can be a program name with args.
3937 set dummy ar; ac_word=$2
3938 echo "$as_me:3938: checking for $ac_word" >&5
3939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3940 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3941   echo $ECHO_N "(cached) $ECHO_C" >&6
3942 else
3943   if test -n "$ac_ct_AR"; then
3944   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3945 else
3946   ac_save_IFS=$IFS; IFS=$ac_path_separator
3947 ac_dummy="$PATH"
3948 for ac_dir in $ac_dummy; do
3949   IFS=$ac_save_IFS
3950   test -z "$ac_dir" && ac_dir=.
3951   $as_executable_p "$ac_dir/$ac_word" || continue
3952 ac_cv_prog_ac_ct_AR="ar"
3953 echo "$as_me:3953: found $ac_dir/$ac_word" >&5
3954 break
3955 done
3956
3957   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3958 fi
3959 fi
3960 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3961 if test -n "$ac_ct_AR"; then
3962   echo "$as_me:3962: result: $ac_ct_AR" >&5
3963 echo "${ECHO_T}$ac_ct_AR" >&6
3964 else
3965   echo "$as_me:3965: result: no" >&5
3966 echo "${ECHO_T}no" >&6
3967 fi
3968
3969   AR=$ac_ct_AR
3970 else
3971   AR="$ac_cv_prog_AR"
3972 fi
3973
3974 if test -n "$ac_tool_prefix"; then
3975   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3976 set dummy ${ac_tool_prefix}ar; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_AR+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$AR"; then
3983   ac_cv_prog_AR="$AR" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_AR="${ac_tool_prefix}ar"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996 fi
3997 fi
3998 AR=$ac_cv_prog_AR
3999 if test -n "$AR"; then
4000   echo "$as_me:4000: result: $AR" >&5
4001 echo "${ECHO_T}$AR" >&6
4002 else
4003   echo "$as_me:4003: result: no" >&5
4004 echo "${ECHO_T}no" >&6
4005 fi
4006
4007 fi
4008 if test -z "$ac_cv_prog_AR"; then
4009   ac_ct_AR=$AR
4010   # Extract the first word of "ar", so it can be a program name with args.
4011 set dummy ar; ac_word=$2
4012 echo "$as_me:4012: checking for $ac_word" >&5
4013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4015   echo $ECHO_N "(cached) $ECHO_C" >&6
4016 else
4017   if test -n "$ac_ct_AR"; then
4018   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4019 else
4020   ac_save_IFS=$IFS; IFS=$ac_path_separator
4021 ac_dummy="$PATH"
4022 for ac_dir in $ac_dummy; do
4023   IFS=$ac_save_IFS
4024   test -z "$ac_dir" && ac_dir=.
4025   $as_executable_p "$ac_dir/$ac_word" || continue
4026 ac_cv_prog_ac_ct_AR="ar"
4027 echo "$as_me:4027: found $ac_dir/$ac_word" >&5
4028 break
4029 done
4030
4031   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4032 fi
4033 fi
4034 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4035 if test -n "$ac_ct_AR"; then
4036   echo "$as_me:4036: result: $ac_ct_AR" >&5
4037 echo "${ECHO_T}$ac_ct_AR" >&6
4038 else
4039   echo "$as_me:4039: result: no" >&5
4040 echo "${ECHO_T}no" >&6
4041 fi
4042
4043   AR=$ac_ct_AR
4044 else
4045   AR="$ac_cv_prog_AR"
4046 fi
4047
4048 echo "$as_me:4048: checking for options to update archives" >&5
4049 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4050 if test "${cf_cv_ar_flags+set}" = set; then
4051   echo $ECHO_N "(cached) $ECHO_C" >&6
4052 else
4053
4054         cf_cv_ar_flags=unknown
4055         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4056         do
4057                 rm -f conftest.$ac_cv_objext
4058                 rm -f conftest.a
4059
4060                 cat >conftest.$ac_ext <<EOF
4061 #line 4061 "configure"
4062 int     testdata[3] = { 123, 456, 789 };
4063 EOF
4064                 if { (eval echo "$as_me:4064: \"$ac_compile\"") >&5
4065   (eval $ac_compile) 2>&5
4066   ac_status=$?
4067   echo "$as_me:4067: \$? = $ac_status" >&5
4068   (exit $ac_status); } ; then
4069                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4070                         if test -f conftest.a ; then
4071                                 cf_cv_ar_flags=$cf_ar_flags
4072                                 break
4073                         fi
4074                 else
4075                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4076
4077 echo "${as_me-configure}:4077: testing cannot compile test-program ..." 1>&5
4078
4079                         break
4080                 fi
4081         done
4082         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4083
4084 fi
4085 echo "$as_me:4085: result: $cf_cv_ar_flags" >&5
4086 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4087 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4088 ARFLAGS=$cf_cv_ar_flags
4089
4090 echo "$as_me:4090: checking if you have specified an install-prefix" >&5
4091 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4092
4093 # Check whether --with-install-prefix or --without-install-prefix was given.
4094 if test "${with_install_prefix+set}" = set; then
4095   withval="$with_install_prefix"
4096   case "$withval" in #(vi
4097         yes|no) #(vi
4098                 ;;
4099         *)      DESTDIR="$withval"
4100                 ;;
4101         esac
4102 fi;
4103 echo "$as_me:4103: result: $DESTDIR" >&5
4104 echo "${ECHO_T}$DESTDIR" >&6
4105
4106 ###############################################################################
4107
4108 # If we're cross-compiling, allow the user to override the tools and their
4109 # options.  The configure script is oriented toward identifying the host
4110 # compiler, etc., but we need a build compiler to generate parts of the source.
4111
4112 if test "$cross_compiling" = yes ; then
4113
4114         # defaults that we might want to override
4115         : ${BUILD_CFLAGS:=''}
4116         : ${BUILD_CPPFLAGS:=''}
4117         : ${BUILD_LDFLAGS:=''}
4118         : ${BUILD_LIBS:=''}
4119         : ${BUILD_EXEEXT:='$x'}
4120         : ${BUILD_OBJEXT:='o'}
4121
4122 # Check whether --with-build-cc or --without-build-cc was given.
4123 if test "${with_build_cc+set}" = set; then
4124   withval="$with_build_cc"
4125   BUILD_CC="$withval"
4126 else
4127   for ac_prog in gcc cc cl
4128 do
4129   # Extract the first word of "$ac_prog", so it can be a program name with args.
4130 set dummy $ac_prog; ac_word=$2
4131 echo "$as_me:4131: checking for $ac_word" >&5
4132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4133 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4134   echo $ECHO_N "(cached) $ECHO_C" >&6
4135 else
4136   if test -n "$BUILD_CC"; then
4137   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4138 else
4139   ac_save_IFS=$IFS; IFS=$ac_path_separator
4140 ac_dummy="$PATH"
4141 for ac_dir in $ac_dummy; do
4142   IFS=$ac_save_IFS
4143   test -z "$ac_dir" && ac_dir=.
4144   $as_executable_p "$ac_dir/$ac_word" || continue
4145 ac_cv_prog_BUILD_CC="$ac_prog"
4146 echo "$as_me:4146: found $ac_dir/$ac_word" >&5
4147 break
4148 done
4149
4150 fi
4151 fi
4152 BUILD_CC=$ac_cv_prog_BUILD_CC
4153 if test -n "$BUILD_CC"; then
4154   echo "$as_me:4154: result: $BUILD_CC" >&5
4155 echo "${ECHO_T}$BUILD_CC" >&6
4156 else
4157   echo "$as_me:4157: result: no" >&5
4158 echo "${ECHO_T}no" >&6
4159 fi
4160
4161   test -n "$BUILD_CC" && break
4162 done
4163
4164 fi;
4165         echo "$as_me:4165: checking for native build C compiler" >&5
4166 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4167         echo "$as_me:4167: result: $BUILD_CC" >&5
4168 echo "${ECHO_T}$BUILD_CC" >&6
4169
4170         echo "$as_me:4170: checking for native build C preprocessor" >&5
4171 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4172
4173 # Check whether --with-build-cpp or --without-build-cpp was given.
4174 if test "${with_build_cpp+set}" = set; then
4175   withval="$with_build_cpp"
4176   BUILD_CPP="$withval"
4177 else
4178   BUILD_CPP='${BUILD_CC} -E'
4179 fi;
4180         echo "$as_me:4180: result: $BUILD_CPP" >&5
4181 echo "${ECHO_T}$BUILD_CPP" >&6
4182
4183         echo "$as_me:4183: checking for native build C flags" >&5
4184 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4185
4186 # Check whether --with-build-cflags or --without-build-cflags was given.
4187 if test "${with_build_cflags+set}" = set; then
4188   withval="$with_build_cflags"
4189   BUILD_CFLAGS="$withval"
4190 fi;
4191         echo "$as_me:4191: result: $BUILD_CFLAGS" >&5
4192 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4193
4194         echo "$as_me:4194: checking for native build C preprocessor-flags" >&5
4195 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4196
4197 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4198 if test "${with_build_cppflags+set}" = set; then
4199   withval="$with_build_cppflags"
4200   BUILD_CPPFLAGS="$withval"
4201 fi;
4202         echo "$as_me:4202: result: $BUILD_CPPFLAGS" >&5
4203 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4204
4205         echo "$as_me:4205: checking for native build linker-flags" >&5
4206 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4207
4208 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4209 if test "${with_build_ldflags+set}" = set; then
4210   withval="$with_build_ldflags"
4211   BUILD_LDFLAGS="$withval"
4212 fi;
4213         echo "$as_me:4213: result: $BUILD_LDFLAGS" >&5
4214 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4215
4216         echo "$as_me:4216: checking for native build linker-libraries" >&5
4217 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4218
4219 # Check whether --with-build-libs or --without-build-libs was given.
4220 if test "${with_build_libs+set}" = set; then
4221   withval="$with_build_libs"
4222   BUILD_LIBS="$withval"
4223 fi;
4224         echo "$as_me:4224: result: $BUILD_LIBS" >&5
4225 echo "${ECHO_T}$BUILD_LIBS" >&6
4226
4227         # this assumes we're on Unix.
4228         BUILD_EXEEXT=
4229         BUILD_OBJEXT=o
4230
4231         : ${BUILD_CC:='${CC}'}
4232
4233         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4234                 { { echo "$as_me:4234: error: Cross-build requires two compilers.
4235 Use --with-build-cc to specify the native compiler." >&5
4236 echo "$as_me: error: Cross-build requires two compilers.
4237 Use --with-build-cc to specify the native compiler." >&2;}
4238    { (exit 1); exit 1; }; }
4239         fi
4240
4241 else
4242         : ${BUILD_CC:='${CC}'}
4243         : ${BUILD_CPP:='${CPP}'}
4244         : ${BUILD_CFLAGS:='${CFLAGS}'}
4245         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4246         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4247         : ${BUILD_LIBS:='${LIBS}'}
4248         : ${BUILD_EXEEXT:='$x'}
4249         : ${BUILD_OBJEXT:='o'}
4250 fi
4251
4252 ###############################################################################
4253
4254 ### Options to allow the user to specify the set of libraries which are used.
4255 ### Use "--without-normal --with-shared" to allow the default model to be
4256 ### shared, for example.
4257 cf_list_models=""
4258
4259 LIBTOOL=
4260
4261 # common library maintenance symbols that are convenient for libtool scripts:
4262 LIB_CREATE='${AR} -cr'
4263 LIB_OBJECT='${OBJECTS}'
4264 LIB_SUFFIX=.a
4265 LIB_PREP="$RANLIB"
4266
4267 # symbols used to prop libtool up to enable it to determine what it should be
4268 # doing:
4269 LIB_CLEAN=
4270 LIB_COMPILE=
4271 LIB_LINK='${CC}'
4272 LIB_INSTALL=
4273 LIB_UNINSTALL=
4274
4275 echo "$as_me:4275: checking if you want to build libraries with libtool" >&5
4276 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4277
4278 # Check whether --with-libtool or --without-libtool was given.
4279 if test "${with_libtool+set}" = set; then
4280   withval="$with_libtool"
4281   with_libtool=$withval
4282 else
4283   with_libtool=no
4284 fi;
4285 echo "$as_me:4285: result: $with_libtool" >&5
4286 echo "${ECHO_T}$with_libtool" >&6
4287 if test "$with_libtool" != "no"; then
4288
4289         if test "$with_libtool" != "yes" ; then
4290
4291 if test "x$prefix" != xNONE; then
4292   cf_path_syntax="$prefix"
4293 else
4294   cf_path_syntax="$ac_default_prefix"
4295 fi
4296
4297 case ".$with_libtool" in #(vi
4298 .\$\(*\)*|.\'*\'*) #(vi
4299   ;;
4300 ..|./*|.\\*) #(vi
4301   ;;
4302 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4303   ;;
4304 .\${*prefix}*) #(vi
4305   eval with_libtool="$with_libtool"
4306   case ".$with_libtool" in #(vi
4307   .NONE/*)
4308     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4309     ;;
4310   esac
4311   ;; #(vi
4312 .no|.NONE/*)
4313   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4314   ;;
4315 *)
4316   { { echo "$as_me:4316: error: expected a pathname, not \"$with_libtool\"" >&5
4317 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4318    { (exit 1); exit 1; }; }
4319   ;;
4320 esac
4321
4322                 LIBTOOL=$with_libtool
4323         else
4324                 # Extract the first word of "libtool", so it can be a program name with args.
4325 set dummy libtool; 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_path_LIBTOOL+set}" = set; then
4329   echo $ECHO_N "(cached) $ECHO_C" >&6
4330 else
4331   case $LIBTOOL in
4332   [\\/]* | ?:[\\/]*)
4333   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4334   ;;
4335   *)
4336   ac_save_IFS=$IFS; IFS=$ac_path_separator
4337 ac_dummy="$PATH"
4338 for ac_dir in $ac_dummy; do
4339   IFS=$ac_save_IFS
4340   test -z "$ac_dir" && ac_dir=.
4341   if $as_executable_p "$ac_dir/$ac_word"; then
4342    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4343    echo "$as_me:4343: found $ac_dir/$ac_word" >&5
4344    break
4345 fi
4346 done
4347
4348   ;;
4349 esac
4350 fi
4351 LIBTOOL=$ac_cv_path_LIBTOOL
4352
4353 if test -n "$LIBTOOL"; then
4354   echo "$as_me:4354: result: $LIBTOOL" >&5
4355 echo "${ECHO_T}$LIBTOOL" >&6
4356 else
4357   echo "$as_me:4357: result: no" >&5
4358 echo "${ECHO_T}no" >&6
4359 fi
4360
4361         fi
4362         if test -z "$LIBTOOL" ; then
4363                 { { echo "$as_me:4363: error: Cannot find libtool" >&5
4364 echo "$as_me: error: Cannot find libtool" >&2;}
4365    { (exit 1); exit 1; }; }
4366         fi
4367         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4368         LIB_OBJECT='${OBJECTS:.o=.lo}'
4369         LIB_SUFFIX=.la
4370         LIB_CLEAN='${LIBTOOL} --mode=clean'
4371         LIB_COMPILE='${LIBTOOL} --mode=compile'
4372         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4373         LIB_INSTALL='${LIBTOOL} --mode=install'
4374         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4375         LIB_PREP=:
4376
4377         # Show the version of libtool
4378         echo "$as_me:4378: checking version of libtool" >&5
4379 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4380
4381         # Save the version in a cache variable - this is not entirely a good
4382         # thing, but the version string from libtool is very ugly, and for
4383         # bug reports it might be useful to have the original string. "("
4384         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.].*//'`
4385         echo "$as_me:4385: result: $cf_cv_libtool_version" >&5
4386 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4387         if test -z "$cf_cv_libtool_version" ; then
4388                 { { echo "$as_me:4388: error: This is not GNU libtool" >&5
4389 echo "$as_me: error: This is not GNU libtool" >&2;}
4390    { (exit 1); exit 1; }; }
4391         fi
4392
4393         # special hack to add -no-undefined (which libtool should do for itself)
4394         case "$cf_cv_system_name" in #(vi
4395         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4396                 LIBTOOL="$LIBTOOL -no-undefined"
4397                 ;;
4398         esac
4399
4400         # special hack to add --tag option for C++ compiler
4401         case $cf_cv_libtool_version in #(vi
4402         1.[5-9]*|[2-9]*) #(vi
4403                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4404                 LIBTOOL="$LIBTOOL --tag=CC"
4405                 ;;
4406         *)
4407                 LIBTOOL_CXX="$LIBTOOL"
4408                 ;;
4409         esac
4410 else
4411         LIBTOOL=""
4412         LIBTOOL_CXX=""
4413 fi
4414
4415 test -z "$LIBTOOL" && ECHO_LT=
4416
4417 if test "$with_libtool" != "no" ; then
4418
4419 cf_list_models="$cf_list_models libtool"
4420
4421 else
4422
4423 echo "$as_me:4423: checking if you want to build shared libraries" >&5
4424 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4425
4426 # Check whether --with-shared or --without-shared was given.
4427 if test "${with_shared+set}" = set; then
4428   withval="$with_shared"
4429   with_shared=$withval
4430 else
4431   with_shared=no
4432 fi;
4433 echo "$as_me:4433: result: $with_shared" >&5
4434 echo "${ECHO_T}$with_shared" >&6
4435 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4436
4437 echo "$as_me:4437: checking if you want to build static libraries" >&5
4438 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4439
4440 # Check whether --with-normal or --without-normal was given.
4441 if test "${with_normal+set}" = set; then
4442   withval="$with_normal"
4443   with_normal=$withval
4444 else
4445   with_normal=yes
4446 fi;
4447 echo "$as_me:4447: result: $with_normal" >&5
4448 echo "${ECHO_T}$with_normal" >&6
4449 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4450
4451 echo "$as_me:4451: checking if you want to build debug libraries" >&5
4452 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4453
4454 # Check whether --with-debug or --without-debug was given.
4455 if test "${with_debug+set}" = set; then
4456   withval="$with_debug"
4457   with_debug=$withval
4458 else
4459   with_debug=yes
4460 fi;
4461 echo "$as_me:4461: result: $with_debug" >&5
4462 echo "${ECHO_T}$with_debug" >&6
4463 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4464
4465 echo "$as_me:4465: checking if you want to build profiling libraries" >&5
4466 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4467
4468 # Check whether --with-profile or --without-profile was given.
4469 if test "${with_profile+set}" = set; then
4470   withval="$with_profile"
4471   with_profile=$withval
4472 else
4473   with_profile=no
4474 fi;
4475 echo "$as_me:4475: result: $with_profile" >&5
4476 echo "${ECHO_T}$with_profile" >&6
4477 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4478
4479 fi
4480
4481 ###############################################################################
4482
4483 echo "$as_me:4483: checking for specified models" >&5
4484 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4485 test -z "$cf_list_models" && cf_list_models=normal
4486 test "$with_libtool" != "no" && cf_list_models=libtool
4487 echo "$as_me:4487: result: $cf_list_models" >&5
4488 echo "${ECHO_T}$cf_list_models" >&6
4489
4490 ### Use the first model as the default, and save its suffix for use in building
4491 ### up test-applications.
4492 echo "$as_me:4492: checking for default model" >&5
4493 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4494 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4495 echo "$as_me:4495: result: $DFT_LWR_MODEL" >&5
4496 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4497
4498 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4499
4500 TICS_NAME=tic
4501
4502 TINFO_NAME=tinfo
4503
4504 LIB_NAME=ncurses
4505
4506 LIB_DIR=../lib
4507 LIB_2ND=../../lib
4508
4509         case $cf_cv_system_name in #(vi
4510         OS/2*|os2*) #(vi
4511         LIB_PREFIX=''
4512         ;;
4513         *)      LIB_PREFIX='lib'
4514         ;;
4515         esac
4516 cf_prefix=$LIB_PREFIX
4517
4518 LIB_PREFIX=$cf_prefix
4519
4520 LIB_SUFFIX=
4521
4522 ###############################################################################
4523
4524 echo "$as_me:4524: checking if you want to build a separate terminfo library" >&5
4525 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4526
4527 # Check whether --with-termlib or --without-termlib was given.
4528 if test "${with_termlib+set}" = set; then
4529   withval="$with_termlib"
4530   with_termlib=$withval
4531 else
4532   with_termlib=no
4533 fi;
4534 echo "$as_me:4534: result: $with_termlib" >&5
4535 echo "${ECHO_T}$with_termlib" >&6
4536
4537 echo "$as_me:4537: checking if you want to build a separate tic library" >&5
4538 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4539
4540 # Check whether --with-ticlib or --without-ticlib was given.
4541 if test "${with_ticlib+set}" = set; then
4542   withval="$with_ticlib"
4543   with_ticlib=$withval
4544 else
4545   with_ticlib=no
4546 fi;
4547 echo "$as_me:4547: result: $with_ticlib" >&5
4548 echo "${ECHO_T}$with_ticlib" >&6
4549
4550 ### Checks for special libraries, must be done up-front.
4551 SHLIB_LIST=""
4552
4553 echo "$as_me:4553: checking if you want to link with the GPM mouse library" >&5
4554 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4555
4556 # Check whether --with-gpm or --without-gpm was given.
4557 if test "${with_gpm+set}" = set; then
4558   withval="$with_gpm"
4559   with_gpm=$withval
4560 else
4561   with_gpm=maybe
4562 fi;
4563 echo "$as_me:4563: result: $with_gpm" >&5
4564 echo "${ECHO_T}$with_gpm" >&6
4565
4566 if test "$with_gpm" != no ; then
4567         echo "$as_me:4567: checking for gpm.h" >&5
4568 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4569 if test "${ac_cv_header_gpm_h+set}" = set; then
4570   echo $ECHO_N "(cached) $ECHO_C" >&6
4571 else
4572   cat >conftest.$ac_ext <<_ACEOF
4573 #line 4573 "configure"
4574 #include "confdefs.h"
4575 #include <gpm.h>
4576 _ACEOF
4577 if { (eval echo "$as_me:4577: \"$ac_cpp conftest.$ac_ext\"") >&5
4578   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4579   ac_status=$?
4580   egrep -v '^ *\+' conftest.er1 >conftest.err
4581   rm -f conftest.er1
4582   cat conftest.err >&5
4583   echo "$as_me:4583: \$? = $ac_status" >&5
4584   (exit $ac_status); } >/dev/null; then
4585   if test -s conftest.err; then
4586     ac_cpp_err=$ac_c_preproc_warn_flag
4587   else
4588     ac_cpp_err=
4589   fi
4590 else
4591   ac_cpp_err=yes
4592 fi
4593 if test -z "$ac_cpp_err"; then
4594   ac_cv_header_gpm_h=yes
4595 else
4596   echo "$as_me: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598   ac_cv_header_gpm_h=no
4599 fi
4600 rm -f conftest.err conftest.$ac_ext
4601 fi
4602 echo "$as_me:4602: result: $ac_cv_header_gpm_h" >&5
4603 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4604 if test $ac_cv_header_gpm_h = yes; then
4605
4606                 cat >>confdefs.h <<\EOF
4607 #define HAVE_GPM_H 1
4608 EOF
4609
4610                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4611                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4612
4613 echo "${as_me-configure}:4613: testing assuming we really have GPM library ..." 1>&5
4614
4615                         cat >>confdefs.h <<\EOF
4616 #define HAVE_LIBGPM 1
4617 EOF
4618
4619                 else
4620                         echo "$as_me:4620: checking for Gpm_Open in -lgpm" >&5
4621 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4622 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4623   echo $ECHO_N "(cached) $ECHO_C" >&6
4624 else
4625   ac_check_lib_save_LIBS=$LIBS
4626 LIBS="-lgpm  $LIBS"
4627 cat >conftest.$ac_ext <<_ACEOF
4628 #line 4628 "configure"
4629 #include "confdefs.h"
4630
4631 /* Override any gcc2 internal prototype to avoid an error.  */
4632 #ifdef __cplusplus
4633 extern "C"
4634 #endif
4635 /* We use char because int might match the return type of a gcc2
4636    builtin and then its argument prototype would still apply.  */
4637 char Gpm_Open ();
4638 int
4639 main ()
4640 {
4641 Gpm_Open ();
4642   ;
4643   return 0;
4644 }
4645 _ACEOF
4646 rm -f conftest.$ac_objext conftest$ac_exeext
4647 if { (eval echo "$as_me:4647: \"$ac_link\"") >&5
4648   (eval $ac_link) 2>&5
4649   ac_status=$?
4650   echo "$as_me:4650: \$? = $ac_status" >&5
4651   (exit $ac_status); } &&
4652          { ac_try='test -s conftest$ac_exeext'
4653   { (eval echo "$as_me:4653: \"$ac_try\"") >&5
4654   (eval $ac_try) 2>&5
4655   ac_status=$?
4656   echo "$as_me:4656: \$? = $ac_status" >&5
4657   (exit $ac_status); }; }; then
4658   ac_cv_lib_gpm_Gpm_Open=yes
4659 else
4660   echo "$as_me: failed program was:" >&5
4661 cat conftest.$ac_ext >&5
4662 ac_cv_lib_gpm_Gpm_Open=no
4663 fi
4664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4665 LIBS=$ac_check_lib_save_LIBS
4666 fi
4667 echo "$as_me:4667: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4668 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4669 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4670   :
4671 else
4672
4673                                 { { echo "$as_me:4673: error: Cannot link with GPM library" >&5
4674 echo "$as_me: error: Cannot link with GPM library" >&2;}
4675    { (exit 1); exit 1; }; }
4676                 fi
4677                 with_gpm=yes
4678
4679 fi
4680
4681 else
4682
4683                 test "$with_gpm" != maybe && { echo "$as_me:4683: WARNING: Cannot find GPM header" >&5
4684 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4685                 with_gpm=no
4686
4687 fi
4688
4689 fi
4690
4691 if test "$with_gpm" != no ; then
4692         echo "$as_me:4692: checking if you want to load GPM dynamically" >&5
4693 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4694
4695 # Check whether --with-dlsym or --without-dlsym was given.
4696 if test "${with_dlsym+set}" = set; then
4697   withval="$with_dlsym"
4698   with_dlsym=$withval
4699 else
4700   with_dlsym=yes
4701 fi;
4702         echo "$as_me:4702: result: $with_dlsym" >&5
4703 echo "${ECHO_T}$with_dlsym" >&6
4704         if test "$with_dlsym" = yes ; then
4705
4706 cf_have_dlsym=no
4707 echo "$as_me:4707: checking for dlsym" >&5
4708 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4709 if test "${ac_cv_func_dlsym+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   cat >conftest.$ac_ext <<_ACEOF
4713 #line 4713 "configure"
4714 #include "confdefs.h"
4715 /* System header to define __stub macros and hopefully few prototypes,
4716     which can conflict with char dlsym (); below.  */
4717 #include <assert.h>
4718 /* Override any gcc2 internal prototype to avoid an error.  */
4719 #ifdef __cplusplus
4720 extern "C"
4721 #endif
4722 /* We use char because int might match the return type of a gcc2
4723    builtin and then its argument prototype would still apply.  */
4724 char dlsym ();
4725 char (*f) ();
4726
4727 int
4728 main ()
4729 {
4730 /* The GNU C library defines this for functions which it implements
4731     to always fail with ENOSYS.  Some functions are actually named
4732     something starting with __ and the normal name is an alias.  */
4733 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4734 choke me
4735 #else
4736 f = dlsym;
4737 #endif
4738
4739   ;
4740   return 0;
4741 }
4742 _ACEOF
4743 rm -f conftest.$ac_objext conftest$ac_exeext
4744 if { (eval echo "$as_me:4744: \"$ac_link\"") >&5
4745   (eval $ac_link) 2>&5
4746   ac_status=$?
4747   echo "$as_me:4747: \$? = $ac_status" >&5
4748   (exit $ac_status); } &&
4749          { ac_try='test -s conftest$ac_exeext'
4750   { (eval echo "$as_me:4750: \"$ac_try\"") >&5
4751   (eval $ac_try) 2>&5
4752   ac_status=$?
4753   echo "$as_me:4753: \$? = $ac_status" >&5
4754   (exit $ac_status); }; }; then
4755   ac_cv_func_dlsym=yes
4756 else
4757   echo "$as_me: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 ac_cv_func_dlsym=no
4760 fi
4761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4762 fi
4763 echo "$as_me:4763: result: $ac_cv_func_dlsym" >&5
4764 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4765 if test $ac_cv_func_dlsym = yes; then
4766   cf_have_dlsym=yes
4767 else
4768
4769 cf_have_libdl=no
4770 echo "$as_me:4770: checking for dlsym in -ldl" >&5
4771 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4772 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4773   echo $ECHO_N "(cached) $ECHO_C" >&6
4774 else
4775   ac_check_lib_save_LIBS=$LIBS
4776 LIBS="-ldl  $LIBS"
4777 cat >conftest.$ac_ext <<_ACEOF
4778 #line 4778 "configure"
4779 #include "confdefs.h"
4780
4781 /* Override any gcc2 internal prototype to avoid an error.  */
4782 #ifdef __cplusplus
4783 extern "C"
4784 #endif
4785 /* We use char because int might match the return type of a gcc2
4786    builtin and then its argument prototype would still apply.  */
4787 char dlsym ();
4788 int
4789 main ()
4790 {
4791 dlsym ();
4792   ;
4793   return 0;
4794 }
4795 _ACEOF
4796 rm -f conftest.$ac_objext conftest$ac_exeext
4797 if { (eval echo "$as_me:4797: \"$ac_link\"") >&5
4798   (eval $ac_link) 2>&5
4799   ac_status=$?
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); } &&
4802          { ac_try='test -s conftest$ac_exeext'
4803   { (eval echo "$as_me:4803: \"$ac_try\"") >&5
4804   (eval $ac_try) 2>&5
4805   ac_status=$?
4806   echo "$as_me:4806: \$? = $ac_status" >&5
4807   (exit $ac_status); }; }; then
4808   ac_cv_lib_dl_dlsym=yes
4809 else
4810   echo "$as_me: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
4812 ac_cv_lib_dl_dlsym=no
4813 fi
4814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4815 LIBS=$ac_check_lib_save_LIBS
4816 fi
4817 echo "$as_me:4817: result: $ac_cv_lib_dl_dlsym" >&5
4818 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4819 if test $ac_cv_lib_dl_dlsym = yes; then
4820
4821         cf_have_dlsym=yes
4822         cf_have_libdl=yes
4823 fi
4824
4825 fi
4826
4827 if test "$cf_have_dlsym" = yes ; then
4828         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4829
4830         echo "$as_me:4830: checking whether able to link to dl*() functions" >&5
4831 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4832         cat >conftest.$ac_ext <<_ACEOF
4833 #line 4833 "configure"
4834 #include "confdefs.h"
4835 #include <dlfcn.h>
4836 int
4837 main ()
4838 {
4839
4840                 void *obj;
4841                 if ((obj = dlopen("filename", 0)) != 0) {
4842                         if (dlsym(obj, "symbolname") == 0) {
4843                         dlclose(obj);
4844                         }
4845                 }
4846   ;
4847   return 0;
4848 }
4849 _ACEOF
4850 rm -f conftest.$ac_objext conftest$ac_exeext
4851 if { (eval echo "$as_me:4851: \"$ac_link\"") >&5
4852   (eval $ac_link) 2>&5
4853   ac_status=$?
4854   echo "$as_me:4854: \$? = $ac_status" >&5
4855   (exit $ac_status); } &&
4856          { ac_try='test -s conftest$ac_exeext'
4857   { (eval echo "$as_me:4857: \"$ac_try\"") >&5
4858   (eval $ac_try) 2>&5
4859   ac_status=$?
4860   echo "$as_me:4860: \$? = $ac_status" >&5
4861   (exit $ac_status); }; }; then
4862
4863                 cat >>confdefs.h <<\EOF
4864 #define HAVE_LIBDL 1
4865 EOF
4866
4867 else
4868   echo "$as_me: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4870
4871                 { { echo "$as_me:4871: error: Cannot link test program for libdl" >&5
4872 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4873    { (exit 1); exit 1; }; }
4874 fi
4875 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4876         echo "$as_me:4876: result: ok" >&5
4877 echo "${ECHO_T}ok" >&6
4878 else
4879         { { echo "$as_me:4879: error: Cannot find dlsym function" >&5
4880 echo "$as_me: error: Cannot find dlsym function" >&2;}
4881    { (exit 1); exit 1; }; }
4882 fi
4883
4884                 if test "$with_gpm" != yes ; then
4885                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4886
4887 echo "${as_me-configure}:4887: testing assuming soname for gpm is $with_gpm ..." 1>&5
4888
4889                         cf_cv_gpm_soname="$with_gpm"
4890                 else
4891
4892 echo "$as_me:4892: checking for soname of gpm library" >&5
4893 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4894 if test "${cf_cv_gpm_soname+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897
4898 cf_cv_gpm_soname=unknown
4899 if test "$cross_compiling" != yes ; then
4900 cat >conftest.$ac_ext <<CF_EOF
4901 #include <gpm.h>
4902 int main()
4903 {
4904 if (Gpm_Open(0,0)) Gpm_Close();
4905         ${cf_cv_main_return:-return}(0);
4906 }
4907 CF_EOF
4908 cf_save_LIBS="$LIBS"
4909         LIBS="-lgpm $LIBS"
4910         if { (eval echo "$as_me:4910: \"$ac_compile\"") >&5
4911   (eval $ac_compile) 2>&5
4912   ac_status=$?
4913   echo "$as_me:4913: \$? = $ac_status" >&5
4914   (exit $ac_status); } ; then
4915                 if { (eval echo "$as_me:4915: \"$ac_link\"") >&5
4916   (eval $ac_link) 2>&5
4917   ac_status=$?
4918   echo "$as_me:4918: \$? = $ac_status" >&5
4919   (exit $ac_status); } ; then
4920                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4921                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4922                 fi
4923         fi
4924 rm -f conftest*
4925 LIBS="$cf_save_LIBS"
4926 fi
4927
4928 fi
4929 echo "$as_me:4929: result: $cf_cv_gpm_soname" >&5
4930 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4931
4932                 fi
4933                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4934 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4935 EOF
4936
4937                 SHLIB_LIST="-ldl $SHLIB_LIST"
4938         else
4939                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4940         fi
4941         cat >>confdefs.h <<\EOF
4942 #define HAVE_LIBGPM 1
4943 EOF
4944
4945 echo "$as_me:4945: checking for Gpm_Wgetch in -lgpm" >&5
4946 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4947 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4948   echo $ECHO_N "(cached) $ECHO_C" >&6
4949 else
4950   ac_check_lib_save_LIBS=$LIBS
4951 LIBS="-lgpm  $LIBS"
4952 cat >conftest.$ac_ext <<_ACEOF
4953 #line 4953 "configure"
4954 #include "confdefs.h"
4955
4956 /* Override any gcc2 internal prototype to avoid an error.  */
4957 #ifdef __cplusplus
4958 extern "C"
4959 #endif
4960 /* We use char because int might match the return type of a gcc2
4961    builtin and then its argument prototype would still apply.  */
4962 char Gpm_Wgetch ();
4963 int
4964 main ()
4965 {
4966 Gpm_Wgetch ();
4967   ;
4968   return 0;
4969 }
4970 _ACEOF
4971 rm -f conftest.$ac_objext conftest$ac_exeext
4972 if { (eval echo "$as_me:4972: \"$ac_link\"") >&5
4973   (eval $ac_link) 2>&5
4974   ac_status=$?
4975   echo "$as_me:4975: \$? = $ac_status" >&5
4976   (exit $ac_status); } &&
4977          { ac_try='test -s conftest$ac_exeext'
4978   { (eval echo "$as_me:4978: \"$ac_try\"") >&5
4979   (eval $ac_try) 2>&5
4980   ac_status=$?
4981   echo "$as_me:4981: \$? = $ac_status" >&5
4982   (exit $ac_status); }; }; then
4983   ac_cv_lib_gpm_Gpm_Wgetch=yes
4984 else
4985   echo "$as_me: failed program was:" >&5
4986 cat conftest.$ac_ext >&5
4987 ac_cv_lib_gpm_Gpm_Wgetch=no
4988 fi
4989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4990 LIBS=$ac_check_lib_save_LIBS
4991 fi
4992 echo "$as_me:4992: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4993 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4994 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4995
4996 echo "$as_me:4996: checking if GPM is weakly bound to curses library" >&5
4997 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4998 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4999   echo $ECHO_N "(cached) $ECHO_C" >&6
5000 else
5001
5002 cf_cv_check_gpm_wgetch=unknown
5003 if test "$cross_compiling" != yes ; then
5004
5005 cat >conftest.$ac_ext <<CF_EOF
5006 #include <gpm.h>
5007 int main()
5008 {
5009         Gpm_Wgetch();
5010         ${cf_cv_main_return:-return}(0);
5011 }
5012 CF_EOF
5013
5014         cf_save_LIBS="$LIBS"
5015         # This only works if we can look at the symbol table.  If a shared
5016         # library is stripped for install, we cannot use that.  So we're forced
5017         # to rely on the static library, noting that some packagers may not
5018         # include it.
5019         LIBS="-static -lgpm -dynamic $LIBS"
5020         if { (eval echo "$as_me:5020: \"$ac_compile\"") >&5
5021   (eval $ac_compile) 2>&5
5022   ac_status=$?
5023   echo "$as_me:5023: \$? = $ac_status" >&5
5024   (exit $ac_status); } ; then
5025                 if { (eval echo "$as_me:5025: \"$ac_link\"") >&5
5026   (eval $ac_link) 2>&5
5027   ac_status=$?
5028   echo "$as_me:5028: \$? = $ac_status" >&5
5029   (exit $ac_status); } ; then
5030                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5031                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5032                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5033                 fi
5034         fi
5035         rm -f conftest*
5036         LIBS="$cf_save_LIBS"
5037 fi
5038
5039 fi
5040 echo "$as_me:5040: result: $cf_cv_check_gpm_wgetch" >&5
5041 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5042
5043 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5044         { echo "$as_me:5044: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5045 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5046 fi
5047
5048 fi
5049
5050 fi
5051
5052 # not everyone has "test -c"
5053 if test -c /dev/sysmouse 2>/dev/null ; then
5054 echo "$as_me:5054: checking if you want to use sysmouse" >&5
5055 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5056
5057 # Check whether --with-sysmouse or --without-sysmouse was given.
5058 if test "${with_sysmouse+set}" = set; then
5059   withval="$with_sysmouse"
5060   cf_with_sysmouse=$withval
5061 else
5062   cf_with_sysmouse=maybe
5063 fi;
5064         if test "$cf_with_sysmouse" != no ; then
5065         cat >conftest.$ac_ext <<_ACEOF
5066 #line 5066 "configure"
5067 #include "confdefs.h"
5068
5069 #include <osreldate.h>
5070 #if (__FreeBSD_version >= 400017)
5071 #include <sys/consio.h>
5072 #include <sys/fbio.h>
5073 #else
5074 #include <machine/console.h>
5075 #endif
5076
5077 int
5078 main ()
5079 {
5080
5081         struct mouse_info the_mouse;
5082         ioctl(0, CONS_MOUSECTL, &the_mouse);
5083
5084   ;
5085   return 0;
5086 }
5087 _ACEOF
5088 rm -f conftest.$ac_objext
5089 if { (eval echo "$as_me:5089: \"$ac_compile\"") >&5
5090   (eval $ac_compile) 2>&5
5091   ac_status=$?
5092   echo "$as_me:5092: \$? = $ac_status" >&5
5093   (exit $ac_status); } &&
5094          { ac_try='test -s conftest.$ac_objext'
5095   { (eval echo "$as_me:5095: \"$ac_try\"") >&5
5096   (eval $ac_try) 2>&5
5097   ac_status=$?
5098   echo "$as_me:5098: \$? = $ac_status" >&5
5099   (exit $ac_status); }; }; then
5100   cf_with_sysmouse=yes
5101 else
5102   echo "$as_me: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5104 cf_with_sysmouse=no
5105 fi
5106 rm -f conftest.$ac_objext conftest.$ac_ext
5107         fi
5108 echo "$as_me:5108: result: $cf_with_sysmouse" >&5
5109 echo "${ECHO_T}$cf_with_sysmouse" >&6
5110 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5111 #define USE_SYSMOUSE 1
5112 EOF
5113
5114 fi
5115
5116 if test X"$CC_G_OPT" = X"" ; then
5117         CC_G_OPT='-g'
5118         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5119 fi
5120
5121 if test X"$CXX_G_OPT" = X"" ; then
5122         CXX_G_OPT='-g'
5123         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5124 fi
5125
5126 echo "$as_me:5126: checking for default loader flags" >&5
5127 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5128 case $DFT_LWR_MODEL in
5129 libtool) LD_MODEL=''   ;;
5130 normal)  LD_MODEL=''   ;;
5131 debug)   LD_MODEL=$CC_G_OPT ;;
5132 profile) LD_MODEL='-pg';;
5133 shared)  LD_MODEL=''   ;;
5134 esac
5135 echo "$as_me:5135: result: $LD_MODEL" >&5
5136 echo "${ECHO_T}$LD_MODEL" >&6
5137
5138 case $DFT_LWR_MODEL in
5139 shared)
5140
5141 echo "$as_me:5141: checking if rpath option should be used" >&5
5142 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5143
5144 # Check whether --enable-rpath or --disable-rpath was given.
5145 if test "${enable_rpath+set}" = set; then
5146   enableval="$enable_rpath"
5147   cf_cv_ld_rpath=$enableval
5148 else
5149   cf_cv_ld_rpath=no
5150 fi;
5151 echo "$as_me:5151: result: $cf_cv_ld_rpath" >&5
5152 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5153
5154 echo "$as_me:5154: checking if shared libraries should be relinked during install" >&5
5155 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5156
5157 # Check whether --enable-relink or --disable-relink was given.
5158 if test "${enable_relink+set}" = set; then
5159   enableval="$enable_relink"
5160   cf_cv_do_relink=$enableval
5161 else
5162   cf_cv_do_relink=yes
5163 fi;
5164 echo "$as_me:5164: result: $cf_cv_do_relink" >&5
5165 echo "${ECHO_T}$cf_cv_do_relink" >&6
5166         ;;
5167 esac
5168
5169         LOCAL_LDFLAGS=
5170         LOCAL_LDFLAGS2=
5171         LD_RPATH_OPT=
5172         LD_SHARED_OPTS=
5173         INSTALL_LIB="-m 644"
5174
5175         cf_cv_do_symlinks=no
5176
5177         echo "$as_me:5177: checking if release/abi version should be used for shared libs" >&5
5178 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5179
5180 # Check whether --with-shlib-version or --without-shlib-version was given.
5181 if test "${with_shlib_version+set}" = set; then
5182   withval="$with_shlib_version"
5183   test -z "$withval" && withval=auto
5184         case $withval in #(vi
5185         yes) #(vi
5186                 cf_cv_shlib_version=auto
5187                 ;;
5188         rel|abi|auto|no) #(vi
5189                 cf_cv_shlib_version=$withval
5190                 ;;
5191         *)
5192                 { { echo "$as_me:5192: error: option value must be one of: rel, abi, auto or no" >&5
5193 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5194    { (exit 1); exit 1; }; }
5195                 ;;
5196         esac
5197
5198 else
5199   cf_cv_shlib_version=auto
5200 fi;
5201         echo "$as_me:5201: result: $cf_cv_shlib_version" >&5
5202 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5203
5204         cf_cv_rm_so_locs=no
5205
5206         # Some less-capable ports of gcc support only -fpic
5207         CC_SHARED_OPTS=
5208         if test "$GCC" = yes
5209         then
5210                 echo "$as_me:5210: checking which $CC option to use" >&5
5211 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5212                 cf_save_CFLAGS="$CFLAGS"
5213                 for CC_SHARED_OPTS in -fPIC -fpic ''
5214                 do
5215                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5216                         cat >conftest.$ac_ext <<_ACEOF
5217 #line 5217 "configure"
5218 #include "confdefs.h"
5219 #include <stdio.h>
5220 int
5221 main ()
5222 {
5223 int x = 1
5224   ;
5225   return 0;
5226 }
5227 _ACEOF
5228 rm -f conftest.$ac_objext
5229 if { (eval echo "$as_me:5229: \"$ac_compile\"") >&5
5230   (eval $ac_compile) 2>&5
5231   ac_status=$?
5232   echo "$as_me:5232: \$? = $ac_status" >&5
5233   (exit $ac_status); } &&
5234          { ac_try='test -s conftest.$ac_objext'
5235   { (eval echo "$as_me:5235: \"$ac_try\"") >&5
5236   (eval $ac_try) 2>&5
5237   ac_status=$?
5238   echo "$as_me:5238: \$? = $ac_status" >&5
5239   (exit $ac_status); }; }; then
5240   break
5241 else
5242   echo "$as_me: failed program was:" >&5
5243 cat conftest.$ac_ext >&5
5244 fi
5245 rm -f conftest.$ac_objext conftest.$ac_ext
5246                 done
5247                 echo "$as_me:5247: result: $CC_SHARED_OPTS" >&5
5248 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5249                 CFLAGS="$cf_save_CFLAGS"
5250         fi
5251
5252         cf_cv_shlib_version_infix=no
5253
5254         case $cf_cv_system_name in
5255         aix[56]*)
5256                 if test "$GCC" = yes; then
5257                         CC_SHARED_OPTS=
5258                         MK_SHARED_LIB="$(CC) -shared"
5259                 fi
5260                 ;;
5261         beos*)
5262                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5263                 ;;
5264         cygwin*)
5265                 CC_SHARED_OPTS=
5266                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5267                 cf_cv_shlib_version=cygdll
5268                 cf_cv_shlib_version_infix=cygdll
5269                 cat >mk_shared_lib.sh <<-CF_EOF
5270                 #!/bin/sh
5271                 SHARED_LIB=\$1
5272                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5273                 shift
5274                 cat <<-EOF
5275                 Linking shared library
5276                 ** SHARED_LIB \$SHARED_LIB
5277                 ** IMPORT_LIB \$IMPORT_LIB
5278 EOF
5279                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5280 CF_EOF
5281                 chmod +x mk_shared_lib.sh
5282                 ;;
5283         darwin*)
5284                 EXTRA_CFLAGS="-no-cpp-precomp"
5285                 CC_SHARED_OPTS="-dynamic"
5286                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5287                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5288                 cf_cv_shlib_version_infix=yes
5289                 echo "$as_me:5289: checking if ld -search_paths_first works" >&5
5290 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5291 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5292   echo $ECHO_N "(cached) $ECHO_C" >&6
5293 else
5294
5295                         cf_save_LDFLAGS=$LDFLAGS
5296                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5297                         cat >conftest.$ac_ext <<_ACEOF
5298 #line 5298 "configure"
5299 #include "confdefs.h"
5300
5301 int
5302 main ()
5303 {
5304 int i;
5305   ;
5306   return 0;
5307 }
5308 _ACEOF
5309 rm -f conftest.$ac_objext conftest$ac_exeext
5310 if { (eval echo "$as_me:5310: \"$ac_link\"") >&5
5311   (eval $ac_link) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); } &&
5315          { ac_try='test -s conftest$ac_exeext'
5316   { (eval echo "$as_me:5316: \"$ac_try\"") >&5
5317   (eval $ac_try) 2>&5
5318   ac_status=$?
5319   echo "$as_me:5319: \$? = $ac_status" >&5
5320   (exit $ac_status); }; }; then
5321   cf_cv_ldflags_search_paths_first=yes
5322 else
5323   echo "$as_me: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 cf_cv_ldflags_search_paths_first=no
5326 fi
5327 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5328                                 LDFLAGS=$cf_save_LDFLAGS
5329 fi
5330 echo "$as_me:5330: result: $cf_cv_ldflags_search_paths_first" >&5
5331 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5332                 if test $cf_cv_ldflags_search_paths_first = yes; then
5333                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5334                 fi
5335                 ;;
5336         hpux*)
5337                 # (tested with gcc 2.7.2 -- I don't have c89)
5338                 if test "$GCC" = yes; then
5339                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5340                 else
5341                         CC_SHARED_OPTS='+Z'
5342                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5343                 fi
5344                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5345                 # HP-UX shared libraries must be executable, and should be
5346                 # readonly to exploit a quirk in the memory manager.
5347                 INSTALL_LIB="-m 555"
5348                 ;;
5349         irix*)
5350                 if test "$cf_cv_ld_rpath" = yes ; then
5351                         if test "$GCC" = yes; then
5352                                 LD_RPATH_OPT="-Wl,-rpath,"
5353                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5354                         else
5355                                 LD_RPATH_OPT="-rpath "
5356                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5357                         fi
5358                 fi
5359                 # tested with IRIX 5.2 and 'cc'.
5360                 if test "$GCC" != yes; then
5361                         CC_SHARED_OPTS='-KPIC'
5362                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5363                 else
5364                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5365                 fi
5366                 cf_cv_rm_so_locs=yes
5367                 ;;
5368         linux*|gnu*|k*bsd*-gnu)
5369                 if test "$DFT_LWR_MODEL" = "shared" ; then
5370                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5371                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5372                 fi
5373                 if test "$cf_cv_ld_rpath" = yes ; then
5374                         LD_RPATH_OPT="-Wl,-rpath,"
5375                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5376                 fi
5377
5378         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5379         if test "$cf_cv_shlib_version" = rel; then
5380                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5381         else
5382                 cf_cv_shared_soname='`basename $@`'
5383         fi
5384
5385                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5386                 ;;
5387         openbsd[2-9].*)
5388                 if test "$DFT_LWR_MODEL" = "shared" ; then
5389                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5390                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5391                 fi
5392                 if test "$cf_cv_ld_rpath" = yes ; then
5393                         LD_RPATH_OPT="-Wl,-rpath,"
5394                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5395                 fi
5396                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5397
5398         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5399         if test "$cf_cv_shlib_version" = rel; then
5400                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5401         else
5402                 cf_cv_shared_soname='`basename $@`'
5403         fi
5404
5405                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5406                 ;;
5407         nto-qnx*|openbsd*|freebsd[12].*)
5408                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5409                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5410                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5411                 ;;
5412         freebsd*)
5413                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5414                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5415                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5416                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5417                         LD_RPATH_OPT="-rpath "
5418                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5419                 fi
5420
5421         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5422         if test "$cf_cv_shlib_version" = rel; then
5423                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5424         else
5425                 cf_cv_shared_soname='`basename $@`'
5426         fi
5427
5428                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5429                 ;;
5430         netbsd*)
5431                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5432                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5433                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5434                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5435                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5436                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5437                         if test "$cf_cv_shlib_version" = auto; then
5438                         if test -f /usr/libexec/ld.elf_so; then
5439                                 cf_cv_shlib_version=abi
5440                         else
5441                                 cf_cv_shlib_version=rel
5442                         fi
5443                         fi
5444
5445         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5446         if test "$cf_cv_shlib_version" = rel; then
5447                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5448         else
5449                 cf_cv_shared_soname='`basename $@`'
5450         fi
5451
5452                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5453                 else
5454                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5455                 fi
5456                 ;;
5457         osf*|mls+*)
5458                 # tested with OSF/1 V3.2 and 'cc'
5459                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5460                 # link with shared libs).
5461                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5462                 case $host_os in
5463                 osf4*)
5464                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5465                         ;;
5466                 esac
5467                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5468                 if test "$DFT_LWR_MODEL" = "shared" ; then
5469                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5470                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5471                 fi
5472                 if test "$cf_cv_ld_rpath" = yes ; then
5473                         LD_RPATH_OPT="-rpath"
5474                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5475                 fi
5476                 cf_cv_rm_so_locs=yes
5477                 ;;
5478         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5479                 # tested with osr5.0.5
5480                 if test "$GCC" != yes; then
5481                         CC_SHARED_OPTS='-belf -KPIC'
5482                 fi
5483                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5484                 if test "$cf_cv_ld_rpath" = yes ; then
5485                         # only way is to set LD_RUN_PATH but no switch for it
5486                         RUN_PATH=$libdir
5487                 fi
5488                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5489                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5490                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5491                 ;;
5492         sunos4*)
5493                 # tested with SunOS 4.1.1 and gcc 2.7.0
5494                 if test "$GCC" != yes; then
5495                         CC_SHARED_OPTS='-KPIC'
5496                 fi
5497                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5498                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5499                 ;;
5500         solaris2*)
5501                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5502                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5503                 if test "$DFT_LWR_MODEL" = "shared" ; then
5504                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5505                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5506                 fi
5507                 if test "$cf_cv_ld_rpath" = yes ; then
5508                         LD_RPATH_OPT="-R"
5509                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5510                 fi
5511
5512         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5513         if test "$cf_cv_shlib_version" = rel; then
5514                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5515         else
5516                 cf_cv_shared_soname='`basename $@`'
5517         fi
5518
5519                 if test "$GCC" != yes; then
5520                         cf_save_CFLAGS="$CFLAGS"
5521                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5522                         do
5523                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5524                                 cat >conftest.$ac_ext <<_ACEOF
5525 #line 5525 "configure"
5526 #include "confdefs.h"
5527 #include <stdio.h>
5528 int
5529 main ()
5530 {
5531 printf("Hello\n");
5532   ;
5533   return 0;
5534 }
5535 _ACEOF
5536 rm -f conftest.$ac_objext
5537 if { (eval echo "$as_me:5537: \"$ac_compile\"") >&5
5538   (eval $ac_compile) 2>&5
5539   ac_status=$?
5540   echo "$as_me:5540: \$? = $ac_status" >&5
5541   (exit $ac_status); } &&
5542          { ac_try='test -s conftest.$ac_objext'
5543   { (eval echo "$as_me:5543: \"$ac_try\"") >&5
5544   (eval $ac_try) 2>&5
5545   ac_status=$?
5546   echo "$as_me:5546: \$? = $ac_status" >&5
5547   (exit $ac_status); }; }; then
5548   break
5549 else
5550   echo "$as_me: failed program was:" >&5
5551 cat conftest.$ac_ext >&5
5552 fi
5553 rm -f conftest.$ac_objext conftest.$ac_ext
5554                         done
5555                         CFLAGS="$cf_save_CFLAGS"
5556                         CC_SHARED_OPTS=$cf_shared_opts
5557                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5558                 else
5559                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5560                 fi
5561                 ;;
5562         sysv5uw7*|unix_sv*)
5563                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5564                 if test "$GCC" != yes; then
5565                         CC_SHARED_OPTS='-KPIC'
5566                 fi
5567                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5568                 ;;
5569         *)
5570                 CC_SHARED_OPTS='unknown'
5571                 MK_SHARED_LIB='echo unknown'
5572                 ;;
5573         esac
5574
5575         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5576         case "$cf_cv_shlib_version" in #(vi
5577         rel|abi)
5578                 case "$MK_SHARED_LIB" in #(vi
5579                 *'-o $@')
5580                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5581                         ;;
5582                 *)
5583                         { echo "$as_me:5583: WARNING: ignored --with-shlib-version" >&5
5584 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5585                         ;;
5586                 esac
5587                 ;;
5588         esac
5589
5590         if test -n "$LD_RPATH_OPT" ; then
5591                 echo "$as_me:5591: checking if we need a space after rpath option" >&5
5592 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5593                 cf_save_LIBS="$LIBS"
5594                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5595                 cat >conftest.$ac_ext <<_ACEOF
5596 #line 5596 "configure"
5597 #include "confdefs.h"
5598
5599 int
5600 main ()
5601 {
5602
5603   ;
5604   return 0;
5605 }
5606 _ACEOF
5607 rm -f conftest.$ac_objext conftest$ac_exeext
5608 if { (eval echo "$as_me:5608: \"$ac_link\"") >&5
5609   (eval $ac_link) 2>&5
5610   ac_status=$?
5611   echo "$as_me:5611: \$? = $ac_status" >&5
5612   (exit $ac_status); } &&
5613          { ac_try='test -s conftest$ac_exeext'
5614   { (eval echo "$as_me:5614: \"$ac_try\"") >&5
5615   (eval $ac_try) 2>&5
5616   ac_status=$?
5617   echo "$as_me:5617: \$? = $ac_status" >&5
5618   (exit $ac_status); }; }; then
5619   cf_rpath_space=no
5620 else
5621   echo "$as_me: failed program was:" >&5
5622 cat conftest.$ac_ext >&5
5623 cf_rpath_space=yes
5624 fi
5625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5626                 LIBS="$cf_save_LIBS"
5627                 echo "$as_me:5627: result: $cf_rpath_space" >&5
5628 echo "${ECHO_T}$cf_rpath_space" >&6
5629                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5630                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5631         fi
5632
5633 if test "$CC_SHARED_OPTS" = "unknown"; then
5634         for model in $cf_list_models; do
5635                 if test "$model" = "shared"; then
5636                         { { echo "$as_me:5636: error: Shared libraries are not supported in this version" >&5
5637 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 fi
5640         done
5641 fi
5642
5643 ###############################################################################
5644
5645 ###     use option --disable-overwrite to leave out the link to -lcurses
5646 echo "$as_me:5646: checking if you wish to install ncurses overwriting curses" >&5
5647 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5648
5649 # Check whether --enable-overwrite or --disable-overwrite was given.
5650 if test "${enable_overwrite+set}" = set; then
5651   enableval="$enable_overwrite"
5652   with_overwrite=$enableval
5653 else
5654   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5655 fi;
5656 echo "$as_me:5656: result: $with_overwrite" >&5
5657 echo "${ECHO_T}$with_overwrite" >&6
5658
5659 echo "$as_me:5659: checking if external terminfo-database is used" >&5
5660 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5661
5662 # Check whether --enable-database or --disable-database was given.
5663 if test "${enable_database+set}" = set; then
5664   enableval="$enable_database"
5665   use_database=$enableval
5666 else
5667   use_database=yes
5668 fi;
5669 echo "$as_me:5669: result: $use_database" >&5
5670 echo "${ECHO_T}$use_database" >&6
5671
5672 case $host_os in #(vi
5673 os2*) #(vi
5674         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5675         ;;
5676 *) #(vi
5677         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5678         ;;
5679 esac
5680
5681         case $cf_cv_system_name in
5682         os2*)   PATH_SEPARATOR=';'  ;;
5683         *)      PATH_SEPARATOR=':'  ;;
5684         esac
5685
5686 if test "$use_database" != no ; then
5687         cat >>confdefs.h <<\EOF
5688 #define USE_DATABASE 1
5689 EOF
5690
5691         echo "$as_me:5691: checking which terminfo source-file will be installed" >&5
5692 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5693
5694 # Check whether --enable-database or --disable-database was given.
5695 if test "${enable_database+set}" = set; then
5696   enableval="$enable_database"
5697   TERMINFO_SRC=$withval
5698 fi;
5699         echo "$as_me:5699: result: $TERMINFO_SRC" >&5
5700 echo "${ECHO_T}$TERMINFO_SRC" >&6
5701
5702         echo "$as_me:5702: checking whether to use hashed database instead of directory/tree" >&5
5703 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5704
5705 # Check whether --with-hashed-db or --without-hashed-db was given.
5706 if test "${with_hashed_db+set}" = set; then
5707   withval="$with_hashed_db"
5708
5709 else
5710   with_hashed_db=no
5711 fi;
5712         echo "$as_me:5712: result: $with_hashed_db" >&5
5713 echo "${ECHO_T}$with_hashed_db" >&6
5714 else
5715         with_hashed_db=no
5716 fi
5717
5718 echo "$as_me:5718: checking for list of fallback descriptions" >&5
5719 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5720
5721 # Check whether --with-fallbacks or --without-fallbacks was given.
5722 if test "${with_fallbacks+set}" = set; then
5723   withval="$with_fallbacks"
5724   with_fallback=$withval
5725 else
5726   with_fallback=
5727 fi;
5728 echo "$as_me:5728: result: $with_fallback" >&5
5729 echo "${ECHO_T}$with_fallback" >&6
5730 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5731
5732 echo "$as_me:5732: checking if you want modern xterm or antique" >&5
5733 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5734
5735 # Check whether --with-xterm-new or --without-xterm-new was given.
5736 if test "${with_xterm_new+set}" = set; then
5737   withval="$with_xterm_new"
5738   with_xterm_new=$withval
5739 else
5740   with_xterm_new=yes
5741 fi;
5742 case $with_xterm_new in
5743 no)     with_xterm_new=xterm-old;;
5744 *)      with_xterm_new=xterm-new;;
5745 esac
5746 echo "$as_me:5746: result: $with_xterm_new" >&5
5747 echo "${ECHO_T}$with_xterm_new" >&6
5748 WHICH_XTERM=$with_xterm_new
5749
5750 MAKE_TERMINFO=
5751 if test "$use_database" = no ; then
5752         TERMINFO="${datadir}/terminfo"
5753         MAKE_TERMINFO="#"
5754 else
5755
5756 echo "$as_me:5756: checking for list of terminfo directories" >&5
5757 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5758
5759 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5760 if test "${with_terminfo_dirs+set}" = set; then
5761   withval="$with_terminfo_dirs"
5762
5763 else
5764   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5765 fi;
5766 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5767 cf_dst_path=
5768 for cf_src_path in $withval
5769 do
5770
5771 if test "x$prefix" != xNONE; then
5772   cf_path_syntax="$prefix"
5773 else
5774   cf_path_syntax="$ac_default_prefix"
5775 fi
5776
5777 case ".$cf_src_path" in #(vi
5778 .\$\(*\)*|.\'*\'*) #(vi
5779   ;;
5780 ..|./*|.\\*) #(vi
5781   ;;
5782 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5783   ;;
5784 .\${*prefix}*) #(vi
5785   eval cf_src_path="$cf_src_path"
5786   case ".$cf_src_path" in #(vi
5787   .NONE/*)
5788     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5789     ;;
5790   esac
5791   ;; #(vi
5792 .no|.NONE/*)
5793   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5794   ;;
5795 *)
5796   { { echo "$as_me:5796: error: expected a pathname, not \"$cf_src_path\"" >&5
5797 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5798    { (exit 1); exit 1; }; }
5799   ;;
5800 esac
5801
5802   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5803   cf_dst_path="${cf_dst_path}${cf_src_path}"
5804 done
5805 IFS="$ac_save_ifs"
5806
5807 eval 'TERMINFO_DIRS="$cf_dst_path"'
5808
5809 echo "$as_me:5809: result: $TERMINFO_DIRS" >&5
5810 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5811 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5812 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5813 EOF
5814
5815 echo "$as_me:5815: checking for default terminfo directory" >&5
5816 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5817
5818 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5819 if test "${with_default_terminfo_dir+set}" = set; then
5820   withval="$with_default_terminfo_dir"
5821
5822 else
5823   withval="${TERMINFO-${datadir}/terminfo}"
5824 fi; if test -n "${datadir}/terminfo" ; then
5825
5826 if test "x$prefix" != xNONE; then
5827   cf_path_syntax="$prefix"
5828 else
5829   cf_path_syntax="$ac_default_prefix"
5830 fi
5831
5832 case ".$withval" in #(vi
5833 .\$\(*\)*|.\'*\'*) #(vi
5834   ;;
5835 ..|./*|.\\*) #(vi
5836   ;;
5837 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5838   ;;
5839 .\${*prefix}*) #(vi
5840   eval withval="$withval"
5841   case ".$withval" in #(vi
5842   .NONE/*)
5843     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5844     ;;
5845   esac
5846   ;; #(vi
5847 .no|.NONE/*)
5848   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5849   ;;
5850 *)
5851   { { echo "$as_me:5851: error: expected a pathname, not \"$withval\"" >&5
5852 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5853    { (exit 1); exit 1; }; }
5854   ;;
5855 esac
5856
5857 fi
5858 TERMINFO="$withval"
5859
5860 echo "$as_me:5860: result: $TERMINFO" >&5
5861 echo "${ECHO_T}$TERMINFO" >&6
5862 cat >>confdefs.h <<EOF
5863 #define TERMINFO "$TERMINFO"
5864 EOF
5865
5866 fi
5867
5868 ###     use option --disable-big-core to make tic run on small machines
5869 ###     We need 4Mb, check if we can allocate 50% more than that.
5870 echo "$as_me:5870: checking if big-core option selected" >&5
5871 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5872
5873 # Check whether --enable-big-core or --disable-big-core was given.
5874 if test "${enable_big_core+set}" = set; then
5875   enableval="$enable_big_core"
5876   with_big_core=$enableval
5877 else
5878   if test "$cross_compiling" = yes; then
5879   with_big_core=no
5880 else
5881   cat >conftest.$ac_ext <<_ACEOF
5882 #line 5882 "configure"
5883 #include "confdefs.h"
5884
5885 #include <stdlib.h>
5886 #include <string.h>
5887 int main() {
5888         unsigned long n = 6000000L;
5889         char *s = malloc(n);
5890         if (s != 0)
5891                 s[0] = s[n-1] = 0;
5892         ${cf_cv_main_return:-return}(s == 0);
5893 }
5894 _ACEOF
5895 rm -f conftest$ac_exeext
5896 if { (eval echo "$as_me:5896: \"$ac_link\"") >&5
5897   (eval $ac_link) 2>&5
5898   ac_status=$?
5899   echo "$as_me:5899: \$? = $ac_status" >&5
5900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5901   { (eval echo "$as_me:5901: \"$ac_try\"") >&5
5902   (eval $ac_try) 2>&5
5903   ac_status=$?
5904   echo "$as_me:5904: \$? = $ac_status" >&5
5905   (exit $ac_status); }; }; then
5906   with_big_core=yes
5907 else
5908   echo "$as_me: program exited with status $ac_status" >&5
5909 echo "$as_me: failed program was:" >&5
5910 cat conftest.$ac_ext >&5
5911 with_big_core=no
5912 fi
5913 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5914 fi
5915 fi;
5916 echo "$as_me:5916: result: $with_big_core" >&5
5917 echo "${ECHO_T}$with_big_core" >&6
5918 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5919 #define HAVE_BIG_CORE 1
5920 EOF
5921
5922 ### ISO C only guarantees 512-char strings, we have tables which load faster
5923 ### when constructed using "big" strings.  More than the C compiler, the awk
5924 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5925 echo "$as_me:5925: checking if big-strings option selected" >&5
5926 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5927
5928 # Check whether --enable-big-strings or --disable-big-strings was given.
5929 if test "${enable_big_strings+set}" = set; then
5930   enableval="$enable_big_strings"
5931   with_big_strings=$enableval
5932 else
5933
5934         case x$AWK in #(vi
5935         x)
5936                 eval with_big_strings=no
5937                 ;;
5938         *) #(vi
5939                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5940                         | $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
5941                         eval with_big_strings=yes
5942                 else
5943                         eval with_big_strings=no
5944                 fi
5945                 ;;
5946         esac
5947
5948 fi;
5949 echo "$as_me:5949: result: $with_big_strings" >&5
5950 echo "${ECHO_T}$with_big_strings" >&6
5951
5952 USE_BIG_STRINGS=0
5953 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5954
5955 ###     use option --enable-termcap to compile in the termcap fallback support
5956 echo "$as_me:5956: checking if you want termcap-fallback support" >&5
5957 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5958
5959 # Check whether --enable-termcap or --disable-termcap was given.
5960 if test "${enable_termcap+set}" = set; then
5961   enableval="$enable_termcap"
5962   with_termcap=$enableval
5963 else
5964   with_termcap=no
5965 fi;
5966 echo "$as_me:5966: result: $with_termcap" >&5
5967 echo "${ECHO_T}$with_termcap" >&6
5968
5969 if test "$with_termcap" != "yes" ; then
5970         if test "$use_database" = no ; then
5971                 if test -z "$with_fallback" ; then
5972                         { { echo "$as_me:5972: error: You have disabled the database w/o specifying fallbacks" >&5
5973 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5974    { (exit 1); exit 1; }; }
5975                 fi
5976         fi
5977         cat >>confdefs.h <<\EOF
5978 #define PURE_TERMINFO 1
5979 EOF
5980
5981 else
5982
5983 if test "$with_ticlib" != no ; then
5984         { { echo "$as_me:5984: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5985 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5986    { (exit 1); exit 1; }; }
5987 fi
5988
5989 cat >>confdefs.h <<\EOF
5990 #define USE_TERMCAP 1
5991 EOF
5992
5993 echo "$as_me:5993: checking for list of termcap files" >&5
5994 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5995
5996 # Check whether --with-termpath or --without-termpath was given.
5997 if test "${with_termpath+set}" = set; then
5998   withval="$with_termpath"
5999
6000 else
6001   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6002 fi;
6003 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6004 cf_dst_path=
6005 for cf_src_path in $withval
6006 do
6007
6008 if test "x$prefix" != xNONE; then
6009   cf_path_syntax="$prefix"
6010 else
6011   cf_path_syntax="$ac_default_prefix"
6012 fi
6013
6014 case ".$cf_src_path" in #(vi
6015 .\$\(*\)*|.\'*\'*) #(vi
6016   ;;
6017 ..|./*|.\\*) #(vi
6018   ;;
6019 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6020   ;;
6021 .\${*prefix}*) #(vi
6022   eval cf_src_path="$cf_src_path"
6023   case ".$cf_src_path" in #(vi
6024   .NONE/*)
6025     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6026     ;;
6027   esac
6028   ;; #(vi
6029 .no|.NONE/*)
6030   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6031   ;;
6032 *)
6033   { { echo "$as_me:6033: error: expected a pathname, not \"$cf_src_path\"" >&5
6034 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6035    { (exit 1); exit 1; }; }
6036   ;;
6037 esac
6038
6039   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6040   cf_dst_path="${cf_dst_path}${cf_src_path}"
6041 done
6042 IFS="$ac_save_ifs"
6043
6044 eval 'TERMPATH="$cf_dst_path"'
6045
6046 echo "$as_me:6046: result: $TERMPATH" >&5
6047 echo "${ECHO_T}$TERMPATH" >&6
6048 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6049 #define TERMPATH "$TERMPATH"
6050 EOF
6051
6052 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6053 echo "$as_me:6053: checking if fast termcap-loader is needed" >&5
6054 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6055
6056 # Check whether --enable-getcap or --disable-getcap was given.
6057 if test "${enable_getcap+set}" = set; then
6058   enableval="$enable_getcap"
6059   with_getcap=$enableval
6060 else
6061   with_getcap=no
6062 fi;
6063 echo "$as_me:6063: result: $with_getcap" >&5
6064 echo "${ECHO_T}$with_getcap" >&6
6065 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6066 #define USE_GETCAP 1
6067 EOF
6068
6069 echo "$as_me:6069: checking if translated termcaps will be cached in ~/.terminfo" >&5
6070 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6071
6072 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6073 if test "${enable_getcap_cache+set}" = set; then
6074   enableval="$enable_getcap_cache"
6075   with_getcap_cache=$enableval
6076 else
6077   with_getcap_cache=no
6078 fi;
6079 echo "$as_me:6079: result: $with_getcap_cache" >&5
6080 echo "${ECHO_T}$with_getcap_cache" >&6
6081 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6082 #define USE_GETCAP_CACHE 1
6083 EOF
6084
6085 fi
6086
6087 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6088 echo "$as_me:6088: checking if ~/.terminfo is wanted" >&5
6089 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6090
6091 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6092 if test "${enable_home_terminfo+set}" = set; then
6093   enableval="$enable_home_terminfo"
6094   with_home_terminfo=$enableval
6095 else
6096   with_home_terminfo=yes
6097 fi;
6098 echo "$as_me:6098: result: $with_home_terminfo" >&5
6099 echo "${ECHO_T}$with_home_terminfo" >&6
6100 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6101 #define USE_HOME_TERMINFO 1
6102 EOF
6103
6104 echo "$as_me:6104: checking if you want to use restricted environment when running as root" >&5
6105 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6106
6107 # Check whether --enable-root-environ or --disable-root-environ was given.
6108 if test "${enable_root_environ+set}" = set; then
6109   enableval="$enable_root_environ"
6110   with_root_environ=$enableval
6111 else
6112   with_root_environ=yes
6113 fi;
6114 echo "$as_me:6114: result: $with_root_environ" >&5
6115 echo "${ECHO_T}$with_root_environ" >&6
6116 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6117 #define USE_ROOT_ENVIRON 1
6118 EOF
6119
6120 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6121 ###   to reduce storage requirements for the terminfo database.
6122
6123 for ac_func in \
6124         remove \
6125         unlink
6126 do
6127 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6128 echo "$as_me:6128: checking for $ac_func" >&5
6129 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6130 if eval "test \"\${$as_ac_var+set}\" = set"; then
6131   echo $ECHO_N "(cached) $ECHO_C" >&6
6132 else
6133   cat >conftest.$ac_ext <<_ACEOF
6134 #line 6134 "configure"
6135 #include "confdefs.h"
6136 /* System header to define __stub macros and hopefully few prototypes,
6137     which can conflict with char $ac_func (); below.  */
6138 #include <assert.h>
6139 /* Override any gcc2 internal prototype to avoid an error.  */
6140 #ifdef __cplusplus
6141 extern "C"
6142 #endif
6143 /* We use char because int might match the return type of a gcc2
6144    builtin and then its argument prototype would still apply.  */
6145 char $ac_func ();
6146 char (*f) ();
6147
6148 int
6149 main ()
6150 {
6151 /* The GNU C library defines this for functions which it implements
6152     to always fail with ENOSYS.  Some functions are actually named
6153     something starting with __ and the normal name is an alias.  */
6154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6155 choke me
6156 #else
6157 f = $ac_func;
6158 #endif
6159
6160   ;
6161   return 0;
6162 }
6163 _ACEOF
6164 rm -f conftest.$ac_objext conftest$ac_exeext
6165 if { (eval echo "$as_me:6165: \"$ac_link\"") >&5
6166   (eval $ac_link) 2>&5
6167   ac_status=$?
6168   echo "$as_me:6168: \$? = $ac_status" >&5
6169   (exit $ac_status); } &&
6170          { ac_try='test -s conftest$ac_exeext'
6171   { (eval echo "$as_me:6171: \"$ac_try\"") >&5
6172   (eval $ac_try) 2>&5
6173   ac_status=$?
6174   echo "$as_me:6174: \$? = $ac_status" >&5
6175   (exit $ac_status); }; }; then
6176   eval "$as_ac_var=yes"
6177 else
6178   echo "$as_me: failed program was:" >&5
6179 cat conftest.$ac_ext >&5
6180 eval "$as_ac_var=no"
6181 fi
6182 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6183 fi
6184 echo "$as_me:6184: result: `eval echo '${'$as_ac_var'}'`" >&5
6185 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6186 if test `eval echo '${'$as_ac_var'}'` = yes; then
6187   cat >>confdefs.h <<EOF
6188 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6189 EOF
6190
6191 fi
6192 done
6193
6194 if test "$cross_compiling" = yes ; then
6195
6196 for ac_func in \
6197                 link \
6198                 symlink
6199 do
6200 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6201 echo "$as_me:6201: checking for $ac_func" >&5
6202 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6203 if eval "test \"\${$as_ac_var+set}\" = set"; then
6204   echo $ECHO_N "(cached) $ECHO_C" >&6
6205 else
6206   cat >conftest.$ac_ext <<_ACEOF
6207 #line 6207 "configure"
6208 #include "confdefs.h"
6209 /* System header to define __stub macros and hopefully few prototypes,
6210     which can conflict with char $ac_func (); below.  */
6211 #include <assert.h>
6212 /* Override any gcc2 internal prototype to avoid an error.  */
6213 #ifdef __cplusplus
6214 extern "C"
6215 #endif
6216 /* We use char because int might match the return type of a gcc2
6217    builtin and then its argument prototype would still apply.  */
6218 char $ac_func ();
6219 char (*f) ();
6220
6221 int
6222 main ()
6223 {
6224 /* The GNU C library defines this for functions which it implements
6225     to always fail with ENOSYS.  Some functions are actually named
6226     something starting with __ and the normal name is an alias.  */
6227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6228 choke me
6229 #else
6230 f = $ac_func;
6231 #endif
6232
6233   ;
6234   return 0;
6235 }
6236 _ACEOF
6237 rm -f conftest.$ac_objext conftest$ac_exeext
6238 if { (eval echo "$as_me:6238: \"$ac_link\"") >&5
6239   (eval $ac_link) 2>&5
6240   ac_status=$?
6241   echo "$as_me:6241: \$? = $ac_status" >&5
6242   (exit $ac_status); } &&
6243          { ac_try='test -s conftest$ac_exeext'
6244   { (eval echo "$as_me:6244: \"$ac_try\"") >&5
6245   (eval $ac_try) 2>&5
6246   ac_status=$?
6247   echo "$as_me:6247: \$? = $ac_status" >&5
6248   (exit $ac_status); }; }; then
6249   eval "$as_ac_var=yes"
6250 else
6251   echo "$as_me: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
6253 eval "$as_ac_var=no"
6254 fi
6255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6256 fi
6257 echo "$as_me:6257: result: `eval echo '${'$as_ac_var'}'`" >&5
6258 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6259 if test `eval echo '${'$as_ac_var'}'` = yes; then
6260   cat >>confdefs.h <<EOF
6261 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6262 EOF
6263
6264 fi
6265 done
6266
6267 else
6268         echo "$as_me:6268: checking if link/symlink functions work" >&5
6269 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6270 if test "${cf_cv_link_funcs+set}" = set; then
6271   echo $ECHO_N "(cached) $ECHO_C" >&6
6272 else
6273
6274                 cf_cv_link_funcs=
6275                 for cf_func in link symlink ; do
6276                         if test "$cross_compiling" = yes; then
6277
6278                         eval 'ac_cv_func_'$cf_func'=error'
6279 else
6280   cat >conftest.$ac_ext <<_ACEOF
6281 #line 6281 "configure"
6282 #include "confdefs.h"
6283
6284 #include <sys/types.h>
6285 #include <sys/stat.h>
6286 #ifdef HAVE_UNISTD_H
6287 #include <unistd.h>
6288 #endif
6289 int main()
6290 {
6291         int fail = 0;
6292         char *src = "config.log";
6293         char *dst = "conftest.chk";
6294         struct stat src_sb;
6295         struct stat dst_sb;
6296
6297         stat(src, &src_sb);
6298         fail = ($cf_func("config.log", "conftest.chk") < 0)
6299             || (stat(dst, &dst_sb) < 0)
6300             || (dst_sb.st_mtime != src_sb.st_mtime);
6301 #ifdef HAVE_UNLINK
6302         unlink(dst);
6303 #else
6304         remove(dst);
6305 #endif
6306         ${cf_cv_main_return:-return} (fail);
6307 }
6308
6309 _ACEOF
6310 rm -f conftest$ac_exeext
6311 if { (eval echo "$as_me:6311: \"$ac_link\"") >&5
6312   (eval $ac_link) 2>&5
6313   ac_status=$?
6314   echo "$as_me:6314: \$? = $ac_status" >&5
6315   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6316   { (eval echo "$as_me:6316: \"$ac_try\"") >&5
6317   (eval $ac_try) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit $ac_status); }; }; then
6321
6322                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6323                         eval 'ac_cv_func_'$cf_func'=yes'
6324 else
6325   echo "$as_me: program exited with status $ac_status" >&5
6326 echo "$as_me: failed program was:" >&5
6327 cat conftest.$ac_ext >&5
6328
6329                         eval 'ac_cv_func_'$cf_func'=no'
6330 fi
6331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6332 fi
6333                 done
6334                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6335
6336 fi
6337 echo "$as_me:6337: result: $cf_cv_link_funcs" >&5
6338 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6339         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6340 #define HAVE_LINK 1
6341 EOF
6342
6343         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6344 #define HAVE_SYMLINK 1
6345 EOF
6346
6347 fi
6348
6349 with_links=no
6350 with_symlinks=no
6351
6352 # soft links (symbolic links) are useful for some systems where hard links do
6353 # not work, or to make it simpler to copy terminfo trees around.
6354 if test "$ac_cv_func_symlink" = yes ; then
6355     echo "$as_me:6355: checking if tic should use symbolic links" >&5
6356 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6357
6358 # Check whether --enable-symlinks or --disable-symlinks was given.
6359 if test "${enable_symlinks+set}" = set; then
6360   enableval="$enable_symlinks"
6361   with_symlinks=$enableval
6362 else
6363   with_symlinks=no
6364 fi;
6365     echo "$as_me:6365: result: $with_symlinks" >&5
6366 echo "${ECHO_T}$with_symlinks" >&6
6367 fi
6368
6369 # If we have hard links and did not choose to use soft links instead, there is
6370 # no reason to make this choice optional - use the hard links.
6371 if test "$with_symlinks" = no ; then
6372     echo "$as_me:6372: checking if tic should use hard links" >&5
6373 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6374     if test "$ac_cv_func_link" = yes ; then
6375         with_links=yes
6376     else
6377         with_links=no
6378     fi
6379     echo "$as_me:6379: result: $with_links" >&5
6380 echo "${ECHO_T}$with_links" >&6
6381 fi
6382
6383 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6384 #define USE_LINKS 1
6385 EOF
6386
6387 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6388 #define USE_SYMLINKS 1
6389 EOF
6390
6391 ###   use option --enable-broken-linker to force on use of broken-linker support
6392 echo "$as_me:6392: checking if you want broken-linker support code" >&5
6393 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6394
6395 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6396 if test "${enable_broken_linker+set}" = set; then
6397   enableval="$enable_broken_linker"
6398   with_broken_linker=$enableval
6399 else
6400   with_broken_linker=${BROKEN_LINKER-no}
6401 fi;
6402 echo "$as_me:6402: result: $with_broken_linker" >&5
6403 echo "${ECHO_T}$with_broken_linker" >&6
6404
6405 BROKEN_LINKER=0
6406 if test "$with_broken_linker" = yes ; then
6407         cat >>confdefs.h <<\EOF
6408 #define BROKEN_LINKER 1
6409 EOF
6410
6411         BROKEN_LINKER=1
6412 elif test "$DFT_LWR_MODEL" = shared ; then
6413         case $cf_cv_system_name in #(vi
6414         cygwin*)
6415                 cat >>confdefs.h <<\EOF
6416 #define BROKEN_LINKER 1
6417 EOF
6418
6419                 BROKEN_LINKER=1
6420                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6421
6422 echo "${as_me-configure}:6422: testing cygwin linker is broken anyway ..." 1>&5
6423
6424                 ;;
6425         esac
6426 fi
6427
6428 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6429 echo "$as_me:6429: checking if tputs should process BSD-style prefix padding" >&5
6430 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6431
6432 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6433 if test "${enable_bsdpad+set}" = set; then
6434   enableval="$enable_bsdpad"
6435   with_bsdpad=$enableval
6436 else
6437   with_bsdpad=no
6438 fi;
6439 echo "$as_me:6439: result: $with_bsdpad" >&5
6440 echo "${ECHO_T}$with_bsdpad" >&6
6441 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6442 #define BSD_TPUTS 1
6443 EOF
6444
6445 ###   use option --enable-widec to turn on use of wide-character support
6446 NCURSES_CH_T=chtype
6447 NCURSES_LIBUTF8=0
6448
6449 NEED_WCHAR_H=0
6450 NCURSES_MBSTATE_T=0
6451 NCURSES_WCHAR_T=0
6452 NCURSES_WINT_T=0
6453
6454 # Check to define _XOPEN_SOURCE "automatically"
6455
6456 echo "$as_me:6456: checking if $CC -U and -D options work together" >&5
6457 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6458 if test "${cf_cv_cc_u_d_options+set}" = set; then
6459   echo $ECHO_N "(cached) $ECHO_C" >&6
6460 else
6461
6462         cf_save_CPPFLAGS="$CPPFLAGS"
6463         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6464         cat >conftest.$ac_ext <<_ACEOF
6465 #line 6465 "configure"
6466 #include "confdefs.h"
6467
6468 int
6469 main ()
6470 {
6471
6472 #ifndef U_D_OPTIONS
6473 make an undefined-error
6474 #endif
6475 #ifdef  D_U_OPTIONS
6476 make a defined-error
6477 #endif
6478
6479   ;
6480   return 0;
6481 }
6482 _ACEOF
6483 rm -f conftest.$ac_objext
6484 if { (eval echo "$as_me:6484: \"$ac_compile\"") >&5
6485   (eval $ac_compile) 2>&5
6486   ac_status=$?
6487   echo "$as_me:6487: \$? = $ac_status" >&5
6488   (exit $ac_status); } &&
6489          { ac_try='test -s conftest.$ac_objext'
6490   { (eval echo "$as_me:6490: \"$ac_try\"") >&5
6491   (eval $ac_try) 2>&5
6492   ac_status=$?
6493   echo "$as_me:6493: \$? = $ac_status" >&5
6494   (exit $ac_status); }; }; then
6495
6496         cf_cv_cc_u_d_options=yes
6497 else
6498   echo "$as_me: failed program was:" >&5
6499 cat conftest.$ac_ext >&5
6500
6501         cf_cv_cc_u_d_options=no
6502 fi
6503 rm -f conftest.$ac_objext conftest.$ac_ext
6504         CPPFLAGS="$cf_save_CPPFLAGS"
6505
6506 fi
6507 echo "$as_me:6507: result: $cf_cv_cc_u_d_options" >&5
6508 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6509
6510 cf_XOPEN_SOURCE=500
6511 cf_POSIX_C_SOURCE=199506L
6512
6513 case $host_os in #(vi
6514 aix[456]*) #(vi
6515         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6516         ;;
6517 freebsd*|dragonfly*) #(vi
6518         # 5.x headers associate
6519         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6520         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6521         cf_POSIX_C_SOURCE=200112L
6522         cf_XOPEN_SOURCE=600
6523         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6524         ;;
6525 hpux*) #(vi
6526         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6527         ;;
6528 irix[56].*) #(vi
6529         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6530         ;;
6531 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6532
6533 echo "$as_me:6533: checking if we must define _GNU_SOURCE" >&5
6534 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6535 if test "${cf_cv_gnu_source+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538
6539 cat >conftest.$ac_ext <<_ACEOF
6540 #line 6540 "configure"
6541 #include "confdefs.h"
6542 #include <sys/types.h>
6543 int
6544 main ()
6545 {
6546
6547 #ifndef _XOPEN_SOURCE
6548 make an error
6549 #endif
6550   ;
6551   return 0;
6552 }
6553 _ACEOF
6554 rm -f conftest.$ac_objext
6555 if { (eval echo "$as_me:6555: \"$ac_compile\"") >&5
6556   (eval $ac_compile) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); } &&
6560          { ac_try='test -s conftest.$ac_objext'
6561   { (eval echo "$as_me:6561: \"$ac_try\"") >&5
6562   (eval $ac_try) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); }; }; then
6566   cf_cv_gnu_source=no
6567 else
6568   echo "$as_me: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 cf_save="$CPPFLAGS"
6571          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6572          cat >conftest.$ac_ext <<_ACEOF
6573 #line 6573 "configure"
6574 #include "confdefs.h"
6575 #include <sys/types.h>
6576 int
6577 main ()
6578 {
6579
6580 #ifdef _XOPEN_SOURCE
6581 make an error
6582 #endif
6583   ;
6584   return 0;
6585 }
6586 _ACEOF
6587 rm -f conftest.$ac_objext
6588 if { (eval echo "$as_me:6588: \"$ac_compile\"") >&5
6589   (eval $ac_compile) 2>&5
6590   ac_status=$?
6591   echo "$as_me:6591: \$? = $ac_status" >&5
6592   (exit $ac_status); } &&
6593          { ac_try='test -s conftest.$ac_objext'
6594   { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6595   (eval $ac_try) 2>&5
6596   ac_status=$?
6597   echo "$as_me:6597: \$? = $ac_status" >&5
6598   (exit $ac_status); }; }; then
6599   cf_cv_gnu_source=no
6600 else
6601   echo "$as_me: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6603 cf_cv_gnu_source=yes
6604 fi
6605 rm -f conftest.$ac_objext conftest.$ac_ext
6606         CPPFLAGS="$cf_save"
6607
6608 fi
6609 rm -f conftest.$ac_objext conftest.$ac_ext
6610
6611 fi
6612 echo "$as_me:6612: result: $cf_cv_gnu_source" >&5
6613 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6614 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6615
6616         ;;
6617 mirbsd*) #(vi
6618         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6619         ;;
6620 netbsd*) #(vi
6621         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6622         ;;
6623 openbsd*) #(vi
6624         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6625         ;;
6626 osf[45]*) #(vi
6627         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6628         ;;
6629 nto-qnx*) #(vi
6630         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6631         ;;
6632 sco*) #(vi
6633         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6634         ;;
6635 solaris*) #(vi
6636         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6637         ;;
6638 *)
6639         echo "$as_me:6639: checking if we should define _XOPEN_SOURCE" >&5
6640 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6641 if test "${cf_cv_xopen_source+set}" = set; then
6642   echo $ECHO_N "(cached) $ECHO_C" >&6
6643 else
6644
6645         cat >conftest.$ac_ext <<_ACEOF
6646 #line 6646 "configure"
6647 #include "confdefs.h"
6648 #include <sys/types.h>
6649 int
6650 main ()
6651 {
6652
6653 #ifndef _XOPEN_SOURCE
6654 make an error
6655 #endif
6656   ;
6657   return 0;
6658 }
6659 _ACEOF
6660 rm -f conftest.$ac_objext
6661 if { (eval echo "$as_me:6661: \"$ac_compile\"") >&5
6662   (eval $ac_compile) 2>&5
6663   ac_status=$?
6664   echo "$as_me:6664: \$? = $ac_status" >&5
6665   (exit $ac_status); } &&
6666          { ac_try='test -s conftest.$ac_objext'
6667   { (eval echo "$as_me:6667: \"$ac_try\"") >&5
6668   (eval $ac_try) 2>&5
6669   ac_status=$?
6670   echo "$as_me:6670: \$? = $ac_status" >&5
6671   (exit $ac_status); }; }; then
6672   cf_cv_xopen_source=no
6673 else
6674   echo "$as_me: failed program was:" >&5
6675 cat conftest.$ac_ext >&5
6676 cf_save="$CPPFLAGS"
6677          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6678          cat >conftest.$ac_ext <<_ACEOF
6679 #line 6679 "configure"
6680 #include "confdefs.h"
6681 #include <sys/types.h>
6682 int
6683 main ()
6684 {
6685
6686 #ifdef _XOPEN_SOURCE
6687 make an error
6688 #endif
6689   ;
6690   return 0;
6691 }
6692 _ACEOF
6693 rm -f conftest.$ac_objext
6694 if { (eval echo "$as_me:6694: \"$ac_compile\"") >&5
6695   (eval $ac_compile) 2>&5
6696   ac_status=$?
6697   echo "$as_me:6697: \$? = $ac_status" >&5
6698   (exit $ac_status); } &&
6699          { ac_try='test -s conftest.$ac_objext'
6700   { (eval echo "$as_me:6700: \"$ac_try\"") >&5
6701   (eval $ac_try) 2>&5
6702   ac_status=$?
6703   echo "$as_me:6703: \$? = $ac_status" >&5
6704   (exit $ac_status); }; }; then
6705   cf_cv_xopen_source=no
6706 else
6707   echo "$as_me: failed program was:" >&5
6708 cat conftest.$ac_ext >&5
6709 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6710 fi
6711 rm -f conftest.$ac_objext conftest.$ac_ext
6712         CPPFLAGS="$cf_save"
6713
6714 fi
6715 rm -f conftest.$ac_objext conftest.$ac_ext
6716
6717 fi
6718 echo "$as_me:6718: result: $cf_cv_xopen_source" >&5
6719 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6720         if test "$cf_cv_xopen_source" != no ; then
6721
6722 # remove _XOPEN_SOURCE symbol from $CFLAGS
6723 CFLAGS=`echo "$CFLAGS" | \
6724         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6725                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6726
6727 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6728 CPPFLAGS=`echo "$CPPFLAGS" | \
6729         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6730                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6731
6732                 test "$cf_cv_cc_u_d_options" = yes && \
6733                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6734                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6735         fi
6736
6737 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6738
6739 cf_save_CFLAGS="$CFLAGS"
6740 cf_save_CPPFLAGS="$CPPFLAGS"
6741
6742 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6743 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6744         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6745                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6746
6747 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6748 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6749         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6750                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6751
6752 echo "$as_me:6752: checking if we should define _POSIX_C_SOURCE" >&5
6753 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6754 if test "${cf_cv_posix_c_source+set}" = set; then
6755   echo $ECHO_N "(cached) $ECHO_C" >&6
6756 else
6757
6758 echo "${as_me-configure}:6758: testing if the symbol is already defined go no further ..." 1>&5
6759
6760         cat >conftest.$ac_ext <<_ACEOF
6761 #line 6761 "configure"
6762 #include "confdefs.h"
6763 #include <sys/types.h>
6764 int
6765 main ()
6766 {
6767
6768 #ifndef _POSIX_C_SOURCE
6769 make an error
6770 #endif
6771   ;
6772   return 0;
6773 }
6774 _ACEOF
6775 rm -f conftest.$ac_objext
6776 if { (eval echo "$as_me:6776: \"$ac_compile\"") >&5
6777   (eval $ac_compile) 2>&5
6778   ac_status=$?
6779   echo "$as_me:6779: \$? = $ac_status" >&5
6780   (exit $ac_status); } &&
6781          { ac_try='test -s conftest.$ac_objext'
6782   { (eval echo "$as_me:6782: \"$ac_try\"") >&5
6783   (eval $ac_try) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); }; }; then
6787   cf_cv_posix_c_source=no
6788 else
6789   echo "$as_me: failed program was:" >&5
6790 cat conftest.$ac_ext >&5
6791 cf_want_posix_source=no
6792          case .$cf_POSIX_C_SOURCE in #(vi
6793          .[12]??*) #(vi
6794                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6795                 ;;
6796          .2) #(vi
6797                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6798                 cf_want_posix_source=yes
6799                 ;;
6800          .*)
6801                 cf_want_posix_source=yes
6802                 ;;
6803          esac
6804          if test "$cf_want_posix_source" = yes ; then
6805                 cat >conftest.$ac_ext <<_ACEOF
6806 #line 6806 "configure"
6807 #include "confdefs.h"
6808 #include <sys/types.h>
6809 int
6810 main ()
6811 {
6812
6813 #ifdef _POSIX_SOURCE
6814 make an error
6815 #endif
6816   ;
6817   return 0;
6818 }
6819 _ACEOF
6820 rm -f conftest.$ac_objext
6821 if { (eval echo "$as_me:6821: \"$ac_compile\"") >&5
6822   (eval $ac_compile) 2>&5
6823   ac_status=$?
6824   echo "$as_me:6824: \$? = $ac_status" >&5
6825   (exit $ac_status); } &&
6826          { ac_try='test -s conftest.$ac_objext'
6827   { (eval echo "$as_me:6827: \"$ac_try\"") >&5
6828   (eval $ac_try) 2>&5
6829   ac_status=$?
6830   echo "$as_me:6830: \$? = $ac_status" >&5
6831   (exit $ac_status); }; }; then
6832   :
6833 else
6834   echo "$as_me: failed program was:" >&5
6835 cat conftest.$ac_ext >&5
6836 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6837 fi
6838 rm -f conftest.$ac_objext conftest.$ac_ext
6839          fi
6840
6841 echo "${as_me-configure}:6841: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6842
6843          CFLAGS="$cf_trim_CFLAGS"
6844          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6845
6846 echo "${as_me-configure}:6846: testing if the second compile does not leave our definition intact error ..." 1>&5
6847
6848          cat >conftest.$ac_ext <<_ACEOF
6849 #line 6849 "configure"
6850 #include "confdefs.h"
6851 #include <sys/types.h>
6852 int
6853 main ()
6854 {
6855
6856 #ifndef _POSIX_C_SOURCE
6857 make an error
6858 #endif
6859   ;
6860   return 0;
6861 }
6862 _ACEOF
6863 rm -f conftest.$ac_objext
6864 if { (eval echo "$as_me:6864: \"$ac_compile\"") >&5
6865   (eval $ac_compile) 2>&5
6866   ac_status=$?
6867   echo "$as_me:6867: \$? = $ac_status" >&5
6868   (exit $ac_status); } &&
6869          { ac_try='test -s conftest.$ac_objext'
6870   { (eval echo "$as_me:6870: \"$ac_try\"") >&5
6871   (eval $ac_try) 2>&5
6872   ac_status=$?
6873   echo "$as_me:6873: \$? = $ac_status" >&5
6874   (exit $ac_status); }; }; then
6875   :
6876 else
6877   echo "$as_me: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 cf_cv_posix_c_source=no
6880 fi
6881 rm -f conftest.$ac_objext conftest.$ac_ext
6882          CFLAGS="$cf_save_CFLAGS"
6883          CPPFLAGS="$cf_save_CPPFLAGS"
6884
6885 fi
6886 rm -f conftest.$ac_objext conftest.$ac_ext
6887
6888 fi
6889 echo "$as_me:6889: result: $cf_cv_posix_c_source" >&5
6890 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6891
6892 if test "$cf_cv_posix_c_source" != no ; then
6893         CFLAGS="$cf_trim_CFLAGS"
6894         CPPFLAGS="$cf_trim_CPPFLAGS"
6895         if test "$cf_cv_cc_u_d_options" = yes ; then
6896                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6897                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6898                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6899         fi
6900         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6901 fi
6902
6903         ;;
6904 esac
6905
6906 # Work around breakage on OS X
6907
6908 echo "$as_me:6908: checking if SIGWINCH is defined" >&5
6909 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6910 if test "${cf_cv_define_sigwinch+set}" = set; then
6911   echo $ECHO_N "(cached) $ECHO_C" >&6
6912 else
6913
6914         cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917
6918 #include <sys/types.h>
6919 #include <sys/signal.h>
6920
6921 int
6922 main ()
6923 {
6924 int x = SIGWINCH
6925   ;
6926   return 0;
6927 }
6928 _ACEOF
6929 rm -f conftest.$ac_objext
6930 if { (eval echo "$as_me:6930: \"$ac_compile\"") >&5
6931   (eval $ac_compile) 2>&5
6932   ac_status=$?
6933   echo "$as_me:6933: \$? = $ac_status" >&5
6934   (exit $ac_status); } &&
6935          { ac_try='test -s conftest.$ac_objext'
6936   { (eval echo "$as_me:6936: \"$ac_try\"") >&5
6937   (eval $ac_try) 2>&5
6938   ac_status=$?
6939   echo "$as_me:6939: \$? = $ac_status" >&5
6940   (exit $ac_status); }; }; then
6941   cf_cv_define_sigwinch=yes
6942 else
6943   echo "$as_me: failed program was:" >&5
6944 cat conftest.$ac_ext >&5
6945 cat >conftest.$ac_ext <<_ACEOF
6946 #line 6946 "configure"
6947 #include "confdefs.h"
6948
6949 #undef _XOPEN_SOURCE
6950 #undef _POSIX_SOURCE
6951 #undef _POSIX_C_SOURCE
6952 #include <sys/types.h>
6953 #include <sys/signal.h>
6954
6955 int
6956 main ()
6957 {
6958 int x = SIGWINCH
6959   ;
6960   return 0;
6961 }
6962 _ACEOF
6963 rm -f conftest.$ac_objext
6964 if { (eval echo "$as_me:6964: \"$ac_compile\"") >&5
6965   (eval $ac_compile) 2>&5
6966   ac_status=$?
6967   echo "$as_me:6967: \$? = $ac_status" >&5
6968   (exit $ac_status); } &&
6969          { ac_try='test -s conftest.$ac_objext'
6970   { (eval echo "$as_me:6970: \"$ac_try\"") >&5
6971   (eval $ac_try) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); }; }; then
6975   cf_cv_define_sigwinch=maybe
6976 else
6977   echo "$as_me: failed program was:" >&5
6978 cat conftest.$ac_ext >&5
6979 cf_cv_define_sigwinch=no
6980 fi
6981 rm -f conftest.$ac_objext conftest.$ac_ext
6982
6983 fi
6984 rm -f conftest.$ac_objext conftest.$ac_ext
6985
6986 fi
6987 echo "$as_me:6987: result: $cf_cv_define_sigwinch" >&5
6988 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6989
6990 if test "$cf_cv_define_sigwinch" = maybe ; then
6991 echo "$as_me:6991: checking for actual SIGWINCH definition" >&5
6992 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6993 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6994   echo $ECHO_N "(cached) $ECHO_C" >&6
6995 else
6996
6997 cf_cv_fixup_sigwinch=unknown
6998 cf_sigwinch=32
6999 while test $cf_sigwinch != 1
7000 do
7001         cat >conftest.$ac_ext <<_ACEOF
7002 #line 7002 "configure"
7003 #include "confdefs.h"
7004
7005 #undef _XOPEN_SOURCE
7006 #undef _POSIX_SOURCE
7007 #undef _POSIX_C_SOURCE
7008 #include <sys/types.h>
7009 #include <sys/signal.h>
7010
7011 int
7012 main ()
7013 {
7014
7015 #if SIGWINCH != $cf_sigwinch
7016 make an error
7017 #endif
7018 int x = SIGWINCH
7019   ;
7020   return 0;
7021 }
7022 _ACEOF
7023 rm -f conftest.$ac_objext
7024 if { (eval echo "$as_me:7024: \"$ac_compile\"") >&5
7025   (eval $ac_compile) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); } &&
7029          { ac_try='test -s conftest.$ac_objext'
7030   { (eval echo "$as_me:7030: \"$ac_try\"") >&5
7031   (eval $ac_try) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); }; }; then
7035   cf_cv_fixup_sigwinch=$cf_sigwinch
7036          break
7037 else
7038   echo "$as_me: failed program was:" >&5
7039 cat conftest.$ac_ext >&5
7040 fi
7041 rm -f conftest.$ac_objext conftest.$ac_ext
7042
7043 cf_sigwinch=`expr $cf_sigwinch - 1`
7044 done
7045
7046 fi
7047 echo "$as_me:7047: result: $cf_cv_fixup_sigwinch" >&5
7048 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7049
7050         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7051                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7052         fi
7053 fi
7054
7055 # Checks for CODESET support.
7056
7057   echo "$as_me:7057: checking for nl_langinfo and CODESET" >&5
7058 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7059 if test "${am_cv_langinfo_codeset+set}" = set; then
7060   echo $ECHO_N "(cached) $ECHO_C" >&6
7061 else
7062   cat >conftest.$ac_ext <<_ACEOF
7063 #line 7063 "configure"
7064 #include "confdefs.h"
7065 #include <langinfo.h>
7066 int
7067 main ()
7068 {
7069 char* cs = nl_langinfo(CODESET);
7070   ;
7071   return 0;
7072 }
7073 _ACEOF
7074 rm -f conftest.$ac_objext conftest$ac_exeext
7075 if { (eval echo "$as_me:7075: \"$ac_link\"") >&5
7076   (eval $ac_link) 2>&5
7077   ac_status=$?
7078   echo "$as_me:7078: \$? = $ac_status" >&5
7079   (exit $ac_status); } &&
7080          { ac_try='test -s conftest$ac_exeext'
7081   { (eval echo "$as_me:7081: \"$ac_try\"") >&5
7082   (eval $ac_try) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); }; }; then
7086   am_cv_langinfo_codeset=yes
7087 else
7088   echo "$as_me: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7090 am_cv_langinfo_codeset=no
7091 fi
7092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7093
7094 fi
7095 echo "$as_me:7095: result: $am_cv_langinfo_codeset" >&5
7096 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7097   if test $am_cv_langinfo_codeset = yes; then
7098
7099 cat >>confdefs.h <<\EOF
7100 #define HAVE_LANGINFO_CODESET 1
7101 EOF
7102
7103   fi
7104
7105 # use these variables to work around a defect in gcc's fixincludes.
7106 NCURSES_OK_WCHAR_T=
7107 NCURSES_OK_WINT_T=
7108
7109 echo "$as_me:7109: checking if you want wide-character code" >&5
7110 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7111
7112 # Check whether --enable-widec or --disable-widec was given.
7113 if test "${enable_widec+set}" = set; then
7114   enableval="$enable_widec"
7115   with_widec=$enableval
7116 else
7117   with_widec=no
7118 fi;
7119 echo "$as_me:7119: result: $with_widec" >&5
7120 echo "${ECHO_T}$with_widec" >&6
7121 if test "$with_widec" = yes ; then
7122         LIB_SUFFIX="w${LIB_SUFFIX}"
7123         cat >>confdefs.h <<\EOF
7124 #define USE_WIDEC_SUPPORT 1
7125 EOF
7126
7127 echo "$as_me:7127: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7128 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7129 cat >conftest.$ac_ext <<_ACEOF
7130 #line 7130 "configure"
7131 #include "confdefs.h"
7132 #include <sys/types.h>
7133
7134 int
7135 main ()
7136 {
7137
7138 #ifndef _XOPEN_SOURCE_EXTENDED
7139 make an error
7140 #endif
7141   ;
7142   return 0;
7143 }
7144 _ACEOF
7145 rm -f conftest.$ac_objext
7146 if { (eval echo "$as_me:7146: \"$ac_compile\"") >&5
7147   (eval $ac_compile) 2>&5
7148   ac_status=$?
7149   echo "$as_me:7149: \$? = $ac_status" >&5
7150   (exit $ac_status); } &&
7151          { ac_try='test -s conftest.$ac_objext'
7152   { (eval echo "$as_me:7152: \"$ac_try\"") >&5
7153   (eval $ac_try) 2>&5
7154   ac_status=$?
7155   echo "$as_me:7155: \$? = $ac_status" >&5
7156   (exit $ac_status); }; }; then
7157   cf_result=no
7158 else
7159   echo "$as_me: failed program was:" >&5
7160 cat conftest.$ac_ext >&5
7161 cf_result=yes
7162 fi
7163 rm -f conftest.$ac_objext conftest.$ac_ext
7164 echo "$as_me:7164: result: $cf_result" >&5
7165 echo "${ECHO_T}$cf_result" >&6
7166
7167 if test "$cf_result" = yes ; then
7168         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7169 elif test "x" != "x" ; then
7170         echo "$as_me:7170: checking checking for compatible value versus " >&5
7171 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7172         cat >conftest.$ac_ext <<_ACEOF
7173 #line 7173 "configure"
7174 #include "confdefs.h"
7175 #include <sys/types.h>
7176
7177 int
7178 main ()
7179 {
7180
7181 #if _XOPEN_SOURCE_EXTENDED- < 0
7182 make an error
7183 #endif
7184   ;
7185   return 0;
7186 }
7187 _ACEOF
7188 rm -f conftest.$ac_objext
7189 if { (eval echo "$as_me:7189: \"$ac_compile\"") >&5
7190   (eval $ac_compile) 2>&5
7191   ac_status=$?
7192   echo "$as_me:7192: \$? = $ac_status" >&5
7193   (exit $ac_status); } &&
7194          { ac_try='test -s conftest.$ac_objext'
7195   { (eval echo "$as_me:7195: \"$ac_try\"") >&5
7196   (eval $ac_try) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); }; }; then
7200   cf_result=yes
7201 else
7202   echo "$as_me: failed program was:" >&5
7203 cat conftest.$ac_ext >&5
7204 cf_result=no
7205 fi
7206 rm -f conftest.$ac_objext conftest.$ac_ext
7207         echo "$as_me:7207: result: $cf_result" >&5
7208 echo "${ECHO_T}$cf_result" >&6
7209         if test "$cf_result" = no ; then
7210                 # perhaps we can override it - try...
7211                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7212         fi
7213 fi
7214
7215         # with_overwrite=no
7216         NCURSES_CH_T=cchar_t
7217
7218 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7219 do
7220 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7221 echo "$as_me:7221: checking for $ac_func" >&5
7222 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7223 if eval "test \"\${$as_ac_var+set}\" = set"; then
7224   echo $ECHO_N "(cached) $ECHO_C" >&6
7225 else
7226   cat >conftest.$ac_ext <<_ACEOF
7227 #line 7227 "configure"
7228 #include "confdefs.h"
7229 /* System header to define __stub macros and hopefully few prototypes,
7230     which can conflict with char $ac_func (); below.  */
7231 #include <assert.h>
7232 /* Override any gcc2 internal prototype to avoid an error.  */
7233 #ifdef __cplusplus
7234 extern "C"
7235 #endif
7236 /* We use char because int might match the return type of a gcc2
7237    builtin and then its argument prototype would still apply.  */
7238 char $ac_func ();
7239 char (*f) ();
7240
7241 int
7242 main ()
7243 {
7244 /* The GNU C library defines this for functions which it implements
7245     to always fail with ENOSYS.  Some functions are actually named
7246     something starting with __ and the normal name is an alias.  */
7247 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7248 choke me
7249 #else
7250 f = $ac_func;
7251 #endif
7252
7253   ;
7254   return 0;
7255 }
7256 _ACEOF
7257 rm -f conftest.$ac_objext conftest$ac_exeext
7258 if { (eval echo "$as_me:7258: \"$ac_link\"") >&5
7259   (eval $ac_link) 2>&5
7260   ac_status=$?
7261   echo "$as_me:7261: \$? = $ac_status" >&5
7262   (exit $ac_status); } &&
7263          { ac_try='test -s conftest$ac_exeext'
7264   { (eval echo "$as_me:7264: \"$ac_try\"") >&5
7265   (eval $ac_try) 2>&5
7266   ac_status=$?
7267   echo "$as_me:7267: \$? = $ac_status" >&5
7268   (exit $ac_status); }; }; then
7269   eval "$as_ac_var=yes"
7270 else
7271   echo "$as_me: failed program was:" >&5
7272 cat conftest.$ac_ext >&5
7273 eval "$as_ac_var=no"
7274 fi
7275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7276 fi
7277 echo "$as_me:7277: result: `eval echo '${'$as_ac_var'}'`" >&5
7278 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7279 if test `eval echo '${'$as_ac_var'}'` = yes; then
7280   cat >>confdefs.h <<EOF
7281 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7282 EOF
7283
7284 fi
7285 done
7286
7287         if test "$ac_cv_func_putwc" != yes ; then
7288
7289 echo "$as_me:7289: checking for multibyte character support" >&5
7290 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7291 if test "${cf_cv_utf8_lib+set}" = set; then
7292   echo $ECHO_N "(cached) $ECHO_C" >&6
7293 else
7294
7295         cf_save_LIBS="$LIBS"
7296         cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299
7300 #include <stdlib.h>
7301 int
7302 main ()
7303 {
7304 putwc(0,0);
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext conftest$ac_exeext
7310 if { (eval echo "$as_me:7310: \"$ac_link\"") >&5
7311   (eval $ac_link) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest$ac_exeext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   cf_cv_utf8_lib=yes
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325
7326 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7327 # will be set on completion of the AC_TRY_LINK below.
7328 cf_cv_header_path_utf8=
7329 cf_cv_library_path_utf8=
7330
7331 echo "${as_me-configure}:7331: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7332
7333 cat >conftest.$ac_ext <<_ACEOF
7334 #line 7334 "configure"
7335 #include "confdefs.h"
7336
7337 #include <libutf8.h>
7338 int
7339 main ()
7340 {
7341 putwc(0,0);
7342   ;
7343   return 0;
7344 }
7345 _ACEOF
7346 rm -f conftest.$ac_objext conftest$ac_exeext
7347 if { (eval echo "$as_me:7347: \"$ac_link\"") >&5
7348   (eval $ac_link) 2>&5
7349   ac_status=$?
7350   echo "$as_me:7350: \$? = $ac_status" >&5
7351   (exit $ac_status); } &&
7352          { ac_try='test -s conftest$ac_exeext'
7353   { (eval echo "$as_me:7353: \"$ac_try\"") >&5
7354   (eval $ac_try) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit $ac_status); }; }; then
7358   cf_cv_find_linkage_utf8=yes
7359 else
7360   echo "$as_me: failed program was:" >&5
7361 cat conftest.$ac_ext >&5
7362
7363     cf_cv_find_linkage_utf8=no
7364
7365     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7366
7367 echo "${as_me-configure}:7367: testing find linkage for utf8 library ..." 1>&5
7368
7369 echo "${as_me-configure}:7369: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7370
7371     cf_save_CPPFLAGS="$CPPFLAGS"
7372     cf_test_CPPFLAGS="$CPPFLAGS"
7373
7374 cf_header_path_list=""
7375 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7376         for cf_header_path in $CPPFLAGS $CFLAGS
7377         do
7378                 case $cf_header_path in #(vi
7379                 -I*)
7380                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7381
7382 test "$cf_header_path" != "NONE" && \
7383 test -d "$cf_header_path" && \
7384  {
7385         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7386         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7387         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7388         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7389         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7390         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7391 }
7392
7393                         cf_header_path_list="$cf_header_path_list $cf_search"
7394                         ;;
7395                 esac
7396         done
7397 fi
7398
7399 cf_search=""
7400
7401 test "/usr" != "$prefix" && \
7402 test -d "/usr" && \
7403 (test $prefix = NONE || test -d $prefix) && {
7404         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7405         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7406         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7407         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7408         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7409         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7410 }
7411
7412 test "$prefix" != "NONE" && \
7413 test -d "$prefix" && \
7414  {
7415         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7416         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7417         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7418         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7419         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7420         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7421 }
7422
7423 test "/usr/local" != "$prefix" && \
7424 test -d "/usr/local" && \
7425 (test $prefix = NONE || test -d $prefix) && {
7426         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7427         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7428         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7429         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7430         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7431         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7432 }
7433
7434 test "/opt" != "$prefix" && \
7435 test -d "/opt" && \
7436 (test $prefix = NONE || test -d $prefix) && {
7437         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7438         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7439         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7440         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7441         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7442         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7443 }
7444
7445 test "$HOME" != "$prefix" && \
7446 test -d "$HOME" && \
7447 (test $prefix = NONE || test -d $prefix) && {
7448         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7449         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7450         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7451         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7452         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7453         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7454 }
7455
7456 test "$includedir" != NONE && \
7457 test "$includedir" != "/usr/include" && \
7458 test -d "$includedir" && {
7459         test -d $includedir &&    cf_search="$cf_search $includedir"
7460         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7461 }
7462
7463 test "$oldincludedir" != NONE && \
7464 test "$oldincludedir" != "/usr/include" && \
7465 test -d "$oldincludedir" && {
7466         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7467         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7468 }
7469
7470 cf_search="$cf_header_path_list $cf_search"
7471
7472     for cf_cv_header_path_utf8 in $cf_search
7473     do
7474       if test -d $cf_cv_header_path_utf8 ; then
7475         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7476
7477 echo "${as_me-configure}:7477: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7478
7479         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7480         cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483
7484 #include <libutf8.h>
7485 int
7486 main ()
7487 {
7488 putwc(0,0);
7489   ;
7490   return 0;
7491 }
7492 _ACEOF
7493 rm -f conftest.$ac_objext
7494 if { (eval echo "$as_me:7494: \"$ac_compile\"") >&5
7495   (eval $ac_compile) 2>&5
7496   ac_status=$?
7497   echo "$as_me:7497: \$? = $ac_status" >&5
7498   (exit $ac_status); } &&
7499          { ac_try='test -s conftest.$ac_objext'
7500   { (eval echo "$as_me:7500: \"$ac_try\"") >&5
7501   (eval $ac_try) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit $ac_status); }; }; then
7505
7506             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7507
7508 echo "${as_me-configure}:7508: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7509
7510             cf_cv_find_linkage_utf8=maybe
7511             cf_test_CPPFLAGS="$CPPFLAGS"
7512             break
7513 else
7514   echo "$as_me: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7516
7517             CPPFLAGS="$cf_save_CPPFLAGS"
7518
7519 fi
7520 rm -f conftest.$ac_objext conftest.$ac_ext
7521       fi
7522     done
7523
7524     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7525
7526 echo "${as_me-configure}:7526: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7527
7528       cf_save_LIBS="$LIBS"
7529       cf_save_LDFLAGS="$LDFLAGS"
7530
7531       if test "$cf_cv_find_linkage_utf8" != yes ; then
7532
7533 cf_library_path_list=""
7534 if test -n "${LDFLAGS}${LIBS}" ; then
7535         for cf_library_path in $LDFLAGS $LIBS
7536         do
7537                 case $cf_library_path in #(vi
7538                 -L*)
7539                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7540
7541 test "$cf_library_path" != "NONE" && \
7542 test -d "$cf_library_path" && \
7543  {
7544         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7545         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7546         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7547         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7548         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7549         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7550 }
7551
7552                         cf_library_path_list="$cf_library_path_list $cf_search"
7553                         ;;
7554                 esac
7555         done
7556 fi
7557
7558 cf_search=""
7559
7560 test "/usr" != "$prefix" && \
7561 test -d "/usr" && \
7562 (test $prefix = NONE || test -d $prefix) && {
7563         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7564         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7565         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7566         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7567         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7568         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7569 }
7570
7571 test "$prefix" != "NONE" && \
7572 test -d "$prefix" && \
7573  {
7574         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7575         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7576         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7577         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7578         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7579         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7580 }
7581
7582 test "/usr/local" != "$prefix" && \
7583 test -d "/usr/local" && \
7584 (test $prefix = NONE || test -d $prefix) && {
7585         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7586         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7587         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7588         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7589         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7590         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7591 }
7592
7593 test "/opt" != "$prefix" && \
7594 test -d "/opt" && \
7595 (test $prefix = NONE || test -d $prefix) && {
7596         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7597         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7598         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7599         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7600         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7601         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7602 }
7603
7604 test "$HOME" != "$prefix" && \
7605 test -d "$HOME" && \
7606 (test $prefix = NONE || test -d $prefix) && {
7607         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7608         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7609         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7610         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7611         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7612         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7613 }
7614
7615 cf_search="$cf_library_path_list $cf_search"
7616
7617         for cf_cv_library_path_utf8 in $cf_search
7618         do
7619           if test -d $cf_cv_library_path_utf8 ; then
7620             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7621
7622 echo "${as_me-configure}:7622: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7623
7624             CPPFLAGS="$cf_test_CPPFLAGS"
7625             LIBS="-lutf8  $cf_save_LIBS"
7626             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7627             cat >conftest.$ac_ext <<_ACEOF
7628 #line 7628 "configure"
7629 #include "confdefs.h"
7630
7631 #include <libutf8.h>
7632 int
7633 main ()
7634 {
7635 putwc(0,0);
7636   ;
7637   return 0;
7638 }
7639 _ACEOF
7640 rm -f conftest.$ac_objext conftest$ac_exeext
7641 if { (eval echo "$as_me:7641: \"$ac_link\"") >&5
7642   (eval $ac_link) 2>&5
7643   ac_status=$?
7644   echo "$as_me:7644: \$? = $ac_status" >&5
7645   (exit $ac_status); } &&
7646          { ac_try='test -s conftest$ac_exeext'
7647   { (eval echo "$as_me:7647: \"$ac_try\"") >&5
7648   (eval $ac_try) 2>&5
7649   ac_status=$?
7650   echo "$as_me:7650: \$? = $ac_status" >&5
7651   (exit $ac_status); }; }; then
7652
7653                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7654
7655 echo "${as_me-configure}:7655: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7656
7657                 cf_cv_find_linkage_utf8=yes
7658                 cf_cv_library_file_utf8="-lutf8"
7659                 break
7660 else
7661   echo "$as_me: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663
7664                 CPPFLAGS="$cf_save_CPPFLAGS"
7665                 LIBS="$cf_save_LIBS"
7666                 LDFLAGS="$cf_save_LDFLAGS"
7667
7668 fi
7669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7670           fi
7671         done
7672         LIBS="$cf_save_LIBS"
7673         CPPFLAGS="$cf_save_CPPFLAGS"
7674         LDFLAGS="$cf_save_LDFLAGS"
7675       fi
7676
7677     else
7678       cf_cv_find_linkage_utf8=no
7679     fi
7680
7681 fi
7682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7683
7684 if test "$cf_cv_find_linkage_utf8" = yes ; then
7685 cf_cv_utf8_lib=add-on
7686 else
7687 cf_cv_utf8_lib=no
7688 fi
7689
7690 fi
7691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7692 fi
7693 echo "$as_me:7693: result: $cf_cv_utf8_lib" >&5
7694 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7695
7696 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7697 # ncurses/ncursesw:
7698 if test "$cf_cv_utf8_lib" = "add-on" ; then
7699         cat >>confdefs.h <<\EOF
7700 #define HAVE_LIBUTF8_H 1
7701 EOF
7702
7703 if test -n "$cf_cv_header_path_utf8" ; then
7704   for cf_add_incdir in $cf_cv_header_path_utf8
7705   do
7706         while test $cf_add_incdir != /usr/include
7707         do
7708           if test -d $cf_add_incdir
7709           then
7710                 cf_have_incdir=no
7711                 if test -n "$CFLAGS$CPPFLAGS" ; then
7712                   # a loop is needed to ensure we can add subdirs of existing dirs
7713                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7714                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7715                           cf_have_incdir=yes; break
7716                         fi
7717                   done
7718                 fi
7719
7720                 if test "$cf_have_incdir" = no ; then
7721                   if test "$cf_add_incdir" = /usr/local/include ; then
7722                         if test "$GCC" = yes
7723                         then
7724                           cf_save_CPPFLAGS=$CPPFLAGS
7725                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7726                           cat >conftest.$ac_ext <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7729 #include <stdio.h>
7730 int
7731 main ()
7732 {
7733 printf("Hello")
7734   ;
7735   return 0;
7736 }
7737 _ACEOF
7738 rm -f conftest.$ac_objext
7739 if { (eval echo "$as_me:7739: \"$ac_compile\"") >&5
7740   (eval $ac_compile) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); } &&
7744          { ac_try='test -s conftest.$ac_objext'
7745   { (eval echo "$as_me:7745: \"$ac_try\"") >&5
7746   (eval $ac_try) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); }; }; then
7750   :
7751 else
7752   echo "$as_me: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
7754 cf_have_incdir=yes
7755 fi
7756 rm -f conftest.$ac_objext conftest.$ac_ext
7757                           CPPFLAGS=$cf_save_CPPFLAGS
7758                         fi
7759                   fi
7760                 fi
7761
7762                 if test "$cf_have_incdir" = no ; then
7763                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7764
7765 echo "${as_me-configure}:7765: testing adding $cf_add_incdir to include-path ..." 1>&5
7766
7767                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7768
7769                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7770                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7771                   cf_add_incdir="$cf_top_incdir"
7772                 else
7773                   break
7774                 fi
7775           fi
7776         done
7777   done
7778 fi
7779
7780 if test -n "$cf_cv_library_path_utf8" ; then
7781   for cf_add_libdir in $cf_cv_library_path_utf8
7782   do
7783     if test $cf_add_libdir = /usr/lib ; then
7784       :
7785     elif test -d $cf_add_libdir
7786     then
7787       cf_have_libdir=no
7788       if test -n "$LDFLAGS$LIBS" ; then
7789         # a loop is needed to ensure we can add subdirs of existing dirs
7790         for cf_test_libdir in $LDFLAGS $LIBS ; do
7791           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7792             cf_have_libdir=yes; break
7793           fi
7794         done
7795       fi
7796       if test "$cf_have_libdir" = no ; then
7797         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7798
7799 echo "${as_me-configure}:7799: testing adding $cf_add_libdir to library-path ..." 1>&5
7800
7801         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7802       fi
7803     fi
7804   done
7805 fi
7806
7807         LIBS="-lutf8 $LIBS"
7808 fi
7809
7810                 if test "$cf_cv_utf8_lib" != no ; then
7811                         NCURSES_LIBUTF8=1
7812                 fi
7813         fi
7814
7815 # This is needed on Tru64 5.0 to declare mbstate_t
7816 echo "$as_me:7816: checking if we must include wchar.h to declare mbstate_t" >&5
7817 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7818 if test "${cf_cv_mbstate_t+set}" = set; then
7819   echo $ECHO_N "(cached) $ECHO_C" >&6
7820 else
7821
7822 cat >conftest.$ac_ext <<_ACEOF
7823 #line 7823 "configure"
7824 #include "confdefs.h"
7825
7826 #include <stdlib.h>
7827 #include <stdarg.h>
7828 #include <stdio.h>
7829 #ifdef HAVE_LIBUTF8_H
7830 #include <libutf8.h>
7831 #endif
7832 int
7833 main ()
7834 {
7835 mbstate_t state
7836   ;
7837   return 0;
7838 }
7839 _ACEOF
7840 rm -f conftest.$ac_objext
7841 if { (eval echo "$as_me:7841: \"$ac_compile\"") >&5
7842   (eval $ac_compile) 2>&5
7843   ac_status=$?
7844   echo "$as_me:7844: \$? = $ac_status" >&5
7845   (exit $ac_status); } &&
7846          { ac_try='test -s conftest.$ac_objext'
7847   { (eval echo "$as_me:7847: \"$ac_try\"") >&5
7848   (eval $ac_try) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); }; }; then
7852   cf_cv_mbstate_t=no
7853 else
7854   echo "$as_me: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 cat >conftest.$ac_ext <<_ACEOF
7857 #line 7857 "configure"
7858 #include "confdefs.h"
7859
7860 #include <stdlib.h>
7861 #include <stdarg.h>
7862 #include <stdio.h>
7863 #include <wchar.h>
7864 #ifdef HAVE_LIBUTF8_H
7865 #include <libutf8.h>
7866 #endif
7867 int
7868 main ()
7869 {
7870 mbstate_t value
7871   ;
7872   return 0;
7873 }
7874 _ACEOF
7875 rm -f conftest.$ac_objext
7876 if { (eval echo "$as_me:7876: \"$ac_compile\"") >&5
7877   (eval $ac_compile) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit $ac_status); } &&
7881          { ac_try='test -s conftest.$ac_objext'
7882   { (eval echo "$as_me:7882: \"$ac_try\"") >&5
7883   (eval $ac_try) 2>&5
7884   ac_status=$?
7885   echo "$as_me:7885: \$? = $ac_status" >&5
7886   (exit $ac_status); }; }; then
7887   cf_cv_mbstate_t=yes
7888 else
7889   echo "$as_me: failed program was:" >&5
7890 cat conftest.$ac_ext >&5
7891 cf_cv_mbstate_t=unknown
7892 fi
7893 rm -f conftest.$ac_objext conftest.$ac_ext
7894 fi
7895 rm -f conftest.$ac_objext conftest.$ac_ext
7896 fi
7897 echo "$as_me:7897: result: $cf_cv_mbstate_t" >&5
7898 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7899
7900 if test "$cf_cv_mbstate_t" = yes ; then
7901         cat >>confdefs.h <<\EOF
7902 #define NEED_WCHAR_H 1
7903 EOF
7904
7905         NEED_WCHAR_H=1
7906 fi
7907
7908 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7909 if test "$cf_cv_mbstate_t" = unknown ; then
7910         NCURSES_MBSTATE_T=1
7911 fi
7912
7913 # This is needed on Tru64 5.0 to declare wchar_t
7914 echo "$as_me:7914: checking if we must include wchar.h to declare wchar_t" >&5
7915 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7916 if test "${cf_cv_wchar_t+set}" = set; then
7917   echo $ECHO_N "(cached) $ECHO_C" >&6
7918 else
7919
7920 cat >conftest.$ac_ext <<_ACEOF
7921 #line 7921 "configure"
7922 #include "confdefs.h"
7923
7924 #include <stdlib.h>
7925 #include <stdarg.h>
7926 #include <stdio.h>
7927 #ifdef HAVE_LIBUTF8_H
7928 #include <libutf8.h>
7929 #endif
7930 int
7931 main ()
7932 {
7933 wchar_t state
7934   ;
7935   return 0;
7936 }
7937 _ACEOF
7938 rm -f conftest.$ac_objext
7939 if { (eval echo "$as_me:7939: \"$ac_compile\"") >&5
7940   (eval $ac_compile) 2>&5
7941   ac_status=$?
7942   echo "$as_me:7942: \$? = $ac_status" >&5
7943   (exit $ac_status); } &&
7944          { ac_try='test -s conftest.$ac_objext'
7945   { (eval echo "$as_me:7945: \"$ac_try\"") >&5
7946   (eval $ac_try) 2>&5
7947   ac_status=$?
7948   echo "$as_me:7948: \$? = $ac_status" >&5
7949   (exit $ac_status); }; }; then
7950   cf_cv_wchar_t=no
7951 else
7952   echo "$as_me: failed program was:" >&5
7953 cat conftest.$ac_ext >&5
7954 cat >conftest.$ac_ext <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957
7958 #include <stdlib.h>
7959 #include <stdarg.h>
7960 #include <stdio.h>
7961 #include <wchar.h>
7962 #ifdef HAVE_LIBUTF8_H
7963 #include <libutf8.h>
7964 #endif
7965 int
7966 main ()
7967 {
7968 wchar_t value
7969   ;
7970   return 0;
7971 }
7972 _ACEOF
7973 rm -f conftest.$ac_objext
7974 if { (eval echo "$as_me:7974: \"$ac_compile\"") >&5
7975   (eval $ac_compile) 2>&5
7976   ac_status=$?
7977   echo "$as_me:7977: \$? = $ac_status" >&5
7978   (exit $ac_status); } &&
7979          { ac_try='test -s conftest.$ac_objext'
7980   { (eval echo "$as_me:7980: \"$ac_try\"") >&5
7981   (eval $ac_try) 2>&5
7982   ac_status=$?
7983   echo "$as_me:7983: \$? = $ac_status" >&5
7984   (exit $ac_status); }; }; then
7985   cf_cv_wchar_t=yes
7986 else
7987   echo "$as_me: failed program was:" >&5
7988 cat conftest.$ac_ext >&5
7989 cf_cv_wchar_t=unknown
7990 fi
7991 rm -f conftest.$ac_objext conftest.$ac_ext
7992 fi
7993 rm -f conftest.$ac_objext conftest.$ac_ext
7994 fi
7995 echo "$as_me:7995: result: $cf_cv_wchar_t" >&5
7996 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7997
7998 if test "$cf_cv_wchar_t" = yes ; then
7999         cat >>confdefs.h <<\EOF
8000 #define NEED_WCHAR_H 1
8001 EOF
8002
8003         NEED_WCHAR_H=1
8004 fi
8005
8006 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8007 if test "$cf_cv_wchar_t" = unknown ; then
8008         NCURSES_WCHAR_T=1
8009 fi
8010
8011 # if we find wchar_t in either place, use substitution to provide a fallback.
8012 if test "$cf_cv_wchar_t" != unknown ; then
8013         NCURSES_OK_WCHAR_T=1
8014 fi
8015
8016 # This is needed on Tru64 5.0 to declare wint_t
8017 echo "$as_me:8017: checking if we must include wchar.h to declare wint_t" >&5
8018 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8019 if test "${cf_cv_wint_t+set}" = set; then
8020   echo $ECHO_N "(cached) $ECHO_C" >&6
8021 else
8022
8023 cat >conftest.$ac_ext <<_ACEOF
8024 #line 8024 "configure"
8025 #include "confdefs.h"
8026
8027 #include <stdlib.h>
8028 #include <stdarg.h>
8029 #include <stdio.h>
8030 #ifdef HAVE_LIBUTF8_H
8031 #include <libutf8.h>
8032 #endif
8033 int
8034 main ()
8035 {
8036 wint_t state
8037   ;
8038   return 0;
8039 }
8040 _ACEOF
8041 rm -f conftest.$ac_objext
8042 if { (eval echo "$as_me:8042: \"$ac_compile\"") >&5
8043   (eval $ac_compile) 2>&5
8044   ac_status=$?
8045   echo "$as_me:8045: \$? = $ac_status" >&5
8046   (exit $ac_status); } &&
8047          { ac_try='test -s conftest.$ac_objext'
8048   { (eval echo "$as_me:8048: \"$ac_try\"") >&5
8049   (eval $ac_try) 2>&5
8050   ac_status=$?
8051   echo "$as_me:8051: \$? = $ac_status" >&5
8052   (exit $ac_status); }; }; then
8053   cf_cv_wint_t=no
8054 else
8055   echo "$as_me: failed program was:" >&5
8056 cat conftest.$ac_ext >&5
8057 cat >conftest.$ac_ext <<_ACEOF
8058 #line 8058 "configure"
8059 #include "confdefs.h"
8060
8061 #include <stdlib.h>
8062 #include <stdarg.h>
8063 #include <stdio.h>
8064 #include <wchar.h>
8065 #ifdef HAVE_LIBUTF8_H
8066 #include <libutf8.h>
8067 #endif
8068 int
8069 main ()
8070 {
8071 wint_t value
8072   ;
8073   return 0;
8074 }
8075 _ACEOF
8076 rm -f conftest.$ac_objext
8077 if { (eval echo "$as_me:8077: \"$ac_compile\"") >&5
8078   (eval $ac_compile) 2>&5
8079   ac_status=$?
8080   echo "$as_me:8080: \$? = $ac_status" >&5
8081   (exit $ac_status); } &&
8082          { ac_try='test -s conftest.$ac_objext'
8083   { (eval echo "$as_me:8083: \"$ac_try\"") >&5
8084   (eval $ac_try) 2>&5
8085   ac_status=$?
8086   echo "$as_me:8086: \$? = $ac_status" >&5
8087   (exit $ac_status); }; }; then
8088   cf_cv_wint_t=yes
8089 else
8090   echo "$as_me: failed program was:" >&5
8091 cat conftest.$ac_ext >&5
8092 cf_cv_wint_t=unknown
8093 fi
8094 rm -f conftest.$ac_objext conftest.$ac_ext
8095 fi
8096 rm -f conftest.$ac_objext conftest.$ac_ext
8097 fi
8098 echo "$as_me:8098: result: $cf_cv_wint_t" >&5
8099 echo "${ECHO_T}$cf_cv_wint_t" >&6
8100
8101 if test "$cf_cv_wint_t" = yes ; then
8102         cat >>confdefs.h <<\EOF
8103 #define NEED_WCHAR_H 1
8104 EOF
8105
8106         NEED_WCHAR_H=1
8107 fi
8108
8109 # if we do not find wint_t in either place, use substitution to provide a fallback.
8110 if test "$cf_cv_wint_t" = unknown ; then
8111         NCURSES_WINT_T=1
8112 fi
8113
8114 # if we find wint_t in either place, use substitution to provide a fallback.
8115 if test "$cf_cv_wint_t" != unknown ; then
8116         NCURSES_OK_WINT_T=1
8117 fi
8118
8119         if test "$NCURSES_MBSTATE_T" != 0; then
8120                 cat >>confdefs.h <<\EOF
8121 #define NEED_MBSTATE_T_DEF 1
8122 EOF
8123
8124         fi
8125 fi
8126
8127 ###   use option --disable-lp64 to allow long chtype
8128 case $cf_cv_abi_version in
8129 [345]*)
8130         default_with_lp64=no
8131         ;;
8132 *)
8133         default_with_lp64=yes
8134         ;;
8135 esac
8136
8137 echo "$as_me:8137: checking whether to enable _LP64 definition in curses.h" >&5
8138 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8139
8140 # Check whether --enable-lp64 or --disable-lp64 was given.
8141 if test "${enable_lp64+set}" = set; then
8142   enableval="$enable_lp64"
8143   with_lp64=$enableval
8144 else
8145   with_lp64=$default_with_lp64
8146 fi;
8147 echo "$as_me:8147: result: $with_lp64" >&5
8148 echo "${ECHO_T}$with_lp64" >&6
8149
8150 if test "$with_lp64" = yes ; then
8151         cf_cv_enable_lp64=1
8152 else
8153         cf_cv_enable_lp64=0
8154 fi
8155
8156 # Check whether --enable-largefile or --disable-largefile was given.
8157 if test "${enable_largefile+set}" = set; then
8158   enableval="$enable_largefile"
8159
8160 fi;
8161 if test "$enable_largefile" != no; then
8162
8163   echo "$as_me:8163: checking for special C compiler options needed for large files" >&5
8164 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8165 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8166   echo $ECHO_N "(cached) $ECHO_C" >&6
8167 else
8168   ac_cv_sys_largefile_CC=no
8169      if test "$GCC" != yes; then
8170        ac_save_CC=$CC
8171        while :; do
8172          # IRIX 6.2 and later do not support large files by default,
8173          # so use the C compiler's -n32 option if that helps.
8174          cat >conftest.$ac_ext <<_ACEOF
8175 #line 8175 "configure"
8176 #include "confdefs.h"
8177 #include <sys/types.h>
8178  /* Check that off_t can represent 2**63 - 1 correctly.
8179     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8180     since some C++ compilers masquerading as C compilers
8181     incorrectly reject 9223372036854775807.  */
8182 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8183   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8184                        && LARGE_OFF_T % 2147483647 == 1)
8185                       ? 1 : -1];
8186 int
8187 main ()
8188 {
8189
8190   ;
8191   return 0;
8192 }
8193 _ACEOF
8194          rm -f conftest.$ac_objext
8195 if { (eval echo "$as_me:8195: \"$ac_compile\"") >&5
8196   (eval $ac_compile) 2>&5
8197   ac_status=$?
8198   echo "$as_me:8198: \$? = $ac_status" >&5
8199   (exit $ac_status); } &&
8200          { ac_try='test -s conftest.$ac_objext'
8201   { (eval echo "$as_me:8201: \"$ac_try\"") >&5
8202   (eval $ac_try) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); }; }; then
8206   break
8207 else
8208   echo "$as_me: failed program was:" >&5
8209 cat conftest.$ac_ext >&5
8210 fi
8211 rm -f conftest.$ac_objext
8212          CC="$CC -n32"
8213          rm -f conftest.$ac_objext
8214 if { (eval echo "$as_me:8214: \"$ac_compile\"") >&5
8215   (eval $ac_compile) 2>&5
8216   ac_status=$?
8217   echo "$as_me:8217: \$? = $ac_status" >&5
8218   (exit $ac_status); } &&
8219          { ac_try='test -s conftest.$ac_objext'
8220   { (eval echo "$as_me:8220: \"$ac_try\"") >&5
8221   (eval $ac_try) 2>&5
8222   ac_status=$?
8223   echo "$as_me:8223: \$? = $ac_status" >&5
8224   (exit $ac_status); }; }; then
8225   ac_cv_sys_largefile_CC=' -n32'; break
8226 else
8227   echo "$as_me: failed program was:" >&5
8228 cat conftest.$ac_ext >&5
8229 fi
8230 rm -f conftest.$ac_objext
8231          break
8232        done
8233        CC=$ac_save_CC
8234        rm -f conftest.$ac_ext
8235     fi
8236 fi
8237 echo "$as_me:8237: result: $ac_cv_sys_largefile_CC" >&5
8238 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8239   if test "$ac_cv_sys_largefile_CC" != no; then
8240     CC=$CC$ac_cv_sys_largefile_CC
8241   fi
8242
8243   echo "$as_me:8243: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8244 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8245 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8246   echo $ECHO_N "(cached) $ECHO_C" >&6
8247 else
8248   while :; do
8249   ac_cv_sys_file_offset_bits=no
8250   cat >conftest.$ac_ext <<_ACEOF
8251 #line 8251 "configure"
8252 #include "confdefs.h"
8253 #include <sys/types.h>
8254  /* Check that off_t can represent 2**63 - 1 correctly.
8255     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8256     since some C++ compilers masquerading as C compilers
8257     incorrectly reject 9223372036854775807.  */
8258 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8259   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8260                        && LARGE_OFF_T % 2147483647 == 1)
8261                       ? 1 : -1];
8262 int
8263 main ()
8264 {
8265
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   break
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 fi
8287 rm -f conftest.$ac_objext conftest.$ac_ext
8288   cat >conftest.$ac_ext <<_ACEOF
8289 #line 8289 "configure"
8290 #include "confdefs.h"
8291 #define _FILE_OFFSET_BITS 64
8292 #include <sys/types.h>
8293  /* Check that off_t can represent 2**63 - 1 correctly.
8294     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8295     since some C++ compilers masquerading as C compilers
8296     incorrectly reject 9223372036854775807.  */
8297 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8298   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8299                        && LARGE_OFF_T % 2147483647 == 1)
8300                       ? 1 : -1];
8301 int
8302 main ()
8303 {
8304
8305   ;
8306   return 0;
8307 }
8308 _ACEOF
8309 rm -f conftest.$ac_objext
8310 if { (eval echo "$as_me:8310: \"$ac_compile\"") >&5
8311   (eval $ac_compile) 2>&5
8312   ac_status=$?
8313   echo "$as_me:8313: \$? = $ac_status" >&5
8314   (exit $ac_status); } &&
8315          { ac_try='test -s conftest.$ac_objext'
8316   { (eval echo "$as_me:8316: \"$ac_try\"") >&5
8317   (eval $ac_try) 2>&5
8318   ac_status=$?
8319   echo "$as_me:8319: \$? = $ac_status" >&5
8320   (exit $ac_status); }; }; then
8321   ac_cv_sys_file_offset_bits=64; break
8322 else
8323   echo "$as_me: failed program was:" >&5
8324 cat conftest.$ac_ext >&5
8325 fi
8326 rm -f conftest.$ac_objext conftest.$ac_ext
8327   break
8328 done
8329 fi
8330 echo "$as_me:8330: result: $ac_cv_sys_file_offset_bits" >&5
8331 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8332 if test "$ac_cv_sys_file_offset_bits" != no; then
8333
8334 cat >>confdefs.h <<EOF
8335 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8336 EOF
8337
8338 fi
8339 rm -f conftest*
8340   echo "$as_me:8340: checking for _LARGE_FILES value needed for large files" >&5
8341 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8342 if test "${ac_cv_sys_large_files+set}" = set; then
8343   echo $ECHO_N "(cached) $ECHO_C" >&6
8344 else
8345   while :; do
8346   ac_cv_sys_large_files=no
8347   cat >conftest.$ac_ext <<_ACEOF
8348 #line 8348 "configure"
8349 #include "confdefs.h"
8350 #include <sys/types.h>
8351  /* Check that off_t can represent 2**63 - 1 correctly.
8352     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8353     since some C++ compilers masquerading as C compilers
8354     incorrectly reject 9223372036854775807.  */
8355 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8356   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8357                        && LARGE_OFF_T % 2147483647 == 1)
8358                       ? 1 : -1];
8359 int
8360 main ()
8361 {
8362
8363   ;
8364   return 0;
8365 }
8366 _ACEOF
8367 rm -f conftest.$ac_objext
8368 if { (eval echo "$as_me:8368: \"$ac_compile\"") >&5
8369   (eval $ac_compile) 2>&5
8370   ac_status=$?
8371   echo "$as_me:8371: \$? = $ac_status" >&5
8372   (exit $ac_status); } &&
8373          { ac_try='test -s conftest.$ac_objext'
8374   { (eval echo "$as_me:8374: \"$ac_try\"") >&5
8375   (eval $ac_try) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); }; }; then
8379   break
8380 else
8381   echo "$as_me: failed program was:" >&5
8382 cat conftest.$ac_ext >&5
8383 fi
8384 rm -f conftest.$ac_objext conftest.$ac_ext
8385   cat >conftest.$ac_ext <<_ACEOF
8386 #line 8386 "configure"
8387 #include "confdefs.h"
8388 #define _LARGE_FILES 1
8389 #include <sys/types.h>
8390  /* Check that off_t can represent 2**63 - 1 correctly.
8391     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8392     since some C++ compilers masquerading as C compilers
8393     incorrectly reject 9223372036854775807.  */
8394 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8395   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8396                        && LARGE_OFF_T % 2147483647 == 1)
8397                       ? 1 : -1];
8398 int
8399 main ()
8400 {
8401
8402   ;
8403   return 0;
8404 }
8405 _ACEOF
8406 rm -f conftest.$ac_objext
8407 if { (eval echo "$as_me:8407: \"$ac_compile\"") >&5
8408   (eval $ac_compile) 2>&5
8409   ac_status=$?
8410   echo "$as_me:8410: \$? = $ac_status" >&5
8411   (exit $ac_status); } &&
8412          { ac_try='test -s conftest.$ac_objext'
8413   { (eval echo "$as_me:8413: \"$ac_try\"") >&5
8414   (eval $ac_try) 2>&5
8415   ac_status=$?
8416   echo "$as_me:8416: \$? = $ac_status" >&5
8417   (exit $ac_status); }; }; then
8418   ac_cv_sys_large_files=1; break
8419 else
8420   echo "$as_me: failed program was:" >&5
8421 cat conftest.$ac_ext >&5
8422 fi
8423 rm -f conftest.$ac_objext conftest.$ac_ext
8424   break
8425 done
8426 fi
8427 echo "$as_me:8427: result: $ac_cv_sys_large_files" >&5
8428 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8429 if test "$ac_cv_sys_large_files" != no; then
8430
8431 cat >>confdefs.h <<EOF
8432 #define _LARGE_FILES $ac_cv_sys_large_files
8433 EOF
8434
8435 fi
8436 rm -f conftest*
8437 fi
8438
8439     if test "$enable_largefile" != no ; then
8440         echo "$as_me:8440: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8441 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8442 if test "${ac_cv_sys_largefile_source+set}" = set; then
8443   echo $ECHO_N "(cached) $ECHO_C" >&6
8444 else
8445   while :; do
8446   ac_cv_sys_largefile_source=no
8447   cat >conftest.$ac_ext <<_ACEOF
8448 #line 8448 "configure"
8449 #include "confdefs.h"
8450 #include <stdio.h>
8451 int
8452 main ()
8453 {
8454 return !fseeko;
8455   ;
8456   return 0;
8457 }
8458 _ACEOF
8459 rm -f conftest.$ac_objext
8460 if { (eval echo "$as_me:8460: \"$ac_compile\"") >&5
8461   (eval $ac_compile) 2>&5
8462   ac_status=$?
8463   echo "$as_me:8463: \$? = $ac_status" >&5
8464   (exit $ac_status); } &&
8465          { ac_try='test -s conftest.$ac_objext'
8466   { (eval echo "$as_me:8466: \"$ac_try\"") >&5
8467   (eval $ac_try) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); }; }; then
8471   break
8472 else
8473   echo "$as_me: failed program was:" >&5
8474 cat conftest.$ac_ext >&5
8475 fi
8476 rm -f conftest.$ac_objext conftest.$ac_ext
8477   cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480 #define _LARGEFILE_SOURCE 1
8481 #include <stdio.h>
8482 int
8483 main ()
8484 {
8485 return !fseeko;
8486   ;
8487   return 0;
8488 }
8489 _ACEOF
8490 rm -f conftest.$ac_objext
8491 if { (eval echo "$as_me:8491: \"$ac_compile\"") >&5
8492   (eval $ac_compile) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); } &&
8496          { ac_try='test -s conftest.$ac_objext'
8497   { (eval echo "$as_me:8497: \"$ac_try\"") >&5
8498   (eval $ac_try) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); }; }; then
8502   ac_cv_sys_largefile_source=1; break
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 fi
8507 rm -f conftest.$ac_objext conftest.$ac_ext
8508   break
8509 done
8510 fi
8511 echo "$as_me:8511: result: $ac_cv_sys_largefile_source" >&5
8512 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8513 if test "$ac_cv_sys_largefile_source" != no; then
8514
8515 cat >>confdefs.h <<EOF
8516 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8517 EOF
8518
8519 fi
8520 rm -f conftest*
8521
8522 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8523 # in glibc 2.1.3, but that breaks too many other things.
8524 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8525 echo "$as_me:8525: checking for fseeko" >&5
8526 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8527 if test "${ac_cv_func_fseeko+set}" = set; then
8528   echo $ECHO_N "(cached) $ECHO_C" >&6
8529 else
8530   cat >conftest.$ac_ext <<_ACEOF
8531 #line 8531 "configure"
8532 #include "confdefs.h"
8533 #include <stdio.h>
8534 int
8535 main ()
8536 {
8537 return fseeko && fseeko (stdin, 0, 0);
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554   ac_cv_func_fseeko=yes
8555 else
8556   echo "$as_me: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558 ac_cv_func_fseeko=no
8559 fi
8560 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8561 fi
8562 echo "$as_me:8562: result: $ac_cv_func_fseeko" >&5
8563 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8564 if test $ac_cv_func_fseeko = yes; then
8565
8566 cat >>confdefs.h <<\EOF
8567 #define HAVE_FSEEKO 1
8568 EOF
8569
8570 fi
8571
8572         # Normally we would collect these definitions in the config.h,
8573         # but (like _XOPEN_SOURCE), some environments rely on having these
8574         # defined before any of the system headers are included.  Another
8575         # case comes up with C++, e.g., on AIX the compiler compiles the
8576         # header files by themselves before looking at the body files it is
8577         # told to compile.  For ncurses, those header files do not include
8578         # the config.h
8579         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8580         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8581         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8582
8583         echo "$as_me:8583: checking whether to use struct dirent64" >&5
8584 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8585 if test "${cf_cv_struct_dirent64+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588
8589                 cat >conftest.$ac_ext <<_ACEOF
8590 #line 8590 "configure"
8591 #include "confdefs.h"
8592
8593 #include <sys/types.h>
8594 #include <dirent.h>
8595
8596 int
8597 main ()
8598 {
8599
8600                 /* if transitional largefile support is setup, this is true */
8601                 extern struct dirent64 * readdir(DIR *);
8602                 struct dirent64 *x = readdir((DIR *)0);
8603                 struct dirent *y = readdir((DIR *)0);
8604                 int z = x - y;
8605
8606   ;
8607   return 0;
8608 }
8609 _ACEOF
8610 rm -f conftest.$ac_objext
8611 if { (eval echo "$as_me:8611: \"$ac_compile\"") >&5
8612   (eval $ac_compile) 2>&5
8613   ac_status=$?
8614   echo "$as_me:8614: \$? = $ac_status" >&5
8615   (exit $ac_status); } &&
8616          { ac_try='test -s conftest.$ac_objext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622   cf_cv_struct_dirent64=yes
8623 else
8624   echo "$as_me: failed program was:" >&5
8625 cat conftest.$ac_ext >&5
8626 cf_cv_struct_dirent64=no
8627 fi
8628 rm -f conftest.$ac_objext conftest.$ac_ext
8629
8630 fi
8631 echo "$as_me:8631: result: $cf_cv_struct_dirent64" >&5
8632 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8633         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8634 #define HAVE_STRUCT_DIRENT64 1
8635 EOF
8636
8637     fi
8638
8639 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8640 echo "$as_me:8640: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8641 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8642
8643 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8644 if test "${enable_tparm_varargs+set}" = set; then
8645   enableval="$enable_tparm_varargs"
8646   with_tparm_varargs=$enableval
8647 else
8648   with_tparm_varargs=yes
8649 fi;
8650 echo "$as_me:8650: result: $with_tparm_varargs" >&5
8651 echo "${ECHO_T}$with_tparm_varargs" >&6
8652 NCURSES_TPARM_VARARGS=0
8653 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8654
8655 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8656 if test "$with_ticlib" != no ; then
8657 echo "$as_me:8657: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8658 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8659
8660 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8661 if test "${enable_tic_depends+set}" = set; then
8662   enableval="$enable_tic_depends"
8663   with_tic_depends=$enableval
8664 else
8665   with_tic_depends=yes
8666 fi;
8667 echo "$as_me:8667: result: $with_tic_depends" >&5
8668 echo "${ECHO_T}$with_tic_depends" >&6
8669 else
8670         with_tic_depends=no
8671 fi
8672
8673 ###   use option --with-bool to override bool's type
8674 echo "$as_me:8674: checking for type of bool" >&5
8675 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8676
8677 # Check whether --with-bool or --without-bool was given.
8678 if test "${with_bool+set}" = set; then
8679   withval="$with_bool"
8680   NCURSES_BOOL="$withval"
8681 else
8682   NCURSES_BOOL=auto
8683 fi;
8684 echo "$as_me:8684: result: $NCURSES_BOOL" >&5
8685 echo "${ECHO_T}$NCURSES_BOOL" >&6
8686
8687 echo "$as_me:8687: checking for alternate terminal capabilities file" >&5
8688 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8689
8690 # Check whether --with-caps or --without-caps was given.
8691 if test "${with_caps+set}" = set; then
8692   withval="$with_caps"
8693   TERMINFO_CAPS=Caps.$withval
8694 else
8695   TERMINFO_CAPS=Caps
8696 fi;
8697 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8698 echo "$as_me:8698: result: $TERMINFO_CAPS" >&5
8699 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8700
8701 ###   use option --with-chtype to override chtype's type
8702 echo "$as_me:8702: checking for type of chtype" >&5
8703 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8704
8705 # Check whether --with-chtype or --without-chtype was given.
8706 if test "${with_chtype+set}" = set; then
8707   withval="$with_chtype"
8708   NCURSES_CHTYPE="$withval"
8709 else
8710   NCURSES_CHTYPE=auto
8711 fi;
8712 echo "$as_me:8712: result: $NCURSES_CHTYPE" >&5
8713 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8714
8715 ###   use option --with-ospeed to override ospeed's type
8716 echo "$as_me:8716: checking for type of ospeed" >&5
8717 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8718
8719 # Check whether --with-ospeed or --without-ospeed was given.
8720 if test "${with_ospeed+set}" = set; then
8721   withval="$with_ospeed"
8722   NCURSES_OSPEED="$withval"
8723 else
8724   NCURSES_OSPEED=short
8725 fi;
8726 echo "$as_me:8726: result: $NCURSES_OSPEED" >&5
8727 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8728
8729 ###   use option --with-mmask-t to override mmask_t's type
8730 echo "$as_me:8730: checking for type of mmask_t" >&5
8731 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8732
8733 # Check whether --with-mmask-t or --without-mmask-t was given.
8734 if test "${with_mmask_t+set}" = set; then
8735   withval="$with_mmask_t"
8736   NCURSES_MMASK_T="$withval"
8737 else
8738   NCURSES_MMASK_T=auto
8739 fi;
8740 echo "$as_me:8740: result: $NCURSES_MMASK_T" >&5
8741 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8742
8743 ### Enable compiling-in rcs id's
8744 echo "$as_me:8744: checking if RCS identifiers should be compiled-in" >&5
8745 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8746
8747 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8748 if test "${with_rcs_ids+set}" = set; then
8749   withval="$with_rcs_ids"
8750   with_rcs_ids=$withval
8751 else
8752   with_rcs_ids=no
8753 fi;
8754 echo "$as_me:8754: result: $with_rcs_ids" >&5
8755 echo "${ECHO_T}$with_rcs_ids" >&6
8756 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8757 #define USE_RCS_IDS 1
8758 EOF
8759
8760 ###############################################################################
8761
8762 echo "$as_me:8762: checking format of man-pages" >&5
8763 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8764
8765 # Check whether --with-manpage-format or --without-manpage-format was given.
8766 if test "${with_manpage_format+set}" = set; then
8767   withval="$with_manpage_format"
8768   MANPAGE_FORMAT=$withval
8769 else
8770   MANPAGE_FORMAT=unknown
8771 fi;
8772
8773 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8774 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8775
8776 cf_unknown=
8777
8778 case $MANPAGE_FORMAT in
8779 unknown)
8780   if test -z "$MANPATH" ; then
8781     MANPATH="/usr/man:/usr/share/man"
8782   fi
8783
8784   # look for the 'date' man-page (it's most likely to be installed!)
8785   MANPAGE_FORMAT=
8786   cf_preform=no
8787   cf_catonly=yes
8788   cf_example=date
8789
8790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8791   for cf_dir in $MANPATH; do
8792     test -z "$cf_dir" && cf_dir=/usr/man
8793     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
8794     do
8795       cf_test=`echo $cf_name | sed -e 's/*//'`
8796       if test "x$cf_test" = "x$cf_name" ; then
8797
8798         case "$cf_name" in
8799         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8800         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8801         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8802         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8803         esac
8804
8805         case "$cf_name" in
8806         $cf_dir/man*)
8807           cf_catonly=no
8808           ;;
8809         $cf_dir/cat*)
8810           cf_preform=yes
8811           ;;
8812         esac
8813         break
8814       fi
8815
8816       # if we found a match in either man* or cat*, stop looking
8817       if test -n "$MANPAGE_FORMAT" ; then
8818         cf_found=no
8819         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8820         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8821         case "$cf_name" in
8822         $cf_dir/cat*)
8823           cf_found=yes
8824           ;;
8825         esac
8826         test $cf_found=yes && break
8827       fi
8828     done
8829     # only check the first directory in $MANPATH where we find manpages
8830     if test -n "$MANPAGE_FORMAT" ; then
8831        break
8832     fi
8833   done
8834   # if we did not find the example, just assume it is normal
8835   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8836   IFS="$ac_save_ifs"
8837   ;;
8838 *)
8839   for cf_option in $MANPAGE_FORMAT; do
8840      case $cf_option in #(vi
8841      gzip|compress|BSDI|normal|formatted|catonly)
8842        ;;
8843      *)
8844        cf_unknown="$cf_unknown $cf_option"
8845        ;;
8846      esac
8847   done
8848   ;;
8849 esac
8850
8851 echo "$as_me:8851: result: $MANPAGE_FORMAT" >&5
8852 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8853 if test -n "$cf_unknown" ; then
8854   { echo "$as_me:8854: WARNING: Unexpected manpage-format $cf_unknown" >&5
8855 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8856 fi
8857
8858 echo "$as_me:8858: checking for manpage renaming" >&5
8859 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8860
8861 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8862 if test "${with_manpage_renames+set}" = set; then
8863   withval="$with_manpage_renames"
8864   MANPAGE_RENAMES=$withval
8865 else
8866   MANPAGE_RENAMES=yes
8867 fi;
8868
8869 case ".$MANPAGE_RENAMES" in #(vi
8870 .no) #(vi
8871   ;;
8872 .|.yes)
8873   # Debian 'man' program?
8874   if test -f /etc/debian_version ; then
8875     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8876   else
8877     MANPAGE_RENAMES=no
8878   fi
8879   ;;
8880 esac
8881
8882 if test "$MANPAGE_RENAMES" != no ; then
8883   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8884     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8885   elif test ! -f $MANPAGE_RENAMES ; then
8886     { { echo "$as_me:8886: error: not a filename: $MANPAGE_RENAMES" >&5
8887 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8888    { (exit 1); exit 1; }; }
8889   fi
8890
8891   test ! -d man && mkdir man
8892
8893   # Construct a sed-script to perform renaming within man-pages
8894   if test -n "$MANPAGE_RENAMES" ; then
8895     test ! -d man && mkdir man
8896     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8897   fi
8898 fi
8899
8900 echo "$as_me:8900: result: $MANPAGE_RENAMES" >&5
8901 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8902
8903 echo "$as_me:8903: checking if manpage aliases will be installed" >&5
8904 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8905
8906 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8907 if test "${with_manpage_aliases+set}" = set; then
8908   withval="$with_manpage_aliases"
8909   MANPAGE_ALIASES=$withval
8910 else
8911   MANPAGE_ALIASES=yes
8912 fi;
8913
8914 echo "$as_me:8914: result: $MANPAGE_ALIASES" >&5
8915 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8916
8917 if test "$LN_S" = "ln -s"; then
8918         cf_use_symlinks=yes
8919 else
8920         cf_use_symlinks=no
8921 fi
8922
8923 MANPAGE_SYMLINKS=no
8924 if test "$MANPAGE_ALIASES" = yes ; then
8925 echo "$as_me:8925: checking if manpage symlinks should be used" >&5
8926 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8927
8928 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8929 if test "${with_manpage_symlinks+set}" = set; then
8930   withval="$with_manpage_symlinks"
8931   MANPAGE_SYMLINKS=$withval
8932 else
8933   MANPAGE_SYMLINKS=$cf_use_symlinks
8934 fi;
8935
8936 if test "$$cf_use_symlinks" = no; then
8937 if test "$MANPAGE_SYMLINKS" = yes ; then
8938         { echo "$as_me:8938: WARNING: cannot make symlinks" >&5
8939 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8940         MANPAGE_SYMLINKS=no
8941 fi
8942 fi
8943
8944 echo "$as_me:8944: result: $MANPAGE_SYMLINKS" >&5
8945 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8946 fi
8947
8948 echo "$as_me:8948: checking for manpage tbl" >&5
8949 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8950
8951 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8952 if test "${with_manpage_tbl+set}" = set; then
8953   withval="$with_manpage_tbl"
8954   MANPAGE_TBL=$withval
8955 else
8956   MANPAGE_TBL=no
8957 fi;
8958
8959 echo "$as_me:8959: result: $MANPAGE_TBL" >&5
8960 echo "${ECHO_T}$MANPAGE_TBL" >&6
8961
8962   if test "$prefix" = "NONE" ; then
8963      cf_prefix="$ac_default_prefix"
8964   else
8965      cf_prefix="$prefix"
8966   fi
8967
8968   case "$MANPAGE_FORMAT" in # (vi
8969   *catonly*) # (vi
8970     cf_format=yes
8971     cf_inboth=no
8972     ;;
8973   *formatted*) # (vi
8974     cf_format=yes
8975     cf_inboth=yes
8976     ;;
8977   *)
8978     cf_format=no
8979     cf_inboth=no
8980     ;;
8981   esac
8982
8983 test ! -d man && mkdir man
8984
8985 cf_so_strip=
8986 cf_compress=
8987 case "$MANPAGE_FORMAT" in #(vi
8988 *compress*) #(vi
8989         cf_so_strip="Z"
8990         cf_compress=compress
8991   ;;
8992 *gzip*) #(vi
8993         cf_so_strip="gz"
8994         cf_compress=gzip
8995   ;;
8996 esac
8997
8998 cf_edit_man=./edit_man.sh
8999 cf_man_alias=`pwd`/man_alias.sed
9000
9001 cat >$cf_edit_man <<CF_EOF
9002 #! /bin/sh
9003 # this script is generated by the configure-script CF_MAN_PAGES macro.
9004
9005 prefix="$cf_prefix"
9006 datadir="$datadir"
9007
9008 NCURSES_MAJOR="$NCURSES_MAJOR"
9009 NCURSES_MINOR="$NCURSES_MINOR"
9010 NCURSES_PATCH="$NCURSES_PATCH"
9011
9012 NCURSES_OSPEED="$NCURSES_OSPEED"
9013 TERMINFO="$TERMINFO"
9014
9015 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9016
9017 INSTALL="$INSTALL"
9018 INSTALL_DATA="$INSTALL_DATA"
9019
9020 transform="$program_transform_name"
9021
9022 TMP=\${TMPDIR-/tmp}/man\$\$
9023 trap "rm -f \$TMP" 0 1 2 5 15
9024
9025 form=\$1
9026 shift || exit 1
9027
9028 verb=\$1
9029 shift || exit 1
9030
9031 mandir=\$1
9032 shift || exit 1
9033
9034 srcdir=\$1
9035 top_srcdir=\$srcdir/..
9036 shift || exit 1
9037
9038 if test "\$form" = normal ; then
9039         if test "$cf_format" = yes ; then
9040         if test "$cf_inboth" = no ; then
9041                 sh \$0 format \$verb \$mandir \$srcdir \$*
9042                 exit $?
9043         fi
9044         fi
9045         cf_subdir=\$mandir/man
9046         cf_tables=$MANPAGE_TBL
9047 else
9048         cf_subdir=\$mandir/cat
9049         cf_tables=yes
9050 fi
9051
9052 # process the list of source-files
9053 for i in \$* ; do
9054 case \$i in #(vi
9055 *.orig|*.rej) ;; #(vi
9056 *.[0-9]*)
9057         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9058         if test \$verb = installing ; then
9059         if test ! -d \$cf_subdir\${section} ; then
9060                 \$MKDIRS \$cf_subdir\$section
9061         fi
9062         fi
9063
9064         # replace variables in man page
9065         if test ! -f $cf_man_alias ; then
9066 cat >>$cf_man_alias <<-CF_EOF2
9067                 s,@DATADIR@,\$datadir,g
9068                 s,@TERMINFO@,\$TERMINFO,g
9069                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9070                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9071                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9072                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9073 CF_EOF
9074
9075         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9076         do
9077                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9078                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9079 cat >>$cf_edit_man <<-CF_EOF
9080                 s,@$cf_NAME@,$cf_name,
9081 CF_EOF
9082         done
9083
9084 cat >>$cf_edit_man <<CF_EOF
9085 CF_EOF2
9086                 echo "...made $cf_man_alias"
9087         fi
9088
9089         aliases=
9090         cf_source=\`basename \$i\`
9091         inalias=\$cf_source
9092         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9093         if test ! -f \$inalias ; then
9094                 echo .. skipped \$cf_source
9095                 continue
9096         fi
9097 CF_EOF
9098
9099 if test "$MANPAGE_ALIASES" != no ; then
9100 cat >>$cf_edit_man <<CF_EOF
9101         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9102 CF_EOF
9103 fi
9104
9105 if test "$MANPAGE_RENAMES" = no ; then
9106 cat >>$cf_edit_man <<CF_EOF
9107         # perform program transformations for section 1 man pages
9108         if test \$section = 1 ; then
9109                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9110         else
9111                 cf_target=\$cf_subdir\${section}/\$cf_source
9112         fi
9113 CF_EOF
9114 else
9115 cat >>$cf_edit_man <<CF_EOF
9116         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9117         if test -z "\$cf_target" ; then
9118                 echo '? missing rename for '\$cf_source
9119                 cf_target="\$cf_source"
9120         fi
9121         cf_target="\$cf_subdir\${section}/\${cf_target}"
9122
9123 CF_EOF
9124 fi
9125
9126 cat >>$cf_edit_man <<CF_EOF
9127         sed     -f $cf_man_alias \\
9128 CF_EOF
9129
9130 if test -f $MANPAGE_RENAMES ; then
9131 cat >>$cf_edit_man <<CF_EOF
9132                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9133 CF_EOF
9134 else
9135 cat >>$cf_edit_man <<CF_EOF
9136                 < \$i >\$TMP
9137 CF_EOF
9138 fi
9139
9140 cat >>$cf_edit_man <<CF_EOF
9141 if test \$cf_tables = yes ; then
9142         tbl \$TMP >\$TMP.out
9143         mv \$TMP.out \$TMP
9144 fi
9145 CF_EOF
9146
9147 if test $with_curses_h != yes ; then
9148 cat >>$cf_edit_man <<CF_EOF
9149         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9150         mv \$TMP.out \$TMP
9151 CF_EOF
9152 fi
9153
9154 cat >>$cf_edit_man <<CF_EOF
9155         if test \$form = format ; then
9156                 nroff -man \$TMP >\$TMP.out
9157                 mv \$TMP.out \$TMP
9158         fi
9159 CF_EOF
9160
9161 if test -n "$cf_compress" ; then
9162 cat >>$cf_edit_man <<CF_EOF
9163         if test \$verb = installing ; then
9164         if ( $cf_compress -f \$TMP )
9165         then
9166                 mv \$TMP.$cf_so_strip \$TMP
9167         fi
9168         fi
9169         cf_target="\$cf_target.$cf_so_strip"
9170 CF_EOF
9171 fi
9172
9173 case "$MANPAGE_FORMAT" in #(vi
9174 *BSDI*)
9175 cat >>$cf_edit_man <<CF_EOF
9176         if test \$form = format ; then
9177                 # BSDI installs only .0 suffixes in the cat directories
9178                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9179         fi
9180 CF_EOF
9181   ;;
9182 esac
9183
9184 cat >>$cf_edit_man <<CF_EOF
9185         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9186         if test \$verb = installing ; then
9187                 echo \$verb \$cf_target
9188                 \$INSTALL_DATA \$TMP \$cf_target
9189                 test -d \$cf_subdir\${section} &&
9190                 test -n "\$aliases" && (
9191                         cd \$cf_subdir\${section} && (
9192                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9193                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9194                                 cf_target=\`basename \$cf_target\`
9195                                 for cf_alias in \$aliases
9196                                 do
9197                                         if test \$section = 1 ; then
9198                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9199                                         fi
9200
9201                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9202                                                 if test -f \$cf_alias\${suffix} ; then
9203                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9204                                                         then
9205                                                                 continue
9206                                                         fi
9207                                                 fi
9208                                                 echo .. \$verb alias \$cf_alias\${suffix}
9209                                                 rm -f \$cf_alias\${suffix}
9210                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9211                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9212                                                 echo ".so \$cf_source" >\$TMP
9213 CF_EOF
9214 if test -n "$cf_compress" ; then
9215 cat >>$cf_edit_man <<CF_EOF
9216                                                 if test -n "$cf_so_strip" ; then
9217                                                         $cf_compress -f \$TMP
9218                                                         mv \$TMP.$cf_so_strip \$TMP
9219                                                 fi
9220 CF_EOF
9221 fi
9222 cat >>$cf_edit_man <<CF_EOF
9223                                                 echo .. \$verb alias \$cf_alias\${suffix}
9224                                                 rm -f \$cf_alias\${suffix}
9225                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9226                                         fi
9227                                 done
9228                         )
9229                 )
9230         elif test \$verb = removing ; then
9231                 test -f \$cf_target && (
9232                         echo \$verb \$cf_target
9233                         rm -f \$cf_target
9234                 )
9235                 test -d \$cf_subdir\${section} &&
9236                 test -n "\$aliases" && (
9237                         cd \$cf_subdir\${section} && (
9238                                 for cf_alias in \$aliases
9239                                 do
9240                                         if test \$section = 1 ; then
9241                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9242                                         fi
9243
9244                                         echo .. \$verb alias \$cf_alias\${suffix}
9245                                         rm -f \$cf_alias\${suffix}
9246                                 done
9247                         )
9248                 )
9249         else
9250 #               echo ".hy 0"
9251                 cat \$TMP
9252         fi
9253         ;;
9254 esac
9255 done
9256
9257 if test $cf_inboth = yes ; then
9258 if test \$form != format ; then
9259         sh \$0 format \$verb \$mandir \$srcdir \$*
9260 fi
9261 fi
9262
9263 exit 0
9264 CF_EOF
9265 chmod 755 $cf_edit_man
9266
9267 ###############################################################################
9268
9269 ### Note that some functions (such as const) are normally disabled anyway.
9270 echo "$as_me:9270: checking if you want to build with function extensions" >&5
9271 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9272
9273 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9274 if test "${enable_ext_funcs+set}" = set; then
9275   enableval="$enable_ext_funcs"
9276   with_ext_funcs=$enableval
9277 else
9278   with_ext_funcs=yes
9279 fi;
9280 echo "$as_me:9280: result: $with_ext_funcs" >&5
9281 echo "${ECHO_T}$with_ext_funcs" >&6
9282 if test "$with_ext_funcs" = yes ; then
9283         NCURSES_EXT_FUNCS=1
9284         cat >>confdefs.h <<\EOF
9285 #define HAVE_CURSES_VERSION 1
9286 EOF
9287
9288         cat >>confdefs.h <<\EOF
9289 #define HAVE_HAS_KEY 1
9290 EOF
9291
9292         cat >>confdefs.h <<\EOF
9293 #define HAVE_RESIZETERM 1
9294 EOF
9295
9296         cat >>confdefs.h <<\EOF
9297 #define HAVE_RESIZE_TERM 1
9298 EOF
9299
9300         cat >>confdefs.h <<\EOF
9301 #define HAVE_USE_DEFAULT_COLORS 1
9302 EOF
9303
9304         cat >>confdefs.h <<\EOF
9305 #define HAVE_WRESIZE 1
9306 EOF
9307
9308         cat >>confdefs.h <<\EOF
9309 #define NCURSES_EXT_FUNCS 1
9310 EOF
9311
9312         GENERATED_EXT_FUNCS=generated
9313 else
9314         NCURSES_EXT_FUNCS=0
9315         GENERATED_EXT_FUNCS=
9316 fi
9317
9318 echo "$as_me:9318: checking if you want to build with experimental SCREEN extensions" >&5
9319 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9320
9321 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9322 if test "${enable_sp_funcs+set}" = set; then
9323   enableval="$enable_sp_funcs"
9324   with_sp_funcs=$enableval
9325 else
9326   with_sp_funcs=no
9327 fi;
9328 echo "$as_me:9328: result: $with_sp_funcs" >&5
9329 echo "${ECHO_T}$with_sp_funcs" >&6
9330 if test "$with_sp_funcs" = yes ; then
9331         NCURSES_SP_FUNCS=1
9332         cat >>confdefs.h <<\EOF
9333 #define NCURSES_SP_FUNCS 1
9334 EOF
9335
9336         GENERATED_SP_FUNCS=generated
9337 else
9338         NCURSES_SP_FUNCS=0
9339         GENERATED_SP_FUNCS=
9340 fi
9341
9342 ###   use option --enable-const to turn on use of const beyond that in XSI.
9343 echo "$as_me:9343: checking for extended use of const keyword" >&5
9344 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9345
9346 # Check whether --enable-const or --disable-const was given.
9347 if test "${enable_const+set}" = set; then
9348   enableval="$enable_const"
9349   with_ext_const=$enableval
9350 else
9351   with_ext_const=no
9352 fi;
9353 echo "$as_me:9353: result: $with_ext_const" >&5
9354 echo "${ECHO_T}$with_ext_const" >&6
9355 NCURSES_CONST='/*nothing*/'
9356 if test "$with_ext_const" = yes ; then
9357         NCURSES_CONST=const
9358 fi
9359
9360 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9361 echo "$as_me:9361: checking if you want to use extended colors" >&5
9362 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9363
9364 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9365 if test "${enable_ext_colors+set}" = set; then
9366   enableval="$enable_ext_colors"
9367   with_ext_colors=$enableval
9368 else
9369   with_ext_colors=no
9370 fi;
9371 echo "$as_me:9371: result: $with_ext_colors" >&5
9372 echo "${ECHO_T}$with_ext_colors" >&6
9373 NCURSES_EXT_COLORS=0
9374 if test "$with_ext_colors" = yes ; then
9375         if test "$with_widec" != yes ; then
9376                 { { echo "$as_me:9376: error: This option applies only to wide-character library" >&5
9377 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9378    { (exit 1); exit 1; }; }
9379         else
9380                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9381
9382 if test "${with_abi_version+set}" != set; then
9383         case $cf_cv_rel_version in
9384         5.*)
9385                 cf_cv_rel_version=6.0
9386                 cf_cv_abi_version=6
9387                 { echo "$as_me:9387: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9388 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9389                 ;;
9390         esac
9391 fi
9392
9393         fi
9394         NCURSES_EXT_COLORS=1
9395         cat >>confdefs.h <<\EOF
9396 #define NCURSES_EXT_COLORS 1
9397 EOF
9398
9399 fi
9400
9401 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9402 echo "$as_me:9402: checking if you want to use extended mouse encoding" >&5
9403 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9404
9405 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9406 if test "${enable_ext_mouse+set}" = set; then
9407   enableval="$enable_ext_mouse"
9408   with_ext_mouse=$enableval
9409 else
9410   with_ext_mouse=no
9411 fi;
9412 echo "$as_me:9412: result: $with_ext_mouse" >&5
9413 echo "${ECHO_T}$with_ext_mouse" >&6
9414 NCURSES_MOUSE_VERSION=1
9415 if test "$with_ext_mouse" = yes ; then
9416         NCURSES_MOUSE_VERSION=2
9417
9418 if test "${with_abi_version+set}" != set; then
9419         case $cf_cv_rel_version in
9420         5.*)
9421                 cf_cv_rel_version=6.0
9422                 cf_cv_abi_version=6
9423                 { echo "$as_me:9423: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9424 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9425                 ;;
9426         esac
9427 fi
9428
9429 fi
9430
9431 echo "$as_me:9431: checking if you want \$NCURSES_NO_PADDING code" >&5
9432 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9433
9434 # Check whether --enable-no-padding or --disable-no-padding was given.
9435 if test "${enable_no_padding+set}" = set; then
9436   enableval="$enable_no_padding"
9437   with_no_padding=$enableval
9438 else
9439   with_no_padding=$with_ext_funcs
9440 fi;
9441 echo "$as_me:9441: result: $with_no_padding" >&5
9442 echo "${ECHO_T}$with_no_padding" >&6
9443 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9444 #define NCURSES_NO_PADDING 1
9445 EOF
9446
9447 echo "$as_me:9447: checking for ANSI C header files" >&5
9448 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9449 if test "${ac_cv_header_stdc+set}" = set; then
9450   echo $ECHO_N "(cached) $ECHO_C" >&6
9451 else
9452   cat >conftest.$ac_ext <<_ACEOF
9453 #line 9453 "configure"
9454 #include "confdefs.h"
9455 #include <stdlib.h>
9456 #include <stdarg.h>
9457 #include <string.h>
9458 #include <float.h>
9459
9460 _ACEOF
9461 if { (eval echo "$as_me:9461: \"$ac_cpp conftest.$ac_ext\"") >&5
9462   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9463   ac_status=$?
9464   egrep -v '^ *\+' conftest.er1 >conftest.err
9465   rm -f conftest.er1
9466   cat conftest.err >&5
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); } >/dev/null; then
9469   if test -s conftest.err; then
9470     ac_cpp_err=$ac_c_preproc_warn_flag
9471   else
9472     ac_cpp_err=
9473   fi
9474 else
9475   ac_cpp_err=yes
9476 fi
9477 if test -z "$ac_cpp_err"; then
9478   ac_cv_header_stdc=yes
9479 else
9480   echo "$as_me: failed program was:" >&5
9481   cat conftest.$ac_ext >&5
9482   ac_cv_header_stdc=no
9483 fi
9484 rm -f conftest.err conftest.$ac_ext
9485
9486 if test $ac_cv_header_stdc = yes; then
9487   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9488   cat >conftest.$ac_ext <<_ACEOF
9489 #line 9489 "configure"
9490 #include "confdefs.h"
9491 #include <string.h>
9492
9493 _ACEOF
9494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9495   egrep "memchr" >/dev/null 2>&1; then
9496   :
9497 else
9498   ac_cv_header_stdc=no
9499 fi
9500 rm -f conftest*
9501
9502 fi
9503
9504 if test $ac_cv_header_stdc = yes; then
9505   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9506   cat >conftest.$ac_ext <<_ACEOF
9507 #line 9507 "configure"
9508 #include "confdefs.h"
9509 #include <stdlib.h>
9510
9511 _ACEOF
9512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9513   egrep "free" >/dev/null 2>&1; then
9514   :
9515 else
9516   ac_cv_header_stdc=no
9517 fi
9518 rm -f conftest*
9519
9520 fi
9521
9522 if test $ac_cv_header_stdc = yes; then
9523   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9524   if test "$cross_compiling" = yes; then
9525   :
9526 else
9527   cat >conftest.$ac_ext <<_ACEOF
9528 #line 9528 "configure"
9529 #include "confdefs.h"
9530 #include <ctype.h>
9531 #if ((' ' & 0x0FF) == 0x020)
9532 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9533 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9534 #else
9535 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9536                      || ('j' <= (c) && (c) <= 'r') \
9537                      || ('s' <= (c) && (c) <= 'z'))
9538 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9539 #endif
9540
9541 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9542 int
9543 main ()
9544 {
9545   int i;
9546   for (i = 0; i < 256; i++)
9547     if (XOR (islower (i), ISLOWER (i))
9548         || toupper (i) != TOUPPER (i))
9549       $ac_main_return(2);
9550   $ac_main_return (0);
9551 }
9552 _ACEOF
9553 rm -f conftest$ac_exeext
9554 if { (eval echo "$as_me:9554: \"$ac_link\"") >&5
9555   (eval $ac_link) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9559   { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560   (eval $ac_try) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); }; }; then
9564   :
9565 else
9566   echo "$as_me: program exited with status $ac_status" >&5
9567 echo "$as_me: failed program was:" >&5
9568 cat conftest.$ac_ext >&5
9569 ac_cv_header_stdc=no
9570 fi
9571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9572 fi
9573 fi
9574 fi
9575 echo "$as_me:9575: result: $ac_cv_header_stdc" >&5
9576 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9577 if test $ac_cv_header_stdc = yes; then
9578
9579 cat >>confdefs.h <<\EOF
9580 #define STDC_HEADERS 1
9581 EOF
9582
9583 fi
9584
9585 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9586
9587 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9588                   inttypes.h stdint.h unistd.h
9589 do
9590 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9591 echo "$as_me:9591: checking for $ac_header" >&5
9592 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9593 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9594   echo $ECHO_N "(cached) $ECHO_C" >&6
9595 else
9596   cat >conftest.$ac_ext <<_ACEOF
9597 #line 9597 "configure"
9598 #include "confdefs.h"
9599 $ac_includes_default
9600 #include <$ac_header>
9601 _ACEOF
9602 rm -f conftest.$ac_objext
9603 if { (eval echo "$as_me:9603: \"$ac_compile\"") >&5
9604   (eval $ac_compile) 2>&5
9605   ac_status=$?
9606   echo "$as_me:9606: \$? = $ac_status" >&5
9607   (exit $ac_status); } &&
9608          { ac_try='test -s conftest.$ac_objext'
9609   { (eval echo "$as_me:9609: \"$ac_try\"") >&5
9610   (eval $ac_try) 2>&5
9611   ac_status=$?
9612   echo "$as_me:9612: \$? = $ac_status" >&5
9613   (exit $ac_status); }; }; then
9614   eval "$as_ac_Header=yes"
9615 else
9616   echo "$as_me: failed program was:" >&5
9617 cat conftest.$ac_ext >&5
9618 eval "$as_ac_Header=no"
9619 fi
9620 rm -f conftest.$ac_objext conftest.$ac_ext
9621 fi
9622 echo "$as_me:9622: result: `eval echo '${'$as_ac_Header'}'`" >&5
9623 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9624 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9625   cat >>confdefs.h <<EOF
9626 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9627 EOF
9628
9629 fi
9630 done
9631
9632 echo "$as_me:9632: checking for signed char" >&5
9633 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9634 if test "${ac_cv_type_signed_char+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637   cat >conftest.$ac_ext <<_ACEOF
9638 #line 9638 "configure"
9639 #include "confdefs.h"
9640 $ac_includes_default
9641 int
9642 main ()
9643 {
9644 if ((signed char *) 0)
9645   return 0;
9646 if (sizeof (signed char))
9647   return 0;
9648   ;
9649   return 0;
9650 }
9651 _ACEOF
9652 rm -f conftest.$ac_objext
9653 if { (eval echo "$as_me:9653: \"$ac_compile\"") >&5
9654   (eval $ac_compile) 2>&5
9655   ac_status=$?
9656   echo "$as_me:9656: \$? = $ac_status" >&5
9657   (exit $ac_status); } &&
9658          { ac_try='test -s conftest.$ac_objext'
9659   { (eval echo "$as_me:9659: \"$ac_try\"") >&5
9660   (eval $ac_try) 2>&5
9661   ac_status=$?
9662   echo "$as_me:9662: \$? = $ac_status" >&5
9663   (exit $ac_status); }; }; then
9664   ac_cv_type_signed_char=yes
9665 else
9666   echo "$as_me: failed program was:" >&5
9667 cat conftest.$ac_ext >&5
9668 ac_cv_type_signed_char=no
9669 fi
9670 rm -f conftest.$ac_objext conftest.$ac_ext
9671 fi
9672 echo "$as_me:9672: result: $ac_cv_type_signed_char" >&5
9673 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9674
9675 echo "$as_me:9675: checking size of signed char" >&5
9676 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9677 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9678   echo $ECHO_N "(cached) $ECHO_C" >&6
9679 else
9680   if test "$ac_cv_type_signed_char" = yes; then
9681   if test "$cross_compiling" = yes; then
9682   # Depending upon the size, compute the lo and hi bounds.
9683 cat >conftest.$ac_ext <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686 $ac_includes_default
9687 int
9688 main ()
9689 {
9690 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9691   ;
9692   return 0;
9693 }
9694 _ACEOF
9695 rm -f conftest.$ac_objext
9696 if { (eval echo "$as_me:9696: \"$ac_compile\"") >&5
9697   (eval $ac_compile) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); } &&
9701          { ac_try='test -s conftest.$ac_objext'
9702   { (eval echo "$as_me:9702: \"$ac_try\"") >&5
9703   (eval $ac_try) 2>&5
9704   ac_status=$?
9705   echo "$as_me:9705: \$? = $ac_status" >&5
9706   (exit $ac_status); }; }; then
9707   ac_lo=0 ac_mid=0
9708   while :; do
9709     cat >conftest.$ac_ext <<_ACEOF
9710 #line 9710 "configure"
9711 #include "confdefs.h"
9712 $ac_includes_default
9713 int
9714 main ()
9715 {
9716 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721 rm -f conftest.$ac_objext
9722 if { (eval echo "$as_me:9722: \"$ac_compile\"") >&5
9723   (eval $ac_compile) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit $ac_status); } &&
9727          { ac_try='test -s conftest.$ac_objext'
9728   { (eval echo "$as_me:9728: \"$ac_try\"") >&5
9729   (eval $ac_try) 2>&5
9730   ac_status=$?
9731   echo "$as_me:9731: \$? = $ac_status" >&5
9732   (exit $ac_status); }; }; then
9733   ac_hi=$ac_mid; break
9734 else
9735   echo "$as_me: failed program was:" >&5
9736 cat conftest.$ac_ext >&5
9737 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9738 fi
9739 rm -f conftest.$ac_objext conftest.$ac_ext
9740   done
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 cat conftest.$ac_ext >&5
9744 ac_hi=-1 ac_mid=-1
9745   while :; do
9746     cat >conftest.$ac_ext <<_ACEOF
9747 #line 9747 "configure"
9748 #include "confdefs.h"
9749 $ac_includes_default
9750 int
9751 main ()
9752 {
9753 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 rm -f conftest.$ac_objext
9759 if { (eval echo "$as_me:9759: \"$ac_compile\"") >&5
9760   (eval $ac_compile) 2>&5
9761   ac_status=$?
9762   echo "$as_me:9762: \$? = $ac_status" >&5
9763   (exit $ac_status); } &&
9764          { ac_try='test -s conftest.$ac_objext'
9765   { (eval echo "$as_me:9765: \"$ac_try\"") >&5
9766   (eval $ac_try) 2>&5
9767   ac_status=$?
9768   echo "$as_me:9768: \$? = $ac_status" >&5
9769   (exit $ac_status); }; }; then
9770   ac_lo=$ac_mid; break
9771 else
9772   echo "$as_me: failed program was:" >&5
9773 cat conftest.$ac_ext >&5
9774 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9775 fi
9776 rm -f conftest.$ac_objext conftest.$ac_ext
9777   done
9778 fi
9779 rm -f conftest.$ac_objext conftest.$ac_ext
9780 # Binary search between lo and hi bounds.
9781 while test "x$ac_lo" != "x$ac_hi"; do
9782   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9783   cat >conftest.$ac_ext <<_ACEOF
9784 #line 9784 "configure"
9785 #include "confdefs.h"
9786 $ac_includes_default
9787 int
9788 main ()
9789 {
9790 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9791   ;
9792   return 0;
9793 }
9794 _ACEOF
9795 rm -f conftest.$ac_objext
9796 if { (eval echo "$as_me:9796: \"$ac_compile\"") >&5
9797   (eval $ac_compile) 2>&5
9798   ac_status=$?
9799   echo "$as_me:9799: \$? = $ac_status" >&5
9800   (exit $ac_status); } &&
9801          { ac_try='test -s conftest.$ac_objext'
9802   { (eval echo "$as_me:9802: \"$ac_try\"") >&5
9803   (eval $ac_try) 2>&5
9804   ac_status=$?
9805   echo "$as_me:9805: \$? = $ac_status" >&5
9806   (exit $ac_status); }; }; then
9807   ac_hi=$ac_mid
9808 else
9809   echo "$as_me: failed program was:" >&5
9810 cat conftest.$ac_ext >&5
9811 ac_lo=`expr $ac_mid + 1`
9812 fi
9813 rm -f conftest.$ac_objext conftest.$ac_ext
9814 done
9815 ac_cv_sizeof_signed_char=$ac_lo
9816 else
9817   if test "$cross_compiling" = yes; then
9818   { { echo "$as_me:9818: error: cannot run test program while cross compiling" >&5
9819 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9820    { (exit 1); exit 1; }; }
9821 else
9822   cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 $ac_includes_default
9826 int
9827 main ()
9828 {
9829 FILE *f = fopen ("conftest.val", "w");
9830 if (!f)
9831   $ac_main_return (1);
9832 fprintf (f, "%d", (sizeof (signed char)));
9833 fclose (f);
9834   ;
9835   return 0;
9836 }
9837 _ACEOF
9838 rm -f conftest$ac_exeext
9839 if { (eval echo "$as_me:9839: \"$ac_link\"") >&5
9840   (eval $ac_link) 2>&5
9841   ac_status=$?
9842   echo "$as_me:9842: \$? = $ac_status" >&5
9843   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9844   { (eval echo "$as_me:9844: \"$ac_try\"") >&5
9845   (eval $ac_try) 2>&5
9846   ac_status=$?
9847   echo "$as_me:9847: \$? = $ac_status" >&5
9848   (exit $ac_status); }; }; then
9849   ac_cv_sizeof_signed_char=`cat conftest.val`
9850 else
9851   echo "$as_me: program exited with status $ac_status" >&5
9852 echo "$as_me: failed program was:" >&5
9853 cat conftest.$ac_ext >&5
9854 fi
9855 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9856 fi
9857 fi
9858 rm -f conftest.val
9859 else
9860   ac_cv_sizeof_signed_char=0
9861 fi
9862 fi
9863 echo "$as_me:9863: result: $ac_cv_sizeof_signed_char" >&5
9864 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9865 cat >>confdefs.h <<EOF
9866 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9867 EOF
9868
9869 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9870         NCURSES_SBOOL="signed char"
9871 else
9872         NCURSES_SBOOL="char"
9873 fi
9874 echo "$as_me:9874: checking if you want to use signed Boolean array in term.h" >&5
9875 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9876
9877 # Check whether --enable-signed-char or --disable-signed-char was given.
9878 if test "${enable_signed_char+set}" = set; then
9879   enableval="$enable_signed_char"
9880   with_signed_char=$enableval
9881 else
9882   with_signed_char=no
9883 fi;
9884 echo "$as_me:9884: result: $with_signed_char" >&5
9885 echo "${ECHO_T}$with_signed_char" >&6
9886 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9887
9888 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9889 echo "$as_me:9889: checking if you want SIGWINCH handler" >&5
9890 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9891
9892 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9893 if test "${enable_sigwinch+set}" = set; then
9894   enableval="$enable_sigwinch"
9895   with_sigwinch=$enableval
9896 else
9897   with_sigwinch=$with_ext_funcs
9898 fi;
9899 echo "$as_me:9899: result: $with_sigwinch" >&5
9900 echo "${ECHO_T}$with_sigwinch" >&6
9901 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9902 #define USE_SIGWINCH 1
9903 EOF
9904
9905 ###   use option --enable-tcap-names to allow user to define new capabilities
9906 echo "$as_me:9906: checking if you want user-definable terminal capabilities like termcap" >&5
9907 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9908
9909 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9910 if test "${enable_tcap_names+set}" = set; then
9911   enableval="$enable_tcap_names"
9912   with_tcap_names=$enableval
9913 else
9914   with_tcap_names=$with_ext_funcs
9915 fi;
9916 echo "$as_me:9916: result: $with_tcap_names" >&5
9917 echo "${ECHO_T}$with_tcap_names" >&6
9918 NCURSES_XNAMES=0
9919 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9920
9921 ###############################################################################
9922 # These options are relatively safe to experiment with.
9923
9924 echo "$as_me:9924: checking if you want all development code" >&5
9925 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9926
9927 # Check whether --with-develop or --without-develop was given.
9928 if test "${with_develop+set}" = set; then
9929   withval="$with_develop"
9930   with_develop=$withval
9931 else
9932   with_develop=no
9933 fi;
9934 echo "$as_me:9934: result: $with_develop" >&5
9935 echo "${ECHO_T}$with_develop" >&6
9936
9937 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9938 echo "$as_me:9938: checking if you want hard-tabs code" >&5
9939 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9940
9941 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9942 if test "${enable_hard_tabs+set}" = set; then
9943   enableval="$enable_hard_tabs"
9944
9945 else
9946   enable_hard_tabs=$with_develop
9947 fi;
9948 echo "$as_me:9948: result: $enable_hard_tabs" >&5
9949 echo "${ECHO_T}$enable_hard_tabs" >&6
9950 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9951 #define USE_HARD_TABS 1
9952 EOF
9953
9954 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9955 echo "$as_me:9955: checking if you want limited support for xmc" >&5
9956 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9957
9958 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9959 if test "${enable_xmc_glitch+set}" = set; then
9960   enableval="$enable_xmc_glitch"
9961
9962 else
9963   enable_xmc_glitch=$with_develop
9964 fi;
9965 echo "$as_me:9965: result: $enable_xmc_glitch" >&5
9966 echo "${ECHO_T}$enable_xmc_glitch" >&6
9967 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9968 #define USE_XMC_SUPPORT 1
9969 EOF
9970
9971 ###############################################################################
9972 # These are just experimental, probably should not be in a package:
9973
9974 echo "$as_me:9974: checking if you do not want to assume colors are white-on-black" >&5
9975 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9976
9977 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9978 if test "${enable_assumed_color+set}" = set; then
9979   enableval="$enable_assumed_color"
9980   with_assumed_color=$enableval
9981 else
9982   with_assumed_color=yes
9983 fi;
9984 echo "$as_me:9984: result: $with_assumed_color" >&5
9985 echo "${ECHO_T}$with_assumed_color" >&6
9986 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9987 #define USE_ASSUMED_COLOR 1
9988 EOF
9989
9990 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9991 echo "$as_me:9991: checking if you want hashmap scrolling-optimization code" >&5
9992 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9993
9994 # Check whether --enable-hashmap or --disable-hashmap was given.
9995 if test "${enable_hashmap+set}" = set; then
9996   enableval="$enable_hashmap"
9997   with_hashmap=$enableval
9998 else
9999   with_hashmap=yes
10000 fi;
10001 echo "$as_me:10001: result: $with_hashmap" >&5
10002 echo "${ECHO_T}$with_hashmap" >&6
10003 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10004 #define USE_HASHMAP 1
10005 EOF
10006
10007 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10008 echo "$as_me:10008: checking if you want colorfgbg code" >&5
10009 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10010
10011 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10012 if test "${enable_colorfgbg+set}" = set; then
10013   enableval="$enable_colorfgbg"
10014   with_colorfgbg=$enableval
10015 else
10016   with_colorfgbg=no
10017 fi;
10018 echo "$as_me:10018: result: $with_colorfgbg" >&5
10019 echo "${ECHO_T}$with_colorfgbg" >&6
10020 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10021 #define USE_COLORFGBG 1
10022 EOF
10023
10024 # This is still experimental (20080329), but should ultimately be moved to
10025 # the script-block --with-normal, etc.
10026
10027 echo "$as_me:10027: checking if you want to link with the pthread library" >&5
10028 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10029
10030 # Check whether --with-pthread or --without-pthread was given.
10031 if test "${with_pthread+set}" = set; then
10032   withval="$with_pthread"
10033   with_pthread=$withval
10034 else
10035   with_pthread=no
10036 fi;
10037 echo "$as_me:10037: result: $with_pthread" >&5
10038 echo "${ECHO_T}$with_pthread" >&6
10039
10040 if test "$with_pthread" != no ; then
10041     echo "$as_me:10041: checking for pthread.h" >&5
10042 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10043 if test "${ac_cv_header_pthread_h+set}" = set; then
10044   echo $ECHO_N "(cached) $ECHO_C" >&6
10045 else
10046   cat >conftest.$ac_ext <<_ACEOF
10047 #line 10047 "configure"
10048 #include "confdefs.h"
10049 #include <pthread.h>
10050 _ACEOF
10051 if { (eval echo "$as_me:10051: \"$ac_cpp conftest.$ac_ext\"") >&5
10052   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10053   ac_status=$?
10054   egrep -v '^ *\+' conftest.er1 >conftest.err
10055   rm -f conftest.er1
10056   cat conftest.err >&5
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); } >/dev/null; then
10059   if test -s conftest.err; then
10060     ac_cpp_err=$ac_c_preproc_warn_flag
10061   else
10062     ac_cpp_err=
10063   fi
10064 else
10065   ac_cpp_err=yes
10066 fi
10067 if test -z "$ac_cpp_err"; then
10068   ac_cv_header_pthread_h=yes
10069 else
10070   echo "$as_me: failed program was:" >&5
10071   cat conftest.$ac_ext >&5
10072   ac_cv_header_pthread_h=no
10073 fi
10074 rm -f conftest.err conftest.$ac_ext
10075 fi
10076 echo "$as_me:10076: result: $ac_cv_header_pthread_h" >&5
10077 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10078 if test $ac_cv_header_pthread_h = yes; then
10079
10080         cat >>confdefs.h <<\EOF
10081 #define HAVE_PTHREADS_H 1
10082 EOF
10083
10084         echo "$as_me:10084: checking if we can link with the pthread library" >&5
10085 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10086         cf_save_LIBS="$LIBS"
10087         LIBS="-lpthread $LIBS"
10088         cat >conftest.$ac_ext <<_ACEOF
10089 #line 10089 "configure"
10090 #include "confdefs.h"
10091
10092 #include <pthread.h>
10093
10094 int
10095 main ()
10096 {
10097
10098         int rc = pthread_create(0,0,0,0);
10099
10100   ;
10101   return 0;
10102 }
10103 _ACEOF
10104 rm -f conftest.$ac_objext conftest$ac_exeext
10105 if { (eval echo "$as_me:10105: \"$ac_link\"") >&5
10106   (eval $ac_link) 2>&5
10107   ac_status=$?
10108   echo "$as_me:10108: \$? = $ac_status" >&5
10109   (exit $ac_status); } &&
10110          { ac_try='test -s conftest$ac_exeext'
10111   { (eval echo "$as_me:10111: \"$ac_try\"") >&5
10112   (eval $ac_try) 2>&5
10113   ac_status=$?
10114   echo "$as_me:10114: \$? = $ac_status" >&5
10115   (exit $ac_status); }; }; then
10116   with_pthread=yes
10117 else
10118   echo "$as_me: failed program was:" >&5
10119 cat conftest.$ac_ext >&5
10120 with_pthread=no
10121 fi
10122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10123         LIBS="$cf_save_LIBS"
10124         echo "$as_me:10124: result: $with_pthread" >&5
10125 echo "${ECHO_T}$with_pthread" >&6
10126
10127         if test "$with_pthread" = yes ; then
10128             LIBS="-lpthread $LIBS"
10129             cat >>confdefs.h <<\EOF
10130 #define HAVE_LIBPTHREADS 1
10131 EOF
10132
10133         else
10134             { { echo "$as_me:10134: error: Cannot link with pthread library" >&5
10135 echo "$as_me: error: Cannot link with pthread library" >&2;}
10136    { (exit 1); exit 1; }; }
10137         fi
10138
10139 fi
10140
10141 fi
10142
10143 echo "$as_me:10143: checking if you want to use weak-symbols for pthreads" >&5
10144 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10145
10146 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10147 if test "${enable_weak_symbols+set}" = set; then
10148   enableval="$enable_weak_symbols"
10149   use_weak_symbols=$withval
10150 else
10151   use_weak_symbols=no
10152 fi;
10153 echo "$as_me:10153: result: $use_weak_symbols" >&5
10154 echo "${ECHO_T}$use_weak_symbols" >&6
10155 if test "$use_weak_symbols" = yes ; then
10156
10157 echo "$as_me:10157: checking if $CC supports weak symbols" >&5
10158 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10159 if test "${cf_cv_weak_symbols+set}" = set; then
10160   echo $ECHO_N "(cached) $ECHO_C" >&6
10161 else
10162
10163 cat >conftest.$ac_ext <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166
10167 #include <stdio.h>
10168 int
10169 main ()
10170 {
10171
10172 #if defined(__GNUC__)
10173 #  if defined __USE_ISOC99
10174 #    define _cat_pragma(exp)    _Pragma(#exp)
10175 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10176 #  else
10177 #    define _weak_pragma(exp)
10178 #  endif
10179 #  define _declare(name)        __extension__ extern __typeof__(name) name
10180 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10181 #endif
10182
10183 weak_symbol(fopen);
10184
10185   ;
10186   return 0;
10187 }
10188 _ACEOF
10189 rm -f conftest.$ac_objext
10190 if { (eval echo "$as_me:10190: \"$ac_compile\"") >&5
10191   (eval $ac_compile) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); } &&
10195          { ac_try='test -s conftest.$ac_objext'
10196   { (eval echo "$as_me:10196: \"$ac_try\"") >&5
10197   (eval $ac_try) 2>&5
10198   ac_status=$?
10199   echo "$as_me:10199: \$? = $ac_status" >&5
10200   (exit $ac_status); }; }; then
10201   cf_cv_weak_symbols=yes
10202 else
10203   echo "$as_me: failed program was:" >&5
10204 cat conftest.$ac_ext >&5
10205 cf_cv_weak_symbols=no
10206 fi
10207 rm -f conftest.$ac_objext conftest.$ac_ext
10208
10209 fi
10210 echo "$as_me:10210: result: $cf_cv_weak_symbols" >&5
10211 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10212
10213 else
10214     cf_cv_weak_symbols=no
10215 fi
10216
10217 if test $cf_cv_weak_symbols = yes ; then
10218     cat >>confdefs.h <<\EOF
10219 #define USE_WEAK_SYMBOLS 1
10220 EOF
10221
10222 fi
10223
10224 PTHREAD=
10225 if test "$with_pthread" = "yes" ; then
10226     cat >>confdefs.h <<\EOF
10227 #define USE_PTHREADS 1
10228 EOF
10229
10230     enable_reentrant=yes
10231     if test $cf_cv_weak_symbols = yes ; then
10232         PTHREAD=-lpthread
10233     fi
10234 fi
10235
10236 # Reentrant code has to be opaque; there's little advantage to making ncurses
10237 # opaque outside of that, so there is no --enable-opaque option.  We can use
10238 # this option without --with-pthreads, but this will be always set for
10239 # pthreads.
10240 echo "$as_me:10240: checking if you want experimental reentrant code" >&5
10241 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10242
10243 # Check whether --enable-reentrant or --disable-reentrant was given.
10244 if test "${enable_reentrant+set}" = set; then
10245   enableval="$enable_reentrant"
10246   with_reentrant=$enableval
10247 else
10248   with_reentrant=no
10249 fi;
10250 echo "$as_me:10250: result: $with_reentrant" >&5
10251 echo "${ECHO_T}$with_reentrant" >&6
10252 if test "$with_reentrant" = yes ; then
10253         cf_cv_enable_reentrant=1
10254         cf_cv_enable_opaque="NCURSES_INTERNALS"
10255         NCURSES_OPAQUE=1
10256         NCURSES_SIZE_T=int
10257         if test $cf_cv_weak_symbols = yes ; then
10258
10259 # remove pthread library from $LIBS
10260 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10261
10262         else
10263                 LIB_SUFFIX="t${LIB_SUFFIX}"
10264         fi
10265         cat >>confdefs.h <<\EOF
10266 #define USE_REENTRANT 1
10267 EOF
10268
10269 if test "${with_abi_version+set}" != set; then
10270         case $cf_cv_rel_version in
10271         5.*)
10272                 cf_cv_rel_version=6.0
10273                 cf_cv_abi_version=6
10274                 { echo "$as_me:10274: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10275 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10276                 ;;
10277         esac
10278 fi
10279
10280 else
10281         cf_cv_enable_reentrant=0
10282         cf_cv_enable_opaque="NCURSES_OPAQUE"
10283         NCURSES_OPAQUE=0
10284         NCURSES_SIZE_T=short
10285 fi
10286
10287 ### Allow using a different wrap-prefix
10288 if test "$cf_cv_enable_reentrant" != 0 ; then
10289         echo "$as_me:10289: checking for prefix used to wrap public variables" >&5
10290 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10291
10292 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10293 if test "${with_wrap_prefix+set}" = set; then
10294   withval="$with_wrap_prefix"
10295   NCURSES_WRAP_PREFIX=$withval
10296 else
10297   NCURSES_WRAP_PREFIX=_nc_
10298 fi;
10299         echo "$as_me:10299: result: $NCURSES_WRAP_PREFIX" >&5
10300 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10301 else
10302         NCURSES_WRAP_PREFIX=_nc_
10303 fi
10304
10305 cat >>confdefs.h <<EOF
10306 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10307 EOF
10308
10309 echo "$as_me:10309: checking if you want experimental safe-sprintf code" >&5
10310 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10311
10312 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10313 if test "${enable_safe_sprintf+set}" = set; then
10314   enableval="$enable_safe_sprintf"
10315   with_safe_sprintf=$enableval
10316 else
10317   with_safe_sprintf=no
10318 fi;
10319 echo "$as_me:10319: result: $with_safe_sprintf" >&5
10320 echo "${ECHO_T}$with_safe_sprintf" >&6
10321 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10322 #define USE_SAFE_SPRINTF 1
10323 EOF
10324
10325 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10326 # when hashmap is used scroll hints are useless
10327 if test "$with_hashmap" = no ; then
10328 echo "$as_me:10328: checking if you want to experiment without scrolling-hints code" >&5
10329 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10330
10331 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10332 if test "${enable_scroll_hints+set}" = set; then
10333   enableval="$enable_scroll_hints"
10334   with_scroll_hints=$enableval
10335 else
10336   with_scroll_hints=yes
10337 fi;
10338 echo "$as_me:10338: result: $with_scroll_hints" >&5
10339 echo "${ECHO_T}$with_scroll_hints" >&6
10340 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10341 #define USE_SCROLL_HINTS 1
10342 EOF
10343
10344 fi
10345
10346 echo "$as_me:10346: checking if you want experimental wgetch-events code" >&5
10347 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10348
10349 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10350 if test "${enable_wgetch_events+set}" = set; then
10351   enableval="$enable_wgetch_events"
10352   with_wgetch_events=$enableval
10353 else
10354   with_wgetch_events=no
10355 fi;
10356 echo "$as_me:10356: result: $with_wgetch_events" >&5
10357 echo "${ECHO_T}$with_wgetch_events" >&6
10358 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10359 #define NCURSES_WGETCH_EVENTS 1
10360 EOF
10361
10362 ###############################################################################
10363
10364 ###     use option --disable-echo to suppress full display compiling commands
10365 echo "$as_me:10365: checking if you want to display full commands during build" >&5
10366 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10367
10368 # Check whether --enable-echo or --disable-echo was given.
10369 if test "${enable_echo+set}" = set; then
10370   enableval="$enable_echo"
10371   with_echo=$enableval
10372 else
10373   with_echo=yes
10374 fi;
10375 if test "$with_echo" = yes; then
10376         ECHO_LINK=
10377 else
10378         ECHO_LINK='@ echo linking $@ ... ;'
10379         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10380         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10381 fi
10382 echo "$as_me:10382: result: $with_echo" >&5
10383 echo "${ECHO_T}$with_echo" >&6
10384
10385 ###     use option --enable-warnings to turn on all gcc warnings
10386 echo "$as_me:10386: checking if you want to see compiler warnings" >&5
10387 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10388
10389 # Check whether --enable-warnings or --disable-warnings was given.
10390 if test "${enable_warnings+set}" = set; then
10391   enableval="$enable_warnings"
10392   with_warnings=$enableval
10393 fi;
10394 echo "$as_me:10394: result: $with_warnings" >&5
10395 echo "${ECHO_T}$with_warnings" >&6
10396
10397 if test "x$with_warnings" = "xyes"; then
10398         ADAFLAGS="$ADAFLAGS -gnatg"
10399
10400 INTEL_COMPILER=no
10401
10402 if test "$GCC" = yes ; then
10403         case $host_os in
10404         linux*|gnu*)
10405                 echo "$as_me:10405: checking if this is really Intel C compiler" >&5
10406 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10407                 cf_save_CFLAGS="$CFLAGS"
10408                 CFLAGS="$CFLAGS -no-gcc"
10409                 cat >conftest.$ac_ext <<_ACEOF
10410 #line 10410 "configure"
10411 #include "confdefs.h"
10412
10413 int
10414 main ()
10415 {
10416
10417 #ifdef __INTEL_COMPILER
10418 #else
10419 make an error
10420 #endif
10421
10422   ;
10423   return 0;
10424 }
10425 _ACEOF
10426 rm -f conftest.$ac_objext
10427 if { (eval echo "$as_me:10427: \"$ac_compile\"") >&5
10428   (eval $ac_compile) 2>&5
10429   ac_status=$?
10430   echo "$as_me:10430: \$? = $ac_status" >&5
10431   (exit $ac_status); } &&
10432          { ac_try='test -s conftest.$ac_objext'
10433   { (eval echo "$as_me:10433: \"$ac_try\"") >&5
10434   (eval $ac_try) 2>&5
10435   ac_status=$?
10436   echo "$as_me:10436: \$? = $ac_status" >&5
10437   (exit $ac_status); }; }; then
10438   INTEL_COMPILER=yes
10439 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10440
10441 else
10442   echo "$as_me: failed program was:" >&5
10443 cat conftest.$ac_ext >&5
10444 fi
10445 rm -f conftest.$ac_objext conftest.$ac_ext
10446                 CFLAGS="$cf_save_CFLAGS"
10447                 echo "$as_me:10447: result: $INTEL_COMPILER" >&5
10448 echo "${ECHO_T}$INTEL_COMPILER" >&6
10449                 ;;
10450         esac
10451 fi
10452
10453 cat > conftest.$ac_ext <<EOF
10454 #line 10454 "${as_me-configure}"
10455 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10456 EOF
10457
10458 if test "$INTEL_COMPILER" = yes
10459 then
10460 # The "-wdXXX" options suppress warnings:
10461 # remark #1419: external declaration in primary source file
10462 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10463 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10464 # remark #193: zero used for undefined preprocessing identifier
10465 # remark #593: variable "curs_sb_left_arrow" was set but never used
10466 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10467 # remark #869: parameter "tw" was never referenced
10468 # remark #981: operands are evaluated in unspecified order
10469 # warning #279: controlling expression is constant
10470
10471         { echo "$as_me:10471: checking for $CC warning options..." >&5
10472 echo "$as_me: checking for $CC warning options..." >&6;}
10473         cf_save_CFLAGS="$CFLAGS"
10474         EXTRA_CFLAGS="-Wall"
10475         for cf_opt in \
10476                 wd1419 \
10477                 wd1683 \
10478                 wd1684 \
10479                 wd193 \
10480                 wd593 \
10481                 wd279 \
10482                 wd810 \
10483                 wd869 \
10484                 wd981
10485         do
10486                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10487                 if { (eval echo "$as_me:10487: \"$ac_compile\"") >&5
10488   (eval $ac_compile) 2>&5
10489   ac_status=$?
10490   echo "$as_me:10490: \$? = $ac_status" >&5
10491   (exit $ac_status); }; then
10492                         test -n "$verbose" && echo "$as_me:10492: result: ... -$cf_opt" >&5
10493 echo "${ECHO_T}... -$cf_opt" >&6
10494                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10495                 fi
10496         done
10497         CFLAGS="$cf_save_CFLAGS"
10498
10499 elif test "$GCC" = yes
10500 then
10501         { echo "$as_me:10501: checking for $CC warning options..." >&5
10502 echo "$as_me: checking for $CC warning options..." >&6;}
10503         cf_save_CFLAGS="$CFLAGS"
10504         EXTRA_CFLAGS="-W -Wall"
10505         cf_warn_CONST=""
10506         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10507         for cf_opt in \
10508                 Wbad-function-cast \
10509                 Wcast-align \
10510                 Wcast-qual \
10511                 Winline \
10512                 Wmissing-declarations \
10513                 Wmissing-prototypes \
10514                 Wnested-externs \
10515                 Wpointer-arith \
10516                 Wshadow \
10517                 Wstrict-prototypes \
10518                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10519         do
10520                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10521                 if { (eval echo "$as_me:10521: \"$ac_compile\"") >&5
10522   (eval $ac_compile) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit $ac_status); }; then
10526                         test -n "$verbose" && echo "$as_me:10526: result: ... -$cf_opt" >&5
10527 echo "${ECHO_T}... -$cf_opt" >&6
10528                         case $cf_opt in #(vi
10529                         Wcast-qual) #(vi
10530                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10531                                 ;;
10532                         Winline) #(vi
10533                                 case $GCC_VERSION in
10534                                 [34].*)
10535                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10536
10537 echo "${as_me-configure}:10537: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10538
10539                                         continue;;
10540                                 esac
10541                                 ;;
10542                         esac
10543                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10544                 fi
10545         done
10546         CFLAGS="$cf_save_CFLAGS"
10547 fi
10548 rm -f conftest*
10549
10550         if test "$cf_with_cxx" = yes ; then
10551
10552 INTEL_CPLUSPLUS=no
10553
10554 if test "$GCC" = yes ; then
10555         case $host_os in
10556         linux*|gnu*)
10557                 echo "$as_me:10557: checking if this is really Intel C++ compiler" >&5
10558 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10559                 cf_save_CFLAGS="$CXXFLAGS"
10560                 CXXFLAGS="$CXXFLAGS -no-gcc"
10561                 cat >conftest.$ac_ext <<_ACEOF
10562 #line 10562 "configure"
10563 #include "confdefs.h"
10564
10565 int
10566 main ()
10567 {
10568
10569 #ifdef __INTEL_COMPILER
10570 #else
10571 make an error
10572 #endif
10573
10574   ;
10575   return 0;
10576 }
10577 _ACEOF
10578 rm -f conftest.$ac_objext
10579 if { (eval echo "$as_me:10579: \"$ac_compile\"") >&5
10580   (eval $ac_compile) 2>&5
10581   ac_status=$?
10582   echo "$as_me:10582: \$? = $ac_status" >&5
10583   (exit $ac_status); } &&
10584          { ac_try='test -s conftest.$ac_objext'
10585   { (eval echo "$as_me:10585: \"$ac_try\"") >&5
10586   (eval $ac_try) 2>&5
10587   ac_status=$?
10588   echo "$as_me:10588: \$? = $ac_status" >&5
10589   (exit $ac_status); }; }; then
10590   INTEL_CPLUSPLUS=yes
10591 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10592
10593 else
10594   echo "$as_me: failed program was:" >&5
10595 cat conftest.$ac_ext >&5
10596 fi
10597 rm -f conftest.$ac_objext conftest.$ac_ext
10598                 CXXFLAGS="$cf_save_CFLAGS"
10599                 echo "$as_me:10599: result: $INTEL_CPLUSPLUS" >&5
10600 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10601                 ;;
10602         esac
10603 fi
10604
10605 ac_ext=cc
10606 ac_cpp='$CXXCPP $CPPFLAGS'
10607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10610 ac_main_return=return
10611
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10613 "configure"
10614 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10615 EOF
10616
10617 if test "$INTEL_CPLUSPLUS" = yes
10618 then
10619 # The "-wdXXX" options suppress warnings:
10620 # remark #1419: external declaration in primary source file
10621 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10622 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10623 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10624 # remark #193: zero used for undefined preprocessing identifier
10625 # remark #593: variable "curs_sb_left_arrow" was set but never used
10626 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10627 # remark #869: parameter "tw" was never referenced
10628 # remark #981: operands are evaluated in unspecified order
10629 # warning #269: invalid format string conversion
10630
10631         { echo "$as_me:10631: checking for $CC warning options..." >&5
10632 echo "$as_me: checking for $CC warning options..." >&6;}
10633         cf_save_CXXFLAGS="$CXXFLAGS"
10634         EXTRA_CXXFLAGS="-Wall"
10635         for cf_opt in \
10636                 wd1419 \
10637                 wd1682 \
10638                 wd1683 \
10639                 wd1684 \
10640                 wd193 \
10641                 wd279 \
10642                 wd593 \
10643                 wd810 \
10644                 wd869 \
10645                 wd981
10646         do
10647                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10648                 if { (eval echo "$as_me:10648: \"$ac_compile\"") >&5
10649   (eval $ac_compile) 2>&5
10650   ac_status=$?
10651   echo "$as_me:10651: \$? = $ac_status" >&5
10652   (exit $ac_status); }; then
10653                         test -n "$verbose" && echo "$as_me:10653: result: ... -$cf_opt" >&5
10654 echo "${ECHO_T}... -$cf_opt" >&6
10655                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10656                 fi
10657         done
10658         CXXFLAGS="$cf_save_CXXFLAGS"
10659
10660 elif test "$GXX" = yes
10661 then
10662         { echo "$as_me:10662: checking for $CXX warning options..." >&5
10663 echo "$as_me: checking for $CXX warning options..." >&6;}
10664         cf_save_CXXFLAGS="$CXXFLAGS"
10665         EXTRA_CXXFLAGS="-W -Wall"
10666         cf_gxx_extra_warnings=""
10667         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10668         case "$GCC_VERSION" in
10669         [1-2].*)
10670                 ;;
10671         *)
10672                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10673                 ;;
10674         esac
10675         for cf_opt in \
10676                 Wabi \
10677                 fabi-version=0 \
10678                 Woverloaded-virtual \
10679                 Wsign-promo \
10680                 Wsynth \
10681                 Wold-style-cast \
10682                 Wcast-align \
10683                 Wcast-qual \
10684                 Wmissing-prototypes \
10685                 Wpointer-arith \
10686                 Wshadow \
10687                 Wstrict-prototypes \
10688                 Wundef $cf_gxx_extra_warnings Wno-unused
10689         do
10690                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10691                 if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
10692   (eval $ac_compile) 2>&5
10693   ac_status=$?
10694   echo "$as_me:10694: \$? = $ac_status" >&5
10695   (exit $ac_status); }; then
10696                         test -n "$verbose" && echo "$as_me:10696: result: ... -$cf_opt" >&5
10697 echo "${ECHO_T}... -$cf_opt" >&6
10698                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10699                 else
10700                         test -n "$verbose" && echo "$as_me:10700: result: ... no -$cf_opt" >&5
10701 echo "${ECHO_T}... no -$cf_opt" >&6
10702                 fi
10703         done
10704         CXXFLAGS="$cf_save_CXXFLAGS"
10705 fi
10706
10707 rm -f conftest*
10708 ac_ext=c
10709 ac_cpp='$CPP $CPPFLAGS'
10710 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10711 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10712 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10713 ac_main_return=return
10714
10715         fi
10716 fi
10717
10718 if test "$GCC" = yes
10719 then
10720 cat > conftest.i <<EOF
10721 #ifndef GCC_PRINTF
10722 #define GCC_PRINTF 0
10723 #endif
10724 #ifndef GCC_SCANF
10725 #define GCC_SCANF 0
10726 #endif
10727 #ifndef GCC_NORETURN
10728 #define GCC_NORETURN /* nothing */
10729 #endif
10730 #ifndef GCC_UNUSED
10731 #define GCC_UNUSED /* nothing */
10732 #endif
10733 EOF
10734 if test "$GCC" = yes
10735 then
10736         { echo "$as_me:10736: checking for $CC __attribute__ directives..." >&5
10737 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10738 cat > conftest.$ac_ext <<EOF
10739 #line 10739 "${as_me-configure}"
10740 #include "confdefs.h"
10741 #include "conftest.h"
10742 #include "conftest.i"
10743 #if     GCC_PRINTF
10744 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10745 #else
10746 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10747 #endif
10748 #if     GCC_SCANF
10749 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10750 #else
10751 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10752 #endif
10753 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10754 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10755 extern void foo(void) GCC_NORETURN;
10756 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10757 EOF
10758         for cf_attribute in scanf printf unused noreturn
10759         do
10760
10761 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10762
10763                 cf_directive="__attribute__(($cf_attribute))"
10764                 echo "checking for $CC $cf_directive" 1>&5
10765                 case $cf_attribute in
10766                 scanf|printf)
10767                 cat >conftest.h <<EOF
10768 #define GCC_$cf_ATTRIBUTE 1
10769 EOF
10770                         ;;
10771                 *)
10772                 cat >conftest.h <<EOF
10773 #define GCC_$cf_ATTRIBUTE $cf_directive
10774 EOF
10775                         ;;
10776                 esac
10777                 if { (eval echo "$as_me:10777: \"$ac_compile\"") >&5
10778   (eval $ac_compile) 2>&5
10779   ac_status=$?
10780   echo "$as_me:10780: \$? = $ac_status" >&5
10781   (exit $ac_status); }; then
10782                         test -n "$verbose" && echo "$as_me:10782: result: ... $cf_attribute" >&5
10783 echo "${ECHO_T}... $cf_attribute" >&6
10784                         cat conftest.h >>confdefs.h
10785                 fi
10786         done
10787 else
10788         fgrep define conftest.i >>confdefs.h
10789 fi
10790 rm -rf conftest*
10791 fi
10792
10793 ###     use option --enable-assertions to turn on generation of assertion code
10794 echo "$as_me:10794: checking if you want to enable runtime assertions" >&5
10795 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10796
10797 # Check whether --enable-assertions or --disable-assertions was given.
10798 if test "${enable_assertions+set}" = set; then
10799   enableval="$enable_assertions"
10800   with_assertions=$enableval
10801 else
10802   with_assertions=no
10803 fi;
10804 echo "$as_me:10804: result: $with_assertions" >&5
10805 echo "${ECHO_T}$with_assertions" >&6
10806 if test -n "$GCC"
10807 then
10808         if test "$with_assertions" = no
10809         then
10810                 cat >>confdefs.h <<\EOF
10811 #define NDEBUG 1
10812 EOF
10813
10814                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10815         else
10816                 ADAFLAGS="$ADAFLAGS -gnata"
10817         fi
10818 fi
10819
10820 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10821
10822 echo "$as_me:10822: checking if you want to use dmalloc for testing" >&5
10823 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10824
10825 # Check whether --with-dmalloc or --without-dmalloc was given.
10826 if test "${with_dmalloc+set}" = set; then
10827   withval="$with_dmalloc"
10828   cat >>confdefs.h <<\EOF
10829 #define USE_DMALLOC 1
10830 EOF
10831
10832         : ${with_cflags:=-g}
10833         : ${with_no_leaks:=yes}
10834          with_dmalloc=yes
10835 else
10836   with_dmalloc=
10837 fi;
10838 echo "$as_me:10838: result: ${with_dmalloc:-no}" >&5
10839 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10840
10841 case .$with_cflags in #(vi
10842 .*-g*)
10843         case .$CFLAGS in #(vi
10844         .*-g*) #(vi
10845                 ;;
10846         *)
10847
10848 cf_fix_cppflags=no
10849 cf_new_cflags=
10850 cf_new_cppflags=
10851 cf_new_extra_cppflags=
10852
10853 for cf_add_cflags in -g
10854 do
10855 case $cf_fix_cppflags in
10856 no)
10857         case $cf_add_cflags in #(vi
10858         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10859                 case $cf_add_cflags in
10860                 -D*)
10861                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10862
10863                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10864                         && test -z "${cf_tst_cflags}" \
10865                         && cf_fix_cppflags=yes
10866
10867                         if test $cf_fix_cppflags = yes ; then
10868                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10869                                 continue
10870                         elif test "${cf_tst_cflags}" = "\"'" ; then
10871                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10872                                 continue
10873                         fi
10874                         ;;
10875                 esac
10876                 case "$CPPFLAGS" in
10877                 *$cf_add_cflags) #(vi
10878                         ;;
10879                 *) #(vi
10880                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10881                         ;;
10882                 esac
10883                 ;;
10884         *)
10885                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10886                 ;;
10887         esac
10888         ;;
10889 yes)
10890         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10891
10892         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10893
10894         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10895         && test -z "${cf_tst_cflags}" \
10896         && cf_fix_cppflags=no
10897         ;;
10898 esac
10899 done
10900
10901 if test -n "$cf_new_cflags" ; then
10902
10903         CFLAGS="$CFLAGS $cf_new_cflags"
10904 fi
10905
10906 if test -n "$cf_new_cppflags" ; then
10907
10908         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10909 fi
10910
10911 if test -n "$cf_new_extra_cppflags" ; then
10912
10913         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10914 fi
10915
10916                 ;;
10917         esac
10918         ;;
10919 esac
10920
10921 if test "$with_dmalloc" = yes ; then
10922         echo "$as_me:10922: checking for dmalloc.h" >&5
10923 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10924 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10925   echo $ECHO_N "(cached) $ECHO_C" >&6
10926 else
10927   cat >conftest.$ac_ext <<_ACEOF
10928 #line 10928 "configure"
10929 #include "confdefs.h"
10930 #include <dmalloc.h>
10931 _ACEOF
10932 if { (eval echo "$as_me:10932: \"$ac_cpp conftest.$ac_ext\"") >&5
10933   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10934   ac_status=$?
10935   egrep -v '^ *\+' conftest.er1 >conftest.err
10936   rm -f conftest.er1
10937   cat conftest.err >&5
10938   echo "$as_me:10938: \$? = $ac_status" >&5
10939   (exit $ac_status); } >/dev/null; then
10940   if test -s conftest.err; then
10941     ac_cpp_err=$ac_c_preproc_warn_flag
10942   else
10943     ac_cpp_err=
10944   fi
10945 else
10946   ac_cpp_err=yes
10947 fi
10948 if test -z "$ac_cpp_err"; then
10949   ac_cv_header_dmalloc_h=yes
10950 else
10951   echo "$as_me: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   ac_cv_header_dmalloc_h=no
10954 fi
10955 rm -f conftest.err conftest.$ac_ext
10956 fi
10957 echo "$as_me:10957: result: $ac_cv_header_dmalloc_h" >&5
10958 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10959 if test $ac_cv_header_dmalloc_h = yes; then
10960
10961 echo "$as_me:10961: checking for dmalloc_debug in -ldmalloc" >&5
10962 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10963 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10964   echo $ECHO_N "(cached) $ECHO_C" >&6
10965 else
10966   ac_check_lib_save_LIBS=$LIBS
10967 LIBS="-ldmalloc  $LIBS"
10968 cat >conftest.$ac_ext <<_ACEOF
10969 #line 10969 "configure"
10970 #include "confdefs.h"
10971
10972 /* Override any gcc2 internal prototype to avoid an error.  */
10973 #ifdef __cplusplus
10974 extern "C"
10975 #endif
10976 /* We use char because int might match the return type of a gcc2
10977    builtin and then its argument prototype would still apply.  */
10978 char dmalloc_debug ();
10979 int
10980 main ()
10981 {
10982 dmalloc_debug ();
10983   ;
10984   return 0;
10985 }
10986 _ACEOF
10987 rm -f conftest.$ac_objext conftest$ac_exeext
10988 if { (eval echo "$as_me:10988: \"$ac_link\"") >&5
10989   (eval $ac_link) 2>&5
10990   ac_status=$?
10991   echo "$as_me:10991: \$? = $ac_status" >&5
10992   (exit $ac_status); } &&
10993          { ac_try='test -s conftest$ac_exeext'
10994   { (eval echo "$as_me:10994: \"$ac_try\"") >&5
10995   (eval $ac_try) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); }; }; then
10999   ac_cv_lib_dmalloc_dmalloc_debug=yes
11000 else
11001   echo "$as_me: failed program was:" >&5
11002 cat conftest.$ac_ext >&5
11003 ac_cv_lib_dmalloc_dmalloc_debug=no
11004 fi
11005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11006 LIBS=$ac_check_lib_save_LIBS
11007 fi
11008 echo "$as_me:11008: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11009 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11010 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11011   cat >>confdefs.h <<EOF
11012 #define HAVE_LIBDMALLOC 1
11013 EOF
11014
11015   LIBS="-ldmalloc $LIBS"
11016
11017 fi
11018
11019 fi
11020
11021 fi
11022
11023 echo "$as_me:11023: checking if you want to use dbmalloc for testing" >&5
11024 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11025
11026 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11027 if test "${with_dbmalloc+set}" = set; then
11028   withval="$with_dbmalloc"
11029   cat >>confdefs.h <<\EOF
11030 #define USE_DBMALLOC 1
11031 EOF
11032
11033         : ${with_cflags:=-g}
11034         : ${with_no_leaks:=yes}
11035          with_dbmalloc=yes
11036 else
11037   with_dbmalloc=
11038 fi;
11039 echo "$as_me:11039: result: ${with_dbmalloc:-no}" >&5
11040 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11041
11042 case .$with_cflags in #(vi
11043 .*-g*)
11044         case .$CFLAGS in #(vi
11045         .*-g*) #(vi
11046                 ;;
11047         *)
11048
11049 cf_fix_cppflags=no
11050 cf_new_cflags=
11051 cf_new_cppflags=
11052 cf_new_extra_cppflags=
11053
11054 for cf_add_cflags in -g
11055 do
11056 case $cf_fix_cppflags in
11057 no)
11058         case $cf_add_cflags in #(vi
11059         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11060                 case $cf_add_cflags in
11061                 -D*)
11062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11063
11064                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11065                         && test -z "${cf_tst_cflags}" \
11066                         && cf_fix_cppflags=yes
11067
11068                         if test $cf_fix_cppflags = yes ; then
11069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11070                                 continue
11071                         elif test "${cf_tst_cflags}" = "\"'" ; then
11072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11073                                 continue
11074                         fi
11075                         ;;
11076                 esac
11077                 case "$CPPFLAGS" in
11078                 *$cf_add_cflags) #(vi
11079                         ;;
11080                 *) #(vi
11081                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11082                         ;;
11083                 esac
11084                 ;;
11085         *)
11086                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11087                 ;;
11088         esac
11089         ;;
11090 yes)
11091         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11092
11093         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11094
11095         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11096         && test -z "${cf_tst_cflags}" \
11097         && cf_fix_cppflags=no
11098         ;;
11099 esac
11100 done
11101
11102 if test -n "$cf_new_cflags" ; then
11103
11104         CFLAGS="$CFLAGS $cf_new_cflags"
11105 fi
11106
11107 if test -n "$cf_new_cppflags" ; then
11108
11109         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11110 fi
11111
11112 if test -n "$cf_new_extra_cppflags" ; then
11113
11114         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11115 fi
11116
11117                 ;;
11118         esac
11119         ;;
11120 esac
11121
11122 if test "$with_dbmalloc" = yes ; then
11123         echo "$as_me:11123: checking for dbmalloc.h" >&5
11124 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11125 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11126   echo $ECHO_N "(cached) $ECHO_C" >&6
11127 else
11128   cat >conftest.$ac_ext <<_ACEOF
11129 #line 11129 "configure"
11130 #include "confdefs.h"
11131 #include <dbmalloc.h>
11132 _ACEOF
11133 if { (eval echo "$as_me:11133: \"$ac_cpp conftest.$ac_ext\"") >&5
11134   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11135   ac_status=$?
11136   egrep -v '^ *\+' conftest.er1 >conftest.err
11137   rm -f conftest.er1
11138   cat conftest.err >&5
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); } >/dev/null; then
11141   if test -s conftest.err; then
11142     ac_cpp_err=$ac_c_preproc_warn_flag
11143   else
11144     ac_cpp_err=
11145   fi
11146 else
11147   ac_cpp_err=yes
11148 fi
11149 if test -z "$ac_cpp_err"; then
11150   ac_cv_header_dbmalloc_h=yes
11151 else
11152   echo "$as_me: failed program was:" >&5
11153   cat conftest.$ac_ext >&5
11154   ac_cv_header_dbmalloc_h=no
11155 fi
11156 rm -f conftest.err conftest.$ac_ext
11157 fi
11158 echo "$as_me:11158: result: $ac_cv_header_dbmalloc_h" >&5
11159 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11160 if test $ac_cv_header_dbmalloc_h = yes; then
11161
11162 echo "$as_me:11162: checking for debug_malloc in -ldbmalloc" >&5
11163 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11164 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11165   echo $ECHO_N "(cached) $ECHO_C" >&6
11166 else
11167   ac_check_lib_save_LIBS=$LIBS
11168 LIBS="-ldbmalloc  $LIBS"
11169 cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172
11173 /* Override any gcc2 internal prototype to avoid an error.  */
11174 #ifdef __cplusplus
11175 extern "C"
11176 #endif
11177 /* We use char because int might match the return type of a gcc2
11178    builtin and then its argument prototype would still apply.  */
11179 char debug_malloc ();
11180 int
11181 main ()
11182 {
11183 debug_malloc ();
11184   ;
11185   return 0;
11186 }
11187 _ACEOF
11188 rm -f conftest.$ac_objext conftest$ac_exeext
11189 if { (eval echo "$as_me:11189: \"$ac_link\"") >&5
11190   (eval $ac_link) 2>&5
11191   ac_status=$?
11192   echo "$as_me:11192: \$? = $ac_status" >&5
11193   (exit $ac_status); } &&
11194          { ac_try='test -s conftest$ac_exeext'
11195   { (eval echo "$as_me:11195: \"$ac_try\"") >&5
11196   (eval $ac_try) 2>&5
11197   ac_status=$?
11198   echo "$as_me:11198: \$? = $ac_status" >&5
11199   (exit $ac_status); }; }; then
11200   ac_cv_lib_dbmalloc_debug_malloc=yes
11201 else
11202   echo "$as_me: failed program was:" >&5
11203 cat conftest.$ac_ext >&5
11204 ac_cv_lib_dbmalloc_debug_malloc=no
11205 fi
11206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11207 LIBS=$ac_check_lib_save_LIBS
11208 fi
11209 echo "$as_me:11209: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11210 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11211 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11212   cat >>confdefs.h <<EOF
11213 #define HAVE_LIBDBMALLOC 1
11214 EOF
11215
11216   LIBS="-ldbmalloc $LIBS"
11217
11218 fi
11219
11220 fi
11221
11222 fi
11223
11224 echo "$as_me:11224: checking if you want to use valgrind for testing" >&5
11225 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11226
11227 # Check whether --with-valgrind or --without-valgrind was given.
11228 if test "${with_valgrind+set}" = set; then
11229   withval="$with_valgrind"
11230   cat >>confdefs.h <<\EOF
11231 #define USE_VALGRIND 1
11232 EOF
11233
11234         : ${with_cflags:=-g}
11235         : ${with_no_leaks:=yes}
11236          with_valgrind=yes
11237 else
11238   with_valgrind=
11239 fi;
11240 echo "$as_me:11240: result: ${with_valgrind:-no}" >&5
11241 echo "${ECHO_T}${with_valgrind:-no}" >&6
11242
11243 case .$with_cflags in #(vi
11244 .*-g*)
11245         case .$CFLAGS in #(vi
11246         .*-g*) #(vi
11247                 ;;
11248         *)
11249
11250 cf_fix_cppflags=no
11251 cf_new_cflags=
11252 cf_new_cppflags=
11253 cf_new_extra_cppflags=
11254
11255 for cf_add_cflags in -g
11256 do
11257 case $cf_fix_cppflags in
11258 no)
11259         case $cf_add_cflags in #(vi
11260         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11261                 case $cf_add_cflags in
11262                 -D*)
11263                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11264
11265                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11266                         && test -z "${cf_tst_cflags}" \
11267                         && cf_fix_cppflags=yes
11268
11269                         if test $cf_fix_cppflags = yes ; then
11270                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11271                                 continue
11272                         elif test "${cf_tst_cflags}" = "\"'" ; then
11273                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11274                                 continue
11275                         fi
11276                         ;;
11277                 esac
11278                 case "$CPPFLAGS" in
11279                 *$cf_add_cflags) #(vi
11280                         ;;
11281                 *) #(vi
11282                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11283                         ;;
11284                 esac
11285                 ;;
11286         *)
11287                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11288                 ;;
11289         esac
11290         ;;
11291 yes)
11292         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11293
11294         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11295
11296         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11297         && test -z "${cf_tst_cflags}" \
11298         && cf_fix_cppflags=no
11299         ;;
11300 esac
11301 done
11302
11303 if test -n "$cf_new_cflags" ; then
11304
11305         CFLAGS="$CFLAGS $cf_new_cflags"
11306 fi
11307
11308 if test -n "$cf_new_cppflags" ; then
11309
11310         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11311 fi
11312
11313 if test -n "$cf_new_extra_cppflags" ; then
11314
11315         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11316 fi
11317
11318                 ;;
11319         esac
11320         ;;
11321 esac
11322
11323 echo "$as_me:11323: checking if you want to perform memory-leak testing" >&5
11324 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11325
11326 # Check whether --enable-leaks or --disable-leaks was given.
11327 if test "${enable_leaks+set}" = set; then
11328   enableval="$enable_leaks"
11329   with_no_leaks=yes
11330 else
11331   : ${with_no_leaks:=no}
11332 fi;
11333 echo "$as_me:11333: result: $with_no_leaks" >&5
11334 echo "${ECHO_T}$with_no_leaks" >&6
11335
11336 if test "$with_no_leaks" = yes ; then
11337         cat >>confdefs.h <<\EOF
11338 #define NO_LEAKS 1
11339 EOF
11340
11341 fi
11342
11343 cat >>confdefs.h <<\EOF
11344 #define HAVE_NC_ALLOC_H 1
11345 EOF
11346
11347 ###     use option --enable-expanded to generate certain macros as functions
11348
11349 # Check whether --enable-expanded or --disable-expanded was given.
11350 if test "${enable_expanded+set}" = set; then
11351   enableval="$enable_expanded"
11352   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11353 #define NCURSES_EXPANDED 1
11354 EOF
11355
11356 fi;
11357
11358 ###     use option --disable-macros to suppress macros in favor of functions
11359
11360 # Check whether --enable-macros or --disable-macros was given.
11361 if test "${enable_macros+set}" = set; then
11362   enableval="$enable_macros"
11363   test "$enableval" = no && cat >>confdefs.h <<\EOF
11364 #define NCURSES_NOMACROS 1
11365 EOF
11366
11367 fi;
11368
11369 # Normally we only add trace() to the debug-library.  Allow this to be
11370 # extended to all models of the ncurses library:
11371 cf_all_traces=no
11372 case "$CFLAGS $CPPFLAGS" in
11373 *-DTRACE*)
11374         cf_all_traces=yes
11375         ;;
11376 esac
11377
11378 echo "$as_me:11378: checking whether to add trace feature to all models" >&5
11379 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11380
11381 # Check whether --with-trace or --without-trace was given.
11382 if test "${with_trace+set}" = set; then
11383   withval="$with_trace"
11384   cf_with_trace=$withval
11385 else
11386   cf_with_trace=$cf_all_traces
11387 fi;
11388 echo "$as_me:11388: result: $cf_with_trace" >&5
11389 echo "${ECHO_T}$cf_with_trace" >&6
11390
11391 if test "$cf_with_trace" = yes ; then
11392         LIB_TRACING=all
11393         ADA_TRACE=TRUE
11394
11395 cf_fix_cppflags=no
11396 cf_new_cflags=
11397 cf_new_cppflags=
11398 cf_new_extra_cppflags=
11399
11400 for cf_add_cflags in -DTRACE
11401 do
11402 case $cf_fix_cppflags in
11403 no)
11404         case $cf_add_cflags in #(vi
11405         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11406                 case $cf_add_cflags in
11407                 -D*)
11408                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11409
11410                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11411                         && test -z "${cf_tst_cflags}" \
11412                         && cf_fix_cppflags=yes
11413
11414                         if test $cf_fix_cppflags = yes ; then
11415                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11416                                 continue
11417                         elif test "${cf_tst_cflags}" = "\"'" ; then
11418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11419                                 continue
11420                         fi
11421                         ;;
11422                 esac
11423                 case "$CPPFLAGS" in
11424                 *$cf_add_cflags) #(vi
11425                         ;;
11426                 *) #(vi
11427                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11428                         ;;
11429                 esac
11430                 ;;
11431         *)
11432                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11433                 ;;
11434         esac
11435         ;;
11436 yes)
11437         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11438
11439         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11440
11441         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11442         && test -z "${cf_tst_cflags}" \
11443         && cf_fix_cppflags=no
11444         ;;
11445 esac
11446 done
11447
11448 if test -n "$cf_new_cflags" ; then
11449
11450         CFLAGS="$CFLAGS $cf_new_cflags"
11451 fi
11452
11453 if test -n "$cf_new_cppflags" ; then
11454
11455         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11456 fi
11457
11458 if test -n "$cf_new_extra_cppflags" ; then
11459
11460         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11461 fi
11462
11463 else
11464         LIB_TRACING=DEBUG
11465         ADA_TRACE=FALSE
11466 fi
11467
11468 ###     Checks for libraries.
11469 case $cf_cv_system_name in #(vi
11470 *mingw32*) #(vi
11471         ;;
11472 *)
11473 echo "$as_me:11473: checking for gettimeofday" >&5
11474 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11475 if test "${ac_cv_func_gettimeofday+set}" = set; then
11476   echo $ECHO_N "(cached) $ECHO_C" >&6
11477 else
11478   cat >conftest.$ac_ext <<_ACEOF
11479 #line 11479 "configure"
11480 #include "confdefs.h"
11481 /* System header to define __stub macros and hopefully few prototypes,
11482     which can conflict with char gettimeofday (); below.  */
11483 #include <assert.h>
11484 /* Override any gcc2 internal prototype to avoid an error.  */
11485 #ifdef __cplusplus
11486 extern "C"
11487 #endif
11488 /* We use char because int might match the return type of a gcc2
11489    builtin and then its argument prototype would still apply.  */
11490 char gettimeofday ();
11491 char (*f) ();
11492
11493 int
11494 main ()
11495 {
11496 /* The GNU C library defines this for functions which it implements
11497     to always fail with ENOSYS.  Some functions are actually named
11498     something starting with __ and the normal name is an alias.  */
11499 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11500 choke me
11501 #else
11502 f = gettimeofday;
11503 #endif
11504
11505   ;
11506   return 0;
11507 }
11508 _ACEOF
11509 rm -f conftest.$ac_objext conftest$ac_exeext
11510 if { (eval echo "$as_me:11510: \"$ac_link\"") >&5
11511   (eval $ac_link) 2>&5
11512   ac_status=$?
11513   echo "$as_me:11513: \$? = $ac_status" >&5
11514   (exit $ac_status); } &&
11515          { ac_try='test -s conftest$ac_exeext'
11516   { (eval echo "$as_me:11516: \"$ac_try\"") >&5
11517   (eval $ac_try) 2>&5
11518   ac_status=$?
11519   echo "$as_me:11519: \$? = $ac_status" >&5
11520   (exit $ac_status); }; }; then
11521   ac_cv_func_gettimeofday=yes
11522 else
11523   echo "$as_me: failed program was:" >&5
11524 cat conftest.$ac_ext >&5
11525 ac_cv_func_gettimeofday=no
11526 fi
11527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11528 fi
11529 echo "$as_me:11529: result: $ac_cv_func_gettimeofday" >&5
11530 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11531 if test $ac_cv_func_gettimeofday = yes; then
11532   cat >>confdefs.h <<\EOF
11533 #define HAVE_GETTIMEOFDAY 1
11534 EOF
11535
11536 else
11537
11538 echo "$as_me:11538: checking for gettimeofday in -lbsd" >&5
11539 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11540 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11541   echo $ECHO_N "(cached) $ECHO_C" >&6
11542 else
11543   ac_check_lib_save_LIBS=$LIBS
11544 LIBS="-lbsd  $LIBS"
11545 cat >conftest.$ac_ext <<_ACEOF
11546 #line 11546 "configure"
11547 #include "confdefs.h"
11548
11549 /* Override any gcc2 internal prototype to avoid an error.  */
11550 #ifdef __cplusplus
11551 extern "C"
11552 #endif
11553 /* We use char because int might match the return type of a gcc2
11554    builtin and then its argument prototype would still apply.  */
11555 char gettimeofday ();
11556 int
11557 main ()
11558 {
11559 gettimeofday ();
11560   ;
11561   return 0;
11562 }
11563 _ACEOF
11564 rm -f conftest.$ac_objext conftest$ac_exeext
11565 if { (eval echo "$as_me:11565: \"$ac_link\"") >&5
11566   (eval $ac_link) 2>&5
11567   ac_status=$?
11568   echo "$as_me:11568: \$? = $ac_status" >&5
11569   (exit $ac_status); } &&
11570          { ac_try='test -s conftest$ac_exeext'
11571   { (eval echo "$as_me:11571: \"$ac_try\"") >&5
11572   (eval $ac_try) 2>&5
11573   ac_status=$?
11574   echo "$as_me:11574: \$? = $ac_status" >&5
11575   (exit $ac_status); }; }; then
11576   ac_cv_lib_bsd_gettimeofday=yes
11577 else
11578   echo "$as_me: failed program was:" >&5
11579 cat conftest.$ac_ext >&5
11580 ac_cv_lib_bsd_gettimeofday=no
11581 fi
11582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11583 LIBS=$ac_check_lib_save_LIBS
11584 fi
11585 echo "$as_me:11585: result: $ac_cv_lib_bsd_gettimeofday" >&5
11586 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11587 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11588   cat >>confdefs.h <<\EOF
11589 #define HAVE_GETTIMEOFDAY 1
11590 EOF
11591
11592         LIBS="$LIBS -lbsd"
11593 fi
11594
11595 fi
11596         ;;
11597 esac
11598
11599 echo "$as_me:11599: checking if -lm needed for math functions" >&5
11600 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11601 if test "${cf_cv_need_libm+set}" = set; then
11602   echo $ECHO_N "(cached) $ECHO_C" >&6
11603 else
11604
11605         cat >conftest.$ac_ext <<_ACEOF
11606 #line 11606 "configure"
11607 #include "confdefs.h"
11608
11609         #include <stdio.h>
11610         #include <math.h>
11611
11612 int
11613 main ()
11614 {
11615 double x = rand(); printf("result = %g\n", sin(x))
11616   ;
11617   return 0;
11618 }
11619 _ACEOF
11620 rm -f conftest.$ac_objext conftest$ac_exeext
11621 if { (eval echo "$as_me:11621: \"$ac_link\"") >&5
11622   (eval $ac_link) 2>&5
11623   ac_status=$?
11624   echo "$as_me:11624: \$? = $ac_status" >&5
11625   (exit $ac_status); } &&
11626          { ac_try='test -s conftest$ac_exeext'
11627   { (eval echo "$as_me:11627: \"$ac_try\"") >&5
11628   (eval $ac_try) 2>&5
11629   ac_status=$?
11630   echo "$as_me:11630: \$? = $ac_status" >&5
11631   (exit $ac_status); }; }; then
11632   cf_cv_need_libm=no
11633 else
11634   echo "$as_me: failed program was:" >&5
11635 cat conftest.$ac_ext >&5
11636 cf_cv_need_libm=yes
11637 fi
11638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11639 fi
11640 echo "$as_me:11640: result: $cf_cv_need_libm" >&5
11641 echo "${ECHO_T}$cf_cv_need_libm" >&6
11642 if test "$cf_cv_need_libm" = yes
11643 then
11644 MATH_LIB=-lm
11645 fi
11646
11647 ###     Checks for header files.
11648 echo "$as_me:11648: checking for ANSI C header files" >&5
11649 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11650 if test "${ac_cv_header_stdc+set}" = set; then
11651   echo $ECHO_N "(cached) $ECHO_C" >&6
11652 else
11653   cat >conftest.$ac_ext <<_ACEOF
11654 #line 11654 "configure"
11655 #include "confdefs.h"
11656 #include <stdlib.h>
11657 #include <stdarg.h>
11658 #include <string.h>
11659 #include <float.h>
11660
11661 _ACEOF
11662 if { (eval echo "$as_me:11662: \"$ac_cpp conftest.$ac_ext\"") >&5
11663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11664   ac_status=$?
11665   egrep -v '^ *\+' conftest.er1 >conftest.err
11666   rm -f conftest.er1
11667   cat conftest.err >&5
11668   echo "$as_me:11668: \$? = $ac_status" >&5
11669   (exit $ac_status); } >/dev/null; then
11670   if test -s conftest.err; then
11671     ac_cpp_err=$ac_c_preproc_warn_flag
11672   else
11673     ac_cpp_err=
11674   fi
11675 else
11676   ac_cpp_err=yes
11677 fi
11678 if test -z "$ac_cpp_err"; then
11679   ac_cv_header_stdc=yes
11680 else
11681   echo "$as_me: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   ac_cv_header_stdc=no
11684 fi
11685 rm -f conftest.err conftest.$ac_ext
11686
11687 if test $ac_cv_header_stdc = yes; then
11688   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11689   cat >conftest.$ac_ext <<_ACEOF
11690 #line 11690 "configure"
11691 #include "confdefs.h"
11692 #include <string.h>
11693
11694 _ACEOF
11695 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11696   egrep "memchr" >/dev/null 2>&1; then
11697   :
11698 else
11699   ac_cv_header_stdc=no
11700 fi
11701 rm -f conftest*
11702
11703 fi
11704
11705 if test $ac_cv_header_stdc = yes; then
11706   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11707   cat >conftest.$ac_ext <<_ACEOF
11708 #line 11708 "configure"
11709 #include "confdefs.h"
11710 #include <stdlib.h>
11711
11712 _ACEOF
11713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11714   egrep "free" >/dev/null 2>&1; then
11715   :
11716 else
11717   ac_cv_header_stdc=no
11718 fi
11719 rm -f conftest*
11720
11721 fi
11722
11723 if test $ac_cv_header_stdc = yes; then
11724   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11725   if test "$cross_compiling" = yes; then
11726   :
11727 else
11728   cat >conftest.$ac_ext <<_ACEOF
11729 #line 11729 "configure"
11730 #include "confdefs.h"
11731 #include <ctype.h>
11732 #if ((' ' & 0x0FF) == 0x020)
11733 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11734 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11735 #else
11736 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11737                      || ('j' <= (c) && (c) <= 'r') \
11738                      || ('s' <= (c) && (c) <= 'z'))
11739 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11740 #endif
11741
11742 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11743 int
11744 main ()
11745 {
11746   int i;
11747   for (i = 0; i < 256; i++)
11748     if (XOR (islower (i), ISLOWER (i))
11749         || toupper (i) != TOUPPER (i))
11750       $ac_main_return(2);
11751   $ac_main_return (0);
11752 }
11753 _ACEOF
11754 rm -f conftest$ac_exeext
11755 if { (eval echo "$as_me:11755: \"$ac_link\"") >&5
11756   (eval $ac_link) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11760   { (eval echo "$as_me:11760: \"$ac_try\"") >&5
11761   (eval $ac_try) 2>&5
11762   ac_status=$?
11763   echo "$as_me:11763: \$? = $ac_status" >&5
11764   (exit $ac_status); }; }; then
11765   :
11766 else
11767   echo "$as_me: program exited with status $ac_status" >&5
11768 echo "$as_me: failed program was:" >&5
11769 cat conftest.$ac_ext >&5
11770 ac_cv_header_stdc=no
11771 fi
11772 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11773 fi
11774 fi
11775 fi
11776 echo "$as_me:11776: result: $ac_cv_header_stdc" >&5
11777 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11778 if test $ac_cv_header_stdc = yes; then
11779
11780 cat >>confdefs.h <<\EOF
11781 #define STDC_HEADERS 1
11782 EOF
11783
11784 fi
11785
11786 ac_header_dirent=no
11787 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11788   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11789 echo "$as_me:11789: checking for $ac_hdr that defines DIR" >&5
11790 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11792   echo $ECHO_N "(cached) $ECHO_C" >&6
11793 else
11794   cat >conftest.$ac_ext <<_ACEOF
11795 #line 11795 "configure"
11796 #include "confdefs.h"
11797 #include <sys/types.h>
11798 #include <$ac_hdr>
11799
11800 int
11801 main ()
11802 {
11803 if ((DIR *) 0)
11804 return 0;
11805   ;
11806   return 0;
11807 }
11808 _ACEOF
11809 rm -f conftest.$ac_objext
11810 if { (eval echo "$as_me:11810: \"$ac_compile\"") >&5
11811   (eval $ac_compile) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); } &&
11815          { ac_try='test -s conftest.$ac_objext'
11816   { (eval echo "$as_me:11816: \"$ac_try\"") >&5
11817   (eval $ac_try) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit $ac_status); }; }; then
11821   eval "$as_ac_Header=yes"
11822 else
11823   echo "$as_me: failed program was:" >&5
11824 cat conftest.$ac_ext >&5
11825 eval "$as_ac_Header=no"
11826 fi
11827 rm -f conftest.$ac_objext conftest.$ac_ext
11828 fi
11829 echo "$as_me:11829: result: `eval echo '${'$as_ac_Header'}'`" >&5
11830 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11831 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11832   cat >>confdefs.h <<EOF
11833 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11834 EOF
11835
11836 ac_header_dirent=$ac_hdr; break
11837 fi
11838
11839 done
11840 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11841 if test $ac_header_dirent = dirent.h; then
11842   echo "$as_me:11842: checking for opendir in -ldir" >&5
11843 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11844 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11845   echo $ECHO_N "(cached) $ECHO_C" >&6
11846 else
11847   ac_check_lib_save_LIBS=$LIBS
11848 LIBS="-ldir  $LIBS"
11849 cat >conftest.$ac_ext <<_ACEOF
11850 #line 11850 "configure"
11851 #include "confdefs.h"
11852
11853 /* Override any gcc2 internal prototype to avoid an error.  */
11854 #ifdef __cplusplus
11855 extern "C"
11856 #endif
11857 /* We use char because int might match the return type of a gcc2
11858    builtin and then its argument prototype would still apply.  */
11859 char opendir ();
11860 int
11861 main ()
11862 {
11863 opendir ();
11864   ;
11865   return 0;
11866 }
11867 _ACEOF
11868 rm -f conftest.$ac_objext conftest$ac_exeext
11869 if { (eval echo "$as_me:11869: \"$ac_link\"") >&5
11870   (eval $ac_link) 2>&5
11871   ac_status=$?
11872   echo "$as_me:11872: \$? = $ac_status" >&5
11873   (exit $ac_status); } &&
11874          { ac_try='test -s conftest$ac_exeext'
11875   { (eval echo "$as_me:11875: \"$ac_try\"") >&5
11876   (eval $ac_try) 2>&5
11877   ac_status=$?
11878   echo "$as_me:11878: \$? = $ac_status" >&5
11879   (exit $ac_status); }; }; then
11880   ac_cv_lib_dir_opendir=yes
11881 else
11882   echo "$as_me: failed program was:" >&5
11883 cat conftest.$ac_ext >&5
11884 ac_cv_lib_dir_opendir=no
11885 fi
11886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11887 LIBS=$ac_check_lib_save_LIBS
11888 fi
11889 echo "$as_me:11889: result: $ac_cv_lib_dir_opendir" >&5
11890 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11891 if test $ac_cv_lib_dir_opendir = yes; then
11892   LIBS="$LIBS -ldir"
11893 fi
11894
11895 else
11896   echo "$as_me:11896: checking for opendir in -lx" >&5
11897 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11898 if test "${ac_cv_lib_x_opendir+set}" = set; then
11899   echo $ECHO_N "(cached) $ECHO_C" >&6
11900 else
11901   ac_check_lib_save_LIBS=$LIBS
11902 LIBS="-lx  $LIBS"
11903 cat >conftest.$ac_ext <<_ACEOF
11904 #line 11904 "configure"
11905 #include "confdefs.h"
11906
11907 /* Override any gcc2 internal prototype to avoid an error.  */
11908 #ifdef __cplusplus
11909 extern "C"
11910 #endif
11911 /* We use char because int might match the return type of a gcc2
11912    builtin and then its argument prototype would still apply.  */
11913 char opendir ();
11914 int
11915 main ()
11916 {
11917 opendir ();
11918   ;
11919   return 0;
11920 }
11921 _ACEOF
11922 rm -f conftest.$ac_objext conftest$ac_exeext
11923 if { (eval echo "$as_me:11923: \"$ac_link\"") >&5
11924   (eval $ac_link) 2>&5
11925   ac_status=$?
11926   echo "$as_me:11926: \$? = $ac_status" >&5
11927   (exit $ac_status); } &&
11928          { ac_try='test -s conftest$ac_exeext'
11929   { (eval echo "$as_me:11929: \"$ac_try\"") >&5
11930   (eval $ac_try) 2>&5
11931   ac_status=$?
11932   echo "$as_me:11932: \$? = $ac_status" >&5
11933   (exit $ac_status); }; }; then
11934   ac_cv_lib_x_opendir=yes
11935 else
11936   echo "$as_me: failed program was:" >&5
11937 cat conftest.$ac_ext >&5
11938 ac_cv_lib_x_opendir=no
11939 fi
11940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11941 LIBS=$ac_check_lib_save_LIBS
11942 fi
11943 echo "$as_me:11943: result: $ac_cv_lib_x_opendir" >&5
11944 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11945 if test $ac_cv_lib_x_opendir = yes; then
11946   LIBS="$LIBS -lx"
11947 fi
11948
11949 fi
11950
11951 echo "$as_me:11951: checking whether time.h and sys/time.h may both be included" >&5
11952 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11953 if test "${ac_cv_header_time+set}" = set; then
11954   echo $ECHO_N "(cached) $ECHO_C" >&6
11955 else
11956   cat >conftest.$ac_ext <<_ACEOF
11957 #line 11957 "configure"
11958 #include "confdefs.h"
11959 #include <sys/types.h>
11960 #include <sys/time.h>
11961 #include <time.h>
11962
11963 int
11964 main ()
11965 {
11966 if ((struct tm *) 0)
11967 return 0;
11968   ;
11969   return 0;
11970 }
11971 _ACEOF
11972 rm -f conftest.$ac_objext
11973 if { (eval echo "$as_me:11973: \"$ac_compile\"") >&5
11974   (eval $ac_compile) 2>&5
11975   ac_status=$?
11976   echo "$as_me:11976: \$? = $ac_status" >&5
11977   (exit $ac_status); } &&
11978          { ac_try='test -s conftest.$ac_objext'
11979   { (eval echo "$as_me:11979: \"$ac_try\"") >&5
11980   (eval $ac_try) 2>&5
11981   ac_status=$?
11982   echo "$as_me:11982: \$? = $ac_status" >&5
11983   (exit $ac_status); }; }; then
11984   ac_cv_header_time=yes
11985 else
11986   echo "$as_me: failed program was:" >&5
11987 cat conftest.$ac_ext >&5
11988 ac_cv_header_time=no
11989 fi
11990 rm -f conftest.$ac_objext conftest.$ac_ext
11991 fi
11992 echo "$as_me:11992: result: $ac_cv_header_time" >&5
11993 echo "${ECHO_T}$ac_cv_header_time" >&6
11994 if test $ac_cv_header_time = yes; then
11995
11996 cat >>confdefs.h <<\EOF
11997 #define TIME_WITH_SYS_TIME 1
11998 EOF
11999
12000 fi
12001
12002 echo "$as_me:12002: checking for regular-expression headers" >&5
12003 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12004 if test "${cf_cv_regex+set}" = set; then
12005   echo $ECHO_N "(cached) $ECHO_C" >&6
12006 else
12007
12008 cat >conftest.$ac_ext <<_ACEOF
12009 #line 12009 "configure"
12010 #include "confdefs.h"
12011 #include <sys/types.h>
12012 #include <regex.h>
12013 int
12014 main ()
12015 {
12016
12017         regex_t *p;
12018         int x = regcomp(p, "", 0);
12019         int y = regexec(p, "", 0, 0, 0);
12020         regfree(p);
12021
12022   ;
12023   return 0;
12024 }
12025 _ACEOF
12026 rm -f conftest.$ac_objext conftest$ac_exeext
12027 if { (eval echo "$as_me:12027: \"$ac_link\"") >&5
12028   (eval $ac_link) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit $ac_status); } &&
12032          { ac_try='test -s conftest$ac_exeext'
12033   { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034   (eval $ac_try) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit $ac_status); }; }; then
12038   cf_cv_regex="regex.h"
12039 else
12040   echo "$as_me: failed program was:" >&5
12041 cat conftest.$ac_ext >&5
12042
12043         cat >conftest.$ac_ext <<_ACEOF
12044 #line 12044 "configure"
12045 #include "confdefs.h"
12046 #include <regexp.h>
12047 int
12048 main ()
12049 {
12050
12051                 char *p = compile("", "", "", 0);
12052                 int x = step("", "");
12053
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 rm -f conftest.$ac_objext conftest$ac_exeext
12059 if { (eval echo "$as_me:12059: \"$ac_link\"") >&5
12060   (eval $ac_link) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); } &&
12064          { ac_try='test -s conftest$ac_exeext'
12065   { (eval echo "$as_me:12065: \"$ac_try\"") >&5
12066   (eval $ac_try) 2>&5
12067   ac_status=$?
12068   echo "$as_me:12068: \$? = $ac_status" >&5
12069   (exit $ac_status); }; }; then
12070   cf_cv_regex="regexp.h"
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 cat conftest.$ac_ext >&5
12074
12075                 cf_save_LIBS="$LIBS"
12076                 LIBS="-lgen $LIBS"
12077                 cat >conftest.$ac_ext <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <regexpr.h>
12081 int
12082 main ()
12083 {
12084
12085                         char *p = compile("", "", "");
12086                         int x = step("", "");
12087
12088   ;
12089   return 0;
12090 }
12091 _ACEOF
12092 rm -f conftest.$ac_objext conftest$ac_exeext
12093 if { (eval echo "$as_me:12093: \"$ac_link\"") >&5
12094   (eval $ac_link) 2>&5
12095   ac_status=$?
12096   echo "$as_me:12096: \$? = $ac_status" >&5
12097   (exit $ac_status); } &&
12098          { ac_try='test -s conftest$ac_exeext'
12099   { (eval echo "$as_me:12099: \"$ac_try\"") >&5
12100   (eval $ac_try) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); }; }; then
12104   cf_cv_regex="regexpr.h"
12105 else
12106   echo "$as_me: failed program was:" >&5
12107 cat conftest.$ac_ext >&5
12108 LIBS="$cf_save_LIBS"
12109 fi
12110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12111 fi
12112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12113 fi
12114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12115
12116 fi
12117
12118 echo "$as_me:12118: result: $cf_cv_regex" >&5
12119 echo "${ECHO_T}$cf_cv_regex" >&6
12120 case $cf_cv_regex in
12121         regex.h)   cat >>confdefs.h <<\EOF
12122 #define HAVE_REGEX_H_FUNCS 1
12123 EOF
12124  ;;
12125         regexp.h)  cat >>confdefs.h <<\EOF
12126 #define HAVE_REGEXP_H_FUNCS 1
12127 EOF
12128  ;;
12129         regexpr.h) cat >>confdefs.h <<\EOF
12130 #define HAVE_REGEXPR_H_FUNCS 1
12131 EOF
12132  ;;
12133 esac
12134
12135 for ac_header in \
12136 fcntl.h \
12137 getopt.h \
12138 limits.h \
12139 locale.h \
12140 poll.h \
12141 sys/bsdtypes.h \
12142 sys/ioctl.h \
12143 sys/param.h \
12144 sys/poll.h \
12145 sys/select.h \
12146 sys/time.h \
12147 sys/times.h \
12148 ttyent.h \
12149 unistd.h \
12150 wctype.h \
12151
12152 do
12153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12154 echo "$as_me:12154: checking for $ac_header" >&5
12155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12157   echo $ECHO_N "(cached) $ECHO_C" >&6
12158 else
12159   cat >conftest.$ac_ext <<_ACEOF
12160 #line 12160 "configure"
12161 #include "confdefs.h"
12162 #include <$ac_header>
12163 _ACEOF
12164 if { (eval echo "$as_me:12164: \"$ac_cpp conftest.$ac_ext\"") >&5
12165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12166   ac_status=$?
12167   egrep -v '^ *\+' conftest.er1 >conftest.err
12168   rm -f conftest.er1
12169   cat conftest.err >&5
12170   echo "$as_me:12170: \$? = $ac_status" >&5
12171   (exit $ac_status); } >/dev/null; then
12172   if test -s conftest.err; then
12173     ac_cpp_err=$ac_c_preproc_warn_flag
12174   else
12175     ac_cpp_err=
12176   fi
12177 else
12178   ac_cpp_err=yes
12179 fi
12180 if test -z "$ac_cpp_err"; then
12181   eval "$as_ac_Header=yes"
12182 else
12183   echo "$as_me: failed program was:" >&5
12184   cat conftest.$ac_ext >&5
12185   eval "$as_ac_Header=no"
12186 fi
12187 rm -f conftest.err conftest.$ac_ext
12188 fi
12189 echo "$as_me:12189: result: `eval echo '${'$as_ac_Header'}'`" >&5
12190 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12192   cat >>confdefs.h <<EOF
12193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12194 EOF
12195
12196 fi
12197 done
12198
12199 # check for ISC (this may also define _POSIX_SOURCE)
12200 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12201 if test "$ISC" = yes ; then
12202
12203 echo "$as_me:12203: checking for main in -lcposix" >&5
12204 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12205 if test "${ac_cv_lib_cposix_main+set}" = set; then
12206   echo $ECHO_N "(cached) $ECHO_C" >&6
12207 else
12208   ac_check_lib_save_LIBS=$LIBS
12209 LIBS="-lcposix  $LIBS"
12210 cat >conftest.$ac_ext <<_ACEOF
12211 #line 12211 "configure"
12212 #include "confdefs.h"
12213
12214 int
12215 main ()
12216 {
12217 main ();
12218   ;
12219   return 0;
12220 }
12221 _ACEOF
12222 rm -f conftest.$ac_objext conftest$ac_exeext
12223 if { (eval echo "$as_me:12223: \"$ac_link\"") >&5
12224   (eval $ac_link) 2>&5
12225   ac_status=$?
12226   echo "$as_me:12226: \$? = $ac_status" >&5
12227   (exit $ac_status); } &&
12228          { ac_try='test -s conftest$ac_exeext'
12229   { (eval echo "$as_me:12229: \"$ac_try\"") >&5
12230   (eval $ac_try) 2>&5
12231   ac_status=$?
12232   echo "$as_me:12232: \$? = $ac_status" >&5
12233   (exit $ac_status); }; }; then
12234   ac_cv_lib_cposix_main=yes
12235 else
12236   echo "$as_me: failed program was:" >&5
12237 cat conftest.$ac_ext >&5
12238 ac_cv_lib_cposix_main=no
12239 fi
12240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12241 LIBS=$ac_check_lib_save_LIBS
12242 fi
12243 echo "$as_me:12243: result: $ac_cv_lib_cposix_main" >&5
12244 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12245 if test $ac_cv_lib_cposix_main = yes; then
12246   cat >>confdefs.h <<EOF
12247 #define HAVE_LIBCPOSIX 1
12248 EOF
12249
12250   LIBS="-lcposix $LIBS"
12251
12252 fi
12253
12254         echo "$as_me:12254: checking for bzero in -linet" >&5
12255 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12256 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12257   echo $ECHO_N "(cached) $ECHO_C" >&6
12258 else
12259   ac_check_lib_save_LIBS=$LIBS
12260 LIBS="-linet  $LIBS"
12261 cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264
12265 /* Override any gcc2 internal prototype to avoid an error.  */
12266 #ifdef __cplusplus
12267 extern "C"
12268 #endif
12269 /* We use char because int might match the return type of a gcc2
12270    builtin and then its argument prototype would still apply.  */
12271 char bzero ();
12272 int
12273 main ()
12274 {
12275 bzero ();
12276   ;
12277   return 0;
12278 }
12279 _ACEOF
12280 rm -f conftest.$ac_objext conftest$ac_exeext
12281 if { (eval echo "$as_me:12281: \"$ac_link\"") >&5
12282   (eval $ac_link) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit $ac_status); } &&
12286          { ac_try='test -s conftest$ac_exeext'
12287   { (eval echo "$as_me:12287: \"$ac_try\"") >&5
12288   (eval $ac_try) 2>&5
12289   ac_status=$?
12290   echo "$as_me:12290: \$? = $ac_status" >&5
12291   (exit $ac_status); }; }; then
12292   ac_cv_lib_inet_bzero=yes
12293 else
12294   echo "$as_me: failed program was:" >&5
12295 cat conftest.$ac_ext >&5
12296 ac_cv_lib_inet_bzero=no
12297 fi
12298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12299 LIBS=$ac_check_lib_save_LIBS
12300 fi
12301 echo "$as_me:12301: result: $ac_cv_lib_inet_bzero" >&5
12302 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12303 if test $ac_cv_lib_inet_bzero = yes; then
12304   LIBS="$LIBS -linet"
12305 fi
12306 fi
12307
12308 echo "$as_me:12308: checking if sys/time.h works with sys/select.h" >&5
12309 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12310 if test "${cf_cv_sys_time_select+set}" = set; then
12311   echo $ECHO_N "(cached) $ECHO_C" >&6
12312 else
12313
12314 cat >conftest.$ac_ext <<_ACEOF
12315 #line 12315 "configure"
12316 #include "confdefs.h"
12317
12318 #include <sys/types.h>
12319 #ifdef HAVE_SYS_TIME_H
12320 #include <sys/time.h>
12321 #endif
12322 #ifdef HAVE_SYS_SELECT_H
12323 #include <sys/select.h>
12324 #endif
12325
12326 int
12327 main ()
12328 {
12329
12330   ;
12331   return 0;
12332 }
12333 _ACEOF
12334 rm -f conftest.$ac_objext
12335 if { (eval echo "$as_me:12335: \"$ac_compile\"") >&5
12336   (eval $ac_compile) 2>&5
12337   ac_status=$?
12338   echo "$as_me:12338: \$? = $ac_status" >&5
12339   (exit $ac_status); } &&
12340          { ac_try='test -s conftest.$ac_objext'
12341   { (eval echo "$as_me:12341: \"$ac_try\"") >&5
12342   (eval $ac_try) 2>&5
12343   ac_status=$?
12344   echo "$as_me:12344: \$? = $ac_status" >&5
12345   (exit $ac_status); }; }; then
12346   cf_cv_sys_time_select=yes
12347 else
12348   echo "$as_me: failed program was:" >&5
12349 cat conftest.$ac_ext >&5
12350 cf_cv_sys_time_select=no
12351 fi
12352 rm -f conftest.$ac_objext conftest.$ac_ext
12353
12354 fi
12355
12356 echo "$as_me:12356: result: $cf_cv_sys_time_select" >&5
12357 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12358 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12359 #define HAVE_SYS_TIME_SELECT 1
12360 EOF
12361
12362 ###     checks for compiler characteristics
12363 ac_ext=c
12364 ac_cpp='$CPP $CPPFLAGS'
12365 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12366 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12367 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12368 ac_main_return=return
12369
12370 echo "$as_me:12370: checking for $CC option to accept ANSI C" >&5
12371 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12372 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12373   echo $ECHO_N "(cached) $ECHO_C" >&6
12374 else
12375   ac_cv_prog_cc_stdc=no
12376 ac_save_CC=$CC
12377 cat >conftest.$ac_ext <<_ACEOF
12378 #line 12378 "configure"
12379 #include "confdefs.h"
12380 #include <stdarg.h>
12381 #include <stdio.h>
12382 #include <sys/types.h>
12383 #include <sys/stat.h>
12384 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12385 struct buf { int x; };
12386 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12387 static char *e (p, i)
12388      char **p;
12389      int i;
12390 {
12391   return p[i];
12392 }
12393 static char *f (char * (*g) (char **, int), char **p, ...)
12394 {
12395   char *s;
12396   va_list v;
12397   va_start (v,p);
12398   s = g (p, va_arg (v,int));
12399   va_end (v);
12400   return s;
12401 }
12402 int test (int i, double x);
12403 struct s1 {int (*f) (int a);};
12404 struct s2 {int (*f) (double a);};
12405 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12406 int argc;
12407 char **argv;
12408 int
12409 main ()
12410 {
12411 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12412   ;
12413   return 0;
12414 }
12415 _ACEOF
12416 # Don't try gcc -ansi; that turns off useful extensions and
12417 # breaks some systems' header files.
12418 # AIX                   -qlanglvl=ansi
12419 # Ultrix and OSF/1      -std1
12420 # HP-UX 10.20 and later -Ae
12421 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12422 # SVR4                  -Xc -D__EXTENSIONS__
12423 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12424 do
12425   CC="$ac_save_CC $ac_arg"
12426   rm -f conftest.$ac_objext
12427 if { (eval echo "$as_me:12427: \"$ac_compile\"") >&5
12428   (eval $ac_compile) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit $ac_status); } &&
12432          { ac_try='test -s conftest.$ac_objext'
12433   { (eval echo "$as_me:12433: \"$ac_try\"") >&5
12434   (eval $ac_try) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); }; }; then
12438   ac_cv_prog_cc_stdc=$ac_arg
12439 break
12440 else
12441   echo "$as_me: failed program was:" >&5
12442 cat conftest.$ac_ext >&5
12443 fi
12444 rm -f conftest.$ac_objext
12445 done
12446 rm -f conftest.$ac_ext conftest.$ac_objext
12447 CC=$ac_save_CC
12448
12449 fi
12450
12451 case "x$ac_cv_prog_cc_stdc" in
12452   x|xno)
12453     echo "$as_me:12453: result: none needed" >&5
12454 echo "${ECHO_T}none needed" >&6 ;;
12455   *)
12456     echo "$as_me:12456: result: $ac_cv_prog_cc_stdc" >&5
12457 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12458     CC="$CC $ac_cv_prog_cc_stdc" ;;
12459 esac
12460
12461 echo "$as_me:12461: checking for an ANSI C-conforming const" >&5
12462 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12463 if test "${ac_cv_c_const+set}" = set; then
12464   echo $ECHO_N "(cached) $ECHO_C" >&6
12465 else
12466   cat >conftest.$ac_ext <<_ACEOF
12467 #line 12467 "configure"
12468 #include "confdefs.h"
12469
12470 int
12471 main ()
12472 {
12473 /* FIXME: Include the comments suggested by Paul. */
12474 #ifndef __cplusplus
12475   /* Ultrix mips cc rejects this.  */
12476   typedef int charset[2];
12477   const charset x;
12478   /* SunOS 4.1.1 cc rejects this.  */
12479   char const *const *ccp;
12480   char **p;
12481   /* NEC SVR4.0.2 mips cc rejects this.  */
12482   struct point {int x, y;};
12483   static struct point const zero = {0,0};
12484   /* AIX XL C 1.02.0.0 rejects this.
12485      It does not let you subtract one const X* pointer from another in
12486      an arm of an if-expression whose if-part is not a constant
12487      expression */
12488   const char *g = "string";
12489   ccp = &g + (g ? g-g : 0);
12490   /* HPUX 7.0 cc rejects these. */
12491   ++ccp;
12492   p = (char**) ccp;
12493   ccp = (char const *const *) p;
12494   { /* SCO 3.2v4 cc rejects this.  */
12495     char *t;
12496     char const *s = 0 ? (char *) 0 : (char const *) 0;
12497
12498     *t++ = 0;
12499   }
12500   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12501     int x[] = {25, 17};
12502     const int *foo = &x[0];
12503     ++foo;
12504   }
12505   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12506     typedef const int *iptr;
12507     iptr p = 0;
12508     ++p;
12509   }
12510   { /* AIX XL C 1.02.0.0 rejects this saying
12511        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12512     struct s { int j; const int *ap[3]; };
12513     struct s *b; b->j = 5;
12514   }
12515   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12516     const int foo = 10;
12517   }
12518 #endif
12519
12520   ;
12521   return 0;
12522 }
12523 _ACEOF
12524 rm -f conftest.$ac_objext
12525 if { (eval echo "$as_me:12525: \"$ac_compile\"") >&5
12526   (eval $ac_compile) 2>&5
12527   ac_status=$?
12528   echo "$as_me:12528: \$? = $ac_status" >&5
12529   (exit $ac_status); } &&
12530          { ac_try='test -s conftest.$ac_objext'
12531   { (eval echo "$as_me:12531: \"$ac_try\"") >&5
12532   (eval $ac_try) 2>&5
12533   ac_status=$?
12534   echo "$as_me:12534: \$? = $ac_status" >&5
12535   (exit $ac_status); }; }; then
12536   ac_cv_c_const=yes
12537 else
12538   echo "$as_me: failed program was:" >&5
12539 cat conftest.$ac_ext >&5
12540 ac_cv_c_const=no
12541 fi
12542 rm -f conftest.$ac_objext conftest.$ac_ext
12543 fi
12544 echo "$as_me:12544: result: $ac_cv_c_const" >&5
12545 echo "${ECHO_T}$ac_cv_c_const" >&6
12546 if test $ac_cv_c_const = no; then
12547
12548 cat >>confdefs.h <<\EOF
12549 #define const
12550 EOF
12551
12552 fi
12553
12554 echo "$as_me:12554: checking for inline" >&5
12555 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12556 if test "${ac_cv_c_inline+set}" = set; then
12557   echo $ECHO_N "(cached) $ECHO_C" >&6
12558 else
12559   ac_cv_c_inline=no
12560 for ac_kw in inline __inline__ __inline; do
12561   cat >conftest.$ac_ext <<_ACEOF
12562 #line 12562 "configure"
12563 #include "confdefs.h"
12564 #ifndef __cplusplus
12565 static $ac_kw int static_foo () {return 0; }
12566 $ac_kw int foo () {return 0; }
12567 #endif
12568
12569 _ACEOF
12570 rm -f conftest.$ac_objext
12571 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); } &&
12576          { ac_try='test -s conftest.$ac_objext'
12577   { (eval echo "$as_me:12577: \"$ac_try\"") >&5
12578   (eval $ac_try) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); }; }; then
12582   ac_cv_c_inline=$ac_kw; break
12583 else
12584   echo "$as_me: failed program was:" >&5
12585 cat conftest.$ac_ext >&5
12586 fi
12587 rm -f conftest.$ac_objext conftest.$ac_ext
12588 done
12589
12590 fi
12591 echo "$as_me:12591: result: $ac_cv_c_inline" >&5
12592 echo "${ECHO_T}$ac_cv_c_inline" >&6
12593 case $ac_cv_c_inline in
12594   inline | yes) ;;
12595   no)
12596 cat >>confdefs.h <<\EOF
12597 #define inline
12598 EOF
12599  ;;
12600   *)  cat >>confdefs.h <<EOF
12601 #define inline $ac_cv_c_inline
12602 EOF
12603  ;;
12604 esac
12605
12606 NCURSES_INLINE=
12607 if test "$ac_cv_c_inline" != no ; then
12608   NCURSES_INLINE=inline
12609   if test "$INTEL_COMPILER" = yes
12610   then
12611     :
12612   elif test "$GCC" = yes
12613   then
12614     echo "$as_me:12614: checking if gcc supports options to tune inlining" >&5
12615 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12616 if test "${cf_cv_gcc_inline+set}" = set; then
12617   echo $ECHO_N "(cached) $ECHO_C" >&6
12618 else
12619
12620       cf_save_CFLAGS=$CFLAGS
12621       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12622       cat >conftest.$ac_ext <<_ACEOF
12623 #line 12623 "configure"
12624 #include "confdefs.h"
12625 inline int foo(void) { return 1; }
12626 int
12627 main ()
12628 {
12629 ${cf_cv_main_return:-return} foo()
12630   ;
12631   return 0;
12632 }
12633 _ACEOF
12634 rm -f conftest.$ac_objext
12635 if { (eval echo "$as_me:12635: \"$ac_compile\"") >&5
12636   (eval $ac_compile) 2>&5
12637   ac_status=$?
12638   echo "$as_me:12638: \$? = $ac_status" >&5
12639   (exit $ac_status); } &&
12640          { ac_try='test -s conftest.$ac_objext'
12641   { (eval echo "$as_me:12641: \"$ac_try\"") >&5
12642   (eval $ac_try) 2>&5
12643   ac_status=$?
12644   echo "$as_me:12644: \$? = $ac_status" >&5
12645   (exit $ac_status); }; }; then
12646   cf_cv_gcc_inline=yes
12647 else
12648   echo "$as_me: failed program was:" >&5
12649 cat conftest.$ac_ext >&5
12650 cf_cv_gcc_inline=no
12651 fi
12652 rm -f conftest.$ac_objext conftest.$ac_ext
12653       CFLAGS=$cf_save_CFLAGS
12654
12655 fi
12656 echo "$as_me:12656: result: $cf_cv_gcc_inline" >&5
12657 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12658     if test "$cf_cv_gcc_inline" = yes ; then
12659
12660 cf_fix_cppflags=no
12661 cf_new_cflags=
12662 cf_new_cppflags=
12663 cf_new_extra_cppflags=
12664
12665 for cf_add_cflags in --param max-inline-insns-single=1200
12666 do
12667 case $cf_fix_cppflags in
12668 no)
12669         case $cf_add_cflags in #(vi
12670         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12671                 case $cf_add_cflags in
12672                 -D*)
12673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12674
12675                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12676                         && test -z "${cf_tst_cflags}" \
12677                         && cf_fix_cppflags=yes
12678
12679                         if test $cf_fix_cppflags = yes ; then
12680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12681                                 continue
12682                         elif test "${cf_tst_cflags}" = "\"'" ; then
12683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12684                                 continue
12685                         fi
12686                         ;;
12687                 esac
12688                 case "$CPPFLAGS" in
12689                 *$cf_add_cflags) #(vi
12690                         ;;
12691                 *) #(vi
12692                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12693                         ;;
12694                 esac
12695                 ;;
12696         *)
12697                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12698                 ;;
12699         esac
12700         ;;
12701 yes)
12702         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12703
12704         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12705
12706         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12707         && test -z "${cf_tst_cflags}" \
12708         && cf_fix_cppflags=no
12709         ;;
12710 esac
12711 done
12712
12713 if test -n "$cf_new_cflags" ; then
12714
12715         CFLAGS="$CFLAGS $cf_new_cflags"
12716 fi
12717
12718 if test -n "$cf_new_cppflags" ; then
12719
12720         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12721 fi
12722
12723 if test -n "$cf_new_extra_cppflags" ; then
12724
12725         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12726 fi
12727
12728     fi
12729   fi
12730 fi
12731
12732 echo "$as_me:12732: checking for signal global datatype" >&5
12733 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12734 if test "${cf_cv_sig_atomic_t+set}" = set; then
12735   echo $ECHO_N "(cached) $ECHO_C" >&6
12736 else
12737
12738         for cf_type in \
12739                 "volatile sig_atomic_t" \
12740                 "sig_atomic_t" \
12741                 "int"
12742         do
12743         cat >conftest.$ac_ext <<_ACEOF
12744 #line 12744 "configure"
12745 #include "confdefs.h"
12746
12747 #include <sys/types.h>
12748 #include <signal.h>
12749 #include <stdio.h>
12750
12751 extern $cf_type x;
12752 $cf_type x;
12753 static void handler(int sig)
12754 {
12755         x = 5;
12756 }
12757 int
12758 main ()
12759 {
12760 signal(SIGINT, handler);
12761                  x = 1
12762   ;
12763   return 0;
12764 }
12765 _ACEOF
12766 rm -f conftest.$ac_objext
12767 if { (eval echo "$as_me:12767: \"$ac_compile\"") >&5
12768   (eval $ac_compile) 2>&5
12769   ac_status=$?
12770   echo "$as_me:12770: \$? = $ac_status" >&5
12771   (exit $ac_status); } &&
12772          { ac_try='test -s conftest.$ac_objext'
12773   { (eval echo "$as_me:12773: \"$ac_try\"") >&5
12774   (eval $ac_try) 2>&5
12775   ac_status=$?
12776   echo "$as_me:12776: \$? = $ac_status" >&5
12777   (exit $ac_status); }; }; then
12778   cf_cv_sig_atomic_t=$cf_type
12779 else
12780   echo "$as_me: failed program was:" >&5
12781 cat conftest.$ac_ext >&5
12782 cf_cv_sig_atomic_t=no
12783 fi
12784 rm -f conftest.$ac_objext conftest.$ac_ext
12785                 test "$cf_cv_sig_atomic_t" != no && break
12786         done
12787
12788 fi
12789
12790 echo "$as_me:12790: result: $cf_cv_sig_atomic_t" >&5
12791 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12792 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12793 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12794 EOF
12795
12796 if test $NCURSES_CHTYPE = auto ; then
12797
12798 echo "$as_me:12798: checking for type of chtype" >&5
12799 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12800 if test "${cf_cv_typeof_chtype+set}" = set; then
12801   echo $ECHO_N "(cached) $ECHO_C" >&6
12802 else
12803
12804                 if test "$cross_compiling" = yes; then
12805   cf_cv_typeof_chtype=long
12806 else
12807   cat >conftest.$ac_ext <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810
12811 #define WANT_BITS 31
12812 #include <stdio.h>
12813 int main()
12814 {
12815         FILE *fp = fopen("cf_test.out", "w");
12816         if (fp != 0) {
12817                 char *result = "long";
12818                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12819                         int n;
12820                         unsigned int x, y;
12821                         for (n = 0; n < WANT_BITS; n++) {
12822                                 x = (1 << n);
12823                                 y = (x >> n);
12824                                 if (y != 1 || x == 0) {
12825                                         x = 0;
12826                                         break;
12827                                 }
12828                         }
12829                         /*
12830                          * If x is nonzero, an int is big enough for the bits
12831                          * that we want.
12832                          */
12833                         result = (x != 0) ? "int" : "long";
12834                 }
12835                 fputs(result, fp);
12836                 fclose(fp);
12837         }
12838         ${cf_cv_main_return:-return}(0);
12839 }
12840
12841 _ACEOF
12842 rm -f conftest$ac_exeext
12843 if { (eval echo "$as_me:12843: \"$ac_link\"") >&5
12844   (eval $ac_link) 2>&5
12845   ac_status=$?
12846   echo "$as_me:12846: \$? = $ac_status" >&5
12847   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12848   { (eval echo "$as_me:12848: \"$ac_try\"") >&5
12849   (eval $ac_try) 2>&5
12850   ac_status=$?
12851   echo "$as_me:12851: \$? = $ac_status" >&5
12852   (exit $ac_status); }; }; then
12853   cf_cv_typeof_chtype=`cat cf_test.out`
12854 else
12855   echo "$as_me: program exited with status $ac_status" >&5
12856 echo "$as_me: failed program was:" >&5
12857 cat conftest.$ac_ext >&5
12858 cf_cv_typeof_chtype=long
12859 fi
12860 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12861 fi
12862                 rm -f cf_test.out
12863
12864 fi
12865
12866 echo "$as_me:12866: result: $cf_cv_typeof_chtype" >&5
12867 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12868
12869 cat >>confdefs.h <<EOF
12870 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12871 EOF
12872
12873 else
12874         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12875 fi
12876 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12877
12878 echo "$as_me:12878: checking if unsigned literals are legal" >&5
12879 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12880 if test "${cf_cv_unsigned_literals+set}" = set; then
12881   echo $ECHO_N "(cached) $ECHO_C" >&6
12882 else
12883
12884         cat >conftest.$ac_ext <<_ACEOF
12885 #line 12885 "configure"
12886 #include "confdefs.h"
12887
12888 int
12889 main ()
12890 {
12891 long x = 1L + 1UL + 1U + 1
12892   ;
12893   return 0;
12894 }
12895 _ACEOF
12896 rm -f conftest.$ac_objext
12897 if { (eval echo "$as_me:12897: \"$ac_compile\"") >&5
12898   (eval $ac_compile) 2>&5
12899   ac_status=$?
12900   echo "$as_me:12900: \$? = $ac_status" >&5
12901   (exit $ac_status); } &&
12902          { ac_try='test -s conftest.$ac_objext'
12903   { (eval echo "$as_me:12903: \"$ac_try\"") >&5
12904   (eval $ac_try) 2>&5
12905   ac_status=$?
12906   echo "$as_me:12906: \$? = $ac_status" >&5
12907   (exit $ac_status); }; }; then
12908   cf_cv_unsigned_literals=yes
12909 else
12910   echo "$as_me: failed program was:" >&5
12911 cat conftest.$ac_ext >&5
12912 cf_cv_unsigned_literals=no
12913 fi
12914 rm -f conftest.$ac_objext conftest.$ac_ext
12915
12916 fi
12917
12918 echo "$as_me:12918: result: $cf_cv_unsigned_literals" >&5
12919 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12920
12921 cf_cv_1UL="1"
12922 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12923 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12924
12925 if test $NCURSES_MMASK_T = auto ; then
12926         cf_cv_typeof_mmask_t=long
12927 else
12928         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12929 fi
12930 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12931
12932 ###     Checks for external-data
12933
12934 echo "$as_me:12934: checking if external errno is declared" >&5
12935 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12936 if test "${cf_cv_dcl_errno+set}" = set; then
12937   echo $ECHO_N "(cached) $ECHO_C" >&6
12938 else
12939
12940     cat >conftest.$ac_ext <<_ACEOF
12941 #line 12941 "configure"
12942 #include "confdefs.h"
12943
12944 #ifdef HAVE_STDLIB_H
12945 #include <stdlib.h>
12946 #endif
12947 #include <stdio.h>
12948 #include <sys/types.h>
12949 #include <errno.h>
12950 int
12951 main ()
12952 {
12953 int x = (int) errno
12954   ;
12955   return 0;
12956 }
12957 _ACEOF
12958 rm -f conftest.$ac_objext
12959 if { (eval echo "$as_me:12959: \"$ac_compile\"") >&5
12960   (eval $ac_compile) 2>&5
12961   ac_status=$?
12962   echo "$as_me:12962: \$? = $ac_status" >&5
12963   (exit $ac_status); } &&
12964          { ac_try='test -s conftest.$ac_objext'
12965   { (eval echo "$as_me:12965: \"$ac_try\"") >&5
12966   (eval $ac_try) 2>&5
12967   ac_status=$?
12968   echo "$as_me:12968: \$? = $ac_status" >&5
12969   (exit $ac_status); }; }; then
12970   cf_cv_dcl_errno=yes
12971 else
12972   echo "$as_me: failed program was:" >&5
12973 cat conftest.$ac_ext >&5
12974 cf_cv_dcl_errno=no
12975 fi
12976 rm -f conftest.$ac_objext conftest.$ac_ext
12977
12978 fi
12979 echo "$as_me:12979: result: $cf_cv_dcl_errno" >&5
12980 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12981
12982 if test "$cf_cv_dcl_errno" = no ; then
12983
12984 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12985
12986     cat >>confdefs.h <<EOF
12987 #define $cf_result 1
12988 EOF
12989
12990 fi
12991
12992 # It's possible (for near-UNIX clones) that the data doesn't exist
12993
12994 echo "$as_me:12994: checking if external errno exists" >&5
12995 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12996 if test "${cf_cv_have_errno+set}" = set; then
12997   echo $ECHO_N "(cached) $ECHO_C" >&6
12998 else
12999
13000     cat >conftest.$ac_ext <<_ACEOF
13001 #line 13001 "configure"
13002 #include "confdefs.h"
13003
13004 #undef errno
13005 extern int errno;
13006
13007 int
13008 main ()
13009 {
13010 errno = 2
13011   ;
13012   return 0;
13013 }
13014 _ACEOF
13015 rm -f conftest.$ac_objext conftest$ac_exeext
13016 if { (eval echo "$as_me:13016: \"$ac_link\"") >&5
13017   (eval $ac_link) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit $ac_status); } &&
13021          { ac_try='test -s conftest$ac_exeext'
13022   { (eval echo "$as_me:13022: \"$ac_try\"") >&5
13023   (eval $ac_try) 2>&5
13024   ac_status=$?
13025   echo "$as_me:13025: \$? = $ac_status" >&5
13026   (exit $ac_status); }; }; then
13027   cf_cv_have_errno=yes
13028 else
13029   echo "$as_me: failed program was:" >&5
13030 cat conftest.$ac_ext >&5
13031 cf_cv_have_errno=no
13032 fi
13033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13034
13035 fi
13036 echo "$as_me:13036: result: $cf_cv_have_errno" >&5
13037 echo "${ECHO_T}$cf_cv_have_errno" >&6
13038
13039 if test "$cf_cv_have_errno" = yes ; then
13040
13041 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13042
13043     cat >>confdefs.h <<EOF
13044 #define $cf_result 1
13045 EOF
13046
13047 fi
13048
13049 echo "$as_me:13049: checking if data-only library module links" >&5
13050 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13051 if test "${cf_cv_link_dataonly+set}" = set; then
13052   echo $ECHO_N "(cached) $ECHO_C" >&6
13053 else
13054
13055         rm -f conftest.a
13056         cat >conftest.$ac_ext <<EOF
13057 #line 13057 "configure"
13058 int     testdata[3] = { 123, 456, 789 };
13059 EOF
13060         if { (eval echo "$as_me:13060: \"$ac_compile\"") >&5
13061   (eval $ac_compile) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit $ac_status); } ; then
13065                 mv conftest.o data.o && \
13066                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13067         fi
13068         rm -f conftest.$ac_ext data.o
13069         cat >conftest.$ac_ext <<EOF
13070 #line 13070 "configure"
13071 int     testfunc()
13072 {
13073 #if defined(NeXT)
13074         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13075 #else
13076         extern int testdata[3];
13077         return testdata[0] == 123
13078            &&  testdata[1] == 456
13079            &&  testdata[2] == 789;
13080 #endif
13081 }
13082 EOF
13083         if { (eval echo "$as_me:13083: \"$ac_compile\"") >&5
13084   (eval $ac_compile) 2>&5
13085   ac_status=$?
13086   echo "$as_me:13086: \$? = $ac_status" >&5
13087   (exit $ac_status); }; then
13088                 mv conftest.o func.o && \
13089                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13090         fi
13091         rm -f conftest.$ac_ext func.o
13092         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13093         cf_saveLIBS="$LIBS"
13094         LIBS="conftest.a $LIBS"
13095         if test "$cross_compiling" = yes; then
13096   cf_cv_link_dataonly=unknown
13097 else
13098   cat >conftest.$ac_ext <<_ACEOF
13099 #line 13099 "configure"
13100 #include "confdefs.h"
13101
13102         int main()
13103         {
13104                 extern int testfunc();
13105                 ${cf_cv_main_return:-return} (!testfunc());
13106         }
13107
13108 _ACEOF
13109 rm -f conftest$ac_exeext
13110 if { (eval echo "$as_me:13110: \"$ac_link\"") >&5
13111   (eval $ac_link) 2>&5
13112   ac_status=$?
13113   echo "$as_me:13113: \$? = $ac_status" >&5
13114   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13115   { (eval echo "$as_me:13115: \"$ac_try\"") >&5
13116   (eval $ac_try) 2>&5
13117   ac_status=$?
13118   echo "$as_me:13118: \$? = $ac_status" >&5
13119   (exit $ac_status); }; }; then
13120   cf_cv_link_dataonly=yes
13121 else
13122   echo "$as_me: program exited with status $ac_status" >&5
13123 echo "$as_me: failed program was:" >&5
13124 cat conftest.$ac_ext >&5
13125 cf_cv_link_dataonly=no
13126 fi
13127 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13128 fi
13129         LIBS="$cf_saveLIBS"
13130
13131 fi
13132
13133 echo "$as_me:13133: result: $cf_cv_link_dataonly" >&5
13134 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13135
13136 if test "$cf_cv_link_dataonly" = no ; then
13137         cat >>confdefs.h <<\EOF
13138 #define BROKEN_LINKER 1
13139 EOF
13140
13141         BROKEN_LINKER=1
13142 fi
13143
13144 ###     Checks for library functions.
13145
13146 for ac_func in \
13147 getcwd \
13148 getegid \
13149 geteuid \
13150 getttynam \
13151 issetugid \
13152 poll \
13153 remove \
13154 select \
13155 setbuf \
13156 setbuffer \
13157 setvbuf \
13158 sigaction \
13159 sigvec \
13160 strdup \
13161 strstr \
13162 tcgetpgrp \
13163 times \
13164 vsnprintf \
13165
13166 do
13167 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13168 echo "$as_me:13168: checking for $ac_func" >&5
13169 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13170 if eval "test \"\${$as_ac_var+set}\" = set"; then
13171   echo $ECHO_N "(cached) $ECHO_C" >&6
13172 else
13173   cat >conftest.$ac_ext <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176 /* System header to define __stub macros and hopefully few prototypes,
13177     which can conflict with char $ac_func (); below.  */
13178 #include <assert.h>
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 #ifdef __cplusplus
13181 extern "C"
13182 #endif
13183 /* We use char because int might match the return type of a gcc2
13184    builtin and then its argument prototype would still apply.  */
13185 char $ac_func ();
13186 char (*f) ();
13187
13188 int
13189 main ()
13190 {
13191 /* The GNU C library defines this for functions which it implements
13192     to always fail with ENOSYS.  Some functions are actually named
13193     something starting with __ and the normal name is an alias.  */
13194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13195 choke me
13196 #else
13197 f = $ac_func;
13198 #endif
13199
13200   ;
13201   return 0;
13202 }
13203 _ACEOF
13204 rm -f conftest.$ac_objext conftest$ac_exeext
13205 if { (eval echo "$as_me:13205: \"$ac_link\"") >&5
13206   (eval $ac_link) 2>&5
13207   ac_status=$?
13208   echo "$as_me:13208: \$? = $ac_status" >&5
13209   (exit $ac_status); } &&
13210          { ac_try='test -s conftest$ac_exeext'
13211   { (eval echo "$as_me:13211: \"$ac_try\"") >&5
13212   (eval $ac_try) 2>&5
13213   ac_status=$?
13214   echo "$as_me:13214: \$? = $ac_status" >&5
13215   (exit $ac_status); }; }; then
13216   eval "$as_ac_var=yes"
13217 else
13218   echo "$as_me: failed program was:" >&5
13219 cat conftest.$ac_ext >&5
13220 eval "$as_ac_var=no"
13221 fi
13222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13223 fi
13224 echo "$as_me:13224: result: `eval echo '${'$as_ac_var'}'`" >&5
13225 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13226 if test `eval echo '${'$as_ac_var'}'` = yes; then
13227   cat >>confdefs.h <<EOF
13228 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13229 EOF
13230
13231 fi
13232 done
13233
13234 if test "$with_getcap" = "yes" ; then
13235
13236 echo "$as_me:13236: checking for terminal-capability database functions" >&5
13237 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13238 if test "${cf_cv_cgetent+set}" = set; then
13239   echo $ECHO_N "(cached) $ECHO_C" >&6
13240 else
13241
13242 cat >conftest.$ac_ext <<_ACEOF
13243 #line 13243 "configure"
13244 #include "confdefs.h"
13245
13246 #include <stdlib.h>
13247 int
13248 main ()
13249 {
13250
13251         char temp[128];
13252         char *buf = temp;
13253         char *db_array = temp;
13254         cgetent(&buf, /* int *, */ &db_array, "vt100");
13255         cgetcap(buf, "tc", '=');
13256         cgetmatch(buf, "tc");
13257
13258   ;
13259   return 0;
13260 }
13261 _ACEOF
13262 rm -f conftest.$ac_objext conftest$ac_exeext
13263 if { (eval echo "$as_me:13263: \"$ac_link\"") >&5
13264   (eval $ac_link) 2>&5
13265   ac_status=$?
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); } &&
13268          { ac_try='test -s conftest$ac_exeext'
13269   { (eval echo "$as_me:13269: \"$ac_try\"") >&5
13270   (eval $ac_try) 2>&5
13271   ac_status=$?
13272   echo "$as_me:13272: \$? = $ac_status" >&5
13273   (exit $ac_status); }; }; then
13274   cf_cv_cgetent=yes
13275 else
13276   echo "$as_me: failed program was:" >&5
13277 cat conftest.$ac_ext >&5
13278 cf_cv_cgetent=no
13279 fi
13280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13281
13282 fi
13283
13284 echo "$as_me:13284: result: $cf_cv_cgetent" >&5
13285 echo "${ECHO_T}$cf_cv_cgetent" >&6
13286 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13287 #define HAVE_BSD_CGETENT 1
13288 EOF
13289
13290 fi
13291
13292 echo "$as_me:13292: checking for isascii" >&5
13293 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13294 if test "${cf_cv_have_isascii+set}" = set; then
13295   echo $ECHO_N "(cached) $ECHO_C" >&6
13296 else
13297
13298         cat >conftest.$ac_ext <<_ACEOF
13299 #line 13299 "configure"
13300 #include "confdefs.h"
13301 #include <ctype.h>
13302 int
13303 main ()
13304 {
13305 int x = isascii(' ')
13306   ;
13307   return 0;
13308 }
13309 _ACEOF
13310 rm -f conftest.$ac_objext conftest$ac_exeext
13311 if { (eval echo "$as_me:13311: \"$ac_link\"") >&5
13312   (eval $ac_link) 2>&5
13313   ac_status=$?
13314   echo "$as_me:13314: \$? = $ac_status" >&5
13315   (exit $ac_status); } &&
13316          { ac_try='test -s conftest$ac_exeext'
13317   { (eval echo "$as_me:13317: \"$ac_try\"") >&5
13318   (eval $ac_try) 2>&5
13319   ac_status=$?
13320   echo "$as_me:13320: \$? = $ac_status" >&5
13321   (exit $ac_status); }; }; then
13322   cf_cv_have_isascii=yes
13323 else
13324   echo "$as_me: failed program was:" >&5
13325 cat conftest.$ac_ext >&5
13326 cf_cv_have_isascii=no
13327 fi
13328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13329
13330 fi
13331 echo "$as_me:13331: result: $cf_cv_have_isascii" >&5
13332 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13333 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13334 #define HAVE_ISASCII 1
13335 EOF
13336
13337 if test "$ac_cv_func_sigaction" = yes; then
13338 echo "$as_me:13338: checking whether sigaction needs _POSIX_SOURCE" >&5
13339 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13340 cat >conftest.$ac_ext <<_ACEOF
13341 #line 13341 "configure"
13342 #include "confdefs.h"
13343
13344 #include <sys/types.h>
13345 #include <signal.h>
13346 int
13347 main ()
13348 {
13349 struct sigaction act
13350   ;
13351   return 0;
13352 }
13353 _ACEOF
13354 rm -f conftest.$ac_objext
13355 if { (eval echo "$as_me:13355: \"$ac_compile\"") >&5
13356   (eval $ac_compile) 2>&5
13357   ac_status=$?
13358   echo "$as_me:13358: \$? = $ac_status" >&5
13359   (exit $ac_status); } &&
13360          { ac_try='test -s conftest.$ac_objext'
13361   { (eval echo "$as_me:13361: \"$ac_try\"") >&5
13362   (eval $ac_try) 2>&5
13363   ac_status=$?
13364   echo "$as_me:13364: \$? = $ac_status" >&5
13365   (exit $ac_status); }; }; then
13366   sigact_bad=no
13367 else
13368   echo "$as_me: failed program was:" >&5
13369 cat conftest.$ac_ext >&5
13370
13371 cat >conftest.$ac_ext <<_ACEOF
13372 #line 13372 "configure"
13373 #include "confdefs.h"
13374
13375 #define _POSIX_SOURCE
13376 #include <sys/types.h>
13377 #include <signal.h>
13378 int
13379 main ()
13380 {
13381 struct sigaction act
13382   ;
13383   return 0;
13384 }
13385 _ACEOF
13386 rm -f conftest.$ac_objext
13387 if { (eval echo "$as_me:13387: \"$ac_compile\"") >&5
13388   (eval $ac_compile) 2>&5
13389   ac_status=$?
13390   echo "$as_me:13390: \$? = $ac_status" >&5
13391   (exit $ac_status); } &&
13392          { ac_try='test -s conftest.$ac_objext'
13393   { (eval echo "$as_me:13393: \"$ac_try\"") >&5
13394   (eval $ac_try) 2>&5
13395   ac_status=$?
13396   echo "$as_me:13396: \$? = $ac_status" >&5
13397   (exit $ac_status); }; }; then
13398   sigact_bad=yes
13399          cat >>confdefs.h <<\EOF
13400 #define SVR4_ACTION 1
13401 EOF
13402
13403 else
13404   echo "$as_me: failed program was:" >&5
13405 cat conftest.$ac_ext >&5
13406 sigact_bad=unknown
13407 fi
13408 rm -f conftest.$ac_objext conftest.$ac_ext
13409 fi
13410 rm -f conftest.$ac_objext conftest.$ac_ext
13411 echo "$as_me:13411: result: $sigact_bad" >&5
13412 echo "${ECHO_T}$sigact_bad" >&6
13413 fi
13414
13415 echo "$as_me:13415: checking if nanosleep really works" >&5
13416 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13417 if test "${cf_cv_func_nanosleep+set}" = set; then
13418   echo $ECHO_N "(cached) $ECHO_C" >&6
13419 else
13420
13421 if test "$cross_compiling" = yes; then
13422   cf_cv_func_nanosleep=unknown
13423 else
13424   cat >conftest.$ac_ext <<_ACEOF
13425 #line 13425 "configure"
13426 #include "confdefs.h"
13427
13428 #include <stdio.h>
13429 #include <errno.h>
13430 #include <time.h>
13431
13432 #ifdef HAVE_SYS_TIME_H
13433 #include <sys/time.h>
13434 #endif
13435
13436 int main() {
13437         struct timespec ts1, ts2;
13438         int code;
13439         ts1.tv_sec  = 0;
13440         ts1.tv_nsec = 750000000;
13441         ts2.tv_sec  = 0;
13442         ts2.tv_nsec = 0;
13443         errno = 0;
13444         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13445         ${cf_cv_main_return:-return}(code != 0);
13446 }
13447
13448 _ACEOF
13449 rm -f conftest$ac_exeext
13450 if { (eval echo "$as_me:13450: \"$ac_link\"") >&5
13451   (eval $ac_link) 2>&5
13452   ac_status=$?
13453   echo "$as_me:13453: \$? = $ac_status" >&5
13454   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13455   { (eval echo "$as_me:13455: \"$ac_try\"") >&5
13456   (eval $ac_try) 2>&5
13457   ac_status=$?
13458   echo "$as_me:13458: \$? = $ac_status" >&5
13459   (exit $ac_status); }; }; then
13460   cf_cv_func_nanosleep=yes
13461 else
13462   echo "$as_me: program exited with status $ac_status" >&5
13463 echo "$as_me: failed program was:" >&5
13464 cat conftest.$ac_ext >&5
13465 cf_cv_func_nanosleep=no
13466 fi
13467 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13468 fi
13469 fi
13470 echo "$as_me:13470: result: $cf_cv_func_nanosleep" >&5
13471 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13472
13473 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13474 #define HAVE_NANOSLEEP 1
13475 EOF
13476
13477 for ac_header in \
13478 termio.h \
13479 termios.h \
13480 unistd.h \
13481
13482 do
13483 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13484 echo "$as_me:13484: checking for $ac_header" >&5
13485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13487   echo $ECHO_N "(cached) $ECHO_C" >&6
13488 else
13489   cat >conftest.$ac_ext <<_ACEOF
13490 #line 13490 "configure"
13491 #include "confdefs.h"
13492 #include <$ac_header>
13493 _ACEOF
13494 if { (eval echo "$as_me:13494: \"$ac_cpp conftest.$ac_ext\"") >&5
13495   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13496   ac_status=$?
13497   egrep -v '^ *\+' conftest.er1 >conftest.err
13498   rm -f conftest.er1
13499   cat conftest.err >&5
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); } >/dev/null; then
13502   if test -s conftest.err; then
13503     ac_cpp_err=$ac_c_preproc_warn_flag
13504   else
13505     ac_cpp_err=
13506   fi
13507 else
13508   ac_cpp_err=yes
13509 fi
13510 if test -z "$ac_cpp_err"; then
13511   eval "$as_ac_Header=yes"
13512 else
13513   echo "$as_me: failed program was:" >&5
13514   cat conftest.$ac_ext >&5
13515   eval "$as_ac_Header=no"
13516 fi
13517 rm -f conftest.err conftest.$ac_ext
13518 fi
13519 echo "$as_me:13519: result: `eval echo '${'$as_ac_Header'}'`" >&5
13520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13521 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13522   cat >>confdefs.h <<EOF
13523 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13524 EOF
13525
13526 fi
13527 done
13528
13529 if test "$ISC" = yes ; then
13530
13531 for ac_header in sys/termio.h
13532 do
13533 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13534 echo "$as_me:13534: checking for $ac_header" >&5
13535 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13536 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13537   echo $ECHO_N "(cached) $ECHO_C" >&6
13538 else
13539   cat >conftest.$ac_ext <<_ACEOF
13540 #line 13540 "configure"
13541 #include "confdefs.h"
13542 #include <$ac_header>
13543 _ACEOF
13544 if { (eval echo "$as_me:13544: \"$ac_cpp conftest.$ac_ext\"") >&5
13545   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13546   ac_status=$?
13547   egrep -v '^ *\+' conftest.er1 >conftest.err
13548   rm -f conftest.er1
13549   cat conftest.err >&5
13550   echo "$as_me:13550: \$? = $ac_status" >&5
13551   (exit $ac_status); } >/dev/null; then
13552   if test -s conftest.err; then
13553     ac_cpp_err=$ac_c_preproc_warn_flag
13554   else
13555     ac_cpp_err=
13556   fi
13557 else
13558   ac_cpp_err=yes
13559 fi
13560 if test -z "$ac_cpp_err"; then
13561   eval "$as_ac_Header=yes"
13562 else
13563   echo "$as_me: failed program was:" >&5
13564   cat conftest.$ac_ext >&5
13565   eval "$as_ac_Header=no"
13566 fi
13567 rm -f conftest.err conftest.$ac_ext
13568 fi
13569 echo "$as_me:13569: result: `eval echo '${'$as_ac_Header'}'`" >&5
13570 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13571 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13572   cat >>confdefs.h <<EOF
13573 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13574 EOF
13575
13576 fi
13577 done
13578
13579 fi
13580 if test "$ac_cv_header_termios_h" = yes ; then
13581         case "$CFLAGS $CPPFLAGS" in
13582         *-D_POSIX_SOURCE*)
13583                 termios_bad=dunno ;;
13584         *)      termios_bad=maybe ;;
13585         esac
13586         if test "$termios_bad" = maybe ; then
13587         echo "$as_me:13587: checking whether termios.h needs _POSIX_SOURCE" >&5
13588 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13589         cat >conftest.$ac_ext <<_ACEOF
13590 #line 13590 "configure"
13591 #include "confdefs.h"
13592 #include <termios.h>
13593 int
13594 main ()
13595 {
13596 struct termios foo; int x = foo.c_iflag
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 rm -f conftest.$ac_objext
13602 if { (eval echo "$as_me:13602: \"$ac_compile\"") >&5
13603   (eval $ac_compile) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit $ac_status); } &&
13607          { ac_try='test -s conftest.$ac_objext'
13608   { (eval echo "$as_me:13608: \"$ac_try\"") >&5
13609   (eval $ac_try) 2>&5
13610   ac_status=$?
13611   echo "$as_me:13611: \$? = $ac_status" >&5
13612   (exit $ac_status); }; }; then
13613   termios_bad=no
13614 else
13615   echo "$as_me: failed program was:" >&5
13616 cat conftest.$ac_ext >&5
13617
13618                 cat >conftest.$ac_ext <<_ACEOF
13619 #line 13619 "configure"
13620 #include "confdefs.h"
13621
13622 #define _POSIX_SOURCE
13623 #include <termios.h>
13624 int
13625 main ()
13626 {
13627 struct termios foo; int x = foo.c_iflag
13628   ;
13629   return 0;
13630 }
13631 _ACEOF
13632 rm -f conftest.$ac_objext
13633 if { (eval echo "$as_me:13633: \"$ac_compile\"") >&5
13634   (eval $ac_compile) 2>&5
13635   ac_status=$?
13636   echo "$as_me:13636: \$? = $ac_status" >&5
13637   (exit $ac_status); } &&
13638          { ac_try='test -s conftest.$ac_objext'
13639   { (eval echo "$as_me:13639: \"$ac_try\"") >&5
13640   (eval $ac_try) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit $ac_status); }; }; then
13644   termios_bad=unknown
13645 else
13646   echo "$as_me: failed program was:" >&5
13647 cat conftest.$ac_ext >&5
13648 termios_bad=yes cat >>confdefs.h <<\EOF
13649 #define SVR4_TERMIO 1
13650 EOF
13651
13652 fi
13653 rm -f conftest.$ac_objext conftest.$ac_ext
13654
13655 fi
13656 rm -f conftest.$ac_objext conftest.$ac_ext
13657         echo "$as_me:13657: result: $termios_bad" >&5
13658 echo "${ECHO_T}$termios_bad" >&6
13659         fi
13660 fi
13661
13662 echo "$as_me:13662: checking for tcgetattr" >&5
13663 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13664 if test "${cf_cv_have_tcgetattr+set}" = set; then
13665   echo $ECHO_N "(cached) $ECHO_C" >&6
13666 else
13667
13668 cat >conftest.$ac_ext <<_ACEOF
13669 #line 13669 "configure"
13670 #include "confdefs.h"
13671
13672 #include <sys/types.h>
13673 #ifdef HAVE_UNISTD_H
13674 #include <unistd.h>
13675 #endif
13676 #ifdef HAVE_TERMIOS_H
13677 #include <termios.h>
13678 #define TTY struct termios
13679 #else
13680 #ifdef HAVE_TERMIO_H
13681 #include <termio.h>
13682 #define TTY struct termio
13683 #endif
13684 #endif
13685
13686 int
13687 main ()
13688 {
13689
13690 TTY foo;
13691 tcgetattr(1, &foo);
13692   ;
13693   return 0;
13694 }
13695 _ACEOF
13696 rm -f conftest.$ac_objext conftest$ac_exeext
13697 if { (eval echo "$as_me:13697: \"$ac_link\"") >&5
13698   (eval $ac_link) 2>&5
13699   ac_status=$?
13700   echo "$as_me:13700: \$? = $ac_status" >&5
13701   (exit $ac_status); } &&
13702          { ac_try='test -s conftest$ac_exeext'
13703   { (eval echo "$as_me:13703: \"$ac_try\"") >&5
13704   (eval $ac_try) 2>&5
13705   ac_status=$?
13706   echo "$as_me:13706: \$? = $ac_status" >&5
13707   (exit $ac_status); }; }; then
13708   cf_cv_have_tcgetattr=yes
13709 else
13710   echo "$as_me: failed program was:" >&5
13711 cat conftest.$ac_ext >&5
13712 cf_cv_have_tcgetattr=no
13713 fi
13714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13715 fi
13716 echo "$as_me:13716: result: $cf_cv_have_tcgetattr" >&5
13717 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13718 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13719 #define HAVE_TCGETATTR 1
13720 EOF
13721
13722 echo "$as_me:13722: checking for vsscanf function or workaround" >&5
13723 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13724 if test "${cf_cv_func_vsscanf+set}" = set; then
13725   echo $ECHO_N "(cached) $ECHO_C" >&6
13726 else
13727
13728 cat >conftest.$ac_ext <<_ACEOF
13729 #line 13729 "configure"
13730 #include "confdefs.h"
13731
13732 #include <stdarg.h>
13733 #include <stdio.h>
13734 int
13735 main ()
13736 {
13737
13738         va_list ap;
13739         vsscanf("from", "%d", ap)
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f conftest.$ac_objext conftest$ac_exeext
13745 if { (eval echo "$as_me:13745: \"$ac_link\"") >&5
13746   (eval $ac_link) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -s conftest$ac_exeext'
13751   { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   cf_cv_func_vsscanf=vsscanf
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13760
13761 cat >conftest.$ac_ext <<_ACEOF
13762 #line 13762 "configure"
13763 #include "confdefs.h"
13764
13765 #include <stdarg.h>
13766 #include <stdio.h>
13767 int
13768 main ()
13769 {
13770
13771     FILE strbuf;
13772     char *str = "from";
13773
13774     strbuf._flag = _IOREAD;
13775     strbuf._ptr = strbuf._base = (unsigned char *) str;
13776     strbuf._cnt = strlen(str);
13777     strbuf._file = _NFILE;
13778     return (vfscanf(&strbuf, "%d", ap))
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f conftest.$ac_objext conftest$ac_exeext
13784 if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
13785   (eval $ac_link) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); } &&
13789          { ac_try='test -s conftest$ac_exeext'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   cf_cv_func_vsscanf=vfscanf
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 cat conftest.$ac_ext >&5
13799
13800 cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803
13804 #include <stdarg.h>
13805 #include <stdio.h>
13806 int
13807 main ()
13808 {
13809
13810     FILE strbuf;
13811     char *str = "from";
13812
13813     strbuf._flag = _IOREAD;
13814     strbuf._ptr = strbuf._base = (unsigned char *) str;
13815     strbuf._cnt = strlen(str);
13816     strbuf._file = _NFILE;
13817     return (_doscan(&strbuf, "%d", ap))
13818   ;
13819   return 0;
13820 }
13821 _ACEOF
13822 rm -f conftest.$ac_objext conftest$ac_exeext
13823 if { (eval echo "$as_me:13823: \"$ac_link\"") >&5
13824   (eval $ac_link) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit $ac_status); } &&
13828          { ac_try='test -s conftest$ac_exeext'
13829   { (eval echo "$as_me:13829: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:13832: \$? = $ac_status" >&5
13833   (exit $ac_status); }; }; then
13834   cf_cv_func_vsscanf=_doscan
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 cat conftest.$ac_ext >&5
13838
13839 cf_cv_func_vsscanf=no
13840 fi
13841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13842 fi
13843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13844 fi
13845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13846 fi
13847 echo "$as_me:13847: result: $cf_cv_func_vsscanf" >&5
13848 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13849
13850 case $cf_cv_func_vsscanf in #(vi
13851 vsscanf) cat >>confdefs.h <<\EOF
13852 #define HAVE_VSSCANF 1
13853 EOF
13854 ;; #(vi
13855 vfscanf) cat >>confdefs.h <<\EOF
13856 #define HAVE_VFSCANF 1
13857 EOF
13858 ;; #(vi
13859 _doscan) cat >>confdefs.h <<\EOF
13860 #define HAVE__DOSCAN 1
13861 EOF
13862 ;;
13863 esac
13864
13865 echo "$as_me:13865: checking for working mkstemp" >&5
13866 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13867 if test "${cf_cv_func_mkstemp+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870
13871 rm -f conftest*
13872 if test "$cross_compiling" = yes; then
13873   echo "$as_me:13873: checking for mkstemp" >&5
13874 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13875 if test "${ac_cv_func_mkstemp+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878   cat >conftest.$ac_ext <<_ACEOF
13879 #line 13879 "configure"
13880 #include "confdefs.h"
13881 /* System header to define __stub macros and hopefully few prototypes,
13882     which can conflict with char mkstemp (); below.  */
13883 #include <assert.h>
13884 /* Override any gcc2 internal prototype to avoid an error.  */
13885 #ifdef __cplusplus
13886 extern "C"
13887 #endif
13888 /* We use char because int might match the return type of a gcc2
13889    builtin and then its argument prototype would still apply.  */
13890 char mkstemp ();
13891 char (*f) ();
13892
13893 int
13894 main ()
13895 {
13896 /* The GNU C library defines this for functions which it implements
13897     to always fail with ENOSYS.  Some functions are actually named
13898     something starting with __ and the normal name is an alias.  */
13899 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13900 choke me
13901 #else
13902 f = mkstemp;
13903 #endif
13904
13905   ;
13906   return 0;
13907 }
13908 _ACEOF
13909 rm -f conftest.$ac_objext conftest$ac_exeext
13910 if { (eval echo "$as_me:13910: \"$ac_link\"") >&5
13911   (eval $ac_link) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit $ac_status); } &&
13915          { ac_try='test -s conftest$ac_exeext'
13916   { (eval echo "$as_me:13916: \"$ac_try\"") >&5
13917   (eval $ac_try) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit $ac_status); }; }; then
13921   ac_cv_func_mkstemp=yes
13922 else
13923   echo "$as_me: failed program was:" >&5
13924 cat conftest.$ac_ext >&5
13925 ac_cv_func_mkstemp=no
13926 fi
13927 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13928 fi
13929 echo "$as_me:13929: result: $ac_cv_func_mkstemp" >&5
13930 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13931
13932 else
13933   cat >conftest.$ac_ext <<_ACEOF
13934 #line 13934 "configure"
13935 #include "confdefs.h"
13936
13937 #include <sys/types.h>
13938 #include <stdlib.h>
13939 #include <stdio.h>
13940 #include <string.h>
13941 #include <sys/stat.h>
13942 int main()
13943 {
13944         char *tmpl = "conftestXXXXXX";
13945         char name[2][80];
13946         int n;
13947         int result = 0;
13948         int fd;
13949         struct stat sb;
13950
13951         umask(077);
13952         for (n = 0; n < 2; ++n) {
13953                 strcpy(name[n], tmpl);
13954                 if ((fd = mkstemp(name[n])) >= 0) {
13955                         if (!strcmp(name[n], tmpl)
13956                          || stat(name[n], &sb) != 0
13957                          || (sb.st_mode & S_IFMT) != S_IFREG
13958                          || (sb.st_mode & 077) != 0) {
13959                                 result = 1;
13960                         }
13961                         close(fd);
13962                 }
13963         }
13964         if (result == 0
13965          && !strcmp(name[0], name[1]))
13966                 result = 1;
13967         ${cf_cv_main_return:-return}(result);
13968 }
13969
13970 _ACEOF
13971 rm -f conftest$ac_exeext
13972 if { (eval echo "$as_me:13972: \"$ac_link\"") >&5
13973   (eval $ac_link) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13977   { (eval echo "$as_me:13977: \"$ac_try\"") >&5
13978   (eval $ac_try) 2>&5
13979   ac_status=$?
13980   echo "$as_me:13980: \$? = $ac_status" >&5
13981   (exit $ac_status); }; }; then
13982   cf_cv_func_mkstemp=yes
13983
13984 else
13985   echo "$as_me: program exited with status $ac_status" >&5
13986 echo "$as_me: failed program was:" >&5
13987 cat conftest.$ac_ext >&5
13988 cf_cv_func_mkstemp=no
13989
13990 fi
13991 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13992 fi
13993
13994 fi
13995 echo "$as_me:13995: result: $cf_cv_func_mkstemp" >&5
13996 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13997 if test "$cf_cv_func_mkstemp" = yes ; then
13998         cat >>confdefs.h <<\EOF
13999 #define HAVE_MKSTEMP 1
14000 EOF
14001
14002 fi
14003
14004 # setup for prototype of fallback for vsscanf()
14005
14006 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14007         HAVE_VSSCANF=1
14008 else
14009         HAVE_VSSCANF=0
14010 fi
14011
14012 if test "$cross_compiling" = yes ; then
14013         { echo "$as_me:14013: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14014 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14015 else
14016         echo "$as_me:14016: checking whether setvbuf arguments are reversed" >&5
14017 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14018 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14019   echo $ECHO_N "(cached) $ECHO_C" >&6
14020 else
14021   if test "$cross_compiling" = yes; then
14022   { { echo "$as_me:14022: error: cannot run test program while cross compiling" >&5
14023 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14024    { (exit 1); exit 1; }; }
14025 else
14026   cat >conftest.$ac_ext <<_ACEOF
14027 #line 14027 "configure"
14028 #include "confdefs.h"
14029 #include <stdio.h>
14030 /* If setvbuf has the reversed format, exit 0. */
14031 int
14032 main ()
14033 {
14034   /* This call has the arguments reversed.
14035      A reversed system may check and see that the address of main
14036      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14037   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14038     $ac_main_return(1);
14039   putc('\r', stdout);
14040   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14041 }
14042 _ACEOF
14043 rm -f conftest$ac_exeext
14044 if { (eval echo "$as_me:14044: \"$ac_link\"") >&5
14045   (eval $ac_link) 2>&5
14046   ac_status=$?
14047   echo "$as_me:14047: \$? = $ac_status" >&5
14048   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14049   { (eval echo "$as_me:14049: \"$ac_try\"") >&5
14050   (eval $ac_try) 2>&5
14051   ac_status=$?
14052   echo "$as_me:14052: \$? = $ac_status" >&5
14053   (exit $ac_status); }; }; then
14054   ac_cv_func_setvbuf_reversed=yes
14055 else
14056   echo "$as_me: program exited with status $ac_status" >&5
14057 echo "$as_me: failed program was:" >&5
14058 cat conftest.$ac_ext >&5
14059 ac_cv_func_setvbuf_reversed=no
14060 fi
14061 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14062 fi
14063 rm -f core core.* *.core
14064 fi
14065 echo "$as_me:14065: result: $ac_cv_func_setvbuf_reversed" >&5
14066 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14067 if test $ac_cv_func_setvbuf_reversed = yes; then
14068
14069 cat >>confdefs.h <<\EOF
14070 #define SETVBUF_REVERSED 1
14071 EOF
14072
14073 fi
14074
14075 fi
14076 echo "$as_me:14076: checking return type of signal handlers" >&5
14077 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14078 if test "${ac_cv_type_signal+set}" = set; then
14079   echo $ECHO_N "(cached) $ECHO_C" >&6
14080 else
14081   cat >conftest.$ac_ext <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084 #include <sys/types.h>
14085 #include <signal.h>
14086 #ifdef signal
14087 # undef signal
14088 #endif
14089 #ifdef __cplusplus
14090 extern "C" void (*signal (int, void (*)(int)))(int);
14091 #else
14092 void (*signal ()) ();
14093 #endif
14094
14095 int
14096 main ()
14097 {
14098 int i;
14099   ;
14100   return 0;
14101 }
14102 _ACEOF
14103 rm -f conftest.$ac_objext
14104 if { (eval echo "$as_me:14104: \"$ac_compile\"") >&5
14105   (eval $ac_compile) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } &&
14109          { ac_try='test -s conftest.$ac_objext'
14110   { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111   (eval $ac_try) 2>&5
14112   ac_status=$?
14113   echo "$as_me:14113: \$? = $ac_status" >&5
14114   (exit $ac_status); }; }; then
14115   ac_cv_type_signal=void
14116 else
14117   echo "$as_me: failed program was:" >&5
14118 cat conftest.$ac_ext >&5
14119 ac_cv_type_signal=int
14120 fi
14121 rm -f conftest.$ac_objext conftest.$ac_ext
14122 fi
14123 echo "$as_me:14123: result: $ac_cv_type_signal" >&5
14124 echo "${ECHO_T}$ac_cv_type_signal" >&6
14125
14126 cat >>confdefs.h <<EOF
14127 #define RETSIGTYPE $ac_cv_type_signal
14128 EOF
14129
14130 echo "$as_me:14130: checking for type sigaction_t" >&5
14131 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14132 if test "${cf_cv_type_sigaction+set}" = set; then
14133   echo $ECHO_N "(cached) $ECHO_C" >&6
14134 else
14135
14136         cat >conftest.$ac_ext <<_ACEOF
14137 #line 14137 "configure"
14138 #include "confdefs.h"
14139
14140 #include <signal.h>
14141 int
14142 main ()
14143 {
14144 sigaction_t x
14145   ;
14146   return 0;
14147 }
14148 _ACEOF
14149 rm -f conftest.$ac_objext
14150 if { (eval echo "$as_me:14150: \"$ac_compile\"") >&5
14151   (eval $ac_compile) 2>&5
14152   ac_status=$?
14153   echo "$as_me:14153: \$? = $ac_status" >&5
14154   (exit $ac_status); } &&
14155          { ac_try='test -s conftest.$ac_objext'
14156   { (eval echo "$as_me:14156: \"$ac_try\"") >&5
14157   (eval $ac_try) 2>&5
14158   ac_status=$?
14159   echo "$as_me:14159: \$? = $ac_status" >&5
14160   (exit $ac_status); }; }; then
14161   cf_cv_type_sigaction=yes
14162 else
14163   echo "$as_me: failed program was:" >&5
14164 cat conftest.$ac_ext >&5
14165 cf_cv_type_sigaction=no
14166 fi
14167 rm -f conftest.$ac_objext conftest.$ac_ext
14168 fi
14169
14170 echo "$as_me:14170: result: $cf_cv_type_sigaction" >&5
14171 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14172 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14173 #define HAVE_TYPE_SIGACTION 1
14174 EOF
14175
14176 echo "$as_me:14176: checking declaration of size-change" >&5
14177 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14178 if test "${cf_cv_sizechange+set}" = set; then
14179   echo $ECHO_N "(cached) $ECHO_C" >&6
14180 else
14181
14182     cf_cv_sizechange=unknown
14183     cf_save_CPPFLAGS="$CPPFLAGS"
14184
14185 for cf_opts in "" "NEED_PTEM_H"
14186 do
14187
14188     CPPFLAGS="$cf_save_CPPFLAGS"
14189     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14190     cat >conftest.$ac_ext <<_ACEOF
14191 #line 14191 "configure"
14192 #include "confdefs.h"
14193 #include <sys/types.h>
14194 #ifdef HAVE_TERMIOS_H
14195 #include <termios.h>
14196 #else
14197 #ifdef HAVE_TERMIO_H
14198 #include <termio.h>
14199 #endif
14200 #endif
14201 #ifdef NEED_PTEM_H
14202 /* This is a workaround for SCO:  they neglected to define struct winsize in
14203  * termios.h -- it's only in termio.h and ptem.h
14204  */
14205 #include        <sys/stream.h>
14206 #include        <sys/ptem.h>
14207 #endif
14208 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14209 #include <sys/ioctl.h>
14210 #endif
14211
14212 int
14213 main ()
14214 {
14215
14216 #ifdef TIOCGSIZE
14217         struct ttysize win;     /* FIXME: what system is this? */
14218         int y = win.ts_lines;
14219         int x = win.ts_cols;
14220 #else
14221 #ifdef TIOCGWINSZ
14222         struct winsize win;
14223         int y = win.ws_row;
14224         int x = win.ws_col;
14225 #else
14226         no TIOCGSIZE or TIOCGWINSZ
14227 #endif /* TIOCGWINSZ */
14228 #endif /* TIOCGSIZE */
14229
14230   ;
14231   return 0;
14232 }
14233 _ACEOF
14234 rm -f conftest.$ac_objext
14235 if { (eval echo "$as_me:14235: \"$ac_compile\"") >&5
14236   (eval $ac_compile) 2>&5
14237   ac_status=$?
14238   echo "$as_me:14238: \$? = $ac_status" >&5
14239   (exit $ac_status); } &&
14240          { ac_try='test -s conftest.$ac_objext'
14241   { (eval echo "$as_me:14241: \"$ac_try\"") >&5
14242   (eval $ac_try) 2>&5
14243   ac_status=$?
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit $ac_status); }; }; then
14246   cf_cv_sizechange=yes
14247 else
14248   echo "$as_me: failed program was:" >&5
14249 cat conftest.$ac_ext >&5
14250 cf_cv_sizechange=no
14251 fi
14252 rm -f conftest.$ac_objext conftest.$ac_ext
14253
14254         CPPFLAGS="$cf_save_CPPFLAGS"
14255         if test "$cf_cv_sizechange" = yes ; then
14256                 echo "size-change succeeded ($cf_opts)" >&5
14257                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14258                 break
14259         fi
14260 done
14261
14262 fi
14263 echo "$as_me:14263: result: $cf_cv_sizechange" >&5
14264 echo "${ECHO_T}$cf_cv_sizechange" >&6
14265 if test "$cf_cv_sizechange" != no ; then
14266         cat >>confdefs.h <<\EOF
14267 #define HAVE_SIZECHANGE 1
14268 EOF
14269
14270         case $cf_cv_sizechange in #(vi
14271         NEED*)
14272                 cat >>confdefs.h <<EOF
14273 #define $cf_cv_sizechange  1
14274 EOF
14275
14276                 ;;
14277         esac
14278 fi
14279
14280 echo "$as_me:14280: checking for memmove" >&5
14281 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14282 if test "${ac_cv_func_memmove+set}" = set; then
14283   echo $ECHO_N "(cached) $ECHO_C" >&6
14284 else
14285   cat >conftest.$ac_ext <<_ACEOF
14286 #line 14286 "configure"
14287 #include "confdefs.h"
14288 /* System header to define __stub macros and hopefully few prototypes,
14289     which can conflict with char memmove (); below.  */
14290 #include <assert.h>
14291 /* Override any gcc2 internal prototype to avoid an error.  */
14292 #ifdef __cplusplus
14293 extern "C"
14294 #endif
14295 /* We use char because int might match the return type of a gcc2
14296    builtin and then its argument prototype would still apply.  */
14297 char memmove ();
14298 char (*f) ();
14299
14300 int
14301 main ()
14302 {
14303 /* The GNU C library defines this for functions which it implements
14304     to always fail with ENOSYS.  Some functions are actually named
14305     something starting with __ and the normal name is an alias.  */
14306 #if defined (__stub_memmove) || defined (__stub___memmove)
14307 choke me
14308 #else
14309 f = memmove;
14310 #endif
14311
14312   ;
14313   return 0;
14314 }
14315 _ACEOF
14316 rm -f conftest.$ac_objext conftest$ac_exeext
14317 if { (eval echo "$as_me:14317: \"$ac_link\"") >&5
14318   (eval $ac_link) 2>&5
14319   ac_status=$?
14320   echo "$as_me:14320: \$? = $ac_status" >&5
14321   (exit $ac_status); } &&
14322          { ac_try='test -s conftest$ac_exeext'
14323   { (eval echo "$as_me:14323: \"$ac_try\"") >&5
14324   (eval $ac_try) 2>&5
14325   ac_status=$?
14326   echo "$as_me:14326: \$? = $ac_status" >&5
14327   (exit $ac_status); }; }; then
14328   ac_cv_func_memmove=yes
14329 else
14330   echo "$as_me: failed program was:" >&5
14331 cat conftest.$ac_ext >&5
14332 ac_cv_func_memmove=no
14333 fi
14334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14335 fi
14336 echo "$as_me:14336: result: $ac_cv_func_memmove" >&5
14337 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14338 if test $ac_cv_func_memmove = yes; then
14339   :
14340 else
14341
14342 echo "$as_me:14342: checking for bcopy" >&5
14343 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14344 if test "${ac_cv_func_bcopy+set}" = set; then
14345   echo $ECHO_N "(cached) $ECHO_C" >&6
14346 else
14347   cat >conftest.$ac_ext <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14350 /* System header to define __stub macros and hopefully few prototypes,
14351     which can conflict with char bcopy (); below.  */
14352 #include <assert.h>
14353 /* Override any gcc2 internal prototype to avoid an error.  */
14354 #ifdef __cplusplus
14355 extern "C"
14356 #endif
14357 /* We use char because int might match the return type of a gcc2
14358    builtin and then its argument prototype would still apply.  */
14359 char bcopy ();
14360 char (*f) ();
14361
14362 int
14363 main ()
14364 {
14365 /* The GNU C library defines this for functions which it implements
14366     to always fail with ENOSYS.  Some functions are actually named
14367     something starting with __ and the normal name is an alias.  */
14368 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14369 choke me
14370 #else
14371 f = bcopy;
14372 #endif
14373
14374   ;
14375   return 0;
14376 }
14377 _ACEOF
14378 rm -f conftest.$ac_objext conftest$ac_exeext
14379 if { (eval echo "$as_me:14379: \"$ac_link\"") >&5
14380   (eval $ac_link) 2>&5
14381   ac_status=$?
14382   echo "$as_me:14382: \$? = $ac_status" >&5
14383   (exit $ac_status); } &&
14384          { ac_try='test -s conftest$ac_exeext'
14385   { (eval echo "$as_me:14385: \"$ac_try\"") >&5
14386   (eval $ac_try) 2>&5
14387   ac_status=$?
14388   echo "$as_me:14388: \$? = $ac_status" >&5
14389   (exit $ac_status); }; }; then
14390   ac_cv_func_bcopy=yes
14391 else
14392   echo "$as_me: failed program was:" >&5
14393 cat conftest.$ac_ext >&5
14394 ac_cv_func_bcopy=no
14395 fi
14396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14397 fi
14398 echo "$as_me:14398: result: $ac_cv_func_bcopy" >&5
14399 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14400 if test $ac_cv_func_bcopy = yes; then
14401
14402         echo "$as_me:14402: checking if bcopy does overlapping moves" >&5
14403 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14404 if test "${cf_cv_good_bcopy+set}" = set; then
14405   echo $ECHO_N "(cached) $ECHO_C" >&6
14406 else
14407
14408                 if test "$cross_compiling" = yes; then
14409   cf_cv_good_bcopy=unknown
14410 else
14411   cat >conftest.$ac_ext <<_ACEOF
14412 #line 14412 "configure"
14413 #include "confdefs.h"
14414
14415 int main() {
14416         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14417         char temp[40];
14418         bcopy(data, temp, sizeof(data));
14419         bcopy(temp+10, temp, 15);
14420         bcopy(temp+5, temp+15, 10);
14421         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14422 }
14423
14424 _ACEOF
14425 rm -f conftest$ac_exeext
14426 if { (eval echo "$as_me:14426: \"$ac_link\"") >&5
14427   (eval $ac_link) 2>&5
14428   ac_status=$?
14429   echo "$as_me:14429: \$? = $ac_status" >&5
14430   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14431   { (eval echo "$as_me:14431: \"$ac_try\"") >&5
14432   (eval $ac_try) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); }; }; then
14436   cf_cv_good_bcopy=yes
14437 else
14438   echo "$as_me: program exited with status $ac_status" >&5
14439 echo "$as_me: failed program was:" >&5
14440 cat conftest.$ac_ext >&5
14441 cf_cv_good_bcopy=no
14442 fi
14443 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14444 fi
14445
14446 fi
14447 echo "$as_me:14447: result: $cf_cv_good_bcopy" >&5
14448 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14449
14450 else
14451   cf_cv_good_bcopy=no
14452 fi
14453
14454         if test "$cf_cv_good_bcopy" = yes ; then
14455                 cat >>confdefs.h <<\EOF
14456 #define USE_OK_BCOPY 1
14457 EOF
14458
14459         else
14460                 cat >>confdefs.h <<\EOF
14461 #define USE_MY_MEMMOVE 1
14462 EOF
14463
14464         fi
14465
14466 fi
14467
14468 echo "$as_me:14468: checking if poll really works" >&5
14469 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14470 if test "${cf_cv_working_poll+set}" = set; then
14471   echo $ECHO_N "(cached) $ECHO_C" >&6
14472 else
14473
14474 if test "$cross_compiling" = yes; then
14475   cf_cv_working_poll=unknown
14476 else
14477   cat >conftest.$ac_ext <<_ACEOF
14478 #line 14478 "configure"
14479 #include "confdefs.h"
14480
14481 #include <stdio.h>
14482 #ifdef HAVE_POLL_H
14483 #include <poll.h>
14484 #else
14485 #include <sys/poll.h>
14486 #endif
14487 int main() {
14488         struct pollfd myfds;
14489         int ret;
14490
14491         myfds.fd = 0;
14492         myfds.events = POLLIN;
14493
14494         ret = poll(&myfds, 1, 100);
14495         ${cf_cv_main_return:-return}(ret != 0);
14496 }
14497 _ACEOF
14498 rm -f conftest$ac_exeext
14499 if { (eval echo "$as_me:14499: \"$ac_link\"") >&5
14500   (eval $ac_link) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14504   { (eval echo "$as_me:14504: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); }; }; then
14509   cf_cv_working_poll=yes
14510 else
14511   echo "$as_me: program exited with status $ac_status" >&5
14512 echo "$as_me: failed program was:" >&5
14513 cat conftest.$ac_ext >&5
14514 cf_cv_working_poll=no
14515 fi
14516 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14517 fi
14518 fi
14519 echo "$as_me:14519: result: $cf_cv_working_poll" >&5
14520 echo "${ECHO_T}$cf_cv_working_poll" >&6
14521 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14522 #define HAVE_WORKING_POLL 1
14523 EOF
14524
14525 # special check for test/ditto.c
14526
14527 echo "$as_me:14527: checking for openpty in -lutil" >&5
14528 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14529 if test "${ac_cv_lib_util_openpty+set}" = set; then
14530   echo $ECHO_N "(cached) $ECHO_C" >&6
14531 else
14532   ac_check_lib_save_LIBS=$LIBS
14533 LIBS="-lutil  $LIBS"
14534 cat >conftest.$ac_ext <<_ACEOF
14535 #line 14535 "configure"
14536 #include "confdefs.h"
14537
14538 /* Override any gcc2 internal prototype to avoid an error.  */
14539 #ifdef __cplusplus
14540 extern "C"
14541 #endif
14542 /* We use char because int might match the return type of a gcc2
14543    builtin and then its argument prototype would still apply.  */
14544 char openpty ();
14545 int
14546 main ()
14547 {
14548 openpty ();
14549   ;
14550   return 0;
14551 }
14552 _ACEOF
14553 rm -f conftest.$ac_objext conftest$ac_exeext
14554 if { (eval echo "$as_me:14554: \"$ac_link\"") >&5
14555   (eval $ac_link) 2>&5
14556   ac_status=$?
14557   echo "$as_me:14557: \$? = $ac_status" >&5
14558   (exit $ac_status); } &&
14559          { ac_try='test -s conftest$ac_exeext'
14560   { (eval echo "$as_me:14560: \"$ac_try\"") >&5
14561   (eval $ac_try) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit $ac_status); }; }; then
14565   ac_cv_lib_util_openpty=yes
14566 else
14567   echo "$as_me: failed program was:" >&5
14568 cat conftest.$ac_ext >&5
14569 ac_cv_lib_util_openpty=no
14570 fi
14571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14572 LIBS=$ac_check_lib_save_LIBS
14573 fi
14574 echo "$as_me:14574: result: $ac_cv_lib_util_openpty" >&5
14575 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14576 if test $ac_cv_lib_util_openpty = yes; then
14577   cf_cv_lib_util=yes
14578 else
14579   cf_cv_lib_util=no
14580 fi
14581
14582 echo "$as_me:14582: checking for openpty header" >&5
14583 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14584 if test "${cf_cv_func_openpty+set}" = set; then
14585   echo $ECHO_N "(cached) $ECHO_C" >&6
14586 else
14587
14588     cf_save_LIBS="$LIBS"
14589     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14590     for cf_header in pty.h libutil.h util.h
14591     do
14592     cat >conftest.$ac_ext <<_ACEOF
14593 #line 14593 "configure"
14594 #include "confdefs.h"
14595
14596 #include <$cf_header>
14597
14598 int
14599 main ()
14600 {
14601
14602     int x = openpty((int *)0, (int *)0, (char *)0,
14603                    (struct termios *)0, (struct winsize *)0);
14604
14605   ;
14606   return 0;
14607 }
14608 _ACEOF
14609 rm -f conftest.$ac_objext conftest$ac_exeext
14610 if { (eval echo "$as_me:14610: \"$ac_link\"") >&5
14611   (eval $ac_link) 2>&5
14612   ac_status=$?
14613   echo "$as_me:14613: \$? = $ac_status" >&5
14614   (exit $ac_status); } &&
14615          { ac_try='test -s conftest$ac_exeext'
14616   { (eval echo "$as_me:14616: \"$ac_try\"") >&5
14617   (eval $ac_try) 2>&5
14618   ac_status=$?
14619   echo "$as_me:14619: \$? = $ac_status" >&5
14620   (exit $ac_status); }; }; then
14621
14622         cf_cv_func_openpty=$cf_header
14623         break
14624
14625 else
14626   echo "$as_me: failed program was:" >&5
14627 cat conftest.$ac_ext >&5
14628
14629         cf_cv_func_openpty=no
14630
14631 fi
14632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14633     done
14634     LIBS="$cf_save_LIBS"
14635
14636 fi
14637 echo "$as_me:14637: result: $cf_cv_func_openpty" >&5
14638 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14639
14640 if test "$cf_cv_func_openpty" != no ; then
14641     cat >>confdefs.h <<EOF
14642 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14643 EOF
14644
14645     cat >>confdefs.h <<\EOF
14646 #define USE_XTERM_PTY 1
14647 EOF
14648
14649     if test "$cf_cv_lib_util" = yes ; then
14650         TEST_LIBS="-lutil $TEST_LIBS"
14651     fi
14652 fi
14653
14654 if test "$with_hashed_db" != no ; then
14655         cat >>confdefs.h <<\EOF
14656 #define USE_HASHED_DB 1
14657 EOF
14658
14659 case $with_hashed_db in #(vi
14660 yes|*able*) #(vi
14661     ;;
14662 *)
14663     if test -d "$with_hashed_db" ; then
14664
14665 if test -n "$with_hashed_db/include" ; then
14666   for cf_add_incdir in $with_hashed_db/include
14667   do
14668         while test $cf_add_incdir != /usr/include
14669         do
14670           if test -d $cf_add_incdir
14671           then
14672                 cf_have_incdir=no
14673                 if test -n "$CFLAGS$CPPFLAGS" ; then
14674                   # a loop is needed to ensure we can add subdirs of existing dirs
14675                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14676                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14677                           cf_have_incdir=yes; break
14678                         fi
14679                   done
14680                 fi
14681
14682                 if test "$cf_have_incdir" = no ; then
14683                   if test "$cf_add_incdir" = /usr/local/include ; then
14684                         if test "$GCC" = yes
14685                         then
14686                           cf_save_CPPFLAGS=$CPPFLAGS
14687                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14688                           cat >conftest.$ac_ext <<_ACEOF
14689 #line 14689 "configure"
14690 #include "confdefs.h"
14691 #include <stdio.h>
14692 int
14693 main ()
14694 {
14695 printf("Hello")
14696   ;
14697   return 0;
14698 }
14699 _ACEOF
14700 rm -f conftest.$ac_objext
14701 if { (eval echo "$as_me:14701: \"$ac_compile\"") >&5
14702   (eval $ac_compile) 2>&5
14703   ac_status=$?
14704   echo "$as_me:14704: \$? = $ac_status" >&5
14705   (exit $ac_status); } &&
14706          { ac_try='test -s conftest.$ac_objext'
14707   { (eval echo "$as_me:14707: \"$ac_try\"") >&5
14708   (eval $ac_try) 2>&5
14709   ac_status=$?
14710   echo "$as_me:14710: \$? = $ac_status" >&5
14711   (exit $ac_status); }; }; then
14712   :
14713 else
14714   echo "$as_me: failed program was:" >&5
14715 cat conftest.$ac_ext >&5
14716 cf_have_incdir=yes
14717 fi
14718 rm -f conftest.$ac_objext conftest.$ac_ext
14719                           CPPFLAGS=$cf_save_CPPFLAGS
14720                         fi
14721                   fi
14722                 fi
14723
14724                 if test "$cf_have_incdir" = no ; then
14725                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14726
14727 echo "${as_me-configure}:14727: testing adding $cf_add_incdir to include-path ..." 1>&5
14728
14729                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14730
14731                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14732                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14733                   cf_add_incdir="$cf_top_incdir"
14734                 else
14735                   break
14736                 fi
14737           fi
14738         done
14739   done
14740 fi
14741
14742 if test -n "$with_hashed_db/lib" ; then
14743   for cf_add_libdir in $with_hashed_db/lib
14744   do
14745     if test $cf_add_libdir = /usr/lib ; then
14746       :
14747     elif test -d $cf_add_libdir
14748     then
14749       cf_have_libdir=no
14750       if test -n "$LDFLAGS$LIBS" ; then
14751         # a loop is needed to ensure we can add subdirs of existing dirs
14752         for cf_test_libdir in $LDFLAGS $LIBS ; do
14753           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14754             cf_have_libdir=yes; break
14755           fi
14756         done
14757       fi
14758       if test "$cf_have_libdir" = no ; then
14759         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14760
14761 echo "${as_me-configure}:14761: testing adding $cf_add_libdir to library-path ..." 1>&5
14762
14763         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14764       fi
14765     fi
14766   done
14767 fi
14768
14769     fi
14770 esac
14771
14772 echo "$as_me:14772: checking for db.h" >&5
14773 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14774 if test "${ac_cv_header_db_h+set}" = set; then
14775   echo $ECHO_N "(cached) $ECHO_C" >&6
14776 else
14777   cat >conftest.$ac_ext <<_ACEOF
14778 #line 14778 "configure"
14779 #include "confdefs.h"
14780 #include <db.h>
14781 _ACEOF
14782 if { (eval echo "$as_me:14782: \"$ac_cpp conftest.$ac_ext\"") >&5
14783   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14784   ac_status=$?
14785   egrep -v '^ *\+' conftest.er1 >conftest.err
14786   rm -f conftest.er1
14787   cat conftest.err >&5
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } >/dev/null; then
14790   if test -s conftest.err; then
14791     ac_cpp_err=$ac_c_preproc_warn_flag
14792   else
14793     ac_cpp_err=
14794   fi
14795 else
14796   ac_cpp_err=yes
14797 fi
14798 if test -z "$ac_cpp_err"; then
14799   ac_cv_header_db_h=yes
14800 else
14801   echo "$as_me: failed program was:" >&5
14802   cat conftest.$ac_ext >&5
14803   ac_cv_header_db_h=no
14804 fi
14805 rm -f conftest.err conftest.$ac_ext
14806 fi
14807 echo "$as_me:14807: result: $ac_cv_header_db_h" >&5
14808 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14809 if test $ac_cv_header_db_h = yes; then
14810
14811 echo "$as_me:14811: checking for version of db" >&5
14812 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14813 if test "${cf_cv_hashed_db_version+set}" = set; then
14814   echo $ECHO_N "(cached) $ECHO_C" >&6
14815 else
14816
14817 cf_cv_hashed_db_version=unknown
14818
14819 for cf_db_version in 1 2 3 4 5
14820 do
14821
14822 echo "${as_me-configure}:14822: testing checking for db version $cf_db_version ..." 1>&5
14823
14824         cat >conftest.$ac_ext <<_ACEOF
14825 #line 14825 "configure"
14826 #include "confdefs.h"
14827
14828 $ac_includes_default
14829 #include <db.h>
14830
14831 #ifdef DB_VERSION_MAJOR
14832         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14833 #if $cf_db_version == DB_VERSION_MAJOR
14834         /* ok */
14835 #else
14836         make an error
14837 #endif
14838 #else
14839 #if $cf_db_version == 1
14840         /* ok: assuming this is DB 1.8.5 */
14841 #else
14842         make an error
14843 #endif
14844 #endif
14845
14846 int
14847 main ()
14848 {
14849 DBT *foo = 0
14850   ;
14851   return 0;
14852 }
14853 _ACEOF
14854 rm -f conftest.$ac_objext
14855 if { (eval echo "$as_me:14855: \"$ac_compile\"") >&5
14856   (eval $ac_compile) 2>&5
14857   ac_status=$?
14858   echo "$as_me:14858: \$? = $ac_status" >&5
14859   (exit $ac_status); } &&
14860          { ac_try='test -s conftest.$ac_objext'
14861   { (eval echo "$as_me:14861: \"$ac_try\"") >&5
14862   (eval $ac_try) 2>&5
14863   ac_status=$?
14864   echo "$as_me:14864: \$? = $ac_status" >&5
14865   (exit $ac_status); }; }; then
14866
14867         cf_cv_hashed_db_version=$cf_db_version
14868         break
14869
14870 else
14871   echo "$as_me: failed program was:" >&5
14872 cat conftest.$ac_ext >&5
14873 fi
14874 rm -f conftest.$ac_objext conftest.$ac_ext
14875 done
14876
14877 fi
14878 echo "$as_me:14878: result: $cf_cv_hashed_db_version" >&5
14879 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14880
14881 if test "$cf_cv_hashed_db_version" = unknown ; then
14882         { { echo "$as_me:14882: error: Cannot determine version of db" >&5
14883 echo "$as_me: error: Cannot determine version of db" >&2;}
14884    { (exit 1); exit 1; }; }
14885 else
14886
14887 echo "$as_me:14887: checking for db libraries" >&5
14888 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14889 if test "${cf_cv_hashed_db_libs+set}" = set; then
14890   echo $ECHO_N "(cached) $ECHO_C" >&6
14891 else
14892
14893 cf_cv_hashed_db_libs=unknown
14894 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14895 do
14896         cf_save_libs="$LIBS"
14897         if test -n "$cf_db_libs"; then
14898                 LIBS="-l$cf_db_libs $LIBS"
14899         fi
14900
14901 echo "${as_me-configure}:14901: testing checking for library "$cf_db_libs" ..." 1>&5
14902
14903         cat >conftest.$ac_ext <<_ACEOF
14904 #line 14904 "configure"
14905 #include "confdefs.h"
14906
14907 $ac_includes_default
14908 #include <db.h>
14909
14910 int
14911 main ()
14912 {
14913
14914         char *path = "/tmp/foo";
14915 #ifdef DB_VERSION_MAJOR
14916 #if DB_VERSION_MAJOR >= 4
14917         DB *result = 0;
14918         db_create(&result, NULL, 0);
14919         result->open(result,
14920                 NULL,
14921                 path,
14922                 path,
14923                 DB_HASH,
14924                 DB_CREATE,
14925                 0644);
14926 #elif DB_VERSION_MAJOR >= 3
14927         DB *result = 0;
14928         db_create(&result, NULL, 0);
14929         result->open(result,
14930                 path,
14931                 path,
14932                 DB_HASH,
14933                 DB_CREATE,
14934                 0644);
14935 #elif DB_VERSION_MAJOR >= 2
14936         DB *result = 0;
14937         db_open(path,
14938                 DB_HASH,
14939                 DB_CREATE,
14940                 0644,
14941                 (DB_ENV *) 0,
14942                 (DB_INFO *) 0,
14943                 &result);
14944 #endif /* DB_VERSION_MAJOR */
14945 #else
14946         DB *result = dbopen(path,
14947                      2,
14948                      0644,
14949                      DB_HASH,
14950                      0);
14951 #endif
14952         ${cf_cv_main_return:-return}(result != 0)
14953
14954   ;
14955   return 0;
14956 }
14957 _ACEOF
14958 rm -f conftest.$ac_objext conftest$ac_exeext
14959 if { (eval echo "$as_me:14959: \"$ac_link\"") >&5
14960   (eval $ac_link) 2>&5
14961   ac_status=$?
14962   echo "$as_me:14962: \$? = $ac_status" >&5
14963   (exit $ac_status); } &&
14964          { ac_try='test -s conftest$ac_exeext'
14965   { (eval echo "$as_me:14965: \"$ac_try\"") >&5
14966   (eval $ac_try) 2>&5
14967   ac_status=$?
14968   echo "$as_me:14968: \$? = $ac_status" >&5
14969   (exit $ac_status); }; }; then
14970
14971         if test -n "$cf_db_libs" ; then
14972                 cf_cv_hashed_db_libs=$cf_db_libs
14973         else
14974                 cf_cv_hashed_db_libs=default
14975         fi
14976         LIBS="$cf_save_libs"
14977         break
14978
14979 else
14980   echo "$as_me: failed program was:" >&5
14981 cat conftest.$ac_ext >&5
14982 fi
14983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14984         LIBS="$cf_save_libs"
14985 done
14986
14987 fi
14988 echo "$as_me:14988: result: $cf_cv_hashed_db_libs" >&5
14989 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14990
14991         if test "$cf_cv_hashed_db_libs" = unknown ; then
14992                 { { echo "$as_me:14992: error: Cannot determine library for db" >&5
14993 echo "$as_me: error: Cannot determine library for db" >&2;}
14994    { (exit 1); exit 1; }; }
14995         elif test "$cf_cv_hashed_db_libs" != default ; then
14996                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14997         fi
14998 fi
14999
15000 else
15001
15002         { { echo "$as_me:15002: error: Cannot find db.h" >&5
15003 echo "$as_me: error: Cannot find db.h" >&2;}
15004    { (exit 1); exit 1; }; }
15005
15006 fi
15007
15008 fi
15009
15010 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15011         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15012         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15013 fi
15014
15015 # Just in case, check if the C compiler has a bool type.
15016
15017 echo "$as_me:15017: checking if we should include stdbool.h" >&5
15018 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15019
15020 if test "${cf_cv_header_stdbool_h+set}" = set; then
15021   echo $ECHO_N "(cached) $ECHO_C" >&6
15022 else
15023
15024         cat >conftest.$ac_ext <<_ACEOF
15025 #line 15025 "configure"
15026 #include "confdefs.h"
15027
15028 int
15029 main ()
15030 {
15031 bool foo = false
15032   ;
15033   return 0;
15034 }
15035 _ACEOF
15036 rm -f conftest.$ac_objext
15037 if { (eval echo "$as_me:15037: \"$ac_compile\"") >&5
15038   (eval $ac_compile) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); } &&
15042          { ac_try='test -s conftest.$ac_objext'
15043   { (eval echo "$as_me:15043: \"$ac_try\"") >&5
15044   (eval $ac_try) 2>&5
15045   ac_status=$?
15046   echo "$as_me:15046: \$? = $ac_status" >&5
15047   (exit $ac_status); }; }; then
15048   cf_cv_header_stdbool_h=0
15049 else
15050   echo "$as_me: failed program was:" >&5
15051 cat conftest.$ac_ext >&5
15052 cat >conftest.$ac_ext <<_ACEOF
15053 #line 15053 "configure"
15054 #include "confdefs.h"
15055
15056 #ifndef __BEOS__
15057 #include <stdbool.h>
15058 #endif
15059
15060 int
15061 main ()
15062 {
15063 bool foo = false
15064   ;
15065   return 0;
15066 }
15067 _ACEOF
15068 rm -f conftest.$ac_objext
15069 if { (eval echo "$as_me:15069: \"$ac_compile\"") >&5
15070   (eval $ac_compile) 2>&5
15071   ac_status=$?
15072   echo "$as_me:15072: \$? = $ac_status" >&5
15073   (exit $ac_status); } &&
15074          { ac_try='test -s conftest.$ac_objext'
15075   { (eval echo "$as_me:15075: \"$ac_try\"") >&5
15076   (eval $ac_try) 2>&5
15077   ac_status=$?
15078   echo "$as_me:15078: \$? = $ac_status" >&5
15079   (exit $ac_status); }; }; then
15080   cf_cv_header_stdbool_h=1
15081 else
15082   echo "$as_me: failed program was:" >&5
15083 cat conftest.$ac_ext >&5
15084 cf_cv_header_stdbool_h=0
15085 fi
15086 rm -f conftest.$ac_objext conftest.$ac_ext
15087 fi
15088 rm -f conftest.$ac_objext conftest.$ac_ext
15089 fi
15090
15091 if test "$cf_cv_header_stdbool_h" = 1
15092 then    echo "$as_me:15092: result: yes" >&5
15093 echo "${ECHO_T}yes" >&6
15094 else    echo "$as_me:15094: result: no" >&5
15095 echo "${ECHO_T}no" >&6
15096 fi
15097
15098 echo "$as_me:15098: checking for builtin bool type" >&5
15099 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15100
15101 if test "${cf_cv_cc_bool_type+set}" = set; then
15102   echo $ECHO_N "(cached) $ECHO_C" >&6
15103 else
15104
15105         cat >conftest.$ac_ext <<_ACEOF
15106 #line 15106 "configure"
15107 #include "confdefs.h"
15108
15109 #include <stdio.h>
15110 #include <sys/types.h>
15111
15112 int
15113 main ()
15114 {
15115 bool x = false
15116   ;
15117   return 0;
15118 }
15119 _ACEOF
15120 rm -f conftest.$ac_objext
15121 if { (eval echo "$as_me:15121: \"$ac_compile\"") >&5
15122   (eval $ac_compile) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); } &&
15126          { ac_try='test -s conftest.$ac_objext'
15127   { (eval echo "$as_me:15127: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); }; }; then
15132   cf_cv_cc_bool_type=1
15133 else
15134   echo "$as_me: failed program was:" >&5
15135 cat conftest.$ac_ext >&5
15136 cf_cv_cc_bool_type=0
15137 fi
15138 rm -f conftest.$ac_objext conftest.$ac_ext
15139
15140 fi
15141
15142 if test "$cf_cv_cc_bool_type" = 1
15143 then    echo "$as_me:15143: result: yes" >&5
15144 echo "${ECHO_T}yes" >&6
15145 else    echo "$as_me:15145: result: no" >&5
15146 echo "${ECHO_T}no" >&6
15147 fi
15148
15149 # Check for C++ compiler characteristics (and ensure that it's there!)
15150 if test -n "$CXX" ; then
15151         ac_ext=cc
15152 ac_cpp='$CXXCPP $CPPFLAGS'
15153 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15154 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15155 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15156 ac_main_return=return
15157
15158 if test -n "$GXX" ; then
15159 case $cf_cv_system_name in #(vi
15160 os2*) #(vi
15161         cf_stdcpp_libname=stdcpp
15162         ;;
15163 *)
15164         cf_stdcpp_libname=stdc++
15165         ;;
15166 esac
15167 echo "$as_me:15167: checking for library $cf_stdcpp_libname" >&5
15168 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15169 if test "${cf_cv_libstdcpp+set}" = set; then
15170   echo $ECHO_N "(cached) $ECHO_C" >&6
15171 else
15172
15173         cf_save="$LIBS"
15174         LIBS="$LIBS -l$cf_stdcpp_libname"
15175 cat >conftest.$ac_ext <<_ACEOF
15176 #line 15176 "configure"
15177 #include "confdefs.h"
15178
15179 #include <strstream.h>
15180 int
15181 main ()
15182 {
15183
15184 char buf[80];
15185 strstreambuf foo(buf, sizeof(buf))
15186
15187   ;
15188   return 0;
15189 }
15190 _ACEOF
15191 rm -f conftest.$ac_objext conftest$ac_exeext
15192 if { (eval echo "$as_me:15192: \"$ac_link\"") >&5
15193   (eval $ac_link) 2>&5
15194   ac_status=$?
15195   echo "$as_me:15195: \$? = $ac_status" >&5
15196   (exit $ac_status); } &&
15197          { ac_try='test -s conftest$ac_exeext'
15198   { (eval echo "$as_me:15198: \"$ac_try\"") >&5
15199   (eval $ac_try) 2>&5
15200   ac_status=$?
15201   echo "$as_me:15201: \$? = $ac_status" >&5
15202   (exit $ac_status); }; }; then
15203   cf_cv_libstdcpp=yes
15204 else
15205   echo "$as_me: failed program was:" >&5
15206 cat conftest.$ac_ext >&5
15207 cf_cv_libstdcpp=no
15208 fi
15209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15210         LIBS="$cf_save"
15211
15212 fi
15213 echo "$as_me:15213: result: $cf_cv_libstdcpp" >&5
15214 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15215 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15216 fi
15217
15218         echo "$as_me:15218: checking whether $CXX understands -c and -o together" >&5
15219 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15220 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15221   echo $ECHO_N "(cached) $ECHO_C" >&6
15222 else
15223
15224 cat > conftest.$ac_ext <<CF_EOF
15225 #include <stdio.h>
15226 int main()
15227 {
15228         ${cf_cv_main_return:-return}(0);
15229 }
15230 CF_EOF
15231 # We do the test twice because some compilers refuse to overwrite an
15232 # existing .o file with -o, though they will create one.
15233 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15234 if { (eval echo "$as_me:15234: \"$ac_try\"") >&5
15235   (eval $ac_try) 2>&5
15236   ac_status=$?
15237   echo "$as_me:15237: \$? = $ac_status" >&5
15238   (exit $ac_status); } &&
15239   test -f conftest2.$ac_objext && { (eval echo "$as_me:15239: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit $ac_status); };
15244 then
15245   eval cf_cv_prog_CXX_c_o=yes
15246 else
15247   eval cf_cv_prog_CXX_c_o=no
15248 fi
15249 rm -f conftest*
15250
15251 fi
15252 if test $cf_cv_prog_CXX_c_o = yes; then
15253   echo "$as_me:15253: result: yes" >&5
15254 echo "${ECHO_T}yes" >&6
15255 else
15256   echo "$as_me:15256: result: no" >&5
15257 echo "${ECHO_T}no" >&6
15258 fi
15259
15260         case $GXX_VERSION in
15261         1*|2.0-6*)
15262                 cf_cxx_library=yes
15263                 ;;
15264         *-2.7*|2.7*)
15265
15266 cf_cxx_library=unknown
15267 case $cf_cv_system_name in #(vi
15268 os2*) #(vi
15269         cf_gpp_libname=gpp
15270         ;;
15271 *)
15272         cf_gpp_libname=g++
15273         ;;
15274 esac
15275 if test "$GXX" = yes; then
15276         echo "$as_me:15276: checking for lib$cf_gpp_libname" >&5
15277 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15278         cf_save="$LIBS"
15279         LIBS="$LIBS -l$cf_gpp_libname"
15280         cat >conftest.$ac_ext <<_ACEOF
15281 #line 15281 "configure"
15282 #include "confdefs.h"
15283
15284 #include <$cf_gpp_libname/builtin.h>
15285
15286 int
15287 main ()
15288 {
15289 two_arg_error_handler_t foo2 = lib_error_handler
15290   ;
15291   return 0;
15292 }
15293 _ACEOF
15294 rm -f conftest.$ac_objext conftest$ac_exeext
15295 if { (eval echo "$as_me:15295: \"$ac_link\"") >&5
15296   (eval $ac_link) 2>&5
15297   ac_status=$?
15298   echo "$as_me:15298: \$? = $ac_status" >&5
15299   (exit $ac_status); } &&
15300          { ac_try='test -s conftest$ac_exeext'
15301   { (eval echo "$as_me:15301: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:15304: \$? = $ac_status" >&5
15305   (exit $ac_status); }; }; then
15306   cf_cxx_library=yes
15307          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15308          if test "$cf_gpp_libname" = cpp ; then
15309             cat >>confdefs.h <<\EOF
15310 #define HAVE_GPP_BUILTIN_H 1
15311 EOF
15312
15313          else
15314             cat >>confdefs.h <<\EOF
15315 #define HAVE_GXX_BUILTIN_H 1
15316 EOF
15317
15318          fi
15319 else
15320   echo "$as_me: failed program was:" >&5
15321 cat conftest.$ac_ext >&5
15322 cat >conftest.$ac_ext <<_ACEOF
15323 #line 15323 "configure"
15324 #include "confdefs.h"
15325
15326 #include <builtin.h>
15327
15328 int
15329 main ()
15330 {
15331 two_arg_error_handler_t foo2 = lib_error_handler
15332   ;
15333   return 0;
15334 }
15335 _ACEOF
15336 rm -f conftest.$ac_objext conftest$ac_exeext
15337 if { (eval echo "$as_me:15337: \"$ac_link\"") >&5
15338   (eval $ac_link) 2>&5
15339   ac_status=$?
15340   echo "$as_me:15340: \$? = $ac_status" >&5
15341   (exit $ac_status); } &&
15342          { ac_try='test -s conftest$ac_exeext'
15343   { (eval echo "$as_me:15343: \"$ac_try\"") >&5
15344   (eval $ac_try) 2>&5
15345   ac_status=$?
15346   echo "$as_me:15346: \$? = $ac_status" >&5
15347   (exit $ac_status); }; }; then
15348   cf_cxx_library=yes
15349          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15350          cat >>confdefs.h <<\EOF
15351 #define HAVE_BUILTIN_H 1
15352 EOF
15353
15354 else
15355   echo "$as_me: failed program was:" >&5
15356 cat conftest.$ac_ext >&5
15357 cf_cxx_library=no
15358 fi
15359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15360 fi
15361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15362         LIBS="$cf_save"
15363         echo "$as_me:15363: result: $cf_cxx_library" >&5
15364 echo "${ECHO_T}$cf_cxx_library" >&6
15365 fi
15366
15367                 ;;
15368         *)
15369                 cf_cxx_library=no
15370                 ;;
15371         esac
15372
15373         ac_ext=cc
15374 ac_cpp='$CXXCPP $CPPFLAGS'
15375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15378 ac_main_return=return
15379 echo "$as_me:15379: checking how to run the C++ preprocessor" >&5
15380 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15381 if test -z "$CXXCPP"; then
15382   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385       # Double quotes because CXXCPP needs to be expanded
15386     for CXXCPP in "$CXX -E" "/lib/cpp"
15387     do
15388       ac_preproc_ok=false
15389 for ac_cxx_preproc_warn_flag in '' yes
15390 do
15391   # Use a header file that comes with gcc, so configuring glibc
15392   # with a fresh cross-compiler works.
15393   # On the NeXT, cc -E runs the code through the compiler's parser,
15394   # not just through cpp. "Syntax error" is here to catch this case.
15395   cat >conftest.$ac_ext <<_ACEOF
15396 #line 15396 "configure"
15397 #include "confdefs.h"
15398 #include <assert.h>
15399                      Syntax error
15400 _ACEOF
15401 if { (eval echo "$as_me:15401: \"$ac_cpp conftest.$ac_ext\"") >&5
15402   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15403   ac_status=$?
15404   egrep -v '^ *\+' conftest.er1 >conftest.err
15405   rm -f conftest.er1
15406   cat conftest.err >&5
15407   echo "$as_me:15407: \$? = $ac_status" >&5
15408   (exit $ac_status); } >/dev/null; then
15409   if test -s conftest.err; then
15410     ac_cpp_err=$ac_cxx_preproc_warn_flag
15411   else
15412     ac_cpp_err=
15413   fi
15414 else
15415   ac_cpp_err=yes
15416 fi
15417 if test -z "$ac_cpp_err"; then
15418   :
15419 else
15420   echo "$as_me: failed program was:" >&5
15421   cat conftest.$ac_ext >&5
15422   # Broken: fails on valid input.
15423 continue
15424 fi
15425 rm -f conftest.err conftest.$ac_ext
15426
15427   # OK, works on sane cases.  Now check whether non-existent headers
15428   # can be detected and how.
15429   cat >conftest.$ac_ext <<_ACEOF
15430 #line 15430 "configure"
15431 #include "confdefs.h"
15432 #include <ac_nonexistent.h>
15433 _ACEOF
15434 if { (eval echo "$as_me:15434: \"$ac_cpp conftest.$ac_ext\"") >&5
15435   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15436   ac_status=$?
15437   egrep -v '^ *\+' conftest.er1 >conftest.err
15438   rm -f conftest.er1
15439   cat conftest.err >&5
15440   echo "$as_me:15440: \$? = $ac_status" >&5
15441   (exit $ac_status); } >/dev/null; then
15442   if test -s conftest.err; then
15443     ac_cpp_err=$ac_cxx_preproc_warn_flag
15444   else
15445     ac_cpp_err=
15446   fi
15447 else
15448   ac_cpp_err=yes
15449 fi
15450 if test -z "$ac_cpp_err"; then
15451   # Broken: success on invalid input.
15452 continue
15453 else
15454   echo "$as_me: failed program was:" >&5
15455   cat conftest.$ac_ext >&5
15456   # Passes both tests.
15457 ac_preproc_ok=:
15458 break
15459 fi
15460 rm -f conftest.err conftest.$ac_ext
15461
15462 done
15463 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15464 rm -f conftest.err conftest.$ac_ext
15465 if $ac_preproc_ok; then
15466   break
15467 fi
15468
15469     done
15470     ac_cv_prog_CXXCPP=$CXXCPP
15471
15472 fi
15473   CXXCPP=$ac_cv_prog_CXXCPP
15474 else
15475   ac_cv_prog_CXXCPP=$CXXCPP
15476 fi
15477 echo "$as_me:15477: result: $CXXCPP" >&5
15478 echo "${ECHO_T}$CXXCPP" >&6
15479 ac_preproc_ok=false
15480 for ac_cxx_preproc_warn_flag in '' yes
15481 do
15482   # Use a header file that comes with gcc, so configuring glibc
15483   # with a fresh cross-compiler works.
15484   # On the NeXT, cc -E runs the code through the compiler's parser,
15485   # not just through cpp. "Syntax error" is here to catch this case.
15486   cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489 #include <assert.h>
15490                      Syntax error
15491 _ACEOF
15492 if { (eval echo "$as_me:15492: \"$ac_cpp conftest.$ac_ext\"") >&5
15493   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15494   ac_status=$?
15495   egrep -v '^ *\+' conftest.er1 >conftest.err
15496   rm -f conftest.er1
15497   cat conftest.err >&5
15498   echo "$as_me:15498: \$? = $ac_status" >&5
15499   (exit $ac_status); } >/dev/null; then
15500   if test -s conftest.err; then
15501     ac_cpp_err=$ac_cxx_preproc_warn_flag
15502   else
15503     ac_cpp_err=
15504   fi
15505 else
15506   ac_cpp_err=yes
15507 fi
15508 if test -z "$ac_cpp_err"; then
15509   :
15510 else
15511   echo "$as_me: failed program was:" >&5
15512   cat conftest.$ac_ext >&5
15513   # Broken: fails on valid input.
15514 continue
15515 fi
15516 rm -f conftest.err conftest.$ac_ext
15517
15518   # OK, works on sane cases.  Now check whether non-existent headers
15519   # can be detected and how.
15520   cat >conftest.$ac_ext <<_ACEOF
15521 #line 15521 "configure"
15522 #include "confdefs.h"
15523 #include <ac_nonexistent.h>
15524 _ACEOF
15525 if { (eval echo "$as_me:15525: \"$ac_cpp conftest.$ac_ext\"") >&5
15526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15527   ac_status=$?
15528   egrep -v '^ *\+' conftest.er1 >conftest.err
15529   rm -f conftest.er1
15530   cat conftest.err >&5
15531   echo "$as_me:15531: \$? = $ac_status" >&5
15532   (exit $ac_status); } >/dev/null; then
15533   if test -s conftest.err; then
15534     ac_cpp_err=$ac_cxx_preproc_warn_flag
15535   else
15536     ac_cpp_err=
15537   fi
15538 else
15539   ac_cpp_err=yes
15540 fi
15541 if test -z "$ac_cpp_err"; then
15542   # Broken: success on invalid input.
15543 continue
15544 else
15545   echo "$as_me: failed program was:" >&5
15546   cat conftest.$ac_ext >&5
15547   # Passes both tests.
15548 ac_preproc_ok=:
15549 break
15550 fi
15551 rm -f conftest.err conftest.$ac_ext
15552
15553 done
15554 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15555 rm -f conftest.err conftest.$ac_ext
15556 if $ac_preproc_ok; then
15557   :
15558 else
15559   { { echo "$as_me:15559: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15560 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15561    { (exit 1); exit 1; }; }
15562 fi
15563
15564 ac_ext=cc
15565 ac_cpp='$CXXCPP $CPPFLAGS'
15566 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15567 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15568 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15569 ac_main_return=return
15570
15571 for ac_header in iostream typeinfo
15572 do
15573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15574 echo "$as_me:15574: checking for $ac_header" >&5
15575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15577   echo $ECHO_N "(cached) $ECHO_C" >&6
15578 else
15579   cat >conftest.$ac_ext <<_ACEOF
15580 #line 15580 "configure"
15581 #include "confdefs.h"
15582 #include <$ac_header>
15583 _ACEOF
15584 if { (eval echo "$as_me:15584: \"$ac_cpp conftest.$ac_ext\"") >&5
15585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15586   ac_status=$?
15587   egrep -v '^ *\+' conftest.er1 >conftest.err
15588   rm -f conftest.er1
15589   cat conftest.err >&5
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); } >/dev/null; then
15592   if test -s conftest.err; then
15593     ac_cpp_err=$ac_cxx_preproc_warn_flag
15594   else
15595     ac_cpp_err=
15596   fi
15597 else
15598   ac_cpp_err=yes
15599 fi
15600 if test -z "$ac_cpp_err"; then
15601   eval "$as_ac_Header=yes"
15602 else
15603   echo "$as_me: failed program was:" >&5
15604   cat conftest.$ac_ext >&5
15605   eval "$as_ac_Header=no"
15606 fi
15607 rm -f conftest.err conftest.$ac_ext
15608 fi
15609 echo "$as_me:15609: result: `eval echo '${'$as_ac_Header'}'`" >&5
15610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15612   cat >>confdefs.h <<EOF
15613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15614 EOF
15615
15616 fi
15617 done
15618
15619     if test x"$ac_cv_header_iostream" = xyes ; then
15620         echo "$as_me:15620: checking if iostream uses std-namespace" >&5
15621 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15622         cat >conftest.$ac_ext <<_ACEOF
15623 #line 15623 "configure"
15624 #include "confdefs.h"
15625
15626 #include <iostream>
15627 using std::endl;
15628 using std::cerr;
15629 int
15630 main ()
15631 {
15632
15633 cerr << "testing" << endl;
15634
15635   ;
15636   return 0;
15637 }
15638 _ACEOF
15639 rm -f conftest.$ac_objext
15640 if { (eval echo "$as_me:15640: \"$ac_compile\"") >&5
15641   (eval $ac_compile) 2>&5
15642   ac_status=$?
15643   echo "$as_me:15643: \$? = $ac_status" >&5
15644   (exit $ac_status); } &&
15645          { ac_try='test -s conftest.$ac_objext'
15646   { (eval echo "$as_me:15646: \"$ac_try\"") >&5
15647   (eval $ac_try) 2>&5
15648   ac_status=$?
15649   echo "$as_me:15649: \$? = $ac_status" >&5
15650   (exit $ac_status); }; }; then
15651   cf_iostream_namespace=yes
15652 else
15653   echo "$as_me: failed program was:" >&5
15654 cat conftest.$ac_ext >&5
15655 cf_iostream_namespace=no
15656 fi
15657 rm -f conftest.$ac_objext conftest.$ac_ext
15658         echo "$as_me:15658: result: $cf_iostream_namespace" >&5
15659 echo "${ECHO_T}$cf_iostream_namespace" >&6
15660         if test "$cf_iostream_namespace" = yes ; then
15661             cat >>confdefs.h <<\EOF
15662 #define IOSTREAM_NAMESPACE 1
15663 EOF
15664
15665         fi
15666     fi
15667
15668 echo "$as_me:15668: checking if we should include stdbool.h" >&5
15669 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15670
15671 if test "${cf_cv_header_stdbool_h+set}" = set; then
15672   echo $ECHO_N "(cached) $ECHO_C" >&6
15673 else
15674
15675         cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 int
15680 main ()
15681 {
15682 bool foo = false
15683   ;
15684   return 0;
15685 }
15686 _ACEOF
15687 rm -f conftest.$ac_objext
15688 if { (eval echo "$as_me:15688: \"$ac_compile\"") >&5
15689   (eval $ac_compile) 2>&5
15690   ac_status=$?
15691   echo "$as_me:15691: \$? = $ac_status" >&5
15692   (exit $ac_status); } &&
15693          { ac_try='test -s conftest.$ac_objext'
15694   { (eval echo "$as_me:15694: \"$ac_try\"") >&5
15695   (eval $ac_try) 2>&5
15696   ac_status=$?
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit $ac_status); }; }; then
15699   cf_cv_header_stdbool_h=0
15700 else
15701   echo "$as_me: failed program was:" >&5
15702 cat conftest.$ac_ext >&5
15703 cat >conftest.$ac_ext <<_ACEOF
15704 #line 15704 "configure"
15705 #include "confdefs.h"
15706
15707 #ifndef __BEOS__
15708 #include <stdbool.h>
15709 #endif
15710
15711 int
15712 main ()
15713 {
15714 bool foo = false
15715   ;
15716   return 0;
15717 }
15718 _ACEOF
15719 rm -f conftest.$ac_objext
15720 if { (eval echo "$as_me:15720: \"$ac_compile\"") >&5
15721   (eval $ac_compile) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); } &&
15725          { ac_try='test -s conftest.$ac_objext'
15726   { (eval echo "$as_me:15726: \"$ac_try\"") >&5
15727   (eval $ac_try) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); }; }; then
15731   cf_cv_header_stdbool_h=1
15732 else
15733   echo "$as_me: failed program was:" >&5
15734 cat conftest.$ac_ext >&5
15735 cf_cv_header_stdbool_h=0
15736 fi
15737 rm -f conftest.$ac_objext conftest.$ac_ext
15738 fi
15739 rm -f conftest.$ac_objext conftest.$ac_ext
15740 fi
15741
15742 if test "$cf_cv_header_stdbool_h" = 1
15743 then    echo "$as_me:15743: result: yes" >&5
15744 echo "${ECHO_T}yes" >&6
15745 else    echo "$as_me:15745: result: no" >&5
15746 echo "${ECHO_T}no" >&6
15747 fi
15748
15749 echo "$as_me:15749: checking for builtin bool type" >&5
15750 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15751
15752 if test "${cf_cv_builtin_bool+set}" = set; then
15753   echo $ECHO_N "(cached) $ECHO_C" >&6
15754 else
15755
15756         cat >conftest.$ac_ext <<_ACEOF
15757 #line 15757 "configure"
15758 #include "confdefs.h"
15759
15760 #include <stdio.h>
15761 #include <sys/types.h>
15762
15763 int
15764 main ()
15765 {
15766 bool x = false
15767   ;
15768   return 0;
15769 }
15770 _ACEOF
15771 rm -f conftest.$ac_objext
15772 if { (eval echo "$as_me:15772: \"$ac_compile\"") >&5
15773   (eval $ac_compile) 2>&5
15774   ac_status=$?
15775   echo "$as_me:15775: \$? = $ac_status" >&5
15776   (exit $ac_status); } &&
15777          { ac_try='test -s conftest.$ac_objext'
15778   { (eval echo "$as_me:15778: \"$ac_try\"") >&5
15779   (eval $ac_try) 2>&5
15780   ac_status=$?
15781   echo "$as_me:15781: \$? = $ac_status" >&5
15782   (exit $ac_status); }; }; then
15783   cf_cv_builtin_bool=1
15784 else
15785   echo "$as_me: failed program was:" >&5
15786 cat conftest.$ac_ext >&5
15787 cf_cv_builtin_bool=0
15788 fi
15789 rm -f conftest.$ac_objext conftest.$ac_ext
15790
15791 fi
15792
15793 if test "$cf_cv_builtin_bool" = 1
15794 then    echo "$as_me:15794: result: yes" >&5
15795 echo "${ECHO_T}yes" >&6
15796 else    echo "$as_me:15796: result: no" >&5
15797 echo "${ECHO_T}no" >&6
15798 fi
15799
15800 echo "$as_me:15800: checking for size of bool" >&5
15801 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15802 if test "${cf_cv_type_of_bool+set}" = set; then
15803   echo $ECHO_N "(cached) $ECHO_C" >&6
15804 else
15805
15806         rm -f cf_test.out
15807         if test "$cross_compiling" = yes; then
15808   cf_cv_type_of_bool=unknown
15809 else
15810   cat >conftest.$ac_ext <<_ACEOF
15811 #line 15811 "configure"
15812 #include "confdefs.h"
15813
15814 #include <stdlib.h>
15815 #include <stdio.h>
15816
15817 #if defined(__cplusplus)
15818
15819 #ifdef HAVE_GXX_BUILTIN_H
15820 #include <g++/builtin.h>
15821 #elif HAVE_GPP_BUILTIN_H
15822 #include <gpp/builtin.h>
15823 #elif HAVE_BUILTIN_H
15824 #include <builtin.h>
15825 #endif
15826
15827 #else
15828
15829 #if $cf_cv_header_stdbool_h
15830 #include <stdbool.h>
15831 #endif
15832
15833 #endif
15834
15835 main()
15836 {
15837         FILE *fp = fopen("cf_test.out", "w");
15838         if (fp != 0) {
15839                 bool x = true;
15840                 if ((bool)(-x) >= 0)
15841                         fputs("unsigned ", fp);
15842                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15843                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15844                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15845                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15846                 fclose(fp);
15847         }
15848         ${cf_cv_main_return:-return}(0);
15849 }
15850
15851 _ACEOF
15852 rm -f conftest$ac_exeext
15853 if { (eval echo "$as_me:15853: \"$ac_link\"") >&5
15854   (eval $ac_link) 2>&5
15855   ac_status=$?
15856   echo "$as_me:15856: \$? = $ac_status" >&5
15857   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15858   { (eval echo "$as_me:15858: \"$ac_try\"") >&5
15859   (eval $ac_try) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); }; }; then
15863   cf_cv_type_of_bool=`cat cf_test.out`
15864                  if test -z "$cf_cv_type_of_bool"; then
15865                    cf_cv_type_of_bool=unknown
15866                  fi
15867 else
15868   echo "$as_me: program exited with status $ac_status" >&5
15869 echo "$as_me: failed program was:" >&5
15870 cat conftest.$ac_ext >&5
15871 cf_cv_type_of_bool=unknown
15872 fi
15873 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15874 fi
15875
15876 fi
15877
15878         rm -f cf_test.out
15879 echo "$as_me:15879: result: $cf_cv_type_of_bool" >&5
15880 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15881 if test "$cf_cv_type_of_bool" = unknown ; then
15882         case .$NCURSES_BOOL in #(vi
15883         .auto|.) NCURSES_BOOL=unsigned;;
15884         esac
15885         { echo "$as_me:15885: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15886 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15887         cf_cv_type_of_bool=$NCURSES_BOOL
15888 fi
15889
15890 echo "$as_me:15890: checking for special defines needed for etip.h" >&5
15891 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15892 cf_save_CXXFLAGS="$CXXFLAGS"
15893 cf_result="none"
15894 for cf_math in "" MATH_H
15895 do
15896 for cf_excp in "" MATH_EXCEPTION
15897 do
15898         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15899         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15900         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15901 cat >conftest.$ac_ext <<_ACEOF
15902 #line 15902 "configure"
15903 #include "confdefs.h"
15904
15905 #include <etip.h.in>
15906
15907 int
15908 main ()
15909 {
15910
15911   ;
15912   return 0;
15913 }
15914 _ACEOF
15915 rm -f conftest.$ac_objext
15916 if { (eval echo "$as_me:15916: \"$ac_compile\"") >&5
15917   (eval $ac_compile) 2>&5
15918   ac_status=$?
15919   echo "$as_me:15919: \$? = $ac_status" >&5
15920   (exit $ac_status); } &&
15921          { ac_try='test -s conftest.$ac_objext'
15922   { (eval echo "$as_me:15922: \"$ac_try\"") >&5
15923   (eval $ac_try) 2>&5
15924   ac_status=$?
15925   echo "$as_me:15925: \$? = $ac_status" >&5
15926   (exit $ac_status); }; }; then
15927
15928         test -n "$cf_math" && cat >>confdefs.h <<EOF
15929 #define ETIP_NEEDS_${cf_math} 1
15930 EOF
15931
15932         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15933 #define ETIP_NEEDS_${cf_excp} 1
15934 EOF
15935
15936         cf_result="$cf_math $cf_excp"
15937         break
15938
15939 else
15940   echo "$as_me: failed program was:" >&5
15941 cat conftest.$ac_ext >&5
15942 fi
15943 rm -f conftest.$ac_objext conftest.$ac_ext
15944 done
15945 done
15946 echo "$as_me:15946: result: $cf_result" >&5
15947 echo "${ECHO_T}$cf_result" >&6
15948 CXXFLAGS="$cf_save_CXXFLAGS"
15949
15950 if test -n "$CXX"; then
15951 echo "$as_me:15951: checking if $CXX accepts parameter initialization" >&5
15952 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15953 if test "${cf_cv_cpp_param_init+set}" = set; then
15954   echo $ECHO_N "(cached) $ECHO_C" >&6
15955 else
15956
15957         ac_ext=cc
15958 ac_cpp='$CXXCPP $CPPFLAGS'
15959 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15960 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15961 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15962 ac_main_return=return
15963
15964         if test "$cross_compiling" = yes; then
15965   cf_cv_cpp_param_init=unknown
15966 else
15967   cat >conftest.$ac_ext <<_ACEOF
15968 #line 15968 "configure"
15969 #include "confdefs.h"
15970
15971 class TEST {
15972 private:
15973         int value;
15974 public:
15975         TEST(int x = 1);
15976         ~TEST();
15977 };
15978
15979 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15980 {
15981         value = x;
15982 }
15983 void main() { }
15984
15985 _ACEOF
15986 rm -f conftest$ac_exeext
15987 if { (eval echo "$as_me:15987: \"$ac_link\"") >&5
15988   (eval $ac_link) 2>&5
15989   ac_status=$?
15990   echo "$as_me:15990: \$? = $ac_status" >&5
15991   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15992   { (eval echo "$as_me:15992: \"$ac_try\"") >&5
15993   (eval $ac_try) 2>&5
15994   ac_status=$?
15995   echo "$as_me:15995: \$? = $ac_status" >&5
15996   (exit $ac_status); }; }; then
15997   cf_cv_cpp_param_init=yes
15998 else
15999   echo "$as_me: program exited with status $ac_status" >&5
16000 echo "$as_me: failed program was:" >&5
16001 cat conftest.$ac_ext >&5
16002 cf_cv_cpp_param_init=no
16003 fi
16004 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16005 fi
16006         ac_ext=cc
16007 ac_cpp='$CXXCPP $CPPFLAGS'
16008 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16009 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16010 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16011 ac_main_return=return
16012
16013 fi
16014 echo "$as_me:16014: result: $cf_cv_cpp_param_init" >&5
16015 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16016 fi
16017 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16018 #define CPP_HAS_PARAM_INIT 1
16019 EOF
16020
16021 if test -n "$CXX"; then
16022
16023 echo "$as_me:16023: checking if $CXX accepts static_cast" >&5
16024 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16025 if test "${cf_cv_cpp_static_cast+set}" = set; then
16026   echo $ECHO_N "(cached) $ECHO_C" >&6
16027 else
16028
16029         ac_ext=cc
16030 ac_cpp='$CXXCPP $CPPFLAGS'
16031 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16032 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16033 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16034 ac_main_return=return
16035
16036         cat >conftest.$ac_ext <<_ACEOF
16037 #line 16037 "configure"
16038 #include "confdefs.h"
16039
16040 class NCursesPanel
16041 {
16042 public:
16043   NCursesPanel(int nlines,
16044                int ncols,
16045                int begin_y = 0,
16046                int begin_x = 0)
16047   {
16048   }
16049
16050   ~NCursesPanel();
16051 };
16052
16053 template<class T> class NCursesUserPanel : public NCursesPanel
16054 {
16055 public:
16056   NCursesUserPanel (int nlines,
16057                     int ncols,
16058                     int begin_y = 0,
16059                     int begin_x = 0,
16060                     const T* p_UserData = static_cast<T*>(0))
16061     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16062   {
16063   };
16064   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16065   {
16066   };
16067
16068   virtual ~NCursesUserPanel() {};
16069 };
16070
16071 int
16072 main ()
16073 {
16074
16075         const char* p_UserData = static_cast<char*>(0)
16076   ;
16077   return 0;
16078 }
16079 _ACEOF
16080 rm -f conftest.$ac_objext
16081 if { (eval echo "$as_me:16081: \"$ac_compile\"") >&5
16082   (eval $ac_compile) 2>&5
16083   ac_status=$?
16084   echo "$as_me:16084: \$? = $ac_status" >&5
16085   (exit $ac_status); } &&
16086          { ac_try='test -s conftest.$ac_objext'
16087   { (eval echo "$as_me:16087: \"$ac_try\"") >&5
16088   (eval $ac_try) 2>&5
16089   ac_status=$?
16090   echo "$as_me:16090: \$? = $ac_status" >&5
16091   (exit $ac_status); }; }; then
16092   cf_cv_cpp_static_cast=yes
16093 else
16094   echo "$as_me: failed program was:" >&5
16095 cat conftest.$ac_ext >&5
16096 cf_cv_cpp_static_cast=no
16097 fi
16098 rm -f conftest.$ac_objext conftest.$ac_ext
16099
16100         ac_ext=cc
16101 ac_cpp='$CXXCPP $CPPFLAGS'
16102 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16103 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16104 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16105 ac_main_return=return
16106
16107 fi
16108 echo "$as_me:16108: result: $cf_cv_cpp_static_cast" >&5
16109 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16110
16111 fi
16112
16113 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16114 #define CPP_HAS_STATIC_CAST 1
16115 EOF
16116
16117         CXX_AR='$(AR)'
16118         CXX_ARFLAGS='$(ARFLAGS)'
16119         case $cf_cv_system_name in #(vi
16120         irix*) #(vi
16121             if test "$GXX" != yes ; then
16122                 CXX_AR='$(CXX)'
16123                 CXX_ARFLAGS='-ar -o'
16124             fi
16125             ;;
16126         sco3.2v5*) #(vi
16127             CXXLDFLAGS="-u main"
16128             ;;
16129         solaris2*)
16130             if test "$GXX" != yes ; then
16131                 CXX_AR='$(CXX)'
16132                 CXX_ARFLAGS='-xar -o'
16133             fi
16134             ;;
16135         esac
16136
16137 else
16138         cf_cxx_library=no
16139         cf_cv_builtin_bool=1
16140
16141         # Just because we are not configuring against C++ right now does not
16142         # mean that a user will not want to use C++.  Some distributors disable
16143         # the C++ portion of this configuration as a shortcut (or just to avoid
16144         # compiling the demo in the c++ directory).  So we need a reasonable
16145         # default for the 'bool' type.
16146         #
16147         # Caveat: since the storage of the bool type is not standardized, it
16148         # may change.
16149
16150         if test "$NCURSES_BOOL" != auto ; then
16151                 cf_cv_type_of_bool=$NCURSES_BOOL
16152                 cf_cv_header_stdbool_h=0
16153         else
16154                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16155
16156 echo "$as_me:16156: checking for size of bool" >&5
16157 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16158 if test "${cf_cv_type_of_bool+set}" = set; then
16159   echo $ECHO_N "(cached) $ECHO_C" >&6
16160 else
16161
16162         rm -f cf_test.out
16163         if test "$cross_compiling" = yes; then
16164   cf_cv_type_of_bool=unknown
16165 else
16166   cat >conftest.$ac_ext <<_ACEOF
16167 #line 16167 "configure"
16168 #include "confdefs.h"
16169
16170 #include <stdlib.h>
16171 #include <stdio.h>
16172
16173 #if defined(__cplusplus)
16174
16175 #ifdef HAVE_GXX_BUILTIN_H
16176 #include <g++/builtin.h>
16177 #elif HAVE_GPP_BUILTIN_H
16178 #include <gpp/builtin.h>
16179 #elif HAVE_BUILTIN_H
16180 #include <builtin.h>
16181 #endif
16182
16183 #else
16184
16185 #if $cf_cv_header_stdbool_h
16186 #include <stdbool.h>
16187 #endif
16188
16189 #endif
16190
16191 main()
16192 {
16193         FILE *fp = fopen("cf_test.out", "w");
16194         if (fp != 0) {
16195                 bool x = true;
16196                 if ((bool)(-x) >= 0)
16197                         fputs("unsigned ", fp);
16198                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16199                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16200                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16201                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16202                 fclose(fp);
16203         }
16204         ${cf_cv_main_return:-return}(0);
16205 }
16206
16207 _ACEOF
16208 rm -f conftest$ac_exeext
16209 if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
16210   (eval $ac_link) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16214   { (eval echo "$as_me:16214: \"$ac_try\"") >&5
16215   (eval $ac_try) 2>&5
16216   ac_status=$?
16217   echo "$as_me:16217: \$? = $ac_status" >&5
16218   (exit $ac_status); }; }; then
16219   cf_cv_type_of_bool=`cat cf_test.out`
16220                  if test -z "$cf_cv_type_of_bool"; then
16221                    cf_cv_type_of_bool=unknown
16222                  fi
16223 else
16224   echo "$as_me: program exited with status $ac_status" >&5
16225 echo "$as_me: failed program was:" >&5
16226 cat conftest.$ac_ext >&5
16227 cf_cv_type_of_bool=unknown
16228 fi
16229 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16230 fi
16231
16232 fi
16233
16234         rm -f cf_test.out
16235 echo "$as_me:16235: result: $cf_cv_type_of_bool" >&5
16236 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16237 if test "$cf_cv_type_of_bool" = unknown ; then
16238         case .$NCURSES_BOOL in #(vi
16239         .auto|.) NCURSES_BOOL=unsigned;;
16240         esac
16241         { echo "$as_me:16241: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16242 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16243         cf_cv_type_of_bool=$NCURSES_BOOL
16244 fi
16245
16246                 else
16247                         echo "$as_me:16247: checking for fallback type of bool" >&5
16248 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16249                         case "$host_cpu" in #(vi
16250                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16251                         *)      cf_cv_type_of_bool=int  ;;
16252                         esac
16253                         echo "$as_me:16253: result: $cf_cv_type_of_bool" >&5
16254 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16255                 fi
16256         fi
16257 fi
16258
16259 # If the C compiler did not declare bool, and we did not determine that the C++
16260 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16261 # ncurses library use the same type as C++ bool.  Note that this allows one to
16262 # specify the type of bool in a configure-script option and postpone
16263 # integration with the C++ compiler provided that the types are compatible.
16264 USE_CXX_BOOL=1
16265 if test $cf_cv_cc_bool_type = 1
16266 then
16267         # oops: C has a bool.  Unlikely, but C++ could differ.
16268         USE_CXX_BOOL=0
16269 elif test $cf_cv_builtin_bool = 0
16270 then
16271         # C++ has no bool
16272         USE_CXX_BOOL=0
16273 else
16274         # this is the normal case
16275         USE_CXX_BOOL='defined(__cplusplus)'
16276 fi
16277
16278 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16279
16280 if test "$cf_with_ada" != "no" ; then
16281     if test "$with_libtool" != "no"; then
16282         { echo "$as_me:16282: WARNING: libtool does not support Ada - disabling feature" >&5
16283 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16284         cf_with_ada=no
16285     fi
16286 fi
16287
16288 if test "$cf_with_ada" != "no" ; then
16289 cf_ada_make=gnatmake
16290 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16291 set dummy $cf_ada_make; ac_word=$2
16292 echo "$as_me:16292: checking for $ac_word" >&5
16293 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16294 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16295   echo $ECHO_N "(cached) $ECHO_C" >&6
16296 else
16297   if test -n "$gnat_exists"; then
16298   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16299 else
16300   ac_save_IFS=$IFS; IFS=$ac_path_separator
16301 ac_dummy="$PATH"
16302 for ac_dir in $ac_dummy; do
16303   IFS=$ac_save_IFS
16304   test -z "$ac_dir" && ac_dir=.
16305   $as_executable_p "$ac_dir/$ac_word" || continue
16306 ac_cv_prog_gnat_exists="yes"
16307 echo "$as_me:16307: found $ac_dir/$ac_word" >&5
16308 break
16309 done
16310
16311   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16312 fi
16313 fi
16314 gnat_exists=$ac_cv_prog_gnat_exists
16315 if test -n "$gnat_exists"; then
16316   echo "$as_me:16316: result: $gnat_exists" >&5
16317 echo "${ECHO_T}$gnat_exists" >&6
16318 else
16319   echo "$as_me:16319: result: no" >&5
16320 echo "${ECHO_T}no" >&6
16321 fi
16322
16323 if test "$ac_cv_prog_gnat_exists" = no; then
16324    cf_ada_make=
16325 else
16326
16327 echo "$as_me:16327: checking for gnat version" >&5
16328 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16329 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16330   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16331 echo "$as_me:16331: result: $cf_gnat_version" >&5
16332 echo "${ECHO_T}$cf_gnat_version" >&6
16333
16334 case $cf_gnat_version in
16335   3.1[1-9]*|3.[2-9]*|[4-9].*)
16336     cf_cv_prog_gnat_correct=yes
16337     ;;
16338   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16339      cf_cv_prog_gnat_correct=no
16340      ;;
16341 esac
16342 case $cf_gnat_version in
16343   3.[1-9]*|[4-9].*)
16344       cf_compile_generics=generics
16345       cf_generic_objects="\${GENOBJS}"
16346       ;;
16347   *)  cf_compile_generics=
16348       cf_generic_objects=
16349       ;;
16350 esac
16351
16352    # Extract the first word of "m4", so it can be a program name with args.
16353 set dummy m4; ac_word=$2
16354 echo "$as_me:16354: checking for $ac_word" >&5
16355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16356 if test "${ac_cv_prog_M4_exists+set}" = set; then
16357   echo $ECHO_N "(cached) $ECHO_C" >&6
16358 else
16359   if test -n "$M4_exists"; then
16360   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16361 else
16362   ac_save_IFS=$IFS; IFS=$ac_path_separator
16363 ac_dummy="$PATH"
16364 for ac_dir in $ac_dummy; do
16365   IFS=$ac_save_IFS
16366   test -z "$ac_dir" && ac_dir=.
16367   $as_executable_p "$ac_dir/$ac_word" || continue
16368 ac_cv_prog_M4_exists="yes"
16369 echo "$as_me:16369: found $ac_dir/$ac_word" >&5
16370 break
16371 done
16372
16373   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16374 fi
16375 fi
16376 M4_exists=$ac_cv_prog_M4_exists
16377 if test -n "$M4_exists"; then
16378   echo "$as_me:16378: result: $M4_exists" >&5
16379 echo "${ECHO_T}$M4_exists" >&6
16380 else
16381   echo "$as_me:16381: result: no" >&5
16382 echo "${ECHO_T}no" >&6
16383 fi
16384
16385    if test "$ac_cv_prog_M4_exists" = no; then
16386       cf_cv_prog_gnat_correct=no
16387       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16388    fi
16389    if test "$cf_cv_prog_gnat_correct" = yes; then
16390       echo "$as_me:16390: checking if GNAT works" >&5
16391 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16392
16393 rm -f conftest*
16394 cat >>conftest.ads <<CF_EOF
16395 procedure conftest;
16396 CF_EOF
16397 cat >>conftest.adb <<CF_EOF
16398 with Text_IO;
16399 with GNAT.OS_Lib;
16400 procedure conftest is
16401 begin
16402    Text_IO.Put ("Hello World");
16403    Text_IO.New_Line;
16404    GNAT.OS_Lib.OS_Exit (0);
16405 end conftest;
16406 CF_EOF
16407 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16408    if ( ./conftest 1>&5 2>&1 ) ; then
16409       cf_cv_prog_gnat_correct=yes
16410    else
16411       cf_cv_prog_gnat_correct=no
16412    fi
16413 else
16414    cf_cv_prog_gnat_correct=no
16415 fi
16416 rm -f conftest*
16417
16418       echo "$as_me:16418: result: $cf_cv_prog_gnat_correct" >&5
16419 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16420    fi
16421 fi
16422 if test "$cf_cv_prog_gnat_correct" = yes; then
16423    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16424
16425    echo "$as_me:16425: checking if GNAT pragma Unreferenced works" >&5
16426 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16427
16428 rm -f conftest*
16429 cat >>conftest.ads <<CF_EOF
16430 procedure conftest;
16431 CF_EOF
16432 cat >>conftest.adb <<CF_EOF
16433 with Text_IO;
16434 with GNAT.OS_Lib;
16435 procedure conftest is
16436    test : Integer;
16437    pragma Unreferenced (test);
16438 begin
16439    test := 1;
16440    Text_IO.Put ("Hello World");
16441    Text_IO.New_Line;
16442    GNAT.OS_Lib.OS_Exit (0);
16443 end conftest;
16444 CF_EOF
16445 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16446       cf_cv_pragma_unreferenced=yes
16447 else
16448    cf_cv_pragma_unreferenced=no
16449 fi
16450 rm -f conftest*
16451
16452    echo "$as_me:16452: result: $cf_cv_pragma_unreferenced" >&5
16453 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16454
16455    # if the pragma is supported, use it (needed in the Trace code).
16456    if test $cf_cv_pragma_unreferenced = yes ; then
16457       PRAGMA_UNREF=TRUE
16458    else
16459       PRAGMA_UNREF=FALSE
16460    fi
16461
16462 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16463 if test "${with_ada_compiler+set}" = set; then
16464   withval="$with_ada_compiler"
16465   cf_ada_compiler=$withval
16466 else
16467   cf_ada_compiler=gnatmake
16468 fi;
16469
16470    cf_ada_package=terminal_interface
16471
16472 # Check whether --with-ada-include or --without-ada-include was given.
16473 if test "${with_ada_include+set}" = set; then
16474   withval="$with_ada_include"
16475
16476 else
16477   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16478 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16479
16480 if test "x$prefix" != xNONE; then
16481   cf_path_syntax="$prefix"
16482 else
16483   cf_path_syntax="$ac_default_prefix"
16484 fi
16485
16486 case ".$withval" in #(vi
16487 .\$\(*\)*|.\'*\'*) #(vi
16488   ;;
16489 ..|./*|.\\*) #(vi
16490   ;;
16491 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16492   ;;
16493 .\${*prefix}*) #(vi
16494   eval withval="$withval"
16495   case ".$withval" in #(vi
16496   .NONE/*)
16497     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16498     ;;
16499   esac
16500   ;; #(vi
16501 .no|.NONE/*)
16502   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16503   ;;
16504 *)
16505   { { echo "$as_me:16505: error: expected a pathname, not \"$withval\"" >&5
16506 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16507    { (exit 1); exit 1; }; }
16508   ;;
16509 esac
16510
16511 fi
16512 ADA_INCLUDE="$withval"
16513
16514 # Check whether --with-ada-objects or --without-ada-objects was given.
16515 if test "${with_ada_objects+set}" = set; then
16516   withval="$with_ada_objects"
16517
16518 else
16519   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16520 fi; if test -n "$prefix/lib/ada/adalib" ; then
16521
16522 if test "x$prefix" != xNONE; then
16523   cf_path_syntax="$prefix"
16524 else
16525   cf_path_syntax="$ac_default_prefix"
16526 fi
16527
16528 case ".$withval" in #(vi
16529 .\$\(*\)*|.\'*\'*) #(vi
16530   ;;
16531 ..|./*|.\\*) #(vi
16532   ;;
16533 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16534   ;;
16535 .\${*prefix}*) #(vi
16536   eval withval="$withval"
16537   case ".$withval" in #(vi
16538   .NONE/*)
16539     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16540     ;;
16541   esac
16542   ;; #(vi
16543 .no|.NONE/*)
16544   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16545   ;;
16546 *)
16547   { { echo "$as_me:16547: error: expected a pathname, not \"$withval\"" >&5
16548 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16549    { (exit 1); exit 1; }; }
16550   ;;
16551 esac
16552
16553 fi
16554 ADA_OBJECTS="$withval"
16555
16556 fi
16557 fi
16558 else
16559    cf_with_ada=no
16560 fi
16561
16562 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16563 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16564 ###
16565 ### ticlib modules may be a separate library, otherwise contained in termlib.
16566 ### termlib modules may be a separate library, otherwise contained in ncurses.
16567 ###
16568 ### The of "+" or " " between the tokens controls the way the script
16569 ### chooses to split module lists into libraries.
16570 ###
16571 ### (see CF_LIB_RULES).
16572 echo "$as_me:16572: checking for library subsets" >&5
16573 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16574 LIB_SUBSETS=
16575
16576 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16577         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16578         if test "$with_ticlib" != no ; then
16579                 LIB_SUBSETS="${LIB_SUBSETS} "
16580         else
16581                 LIB_SUBSETS="${LIB_SUBSETS}+"
16582         fi
16583 fi
16584
16585 LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
16586
16587 case $cf_cv_system_name in #(vi
16588 *mingw32*) #(vi
16589         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16590         ;;
16591 *) #(vi
16592         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16593         ;;
16594 esac
16595
16596 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16597 if test "$with_termlib" != no ; then
16598         LIB_SUBSETS="${LIB_SUBSETS} "
16599 else
16600         LIB_SUBSETS="${LIB_SUBSETS}+"
16601 fi
16602
16603 LIB_SUBSETS="${LIB_SUBSETS}base"
16604
16605 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16606 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16607
16608 echo "$as_me:16608: result: $LIB_SUBSETS" >&5
16609 echo "${ECHO_T}$LIB_SUBSETS" >&6
16610
16611 ### Construct the list of include-directories to be generated
16612
16613 CPPFLAGS="$CPPFLAGS -I. -I../include"
16614 if test "$srcdir" != "."; then
16615         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16616 fi
16617 if test "$GCC" != yes; then
16618         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16619 elif test "$includedir" != "/usr/include"; then
16620         if test "$includedir" = '${prefix}/include' ; then
16621                 if test $prefix != /usr ; then
16622                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16623                 fi
16624         else
16625                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16626         fi
16627 fi
16628
16629 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16630 if test "$srcdir" != "."; then
16631         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16632 fi
16633 if test "$GCC" != yes; then
16634         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16635 elif test "$includedir" != "/usr/include"; then
16636         if test "$includedir" = '${prefix}/include' ; then
16637                 if test $prefix != /usr ; then
16638                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16639                 fi
16640         else
16641                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16642         fi
16643 fi
16644
16645 ### Build up pieces for makefile rules
16646 echo "$as_me:16646: checking default library suffix" >&5
16647 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16648
16649         case $DFT_LWR_MODEL in
16650         libtool) DFT_ARG_SUFFIX=''   ;;
16651         normal)  DFT_ARG_SUFFIX=''   ;;
16652         debug)   DFT_ARG_SUFFIX='_g' ;;
16653         profile) DFT_ARG_SUFFIX='_p' ;;
16654         shared)  DFT_ARG_SUFFIX=''   ;;
16655         esac
16656         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16657 echo "$as_me:16657: result: $DFT_ARG_SUFFIX" >&5
16658 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16659
16660 echo "$as_me:16660: checking default library-dependency suffix" >&5
16661 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16662
16663         case $DFT_LWR_MODEL in #(vi
16664         libtool) #(vi
16665                 DFT_LIB_SUFFIX='.la'
16666                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16667                 ;;
16668         normal) #(vi
16669                 DFT_LIB_SUFFIX='.a'
16670                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16671                 ;;
16672         debug) #(vi
16673                 DFT_LIB_SUFFIX='_g.a'
16674                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16675                 ;;
16676         profile) #(vi
16677                 DFT_LIB_SUFFIX='_p.a'
16678                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16679                 ;;
16680         shared) #(vi
16681                 case $cf_cv_system_name in
16682                 aix[56]*) #(vi
16683                         DFT_LIB_SUFFIX='.a'
16684                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16685                         ;;
16686                 cygwin*) #(vi
16687                         DFT_LIB_SUFFIX='.dll'
16688                         DFT_DEP_SUFFIX='.dll.a'
16689                         ;;
16690                 darwin*) #(vi
16691                         DFT_LIB_SUFFIX='.dylib'
16692                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16693                         ;;
16694                 hpux*) #(vi
16695                         case $target in
16696                         ia64*) #(vi
16697                                 DFT_LIB_SUFFIX='.so'
16698                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16699                                 ;;
16700                         *) #(vi
16701                                 DFT_LIB_SUFFIX='.sl'
16702                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16703                                 ;;
16704                         esac
16705                         ;;
16706                 *)      DFT_LIB_SUFFIX='.so'
16707                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16708                         ;;
16709                 esac
16710         esac
16711         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16712         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16713 echo "$as_me:16713: result: $DFT_DEP_SUFFIX" >&5
16714 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16715
16716 echo "$as_me:16716: checking default object directory" >&5
16717 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16718
16719         case $DFT_LWR_MODEL in
16720         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16721         normal)  DFT_OBJ_SUBDIR='objects' ;;
16722         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16723         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16724         shared)
16725                 case $cf_cv_system_name in #(vi
16726                 cygwin) #(vi
16727                         DFT_OBJ_SUBDIR='objects' ;;
16728                 *)
16729                         DFT_OBJ_SUBDIR='obj_s' ;;
16730                 esac
16731         esac
16732 echo "$as_me:16732: result: $DFT_OBJ_SUBDIR" >&5
16733 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16734
16735 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16736 if test "$cf_with_cxx" = yes ; then
16737 echo "$as_me:16737: checking c++ library-dependency suffix" >&5
16738 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16739 if test "$with_libtool" != "no"; then
16740         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16741 else
16742
16743         case normal in #(vi
16744         libtool) #(vi
16745                 CXX_LIB_SUFFIX='.la'
16746                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16747                 ;;
16748         normal) #(vi
16749                 CXX_LIB_SUFFIX='.a'
16750                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16751                 ;;
16752         debug) #(vi
16753                 CXX_LIB_SUFFIX='_g.a'
16754                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16755                 ;;
16756         profile) #(vi
16757                 CXX_LIB_SUFFIX='_p.a'
16758                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16759                 ;;
16760         shared) #(vi
16761                 case $cf_cv_system_name in
16762                 aix[56]*) #(vi
16763                         CXX_LIB_SUFFIX='.a'
16764                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16765                         ;;
16766                 cygwin*) #(vi
16767                         CXX_LIB_SUFFIX='.dll'
16768                         CXX_DEP_SUFFIX='.dll.a'
16769                         ;;
16770                 darwin*) #(vi
16771                         CXX_LIB_SUFFIX='.dylib'
16772                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16773                         ;;
16774                 hpux*) #(vi
16775                         case $target in
16776                         ia64*) #(vi
16777                                 CXX_LIB_SUFFIX='.so'
16778                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16779                                 ;;
16780                         *) #(vi
16781                                 CXX_LIB_SUFFIX='.sl'
16782                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16783                                 ;;
16784                         esac
16785                         ;;
16786                 *)      CXX_LIB_SUFFIX='.so'
16787                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16788                         ;;
16789                 esac
16790         esac
16791         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16792         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16793 fi
16794 echo "$as_me:16794: result: $CXX_LIB_SUFFIX" >&5
16795 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16796
16797 fi
16798
16799 # do not want -ldl in build except as needed for -lncurses dependency
16800 if test "$with_dlsym" = yes ; then
16801 if test $DFT_LWR_MODEL = shared || \
16802    test $DFT_LWR_MODEL = libtool ; then
16803
16804 # remove dl library from $LIBS
16805 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16806
16807 fi
16808 fi
16809 ### Set up low-level terminfo dependencies for makefiles.
16810
16811 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16812 # do not need libdl
16813 TICS_LIST=
16814 if test "$with_dlsym" = yes ; then
16815
16816 # remove dl library from $SHLIB_LIST
16817 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16818
16819 fi
16820
16821 if test "$with_ticlib" != no ; then
16822
16823         if test "$with_ticlib" != yes ; then
16824                 TICS_NAME=$with_ticlib
16825                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16826                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16827                 TICS_LIB_SUFFIX="${with_ticlib}"
16828         else
16829                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16830                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16831                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16832         fi
16833         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16834 else
16835         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16836 fi
16837
16838 if test "$with_termlib" != no ; then
16839
16840         if test "$with_termlib" != yes ; then
16841                 TINFO_NAME=$with_termlib
16842                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16843                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16844                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16845                 TINFO_LIB_SUFFIX="${with_termlib}"
16846         else
16847                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16848                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16849                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16850                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16851         fi
16852
16853         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16854         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16855         if test "$DFT_LWR_MODEL" = "libtool"; then
16856                 TEST_ARGS="${TEST_DEPS}"
16857                 TEST_ARG2="${TEST_DEP2}"
16858                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16859                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
16860                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
16861         else
16862                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16863                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16864                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16865                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16866                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16867         fi
16868 else
16869         # the next lines are needed for linking libtic over libncurses
16870         TINFO_NAME=${LIB_NAME}
16871         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16872         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16873         if test "$with_tic_depends" = yes ; then
16874                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16875         else
16876                 TICS_LIST="$SHLIB_LIST"
16877         fi
16878
16879         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16880 fi
16881
16882 if test "$DFT_LWR_MODEL" = shared ; then
16883         case $cf_cv_system_name in #(vi
16884         cygwin*)
16885                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16886                 TINFO_SUFFIX=.dll
16887                 ;;
16888         esac
16889 fi
16890
16891 if test "$with_dlsym" = yes ; then
16892
16893 # remove dl library from $TICS_LIST
16894 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16895
16896 fi
16897
16898 if test "$DFT_LWR_MODEL" = "libtool"; then
16899     OBJEXT=lo
16900 fi
16901
16902 # needed for Ada95
16903 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16904
16905 case $DFT_LWR_MODEL in
16906 normal|debug|profile)
16907
16908 if test "$GCC" = yes ; then
16909         case $cf_cv_system_name in #(
16910         OS/2*|os2*|aix[4]*|solaris2.1[0-9])     #( vi
16911                 LDFLAGS_STATIC=
16912                 LDFLAGS_SHARED=
16913                 ;;
16914     *)  #( normally, except when broken
16915         LDFLAGS_STATIC=-static
16916         LDFLAGS_SHARED=-dynamic
16917         ;;
16918     esac
16919 else
16920         case $cf_cv_system_name in #(
16921         aix[456]*)      #( from ld manpage
16922                 LDFLAGS_STATIC=-bstatic
16923                 LDFLAGS_SHARED=-bdynamic
16924                 ;;
16925         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16926                 # We could also use just "archive" and "shared".
16927                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16928                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16929                 ;;
16930         irix*)          #( from ld manpage IRIX64
16931                 LDFLAGS_STATIC=-Bstatic
16932                 LDFLAGS_SHARED=-Bdynamic
16933                 ;;
16934         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16935                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16936                 LDFLAGS_STATIC=-noso
16937                 LDFLAGS_SHARED=-so_archive
16938                 ;;
16939         solaris2*)
16940                 LDFLAGS_STATIC=-Bstatic
16941                 LDFLAGS_SHARED=-Bdynamic
16942                 ;;
16943         esac
16944 fi
16945
16946         ;;
16947 esac
16948
16949 echo "$as_me:16949: checking where we will install curses.h" >&5
16950 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16951 test "$with_overwrite" = no && \
16952 test "x$includedir" = 'x${prefix}/include' && \
16953         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16954 echo "$as_me:16954: result: $includedir" >&5
16955 echo "${ECHO_T}$includedir" >&6
16956
16957 ### Resolve a conflict between normal and wide-curses by forcing applications
16958 ### that will need libutf8 to add it to their configure script.
16959 if test "$with_overwrite" != no ; then
16960 if test "$NCURSES_LIBUTF8" = 1 ; then
16961         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16962         { echo "$as_me:16962: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16963 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16964 fi
16965 fi
16966 WITH_OVERWRITE=$with_overwrite
16967
16968 # used to separate tack out of the tree
16969 NCURSES_TREE=
16970
16971 ### predefined stuff for the test programs
16972 cat >>confdefs.h <<\EOF
16973 #define HAVE_SLK_COLOR 1
16974 EOF
16975
16976 ### Construct the list of subdirectories for which we'll customize makefiles
16977 ### with the appropriate compile-rules.
16978
16979 echo "$as_me:16979: checking for src modules" >&5
16980 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16981
16982 # dependencies and linker-arguments for test-programs
16983 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16984 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16985 if test "$DFT_LWR_MODEL" = "libtool"; then
16986         TEST_ARGS="${TEST_DEPS}"
16987         TEST_ARG2="${TEST_DEP2}"
16988 else
16989         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16990         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16991 fi
16992
16993 cf_cv_src_modules=
16994 for cf_dir in $modules_to_build
16995 do
16996         if test -f $srcdir/$cf_dir/modules; then
16997
16998                 # We may/may not have tack in the distribution, though the
16999                 # makefile is.
17000                 if test $cf_dir = tack ; then
17001                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17002                                 continue
17003                         fi
17004                 fi
17005
17006                 if test -z "$cf_cv_src_modules"; then
17007                         cf_cv_src_modules=$cf_dir
17008                 else
17009                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17010                 fi
17011
17012                 # Make the ncurses_cfg.h file record the library interface files as
17013                 # well.  These are header files that are the same name as their
17014                 # directory.  Ncurses is the only library that does not follow
17015                 # that pattern.
17016                 if test $cf_dir = tack ; then
17017                         continue
17018                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17019
17020 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17021
17022                         cat >>confdefs.h <<EOF
17023 #define HAVE_${cf_have_include}_H 1
17024 EOF
17025
17026                         cat >>confdefs.h <<EOF
17027 #define HAVE_LIB${cf_have_include} 1
17028 EOF
17029
17030                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17031                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17032                         if test "$DFT_LWR_MODEL" = "libtool"; then
17033                                 TEST_ARGS="${TEST_DEPS}"
17034                                 TEST_ARG2="${TEST_DEP2}"
17035                         else
17036                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17037                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17038                         fi
17039                 fi
17040         fi
17041 done
17042 echo "$as_me:17042: result: $cf_cv_src_modules" >&5
17043 echo "${ECHO_T}$cf_cv_src_modules" >&6
17044
17045 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17046 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17047
17048 SRC_SUBDIRS=
17049 if test "x$cf_with_manpages" != xno ; then
17050         SRC_SUBDIRS="$SRC_SUBDIRS man"
17051 fi
17052 SRC_SUBDIRS="$SRC_SUBDIRS include"
17053 for cf_dir in $cf_cv_src_modules
17054 do
17055         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17056 done
17057 SRC_SUBDIRS="$SRC_SUBDIRS test"
17058 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17059 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17060
17061 ADA_SUBDIRS=
17062 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17063         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17064         ADA_SUBDIRS="gen src samples"
17065 fi
17066
17067 SUB_MAKEFILES=
17068 for cf_dir in $SRC_SUBDIRS
17069 do
17070         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17071 done
17072
17073 if test -n "$ADA_SUBDIRS"; then
17074         for cf_dir in $ADA_SUBDIRS
17075         do
17076                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17077         done
17078
17079 fi
17080
17081 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17082    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17083 fi
17084
17085 DIRS_TO_MAKE="lib"
17086 for cf_item in $cf_list_models
17087 do
17088
17089         case $cf_item in
17090         libtool) cf_subdir='obj_lo'  ;;
17091         normal)  cf_subdir='objects' ;;
17092         debug)   cf_subdir='obj_g' ;;
17093         profile) cf_subdir='obj_p' ;;
17094         shared)
17095                 case $cf_cv_system_name in #(vi
17096                 cygwin) #(vi
17097                         cf_subdir='objects' ;;
17098                 *)
17099                         cf_subdir='obj_s' ;;
17100                 esac
17101         esac
17102
17103         for cf_item2 in $DIRS_TO_MAKE
17104         do
17105                 test $cf_item2 = $cf_subdir && break
17106         done
17107         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17108 done
17109 for cf_dir in $DIRS_TO_MAKE
17110 do
17111         test ! -d $cf_dir && mkdir $cf_dir
17112 done
17113
17114 cat >>confdefs.h <<EOF
17115 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17116 EOF
17117
17118 cat >>confdefs.h <<EOF
17119 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17120 EOF
17121
17122 ### Now that we're done running tests, add the compiler-warnings, if any
17123
17124 cf_fix_cppflags=no
17125 cf_new_cflags=
17126 cf_new_cppflags=
17127 cf_new_extra_cppflags=
17128
17129 for cf_add_cflags in $EXTRA_CFLAGS
17130 do
17131 case $cf_fix_cppflags in
17132 no)
17133         case $cf_add_cflags in #(vi
17134         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17135                 case $cf_add_cflags in
17136                 -D*)
17137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17138
17139                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17140                         && test -z "${cf_tst_cflags}" \
17141                         && cf_fix_cppflags=yes
17142
17143                         if test $cf_fix_cppflags = yes ; then
17144                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17145                                 continue
17146                         elif test "${cf_tst_cflags}" = "\"'" ; then
17147                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17148                                 continue
17149                         fi
17150                         ;;
17151                 esac
17152                 case "$CPPFLAGS" in
17153                 *$cf_add_cflags) #(vi
17154                         ;;
17155                 *) #(vi
17156                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17157                         ;;
17158                 esac
17159                 ;;
17160         *)
17161                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17162                 ;;
17163         esac
17164         ;;
17165 yes)
17166         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17167
17168         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17169
17170         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17171         && test -z "${cf_tst_cflags}" \
17172         && cf_fix_cppflags=no
17173         ;;
17174 esac
17175 done
17176
17177 if test -n "$cf_new_cflags" ; then
17178
17179         CFLAGS="$CFLAGS $cf_new_cflags"
17180 fi
17181
17182 if test -n "$cf_new_cppflags" ; then
17183
17184         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17185 fi
17186
17187 if test -n "$cf_new_extra_cppflags" ; then
17188
17189         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17190 fi
17191
17192 ### If we're building with rpath, try to link non-standard libs that way too.
17193 if test "$DFT_LWR_MODEL" = "shared"; then
17194
17195 echo "$as_me:17195: checking for updated LDFLAGS" >&5
17196 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17197 if test -n "$LDFLAGS" ; then
17198 echo "$as_me:17198: result: maybe" >&5
17199 echo "${ECHO_T}maybe" >&6
17200 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17201
17202 echo "${as_me-configure}:17202: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17203
17204 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17205
17206 echo "${as_me-configure}:17206: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17207
17208 case "$EXTRA_LDFLAGS" in #(vi
17209 -Wl,-rpath,*) #(vi
17210         cf_rpath_hack="-Wl,-rpath,"
17211         ;;
17212 -R\ *)
17213         cf_rpath_hack="-R "
17214         ;;
17215 -R*)
17216         cf_rpath_hack="-R"
17217         ;;
17218 *)
17219         cf_rpath_hack=
17220         ;;
17221 esac
17222 if test -n "$cf_rpath_hack" ; then
17223         cf_rpath_dst=
17224         for cf_rpath_src in $LDFLAGS
17225         do
17226                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17227
17228 echo "${as_me-configure}:17228: testing Filtering $cf_rpath_src ..." 1>&5
17229
17230                 case $cf_rpath_src in #(vi
17231                 -L*) #(vi
17232                         if test "$cf_rpath_hack" = "-R " ; then
17233                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17234                         else
17235                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17236                         fi
17237                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17238
17239 echo "${as_me-configure}:17239: testing ...Filter $cf_rpath_tmp ..." 1>&5
17240
17241                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17242                         ;;
17243                 esac
17244                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17245         done
17246         LDFLAGS=$cf_rpath_dst
17247         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17248
17249 echo "${as_me-configure}:17249: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17250
17251         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17252
17253 echo "${as_me-configure}:17253: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17254
17255 fi
17256 else
17257 echo "$as_me:17257: result: no" >&5
17258 echo "${ECHO_T}no" >&6
17259 fi
17260
17261 fi
17262
17263 ### Define substitutions for header files to avoid name-pollution
17264
17265 if test "$cf_cv_have_tcgetattr" = yes ; then
17266         HAVE_TCGETATTR=1
17267 else
17268         HAVE_TCGETATTR=0
17269 fi
17270
17271 if test "$ac_cv_header_termio_h" = yes ; then
17272         HAVE_TERMIO_H=1
17273 else
17274         HAVE_TERMIO_H=0
17275 fi
17276
17277 if test "$ac_cv_header_termios_h" = yes ; then
17278         HAVE_TERMIOS_H=1
17279 else
17280         HAVE_TERMIOS_H=0
17281 fi
17282
17283 ################################################################################
17284 test "$use_database" = yes && \
17285 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17286
17287 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17288
17289 if test x"$enable_pc_files" = xyes ; then \
17290 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17291 MAKE_PC_FILES=
17292 else
17293 MAKE_PC_FILES="#"
17294 fi
17295
17296 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
17297 ac_config_commands="$ac_config_commands default"
17298 cat >confcache <<\_ACEOF
17299 # This file is a shell script that caches the results of configure
17300 # tests run on this system so they can be shared between configure
17301 # scripts and configure runs, see configure's option --config-cache.
17302 # It is not useful on other systems.  If it contains results you don't
17303 # want to keep, you may remove or edit it.
17304 #
17305 # config.status only pays attention to the cache file if you give it
17306 # the --recheck option to rerun configure.
17307 #
17308 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17310 # following values.
17311
17312 _ACEOF
17313
17314 # The following way of writing the cache mishandles newlines in values,
17315 # but we know of no workaround that is simple, portable, and efficient.
17316 # So, don't put newlines in cache variables' values.
17317 # Ultrix sh set writes to stderr and can't be redirected directly,
17318 # and sets the high bit in the cache file unless we assign to the vars.
17319 {
17320   (set) 2>&1 |
17321     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17322     *ac_space=\ *)
17323       # `set' does not quote correctly, so add quotes (double-quote
17324       # substitution turns \\\\ into \\, and sed turns \\ into \).
17325       sed -n \
17326         "s/'/'\\\\''/g;
17327           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17328       ;;
17329     *)
17330       # `set' quotes correctly as required by POSIX, so do not add quotes.
17331       sed -n \
17332         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17333       ;;
17334     esac;
17335 } |
17336   sed '
17337      t clear
17338      : clear
17339      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17340      t end
17341      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17342      : end' >>confcache
17343 if cmp -s $cache_file confcache; then :; else
17344   if test -w $cache_file; then
17345     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17346     cat confcache >$cache_file
17347   else
17348     echo "not updating unwritable cache $cache_file"
17349   fi
17350 fi
17351 rm -f confcache
17352
17353 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17354 # Let make expand exec_prefix.
17355 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17356
17357 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17358 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17359 # trailing colons and then remove the whole line if VPATH becomes empty
17360 # (actually we leave an empty line to preserve line numbers).
17361 if test "x$srcdir" = x.; then
17362   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17363 s/:*\$(srcdir):*/:/;
17364 s/:*\${srcdir}:*/:/;
17365 s/:*@srcdir@:*/:/;
17366 s/^\([^=]*=[    ]*\):*/\1/;
17367 s/:*$//;
17368 s/^[^=]*=[      ]*$//;
17369 }'
17370 fi
17371
17372 DEFS=-DHAVE_CONFIG_H
17373
17374 : ${CONFIG_STATUS=./config.status}
17375 ac_clean_files_save=$ac_clean_files
17376 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17377 { echo "$as_me:17377: creating $CONFIG_STATUS" >&5
17378 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17379 cat >$CONFIG_STATUS <<_ACEOF
17380 #! $SHELL
17381 # Generated automatically by configure.
17382 # Run this file to recreate the current configuration.
17383 # Compiler output produced by configure, useful for debugging
17384 # configure, is in config.log if it exists.
17385
17386 debug=false
17387 SHELL=\${CONFIG_SHELL-$SHELL}
17388 ac_cs_invocation="\$0 \$@"
17389
17390 _ACEOF
17391
17392 cat >>$CONFIG_STATUS <<\_ACEOF
17393 # Be Bourne compatible
17394 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17395   emulate sh
17396   NULLCMD=:
17397 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17398   set -o posix
17399 fi
17400
17401 # Name of the executable.
17402 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17403
17404 if expr a : '\(a\)' >/dev/null 2>&1; then
17405   as_expr=expr
17406 else
17407   as_expr=false
17408 fi
17409
17410 rm -f conf$$ conf$$.exe conf$$.file
17411 echo >conf$$.file
17412 if ln -s conf$$.file conf$$ 2>/dev/null; then
17413   # We could just check for DJGPP; but this test a) works b) is more generic
17414   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17415   if test -f conf$$.exe; then
17416     # Don't use ln at all; we don't have any links
17417     as_ln_s='cp -p'
17418   else
17419     as_ln_s='ln -s'
17420   fi
17421 elif ln conf$$.file conf$$ 2>/dev/null; then
17422   as_ln_s=ln
17423 else
17424   as_ln_s='cp -p'
17425 fi
17426 rm -f conf$$ conf$$.exe conf$$.file
17427
17428 as_executable_p="test -f"
17429
17430 # Support unset when possible.
17431 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17432   as_unset=unset
17433 else
17434   as_unset=false
17435 fi
17436
17437 # NLS nuisances.
17438 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17439 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17440 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17441 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17442 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17443 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17444 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17445 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17446
17447 # IFS
17448 # We need space, tab and new line, in precisely that order.
17449 as_nl='
17450 '
17451 IFS="   $as_nl"
17452
17453 # CDPATH.
17454 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17455
17456 exec 6>&1
17457
17458 _ACEOF
17459
17460 # Files that config.status was made for.
17461 if test -n "$ac_config_files"; then
17462   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17463 fi
17464
17465 if test -n "$ac_config_headers"; then
17466   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17467 fi
17468
17469 if test -n "$ac_config_links"; then
17470   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17471 fi
17472
17473 if test -n "$ac_config_commands"; then
17474   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17475 fi
17476
17477 cat >>$CONFIG_STATUS <<\EOF
17478
17479 ac_cs_usage="\
17480 \`$as_me' instantiates files from templates according to the
17481 current configuration.
17482
17483 Usage: $0 [OPTIONS] [FILE]...
17484
17485   -h, --help       print this help, then exit
17486   -V, --version    print version number, then exit
17487   -d, --debug      don't remove temporary files
17488       --recheck    update $as_me by reconfiguring in the same conditions
17489   --file=FILE[:TEMPLATE]
17490                    instantiate the configuration file FILE
17491   --header=FILE[:TEMPLATE]
17492                    instantiate the configuration header FILE
17493
17494 Configuration files:
17495 $config_files
17496
17497 Configuration headers:
17498 $config_headers
17499
17500 Configuration commands:
17501 $config_commands
17502
17503 Report bugs to <bug-autoconf@gnu.org>."
17504 EOF
17505
17506 cat >>$CONFIG_STATUS <<EOF
17507 ac_cs_version="\\
17508 config.status
17509 configured by $0, generated by GNU Autoconf 2.52.20081225,
17510   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17511
17512 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17513 Free Software Foundation, Inc.
17514 This config.status script is free software; the Free Software Foundation
17515 gives unlimited permission to copy, distribute and modify it."
17516 srcdir=$srcdir
17517 INSTALL="$INSTALL"
17518 EOF
17519
17520 cat >>$CONFIG_STATUS <<\EOF
17521 # If no file are specified by the user, then we need to provide default
17522 # value.  By we need to know if files were specified by the user.
17523 ac_need_defaults=:
17524 while test $# != 0
17525 do
17526   case $1 in
17527   --*=*)
17528     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17529     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17530     shift
17531     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17532     shift
17533     ;;
17534   -*);;
17535   *) # This is not an option, so the user has probably given explicit
17536      # arguments.
17537      ac_need_defaults=false;;
17538   esac
17539
17540   case $1 in
17541   # Handling of the options.
17542 EOF
17543 cat >>$CONFIG_STATUS <<EOF
17544   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17545     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17546     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17547 EOF
17548 cat >>$CONFIG_STATUS <<\EOF
17549   --version | --vers* | -V )
17550     echo "$ac_cs_version"; exit 0 ;;
17551   --he | --h)
17552     # Conflict between --help and --header
17553     { { echo "$as_me:17553: error: ambiguous option: $1
17554 Try \`$0 --help' for more information." >&5
17555 echo "$as_me: error: ambiguous option: $1
17556 Try \`$0 --help' for more information." >&2;}
17557    { (exit 1); exit 1; }; };;
17558   --help | --hel | -h )
17559     echo "$ac_cs_usage"; exit 0 ;;
17560   --debug | --d* | -d )
17561     debug=: ;;
17562   --file | --fil | --fi | --f )
17563     shift
17564     CONFIG_FILES="$CONFIG_FILES $1"
17565     ac_need_defaults=false;;
17566   --header | --heade | --head | --hea )
17567     shift
17568     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17569     ac_need_defaults=false;;
17570
17571   # This is an error.
17572   -*) { { echo "$as_me:17572: error: unrecognized option: $1
17573 Try \`$0 --help' for more information." >&5
17574 echo "$as_me: error: unrecognized option: $1
17575 Try \`$0 --help' for more information." >&2;}
17576    { (exit 1); exit 1; }; } ;;
17577
17578   *) ac_config_targets="$ac_config_targets $1" ;;
17579
17580   esac
17581   shift
17582 done
17583
17584 exec 5>>config.log
17585 cat >&5 << _ACEOF
17586
17587 ## ----------------------- ##
17588 ## Running config.status.  ##
17589 ## ----------------------- ##
17590
17591 This file was extended by $as_me 2.52.20081225, executed with
17592   CONFIG_FILES    = $CONFIG_FILES
17593   CONFIG_HEADERS  = $CONFIG_HEADERS
17594   CONFIG_LINKS    = $CONFIG_LINKS
17595   CONFIG_COMMANDS = $CONFIG_COMMANDS
17596   > $ac_cs_invocation
17597 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17598
17599 _ACEOF
17600 EOF
17601
17602 cat >>$CONFIG_STATUS <<EOF
17603 #
17604 # INIT-COMMANDS section.
17605 #
17606
17607 ### Special initialization commands, used to pass information from the
17608 ### configuration-run into config.status
17609
17610 AWK="$AWK"
17611 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17612 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17613 ECHO_LINK="$ECHO_LINK"
17614 LDCONFIG="$LDCONFIG"
17615 LIB_NAME="$LIB_NAME"
17616 LIB_SUBSETS="$LIB_SUBSETS"
17617 LIB_SUFFIX="$LIB_SUFFIX"
17618 LIB_TRACING="$LIB_TRACING"
17619 MAKE_TERMINFO="$MAKE_TERMINFO"
17620 NCURSES_MAJOR="$NCURSES_MAJOR"
17621 NCURSES_MINOR="$NCURSES_MINOR"
17622 NCURSES_OSPEED="$NCURSES_OSPEED"
17623 NCURSES_PATCH="$NCURSES_PATCH"
17624 SRC_SUBDIRS="$SRC_SUBDIRS"
17625 TERMINFO="$TERMINFO"
17626 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17627 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17628 TICS_NAME="$TICS_NAME"
17629 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17630 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17631 TINFO_NAME="$TINFO_NAME"
17632 TINFO_SUFFIX="$TINFO_SUFFIX"
17633 WITH_CURSES_H="$with_curses_h"
17634 WITH_ECHO="$with_echo"
17635 WITH_OVERWRITE="$with_overwrite"
17636 cf_LIST_MODELS="$cf_list_models"
17637 cf_cv_abi_version="$cf_cv_abi_version"
17638 cf_cv_do_relink="$cf_cv_do_relink"
17639 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17640 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17641 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17642 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17643 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17644 cf_cv_rel_version="$cf_cv_rel_version"
17645 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17646 cf_cv_shared_soname='$cf_cv_shared_soname'
17647 cf_cv_shlib_version="$cf_cv_shlib_version"
17648 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17649 cf_cv_system_name="$cf_cv_system_name"
17650 cf_with_cxx_binding="$cf_with_cxx_binding"
17651 cf_with_manpages="$cf_with_manpages"
17652 host="$host"
17653 target="$target"
17654
17655 EOF
17656
17657 cat >>$CONFIG_STATUS <<\EOF
17658 for ac_config_target in $ac_config_targets
17659 do
17660   case "$ac_config_target" in
17661   # Handling of arguments.
17662   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17663   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17664   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17665   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17666   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17667   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17668   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17669   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17670   *) { { echo "$as_me:17670: error: invalid argument: $ac_config_target" >&5
17671 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17672    { (exit 1); exit 1; }; };;
17673   esac
17674 done
17675
17676 # If the user did not use the arguments to specify the items to instantiate,
17677 # then the envvar interface is used.  Set only those that are not.
17678 # We use the long form for the default assignment because of an extremely
17679 # bizarre bug on SunOS 4.1.3.
17680 if $ac_need_defaults; then
17681   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17682   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17683   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17684 fi
17685
17686 # Create a temporary directory, and hook for its removal unless debugging.
17687 $debug ||
17688 {
17689   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17690   trap '{ (exit 1); exit 1; }' 1 2 13 15
17691 }
17692
17693 # Create a (secure) tmp directory for tmp files.
17694 : ${TMPDIR=/tmp}
17695 {
17696   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17697   test -n "$tmp" && test -d "$tmp"
17698 }  ||
17699 {
17700   tmp=$TMPDIR/cs$$-$RANDOM
17701   (umask 077 && mkdir $tmp)
17702 } ||
17703 {
17704    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17705    { (exit 1); exit 1; }
17706 }
17707
17708 EOF
17709
17710 cat >>$CONFIG_STATUS <<EOF
17711
17712 #
17713 # CONFIG_FILES section.
17714 #
17715
17716 # No need to generate the scripts if there are no CONFIG_FILES.
17717 # This happens for instance when ./config.status config.h
17718 if test -n "\$CONFIG_FILES"; then
17719   # Protect against being on the right side of a sed subst in config.status.
17720   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17721    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17722 s,@SHELL@,$SHELL,;t t
17723 s,@exec_prefix@,$exec_prefix,;t t
17724 s,@prefix@,$prefix,;t t
17725 s,@program_transform_name@,$program_transform_name,;t t
17726 s,@bindir@,$bindir,;t t
17727 s,@sbindir@,$sbindir,;t t
17728 s,@libexecdir@,$libexecdir,;t t
17729 s,@datadir@,$datadir,;t t
17730 s,@sysconfdir@,$sysconfdir,;t t
17731 s,@sharedstatedir@,$sharedstatedir,;t t
17732 s,@localstatedir@,$localstatedir,;t t
17733 s,@libdir@,$libdir,;t t
17734 s,@includedir@,$includedir,;t t
17735 s,@oldincludedir@,$oldincludedir,;t t
17736 s,@infodir@,$infodir,;t t
17737 s,@mandir@,$mandir,;t t
17738 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17739 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17740 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17741 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17742 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17743 s,@build_alias@,$build_alias,;t t
17744 s,@host_alias@,$host_alias,;t t
17745 s,@target_alias@,$target_alias,;t t
17746 s,@ECHO_C@,$ECHO_C,;t t
17747 s,@ECHO_N@,$ECHO_N,;t t
17748 s,@ECHO_T@,$ECHO_T,;t t
17749 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17750 s,@DEFS@,$DEFS,;t t
17751 s,@LIBS@,$LIBS,;t t
17752 s,@top_builddir@,$top_builddir,;t t
17753 s,@EGREP@,$EGREP,;t t
17754 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17755 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17756 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17757 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17758 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17759 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17760 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17761 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17762 s,@build@,$build,;t t
17763 s,@build_cpu@,$build_cpu,;t t
17764 s,@build_vendor@,$build_vendor,;t t
17765 s,@build_os@,$build_os,;t t
17766 s,@host@,$host,;t t
17767 s,@host_cpu@,$host_cpu,;t t
17768 s,@host_vendor@,$host_vendor,;t t
17769 s,@host_os@,$host_os,;t t
17770 s,@target@,$target,;t t
17771 s,@target_cpu@,$target_cpu,;t t
17772 s,@target_vendor@,$target_vendor,;t t
17773 s,@target_os@,$target_os,;t t
17774 s,@CC@,$CC,;t t
17775 s,@CFLAGS@,$CFLAGS,;t t
17776 s,@LDFLAGS@,$LDFLAGS,;t t
17777 s,@CPPFLAGS@,$CPPFLAGS,;t t
17778 s,@ac_ct_CC@,$ac_ct_CC,;t t
17779 s,@EXEEXT@,$EXEEXT,;t t
17780 s,@OBJEXT@,$OBJEXT,;t t
17781 s,@CPP@,$CPP,;t t
17782 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17783 s,@PROG_EXT@,$PROG_EXT,;t t
17784 s,@LDCONFIG@,$LDCONFIG,;t t
17785 s,@CXX@,$CXX,;t t
17786 s,@CXXFLAGS@,$CXXFLAGS,;t t
17787 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17788 s,@AWK@,$AWK,;t t
17789 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17790 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17791 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17792 s,@LINT@,$LINT,;t t
17793 s,@LINT_OPTS@,$LINT_OPTS,;t t
17794 s,@LN_S@,$LN_S,;t t
17795 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17796 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17797 s,@SET_MAKE@,$SET_MAKE,;t t
17798 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17799 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17800 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17801 s,@RANLIB@,$RANLIB,;t t
17802 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17803 s,@LD@,$LD,;t t
17804 s,@ac_ct_LD@,$ac_ct_LD,;t t
17805 s,@AR@,$AR,;t t
17806 s,@ac_ct_AR@,$ac_ct_AR,;t t
17807 s,@ARFLAGS@,$ARFLAGS,;t t
17808 s,@DESTDIR@,$DESTDIR,;t t
17809 s,@BUILD_CC@,$BUILD_CC,;t t
17810 s,@BUILD_CPP@,$BUILD_CPP,;t t
17811 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17812 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17813 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17814 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17815 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17816 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17817 s,@cf_list_models@,$cf_list_models,;t t
17818 s,@LIBTOOL@,$LIBTOOL,;t t
17819 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17820 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17821 s,@LIB_CREATE@,$LIB_CREATE,;t t
17822 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17823 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17824 s,@LIB_PREP@,$LIB_PREP,;t t
17825 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17826 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17827 s,@LIB_LINK@,$LIB_LINK,;t t
17828 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17829 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17830 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17831 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17832 s,@TICS_NAME@,$TICS_NAME,;t t
17833 s,@TINFO_NAME@,$TINFO_NAME,;t t
17834 s,@LIB_NAME@,$LIB_NAME,;t t
17835 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17836 s,@CC_G_OPT@,$CC_G_OPT,;t t
17837 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17838 s,@LD_MODEL@,$LD_MODEL,;t t
17839 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17840 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17841 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17842 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17843 s,@LINK_PROGS@,$LINK_PROGS,;t t
17844 s,@LINK_TESTS@,$LINK_TESTS,;t t
17845 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17846 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17847 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17848 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17849 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17850 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17851 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17852 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17853 s,@TERMINFO@,$TERMINFO,;t t
17854 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17855 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17856 s,@TERMPATH@,$TERMPATH,;t t
17857 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17858 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17859 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17860 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17861 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17862 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17863 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17864 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17865 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17866 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17867 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17868 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17869 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17870 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17871 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17872 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17873 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17874 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17875 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17876 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17877 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17878 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17879 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17880 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17881 s,@PTHREAD@,$PTHREAD,;t t
17882 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17883 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17884 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17885 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17886 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17887 s,@ECHO_LINK@,$ECHO_LINK,;t t
17888 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17889 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17890 s,@ADA_TRACE@,$ADA_TRACE,;t t
17891 s,@MATH_LIB@,$MATH_LIB,;t t
17892 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17893 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17894 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17895 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17896 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17897 s,@TEST_LIBS@,$TEST_LIBS,;t t
17898 s,@CXXCPP@,$CXXCPP,;t t
17899 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17900 s,@CXX_AR@,$CXX_AR,;t t
17901 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17902 s,@CXXLIBS@,$CXXLIBS,;t t
17903 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17904 s,@gnat_exists@,$gnat_exists,;t t
17905 s,@M4_exists@,$M4_exists,;t t
17906 s,@cf_ada_make@,$cf_ada_make,;t t
17907 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17908 s,@cf_ada_package@,$cf_ada_package,;t t
17909 s,@ADAFLAGS@,$ADAFLAGS,;t t
17910 s,@cf_compile_generics@,$cf_compile_generics,;t t
17911 s,@cf_generic_objects@,$cf_generic_objects,;t t
17912 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17913 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17914 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17915 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17916 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17917 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17918 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17919 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17920 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17921 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17922 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17923 s,@TICS_ARGS@,$TICS_ARGS,;t t
17924 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17925 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17926 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17927 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17928 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17929 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17930 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17931 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17932 s,@TICS_LIST@,$TICS_LIST,;t t
17933 s,@TINFO_LIST@,$TINFO_LIST,;t t
17934 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17935 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17936 s,@TEST_ARGS@,$TEST_ARGS,;t t
17937 s,@TEST_DEPS@,$TEST_DEPS,;t t
17938 s,@TEST_ARG2@,$TEST_ARG2,;t t
17939 s,@TEST_DEP2@,$TEST_DEP2,;t t
17940 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17941 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17942 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17943 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17944 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17945 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17946 CEOF
17947
17948 EOF
17949
17950   cat >>$CONFIG_STATUS <<\EOF
17951   # Split the substitutions into bite-sized pieces for seds with
17952   # small command number limits, like on Digital OSF/1 and HP-UX.
17953   ac_max_sed_lines=48
17954   ac_sed_frag=1 # Number of current file.
17955   ac_beg=1 # First line for current file.
17956   ac_end=$ac_max_sed_lines # Line after last line for current file.
17957   ac_more_lines=:
17958   ac_sed_cmds=
17959   while $ac_more_lines; do
17960     if test $ac_beg -gt 1; then
17961       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17962     else
17963       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17964     fi
17965     if test ! -s $tmp/subs.frag; then
17966       ac_more_lines=false
17967     else
17968       # The purpose of the label and of the branching condition is to
17969       # speed up the sed processing (if there are no `@' at all, there
17970       # is no need to browse any of the substitutions).
17971       # These are the two extra sed commands mentioned above.
17972       (echo ':t
17973   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17974       if test -z "$ac_sed_cmds"; then
17975         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17976       else
17977         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17978       fi
17979       ac_sed_frag=`expr $ac_sed_frag + 1`
17980       ac_beg=$ac_end
17981       ac_end=`expr $ac_end + $ac_max_sed_lines`
17982     fi
17983   done
17984   if test -z "$ac_sed_cmds"; then
17985     ac_sed_cmds=cat
17986   fi
17987 fi # test -n "$CONFIG_FILES"
17988
17989 EOF
17990 cat >>$CONFIG_STATUS <<\EOF
17991 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17992   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17993   case $ac_file in
17994   - | *:- | *:-:* ) # input from stdin
17995         cat >$tmp/stdin
17996         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17997         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17998   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17999         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18000   * )   ac_file_in=$ac_file.in ;;
18001   esac
18002
18003   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18004   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18005          X"$ac_file" : 'X\(//\)[^/]' \| \
18006          X"$ac_file" : 'X\(//\)$' \| \
18007          X"$ac_file" : 'X\(/\)' \| \
18008          .     : '\(.\)' 2>/dev/null ||
18009 echo X"$ac_file" |
18010     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18011           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18012           /^X\(\/\/\)$/{ s//\1/; q; }
18013           /^X\(\/\).*/{ s//\1/; q; }
18014           s/.*/./; q'`
18015   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18016     { case "$ac_dir" in
18017   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18018   *)                      as_incr_dir=.;;
18019 esac
18020 as_dummy="$ac_dir"
18021 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18022   case $as_mkdir_dir in
18023     # Skip DOS drivespec
18024     ?:) as_incr_dir=$as_mkdir_dir ;;
18025     *)
18026       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18027       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18028     ;;
18029   esac
18030 done; }
18031
18032     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18033     # A "../" for each directory in $ac_dir_suffix.
18034     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18035   else
18036     ac_dir_suffix= ac_dots=
18037   fi
18038
18039   case $srcdir in
18040   .)  ac_srcdir=.
18041       if test -z "$ac_dots"; then
18042          ac_top_srcdir=.
18043       else
18044          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18045       fi ;;
18046   [\\/]* | ?:[\\/]* )
18047       ac_srcdir=$srcdir$ac_dir_suffix;
18048       ac_top_srcdir=$srcdir ;;
18049   *) # Relative path.
18050     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18051     ac_top_srcdir=$ac_dots$srcdir ;;
18052   esac
18053
18054   case $INSTALL in
18055   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18056   *) ac_INSTALL=$ac_dots$INSTALL ;;
18057   esac
18058
18059   if test x"$ac_file" != x-; then
18060     { echo "$as_me:18060: creating $ac_file" >&5
18061 echo "$as_me: creating $ac_file" >&6;}
18062     rm -f "$ac_file"
18063   fi
18064   # Let's still pretend it is `configure' which instantiates (i.e., don't
18065   # use $as_me), people would be surprised to read:
18066   #    /* config.h.  Generated automatically by config.status.  */
18067   configure_input="Generated automatically from `echo $ac_file_in |
18068                                                  sed 's,.*/,,'` by configure."
18069
18070   # First look for the input files in the build tree, otherwise in the
18071   # src tree.
18072   ac_file_inputs=`IFS=:
18073     for f in $ac_file_in; do
18074       case $f in
18075       -) echo $tmp/stdin ;;
18076       [\\/$]*)
18077          # Absolute (can't be DOS-style, as IFS=:)
18078          test -f "$f" || { { echo "$as_me:18078: error: cannot find input file: $f" >&5
18079 echo "$as_me: error: cannot find input file: $f" >&2;}
18080    { (exit 1); exit 1; }; }
18081          echo $f;;
18082       *) # Relative
18083          if test -f "$f"; then
18084            # Build tree
18085            echo $f
18086          elif test -f "$srcdir/$f"; then
18087            # Source tree
18088            echo $srcdir/$f
18089          else
18090            # /dev/null tree
18091            { { echo "$as_me:18091: error: cannot find input file: $f" >&5
18092 echo "$as_me: error: cannot find input file: $f" >&2;}
18093    { (exit 1); exit 1; }; }
18094          fi;;
18095       esac
18096     done` || { (exit 1); exit 1; }
18097 EOF
18098 cat >>$CONFIG_STATUS <<EOF
18099   sed "$ac_vpsub
18100 $extrasub
18101 EOF
18102 cat >>$CONFIG_STATUS <<\EOF
18103 :t
18104 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18105 s,@configure_input@,$configure_input,;t t
18106 s,@srcdir@,$ac_srcdir,;t t
18107 s,@top_srcdir@,$ac_top_srcdir,;t t
18108 s,@INSTALL@,$ac_INSTALL,;t t
18109 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18110   rm -f $tmp/stdin
18111   if test x"$ac_file" != x-; then
18112     mv $tmp/out $ac_file
18113   else
18114     cat $tmp/out
18115     rm -f $tmp/out
18116   fi
18117
18118 done
18119 EOF
18120 cat >>$CONFIG_STATUS <<\EOF
18121
18122 #
18123 # CONFIG_HEADER section.
18124 #
18125
18126 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18127 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18128 #
18129 # ac_d sets the value in "#define NAME VALUE" lines.
18130 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18131 ac_dB='[        ].*$,\1#\2'
18132 ac_dC=' '
18133 ac_dD=',;t'
18134 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18135 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18136 ac_iB='\([      ]\),\1#\2define\3'
18137 ac_iC=' '
18138 ac_iD='\4,;t'
18139 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18140 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18141 ac_uB='$,\1#\2define\3'
18142 ac_uC=' '
18143 ac_uD=',;t'
18144
18145 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18146   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18147   case $ac_file in
18148   - | *:- | *:-:* ) # input from stdin
18149         cat >$tmp/stdin
18150         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18151         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18152   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18153         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18154   * )   ac_file_in=$ac_file.in ;;
18155   esac
18156
18157   test x"$ac_file" != x- && { echo "$as_me:18157: creating $ac_file" >&5
18158 echo "$as_me: creating $ac_file" >&6;}
18159
18160   # First look for the input files in the build tree, otherwise in the
18161   # src tree.
18162   ac_file_inputs=`IFS=:
18163     for f in $ac_file_in; do
18164       case $f in
18165       -) echo $tmp/stdin ;;
18166       [\\/$]*)
18167          # Absolute (can't be DOS-style, as IFS=:)
18168          test -f "$f" || { { echo "$as_me:18168: error: cannot find input file: $f" >&5
18169 echo "$as_me: error: cannot find input file: $f" >&2;}
18170    { (exit 1); exit 1; }; }
18171          echo $f;;
18172       *) # Relative
18173          if test -f "$f"; then
18174            # Build tree
18175            echo $f
18176          elif test -f "$srcdir/$f"; then
18177            # Source tree
18178            echo $srcdir/$f
18179          else
18180            # /dev/null tree
18181            { { echo "$as_me:18181: error: cannot find input file: $f" >&5
18182 echo "$as_me: error: cannot find input file: $f" >&2;}
18183    { (exit 1); exit 1; }; }
18184          fi;;
18185       esac
18186     done` || { (exit 1); exit 1; }
18187   # Remove the trailing spaces.
18188   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18189
18190 EOF
18191
18192 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18193 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18194 # be either 'cat' or 'sort'.
18195 cat confdefs.h | uniq >conftest.vals
18196
18197 # Break up conftest.vals because some shells have a limit on
18198 # the size of here documents, and old seds have small limits too.
18199
18200 rm -f conftest.tail
18201 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18202 while grep . conftest.vals >/dev/null
18203 do
18204   # Write chunks of a limited-size here document to conftest.frag.
18205   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18206   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18207   echo 'CEOF' >> $CONFIG_STATUS
18208   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18209   rm -f conftest.vals
18210   mv conftest.tail conftest.vals
18211 done
18212 rm -f conftest.vals
18213
18214 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18215 # marker @DEFS@.
18216 echo '  cat >> conftest.edit <<CEOF
18217 /@DEFS@/r conftest.frag
18218 /@DEFS@/d
18219 CEOF
18220 sed -f conftest.edit $tmp/in > $tmp/out
18221 rm -f $tmp/in
18222 mv $tmp/out $tmp/in
18223 rm -f conftest.edit conftest.frag
18224 ' >> $CONFIG_STATUS
18225
18226 cat >>$CONFIG_STATUS <<\EOF
18227   # Let's still pretend it is `configure' which instantiates (i.e., don't
18228   # use $as_me), people would be surprised to read:
18229   #    /* config.h.  Generated automatically by config.status.  */
18230   if test x"$ac_file" = x-; then
18231     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18232   else
18233     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18234   fi
18235   cat $tmp/in >>$tmp/config.h
18236   rm -f $tmp/in
18237   if test x"$ac_file" != x-; then
18238     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18239       { echo "$as_me:18239: $ac_file is unchanged" >&5
18240 echo "$as_me: $ac_file is unchanged" >&6;}
18241     else
18242       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18243          X"$ac_file" : 'X\(//\)[^/]' \| \
18244          X"$ac_file" : 'X\(//\)$' \| \
18245          X"$ac_file" : 'X\(/\)' \| \
18246          .     : '\(.\)' 2>/dev/null ||
18247 echo X"$ac_file" |
18248     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18249           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18250           /^X\(\/\/\)$/{ s//\1/; q; }
18251           /^X\(\/\).*/{ s//\1/; q; }
18252           s/.*/./; q'`
18253       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18254         { case "$ac_dir" in
18255   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18256   *)                      as_incr_dir=.;;
18257 esac
18258 as_dummy="$ac_dir"
18259 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18260   case $as_mkdir_dir in
18261     # Skip DOS drivespec
18262     ?:) as_incr_dir=$as_mkdir_dir ;;
18263     *)
18264       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18265       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18266     ;;
18267   esac
18268 done; }
18269
18270       fi
18271       rm -f $ac_file
18272       mv $tmp/config.h $ac_file
18273     fi
18274   else
18275     cat $tmp/config.h
18276     rm -f $tmp/config.h
18277   fi
18278 done
18279 EOF
18280 cat >>$CONFIG_STATUS <<\EOF
18281
18282 #
18283 # CONFIG_COMMANDS section.
18284 #
18285 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18286   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18287   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18288
18289   case $ac_dest in
18290     default )
18291
18292 for cf_dir in test
18293 do
18294         if test ! -d $srcdir/$cf_dir; then
18295                 continue
18296         elif test -f $srcdir/$cf_dir/programs; then
18297                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18298         fi
18299 done
18300
18301         case $cf_cv_system_name in #(vi
18302         OS/2*|os2*) #(vi
18303         LIB_PREFIX=''
18304         ;;
18305         *)      LIB_PREFIX='lib'
18306         ;;
18307         esac
18308 cf_prefix=$LIB_PREFIX
18309
18310 if test $cf_cv_shlib_version = cygdll ; then
18311         TINFO_NAME=$TINFO_ARG_SUFFIX
18312         TINFO_SUFFIX=.dll
18313 fi
18314
18315 for cf_dir in $SRC_SUBDIRS
18316 do
18317         if test ! -d $srcdir/$cf_dir ; then
18318                 continue
18319         elif test -f $srcdir/$cf_dir/modules; then
18320
18321                 SHARED_LIB=
18322                 LIBS_TO_MAKE=
18323                 for cf_item in $cf_LIST_MODELS
18324                 do
18325
18326         case $cf_item in #(vi
18327         libtool) #(vi
18328                 cf_suffix='.la'
18329                 cf_depsuf=$cf_suffix
18330                 ;;
18331         normal) #(vi
18332                 cf_suffix='.a'
18333                 cf_depsuf=$cf_suffix
18334                 ;;
18335         debug) #(vi
18336                 cf_suffix='_g.a'
18337                 cf_depsuf=$cf_suffix
18338                 ;;
18339         profile) #(vi
18340                 cf_suffix='_p.a'
18341                 cf_depsuf=$cf_suffix
18342                 ;;
18343         shared) #(vi
18344                 case $cf_cv_system_name in
18345                 aix[56]*) #(vi
18346                         cf_suffix='.a'
18347                         cf_depsuf=$cf_suffix
18348                         ;;
18349                 cygwin*) #(vi
18350                         cf_suffix='.dll'
18351                         cf_depsuf='.dll.a'
18352                         ;;
18353                 darwin*) #(vi
18354                         cf_suffix='.dylib'
18355                         cf_depsuf=$cf_suffix
18356                         ;;
18357                 hpux*) #(vi
18358                         case $target in
18359                         ia64*) #(vi
18360                                 cf_suffix='.so'
18361                                 cf_depsuf=$cf_suffix
18362                                 ;;
18363                         *) #(vi
18364                                 cf_suffix='.sl'
18365                                 cf_depsuf=$cf_suffix
18366                                 ;;
18367                         esac
18368                         ;;
18369                 *)      cf_suffix='.so'
18370                         cf_depsuf=$cf_suffix
18371                         ;;
18372                 esac
18373         esac
18374         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18375         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18376
18377                         if test $cf_item = shared ; then
18378                         if test "$cf_cv_do_symlinks" = yes ; then
18379                                 case "$cf_cv_shlib_version" in #(vi
18380                                 rel) #(vi
18381                                         case "$cf_cv_system_name" in #(vi
18382                                         darwin*)
18383                                         case .${LIB_SUFFIX} in
18384                                         .w*)
18385                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18386                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18387                                                 ;;
18388                                         *)
18389                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18390                                                 ;;
18391                                         esac
18392                                         ;; #(vi
18393                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18394                                         esac
18395                                         ;;
18396                                 abi)
18397                                         case "$cf_cv_system_name" in #(vi
18398                                         darwin*)
18399                                         case .${LIB_SUFFIX} in
18400                                         .w*)
18401                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18402                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18403                                                 ;;
18404                                         *)
18405                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18406                                                 ;;
18407                                         esac
18408                                         ;; #(vi
18409                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18410                                         esac
18411                                         ;;
18412                                 esac
18413                         fi
18414                         # cygwin needs import library, and has unique naming convention
18415                         # use autodetected ${cf_prefix} for import lib and static lib, but
18416                         # use 'cyg' prefix for shared lib.
18417                         if test $cf_cv_shlib_version = cygdll ; then
18418                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18419                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18420                                 continue
18421                         fi
18422                         fi
18423                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18424                 done
18425
18426                 if test $cf_dir = ncurses ; then
18427                         cf_subsets="$LIB_SUBSETS"
18428                         cf_r_parts="$cf_subsets"
18429                         cf_liblist="$LIBS_TO_MAKE"
18430
18431                         while test -n "$cf_r_parts"
18432                         do
18433                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18434                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18435                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18436                                         cf_item=
18437                                         case $cf_l_parts in #(vi
18438                                         *termlib*) #(vi
18439                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18440                                                 ;;
18441                                         *ticlib*)
18442                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18443                                                 ;;
18444                                         *)
18445                                                 break
18446                                                 ;;
18447                                         esac
18448                                         if test -n "$cf_item"; then
18449                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18450                                         fi
18451                                 else
18452                                         break
18453                                 fi
18454                         done
18455                 else
18456                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18457                 fi
18458
18459                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18460                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18461                         $cf_dir/Makefile >$cf_dir/Makefile.out
18462                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18463
18464                 $AWK -f $srcdir/mk-0th.awk \
18465                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18466                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18467
18468                 for cf_subset in $cf_subsets
18469                 do
18470                         cf_subdirs=
18471                         for cf_item in $cf_LIST_MODELS
18472                         do
18473                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18474
18475 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18476
18477         case $cf_item in #(vi
18478         libtool) #(vi
18479                 cf_suffix='.la'
18480                 cf_depsuf=$cf_suffix
18481                 ;;
18482         normal) #(vi
18483                 cf_suffix='.a'
18484                 cf_depsuf=$cf_suffix
18485                 ;;
18486         debug) #(vi
18487                 cf_suffix='_g.a'
18488                 cf_depsuf=$cf_suffix
18489                 ;;
18490         profile) #(vi
18491                 cf_suffix='_p.a'
18492                 cf_depsuf=$cf_suffix
18493                 ;;
18494         shared) #(vi
18495                 case $cf_cv_system_name in
18496                 aix[56]*) #(vi
18497                         cf_suffix='.a'
18498                         cf_depsuf=$cf_suffix
18499                         ;;
18500                 cygwin*) #(vi
18501                         cf_suffix='.dll'
18502                         cf_depsuf='.dll.a'
18503                         ;;
18504                 darwin*) #(vi
18505                         cf_suffix='.dylib'
18506                         cf_depsuf=$cf_suffix
18507                         ;;
18508                 hpux*) #(vi
18509                         case $target in
18510                         ia64*) #(vi
18511                                 cf_suffix='.so'
18512                                 cf_depsuf=$cf_suffix
18513                                 ;;
18514                         *) #(vi
18515                                 cf_suffix='.sl'
18516                                 cf_depsuf=$cf_suffix
18517                                 ;;
18518                         esac
18519                         ;;
18520                 *)      cf_suffix='.so'
18521                         cf_depsuf=$cf_suffix
18522                         ;;
18523                 esac
18524         esac
18525         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18526         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18527
18528         case $cf_item in
18529         libtool) cf_subdir='obj_lo'  ;;
18530         normal)  cf_subdir='objects' ;;
18531         debug)   cf_subdir='obj_g' ;;
18532         profile) cf_subdir='obj_p' ;;
18533         shared)
18534                 case $cf_cv_system_name in #(vi
18535                 cygwin) #(vi
18536                         cf_subdir='objects' ;;
18537                 *)
18538                         cf_subdir='obj_s' ;;
18539                 esac
18540         esac
18541
18542                         # Test for case where we build libtinfo with a different name.
18543                         cf_libname=$cf_dir
18544                         if test $cf_dir = ncurses ; then
18545                                 case $cf_subset in
18546                                 *base*)
18547                                         cf_libname=${cf_libname}$LIB_SUFFIX
18548                                         ;;
18549                                 *termlib*)
18550                                         cf_libname=$TINFO_LIB_SUFFIX
18551                                         ;;
18552                                 ticlib*)
18553                                         cf_libname=$TICS_LIB_SUFFIX
18554                                         ;;
18555                                 esac
18556                         else
18557                                 cf_libname=${cf_libname}$LIB_SUFFIX
18558                         fi
18559                         if test -n "${DFT_ARG_SUFFIX}" ; then
18560                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18561                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18562                         fi
18563
18564                         # These dependencies really are for development, not
18565                         # builds, but they are useful in porting, too.
18566                         cf_depend="../include/ncurses_cfg.h"
18567                         if test "$srcdir" = "."; then
18568                                 cf_reldir="."
18569                         else
18570                                 cf_reldir="\${srcdir}"
18571                         fi
18572
18573                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18574                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18575                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18576                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18577                         fi
18578
18579                         cf_dir_suffix=
18580                         old_cf_suffix="$cf_suffix"
18581                         if test "$cf_cv_shlib_version_infix" = yes ; then
18582                         if test -n "$LIB_SUFFIX" ; then
18583                                 case $LIB_SUFFIX in
18584                                 w*)
18585                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18586                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18587                                         cf_dir_suffix=w
18588                                         ;;
18589                                 esac
18590                         fi
18591                         fi
18592
18593                         $AWK -f $srcdir/mk-1st.awk \
18594                                 name=${cf_libname}${cf_dir_suffix} \
18595                                 traces=$LIB_TRACING \
18596                                 MODEL=$cf_ITEM \
18597                                 model=$cf_subdir \
18598                                 prefix=$cf_prefix \
18599                                 suffix=$cf_suffix \
18600                                 subset=$cf_subset \
18601                                 TermlibRoot=$TINFO_NAME \
18602                                 TermlibSuffix=$TINFO_SUFFIX \
18603                                 ShlibVer=$cf_cv_shlib_version \
18604                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18605                                 ReLink=${cf_cv_do_relink-no} \
18606                                 DoLinks=$cf_cv_do_symlinks \
18607                                 rmSoLocs=$cf_cv_rm_so_locs \
18608                                 ldconfig="$LDCONFIG" \
18609                                 overwrite=$WITH_OVERWRITE \
18610                                 depend="$cf_depend" \
18611                                 host="$host" \
18612                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18613
18614                         cf_suffix="$old_cf_suffix"
18615
18616                         for cf_subdir2 in $cf_subdirs lib
18617                         do
18618                                 test $cf_subdir = $cf_subdir2 && break
18619                         done
18620                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18621                         $AWK -f $srcdir/mk-2nd.awk \
18622                                 name=$cf_dir \
18623                                 traces=$LIB_TRACING \
18624                                 MODEL=$cf_ITEM \
18625                                 model=$cf_subdir \
18626                                 subset=$cf_subset \
18627                                 srcdir=$srcdir \
18628                                 echo=$WITH_ECHO \
18629                                 crenames=$cf_cv_prog_CC_c_o \
18630                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18631                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18632                         cf_subdirs="$cf_subdirs $cf_subdir"
18633                         done
18634                 done
18635         fi
18636
18637         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18638 done
18639
18640 for cf_dir in $SRC_SUBDIRS
18641 do
18642         if test ! -d $srcdir/$cf_dir ; then
18643                 continue
18644         fi
18645
18646         if test -f $cf_dir/Makefile ; then
18647                 case "$cf_dir" in
18648                 Ada95) #(vi
18649                         echo 'libs \' >> Makefile
18650                         echo 'install.libs \' >> Makefile
18651                         echo 'uninstall.libs ::' >> Makefile
18652                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18653                         ;;
18654                 esac
18655         fi
18656
18657         if test -f $srcdir/$cf_dir/modules; then
18658                 echo >> Makefile
18659                 if test -f $srcdir/$cf_dir/headers; then
18660 cat >> Makefile <<CF_EOF
18661 install.includes \\
18662 uninstall.includes \\
18663 CF_EOF
18664                 fi
18665 if test "$cf_dir" != "c++" ; then
18666 echo 'lint \' >> Makefile
18667 fi
18668 cat >> Makefile <<CF_EOF
18669 libs \\
18670 lintlib \\
18671 install.libs \\
18672 uninstall.libs \\
18673 install.$cf_dir \\
18674 uninstall.$cf_dir ::
18675         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18676 CF_EOF
18677         elif test -f $srcdir/$cf_dir/headers; then
18678 cat >> Makefile <<CF_EOF
18679
18680 libs \\
18681 install.libs \\
18682 uninstall.libs \\
18683 install.includes \\
18684 uninstall.includes ::
18685         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18686 CF_EOF
18687 fi
18688 done
18689
18690 cat >> Makefile <<CF_EOF
18691
18692 install.libs uninstall.libs \\
18693 install.data uninstall.data ::
18694 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18695 CF_EOF
18696
18697 if test "x$cf_with_manpages" = xyes; then
18698 cat >> Makefile <<CF_EOF
18699
18700 install.man \\
18701 uninstall.man ::
18702         cd man && \${MAKE} \${CF_MFLAGS} \$@
18703 CF_EOF
18704 fi
18705
18706 cat >> Makefile <<CF_EOF
18707
18708 distclean ::
18709         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18710         rm -f headers.sh headers.sed mk_shared_lib.sh
18711         rm -f edit_man.* man_alias.*
18712         rm -rf \${DIRS_TO_MAKE}
18713 CF_EOF
18714
18715 # Special case: tack's manpage lives in its own directory.
18716 if test "x$cf_with_manpages" = xyes; then
18717 if test -d tack ; then
18718 if test -f $srcdir/$tack.h; then
18719 cat >> Makefile <<CF_EOF
18720
18721 install.man \\
18722 uninstall.man ::
18723         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18724 CF_EOF
18725 fi
18726 fi
18727 fi
18728
18729 rm -f headers.sed headers.sh
18730
18731 echo creating headers.sh
18732 cat >headers.sh <<CF_EOF
18733 #! /bin/sh
18734 # This shell script is generated by the 'configure' script.  It is invoked in a
18735 # subdirectory of the build tree.  It generates a sed-script in the parent
18736 # directory that is used to adjust includes for header files that reside in a
18737 # subdirectory of /usr/include, etc.
18738 PRG=""
18739 while test \$# != 3
18740 do
18741 PRG="\$PRG \$1"; shift
18742 done
18743 DST=\$1
18744 REF=\$2
18745 SRC=\$3
18746 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18747 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18748 echo installing \$SRC in \$DST
18749 CF_EOF
18750
18751 if test $WITH_CURSES_H = yes; then
18752         cat >>headers.sh <<CF_EOF
18753 case \$DST in
18754 /*/include/*)
18755         END=\`basename \$DST\`
18756         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18757         do
18758                 NAME=\`basename \$i\`
18759                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18760         done
18761         ;;
18762 *)
18763         echo "" >> \$TMPSED
18764         ;;
18765 esac
18766 CF_EOF
18767
18768 else
18769         cat >>headers.sh <<CF_EOF
18770 case \$DST in
18771 /*/include/*)
18772         END=\`basename \$DST\`
18773         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18774         do
18775                 NAME=\`basename \$i\`
18776                 if test "\$NAME" = "curses.h"
18777                 then
18778                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18779                         NAME=ncurses.h
18780                 fi
18781                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18782         done
18783         ;;
18784 *)
18785         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18786         ;;
18787 esac
18788 CF_EOF
18789 fi
18790 cat >>headers.sh <<CF_EOF
18791 rm -f \$TMPSRC
18792 sed -f \$TMPSED \$SRC > \$TMPSRC
18793 NAME=\`basename \$SRC\`
18794 CF_EOF
18795 if test $WITH_CURSES_H != yes; then
18796         cat >>headers.sh <<CF_EOF
18797 test "\$NAME" = "curses.h" && NAME=ncurses.h
18798 CF_EOF
18799 fi
18800 cat >>headers.sh <<CF_EOF
18801 # Just in case someone gzip'd manpages, remove the conflicting copy.
18802 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18803
18804 eval \$PRG \$TMPSRC \$DST/\$NAME
18805 rm -f \$TMPSRC \$TMPSED
18806 CF_EOF
18807
18808 chmod 0755 headers.sh
18809
18810 for cf_dir in $SRC_SUBDIRS
18811 do
18812         if test ! -d $srcdir/$cf_dir ; then
18813                 continue
18814         fi
18815
18816         if test -f $srcdir/$cf_dir/headers; then
18817                 $AWK -f $srcdir/mk-hdr.awk \
18818                         subset="$LIB_SUBSETS" \
18819                         compat="$WITH_CURSES_H" \
18820                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18821         fi
18822
18823         if test -f $srcdir/$cf_dir/modules; then
18824                 if test "$cf_dir" != "c++" ; then
18825                         cat >>$cf_dir/Makefile <<"CF_EOF"
18826 depend : ${AUTO_SRC}
18827         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18828
18829 # DO NOT DELETE THIS LINE -- make depend depends on it.
18830 CF_EOF
18831                 fi
18832         fi
18833 done
18834
18835  ;;
18836   esac
18837 done
18838 EOF
18839
18840 cat >>$CONFIG_STATUS <<\EOF
18841
18842 { (exit 0); exit 0; }
18843 EOF
18844 chmod +x $CONFIG_STATUS
18845 ac_clean_files=$ac_clean_files_save
18846
18847 # configure is writing to config.log, and then calls config.status.
18848 # config.status does its own redirection, appending to config.log.
18849 # Unfortunately, on DOS this fails, as config.log is still kept open
18850 # by configure, so config.status won't be able to write to it; its
18851 # output is simply discarded.  So we exec the FD to /dev/null,
18852 # effectively closing config.log, so it can be properly (re)opened and
18853 # appended to by config.status.  When coming back to configure, we
18854 # need to make the FD available again.
18855 if test "$no_create" != yes; then
18856   ac_cs_success=:
18857   exec 5>/dev/null
18858   $SHELL $CONFIG_STATUS || ac_cs_success=false
18859   exec 5>>config.log
18860   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18861   # would make configure fail if this is the last instruction.
18862   $ac_cs_success || { (exit 1); exit 1; }
18863 fi
18864 ${MAKE-make} preinstall