]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090606
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.470 .
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} ${LT_UNDEF} -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         LT_UNDEF=
4395         case "$cf_cv_system_name" in #(vi
4396         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4397                 LT_UNDEF=-no-undefined
4398                 ;;
4399         esac
4400
4401         # special hack to add --tag option for C++ compiler
4402         case $cf_cv_libtool_version in #(vi
4403         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4404                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4405                 LIBTOOL="$LIBTOOL --tag=CC"
4406                 ;;
4407         *)
4408                 LIBTOOL_CXX="$LIBTOOL"
4409                 ;;
4410         esac
4411 else
4412         LIBTOOL=""
4413         LIBTOOL_CXX=""
4414 fi
4415
4416 test -z "$LIBTOOL" && ECHO_LT=
4417
4418 if test "$with_libtool" != "no" ; then
4419
4420 cf_list_models="$cf_list_models libtool"
4421
4422 else
4423
4424 echo "$as_me:4424: checking if you want to build shared libraries" >&5
4425 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4426
4427 # Check whether --with-shared or --without-shared was given.
4428 if test "${with_shared+set}" = set; then
4429   withval="$with_shared"
4430   with_shared=$withval
4431 else
4432   with_shared=no
4433 fi;
4434 echo "$as_me:4434: result: $with_shared" >&5
4435 echo "${ECHO_T}$with_shared" >&6
4436 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4437
4438 echo "$as_me:4438: checking if you want to build static libraries" >&5
4439 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4440
4441 # Check whether --with-normal or --without-normal was given.
4442 if test "${with_normal+set}" = set; then
4443   withval="$with_normal"
4444   with_normal=$withval
4445 else
4446   with_normal=yes
4447 fi;
4448 echo "$as_me:4448: result: $with_normal" >&5
4449 echo "${ECHO_T}$with_normal" >&6
4450 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4451
4452 echo "$as_me:4452: checking if you want to build debug libraries" >&5
4453 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4454
4455 # Check whether --with-debug or --without-debug was given.
4456 if test "${with_debug+set}" = set; then
4457   withval="$with_debug"
4458   with_debug=$withval
4459 else
4460   with_debug=yes
4461 fi;
4462 echo "$as_me:4462: result: $with_debug" >&5
4463 echo "${ECHO_T}$with_debug" >&6
4464 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4465
4466 echo "$as_me:4466: checking if you want to build profiling libraries" >&5
4467 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4468
4469 # Check whether --with-profile or --without-profile was given.
4470 if test "${with_profile+set}" = set; then
4471   withval="$with_profile"
4472   with_profile=$withval
4473 else
4474   with_profile=no
4475 fi;
4476 echo "$as_me:4476: result: $with_profile" >&5
4477 echo "${ECHO_T}$with_profile" >&6
4478 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4479
4480 fi
4481
4482 ###############################################################################
4483
4484 echo "$as_me:4484: checking for specified models" >&5
4485 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4486 test -z "$cf_list_models" && cf_list_models=normal
4487 test "$with_libtool" != "no" && cf_list_models=libtool
4488 echo "$as_me:4488: result: $cf_list_models" >&5
4489 echo "${ECHO_T}$cf_list_models" >&6
4490
4491 ### Use the first model as the default, and save its suffix for use in building
4492 ### up test-applications.
4493 echo "$as_me:4493: checking for default model" >&5
4494 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4495 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4496 echo "$as_me:4496: result: $DFT_LWR_MODEL" >&5
4497 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4498
4499 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4500
4501 TICS_NAME=tic
4502
4503 TINFO_NAME=tinfo
4504
4505 LIB_NAME=ncurses
4506
4507 LIB_DIR=../lib
4508 LIB_2ND=../../lib
4509
4510         case $cf_cv_system_name in #(vi
4511         OS/2*|os2*) #(vi
4512         LIB_PREFIX=''
4513         ;;
4514         *)      LIB_PREFIX='lib'
4515         ;;
4516         esac
4517 cf_prefix=$LIB_PREFIX
4518
4519 LIB_PREFIX=$cf_prefix
4520
4521 LIB_SUFFIX=
4522
4523 ###############################################################################
4524
4525 echo "$as_me:4525: checking if you want to build a separate terminfo library" >&5
4526 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4527
4528 # Check whether --with-termlib or --without-termlib was given.
4529 if test "${with_termlib+set}" = set; then
4530   withval="$with_termlib"
4531   with_termlib=$withval
4532 else
4533   with_termlib=no
4534 fi;
4535 echo "$as_me:4535: result: $with_termlib" >&5
4536 echo "${ECHO_T}$with_termlib" >&6
4537
4538 echo "$as_me:4538: checking if you want to build a separate tic library" >&5
4539 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4540
4541 # Check whether --with-ticlib or --without-ticlib was given.
4542 if test "${with_ticlib+set}" = set; then
4543   withval="$with_ticlib"
4544   with_ticlib=$withval
4545 else
4546   with_ticlib=no
4547 fi;
4548 echo "$as_me:4548: result: $with_ticlib" >&5
4549 echo "${ECHO_T}$with_ticlib" >&6
4550
4551 ### Checks for special libraries, must be done up-front.
4552 SHLIB_LIST=""
4553
4554 echo "$as_me:4554: checking if you want to link with the GPM mouse library" >&5
4555 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4556
4557 # Check whether --with-gpm or --without-gpm was given.
4558 if test "${with_gpm+set}" = set; then
4559   withval="$with_gpm"
4560   with_gpm=$withval
4561 else
4562   with_gpm=maybe
4563 fi;
4564 echo "$as_me:4564: result: $with_gpm" >&5
4565 echo "${ECHO_T}$with_gpm" >&6
4566
4567 if test "$with_gpm" != no ; then
4568         echo "$as_me:4568: checking for gpm.h" >&5
4569 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4570 if test "${ac_cv_header_gpm_h+set}" = set; then
4571   echo $ECHO_N "(cached) $ECHO_C" >&6
4572 else
4573   cat >conftest.$ac_ext <<_ACEOF
4574 #line 4574 "configure"
4575 #include "confdefs.h"
4576 #include <gpm.h>
4577 _ACEOF
4578 if { (eval echo "$as_me:4578: \"$ac_cpp conftest.$ac_ext\"") >&5
4579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4580   ac_status=$?
4581   egrep -v '^ *\+' conftest.er1 >conftest.err
4582   rm -f conftest.er1
4583   cat conftest.err >&5
4584   echo "$as_me:4584: \$? = $ac_status" >&5
4585   (exit $ac_status); } >/dev/null; then
4586   if test -s conftest.err; then
4587     ac_cpp_err=$ac_c_preproc_warn_flag
4588   else
4589     ac_cpp_err=
4590   fi
4591 else
4592   ac_cpp_err=yes
4593 fi
4594 if test -z "$ac_cpp_err"; then
4595   ac_cv_header_gpm_h=yes
4596 else
4597   echo "$as_me: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   ac_cv_header_gpm_h=no
4600 fi
4601 rm -f conftest.err conftest.$ac_ext
4602 fi
4603 echo "$as_me:4603: result: $ac_cv_header_gpm_h" >&5
4604 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4605 if test $ac_cv_header_gpm_h = yes; then
4606
4607                 cat >>confdefs.h <<\EOF
4608 #define HAVE_GPM_H 1
4609 EOF
4610
4611                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4612                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4613
4614 echo "${as_me-configure}:4614: testing assuming we really have GPM library ..." 1>&5
4615
4616                         cat >>confdefs.h <<\EOF
4617 #define HAVE_LIBGPM 1
4618 EOF
4619
4620                 else
4621                         echo "$as_me:4621: checking for Gpm_Open in -lgpm" >&5
4622 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4623 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4624   echo $ECHO_N "(cached) $ECHO_C" >&6
4625 else
4626   ac_check_lib_save_LIBS=$LIBS
4627 LIBS="-lgpm  $LIBS"
4628 cat >conftest.$ac_ext <<_ACEOF
4629 #line 4629 "configure"
4630 #include "confdefs.h"
4631
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 #ifdef __cplusplus
4634 extern "C"
4635 #endif
4636 /* We use char because int might match the return type of a gcc2
4637    builtin and then its argument prototype would still apply.  */
4638 char Gpm_Open ();
4639 int
4640 main ()
4641 {
4642 Gpm_Open ();
4643   ;
4644   return 0;
4645 }
4646 _ACEOF
4647 rm -f conftest.$ac_objext conftest$ac_exeext
4648 if { (eval echo "$as_me:4648: \"$ac_link\"") >&5
4649   (eval $ac_link) 2>&5
4650   ac_status=$?
4651   echo "$as_me:4651: \$? = $ac_status" >&5
4652   (exit $ac_status); } &&
4653          { ac_try='test -s conftest$ac_exeext'
4654   { (eval echo "$as_me:4654: \"$ac_try\"") >&5
4655   (eval $ac_try) 2>&5
4656   ac_status=$?
4657   echo "$as_me:4657: \$? = $ac_status" >&5
4658   (exit $ac_status); }; }; then
4659   ac_cv_lib_gpm_Gpm_Open=yes
4660 else
4661   echo "$as_me: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 ac_cv_lib_gpm_Gpm_Open=no
4664 fi
4665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4666 LIBS=$ac_check_lib_save_LIBS
4667 fi
4668 echo "$as_me:4668: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4669 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4670 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4671   :
4672 else
4673
4674                                 { { echo "$as_me:4674: error: Cannot link with GPM library" >&5
4675 echo "$as_me: error: Cannot link with GPM library" >&2;}
4676    { (exit 1); exit 1; }; }
4677                 fi
4678                 with_gpm=yes
4679
4680 fi
4681
4682 else
4683
4684                 test "$with_gpm" != maybe && { echo "$as_me:4684: WARNING: Cannot find GPM header" >&5
4685 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4686                 with_gpm=no
4687
4688 fi
4689
4690 fi
4691
4692 if test "$with_gpm" != no ; then
4693         echo "$as_me:4693: checking if you want to load GPM dynamically" >&5
4694 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4695
4696 # Check whether --with-dlsym or --without-dlsym was given.
4697 if test "${with_dlsym+set}" = set; then
4698   withval="$with_dlsym"
4699   with_dlsym=$withval
4700 else
4701   with_dlsym=yes
4702 fi;
4703         echo "$as_me:4703: result: $with_dlsym" >&5
4704 echo "${ECHO_T}$with_dlsym" >&6
4705         if test "$with_dlsym" = yes ; then
4706
4707 cf_have_dlsym=no
4708 echo "$as_me:4708: checking for dlsym" >&5
4709 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4710 if test "${ac_cv_func_dlsym+set}" = set; then
4711   echo $ECHO_N "(cached) $ECHO_C" >&6
4712 else
4713   cat >conftest.$ac_ext <<_ACEOF
4714 #line 4714 "configure"
4715 #include "confdefs.h"
4716 /* System header to define __stub macros and hopefully few prototypes,
4717     which can conflict with char dlsym (); below.  */
4718 #include <assert.h>
4719 /* Override any gcc2 internal prototype to avoid an error.  */
4720 #ifdef __cplusplus
4721 extern "C"
4722 #endif
4723 /* We use char because int might match the return type of a gcc2
4724    builtin and then its argument prototype would still apply.  */
4725 char dlsym ();
4726 char (*f) ();
4727
4728 int
4729 main ()
4730 {
4731 /* The GNU C library defines this for functions which it implements
4732     to always fail with ENOSYS.  Some functions are actually named
4733     something starting with __ and the normal name is an alias.  */
4734 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4735 choke me
4736 #else
4737 f = dlsym;
4738 #endif
4739
4740   ;
4741   return 0;
4742 }
4743 _ACEOF
4744 rm -f conftest.$ac_objext conftest$ac_exeext
4745 if { (eval echo "$as_me:4745: \"$ac_link\"") >&5
4746   (eval $ac_link) 2>&5
4747   ac_status=$?
4748   echo "$as_me:4748: \$? = $ac_status" >&5
4749   (exit $ac_status); } &&
4750          { ac_try='test -s conftest$ac_exeext'
4751   { (eval echo "$as_me:4751: \"$ac_try\"") >&5
4752   (eval $ac_try) 2>&5
4753   ac_status=$?
4754   echo "$as_me:4754: \$? = $ac_status" >&5
4755   (exit $ac_status); }; }; then
4756   ac_cv_func_dlsym=yes
4757 else
4758   echo "$as_me: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760 ac_cv_func_dlsym=no
4761 fi
4762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4763 fi
4764 echo "$as_me:4764: result: $ac_cv_func_dlsym" >&5
4765 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4766 if test $ac_cv_func_dlsym = yes; then
4767   cf_have_dlsym=yes
4768 else
4769
4770 cf_have_libdl=no
4771 echo "$as_me:4771: checking for dlsym in -ldl" >&5
4772 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4773 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4774   echo $ECHO_N "(cached) $ECHO_C" >&6
4775 else
4776   ac_check_lib_save_LIBS=$LIBS
4777 LIBS="-ldl  $LIBS"
4778 cat >conftest.$ac_ext <<_ACEOF
4779 #line 4779 "configure"
4780 #include "confdefs.h"
4781
4782 /* Override any gcc2 internal prototype to avoid an error.  */
4783 #ifdef __cplusplus
4784 extern "C"
4785 #endif
4786 /* We use char because int might match the return type of a gcc2
4787    builtin and then its argument prototype would still apply.  */
4788 char dlsym ();
4789 int
4790 main ()
4791 {
4792 dlsym ();
4793   ;
4794   return 0;
4795 }
4796 _ACEOF
4797 rm -f conftest.$ac_objext conftest$ac_exeext
4798 if { (eval echo "$as_me:4798: \"$ac_link\"") >&5
4799   (eval $ac_link) 2>&5
4800   ac_status=$?
4801   echo "$as_me:4801: \$? = $ac_status" >&5
4802   (exit $ac_status); } &&
4803          { ac_try='test -s conftest$ac_exeext'
4804   { (eval echo "$as_me:4804: \"$ac_try\"") >&5
4805   (eval $ac_try) 2>&5
4806   ac_status=$?
4807   echo "$as_me:4807: \$? = $ac_status" >&5
4808   (exit $ac_status); }; }; then
4809   ac_cv_lib_dl_dlsym=yes
4810 else
4811   echo "$as_me: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 ac_cv_lib_dl_dlsym=no
4814 fi
4815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4816 LIBS=$ac_check_lib_save_LIBS
4817 fi
4818 echo "$as_me:4818: result: $ac_cv_lib_dl_dlsym" >&5
4819 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4820 if test $ac_cv_lib_dl_dlsym = yes; then
4821
4822         cf_have_dlsym=yes
4823         cf_have_libdl=yes
4824 fi
4825
4826 fi
4827
4828 if test "$cf_have_dlsym" = yes ; then
4829         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4830
4831         echo "$as_me:4831: checking whether able to link to dl*() functions" >&5
4832 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4833         cat >conftest.$ac_ext <<_ACEOF
4834 #line 4834 "configure"
4835 #include "confdefs.h"
4836 #include <dlfcn.h>
4837 int
4838 main ()
4839 {
4840
4841                 void *obj;
4842                 if ((obj = dlopen("filename", 0)) != 0) {
4843                         if (dlsym(obj, "symbolname") == 0) {
4844                         dlclose(obj);
4845                         }
4846                 }
4847   ;
4848   return 0;
4849 }
4850 _ACEOF
4851 rm -f conftest.$ac_objext conftest$ac_exeext
4852 if { (eval echo "$as_me:4852: \"$ac_link\"") >&5
4853   (eval $ac_link) 2>&5
4854   ac_status=$?
4855   echo "$as_me:4855: \$? = $ac_status" >&5
4856   (exit $ac_status); } &&
4857          { ac_try='test -s conftest$ac_exeext'
4858   { (eval echo "$as_me:4858: \"$ac_try\"") >&5
4859   (eval $ac_try) 2>&5
4860   ac_status=$?
4861   echo "$as_me:4861: \$? = $ac_status" >&5
4862   (exit $ac_status); }; }; then
4863
4864                 cat >>confdefs.h <<\EOF
4865 #define HAVE_LIBDL 1
4866 EOF
4867
4868 else
4869   echo "$as_me: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4871
4872                 { { echo "$as_me:4872: error: Cannot link test program for libdl" >&5
4873 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4874    { (exit 1); exit 1; }; }
4875 fi
4876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4877         echo "$as_me:4877: result: ok" >&5
4878 echo "${ECHO_T}ok" >&6
4879 else
4880         { { echo "$as_me:4880: error: Cannot find dlsym function" >&5
4881 echo "$as_me: error: Cannot find dlsym function" >&2;}
4882    { (exit 1); exit 1; }; }
4883 fi
4884
4885                 if test "$with_gpm" != yes ; then
4886                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4887
4888 echo "${as_me-configure}:4888: testing assuming soname for gpm is $with_gpm ..." 1>&5
4889
4890                         cf_cv_gpm_soname="$with_gpm"
4891                 else
4892
4893 echo "$as_me:4893: checking for soname of gpm library" >&5
4894 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4895 if test "${cf_cv_gpm_soname+set}" = set; then
4896   echo $ECHO_N "(cached) $ECHO_C" >&6
4897 else
4898
4899 cf_cv_gpm_soname=unknown
4900 if test "$cross_compiling" != yes ; then
4901 cat >conftest.$ac_ext <<CF_EOF
4902 #include <gpm.h>
4903 int main()
4904 {
4905 if (Gpm_Open(0,0)) Gpm_Close();
4906         ${cf_cv_main_return:-return}(0);
4907 }
4908 CF_EOF
4909 cf_save_LIBS="$LIBS"
4910         LIBS="-lgpm $LIBS"
4911         if { (eval echo "$as_me:4911: \"$ac_compile\"") >&5
4912   (eval $ac_compile) 2>&5
4913   ac_status=$?
4914   echo "$as_me:4914: \$? = $ac_status" >&5
4915   (exit $ac_status); } ; then
4916                 if { (eval echo "$as_me:4916: \"$ac_link\"") >&5
4917   (eval $ac_link) 2>&5
4918   ac_status=$?
4919   echo "$as_me:4919: \$? = $ac_status" >&5
4920   (exit $ac_status); } ; then
4921                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4922                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4923                 fi
4924         fi
4925 rm -f conftest*
4926 LIBS="$cf_save_LIBS"
4927 fi
4928
4929 fi
4930 echo "$as_me:4930: result: $cf_cv_gpm_soname" >&5
4931 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4932
4933                 fi
4934                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4935 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4936 EOF
4937
4938                 SHLIB_LIST="-ldl $SHLIB_LIST"
4939         else
4940                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4941         fi
4942         cat >>confdefs.h <<\EOF
4943 #define HAVE_LIBGPM 1
4944 EOF
4945
4946 echo "$as_me:4946: checking for Gpm_Wgetch in -lgpm" >&5
4947 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4948 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4949   echo $ECHO_N "(cached) $ECHO_C" >&6
4950 else
4951   ac_check_lib_save_LIBS=$LIBS
4952 LIBS="-lgpm  $LIBS"
4953 cat >conftest.$ac_ext <<_ACEOF
4954 #line 4954 "configure"
4955 #include "confdefs.h"
4956
4957 /* Override any gcc2 internal prototype to avoid an error.  */
4958 #ifdef __cplusplus
4959 extern "C"
4960 #endif
4961 /* We use char because int might match the return type of a gcc2
4962    builtin and then its argument prototype would still apply.  */
4963 char Gpm_Wgetch ();
4964 int
4965 main ()
4966 {
4967 Gpm_Wgetch ();
4968   ;
4969   return 0;
4970 }
4971 _ACEOF
4972 rm -f conftest.$ac_objext conftest$ac_exeext
4973 if { (eval echo "$as_me:4973: \"$ac_link\"") >&5
4974   (eval $ac_link) 2>&5
4975   ac_status=$?
4976   echo "$as_me:4976: \$? = $ac_status" >&5
4977   (exit $ac_status); } &&
4978          { ac_try='test -s conftest$ac_exeext'
4979   { (eval echo "$as_me:4979: \"$ac_try\"") >&5
4980   (eval $ac_try) 2>&5
4981   ac_status=$?
4982   echo "$as_me:4982: \$? = $ac_status" >&5
4983   (exit $ac_status); }; }; then
4984   ac_cv_lib_gpm_Gpm_Wgetch=yes
4985 else
4986   echo "$as_me: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 ac_cv_lib_gpm_Gpm_Wgetch=no
4989 fi
4990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4991 LIBS=$ac_check_lib_save_LIBS
4992 fi
4993 echo "$as_me:4993: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4994 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4995 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4996
4997 echo "$as_me:4997: checking if GPM is weakly bound to curses library" >&5
4998 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4999 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5000   echo $ECHO_N "(cached) $ECHO_C" >&6
5001 else
5002
5003 cf_cv_check_gpm_wgetch=unknown
5004 if test "$cross_compiling" != yes ; then
5005
5006 cat >conftest.$ac_ext <<CF_EOF
5007 #include <gpm.h>
5008 int main()
5009 {
5010         Gpm_Wgetch();
5011         ${cf_cv_main_return:-return}(0);
5012 }
5013 CF_EOF
5014
5015         cf_save_LIBS="$LIBS"
5016         # This only works if we can look at the symbol table.  If a shared
5017         # library is stripped for install, we cannot use that.  So we're forced
5018         # to rely on the static library, noting that some packagers may not
5019         # include it.
5020         LIBS="-static -lgpm -dynamic $LIBS"
5021         if { (eval echo "$as_me:5021: \"$ac_compile\"") >&5
5022   (eval $ac_compile) 2>&5
5023   ac_status=$?
5024   echo "$as_me:5024: \$? = $ac_status" >&5
5025   (exit $ac_status); } ; then
5026                 if { (eval echo "$as_me:5026: \"$ac_link\"") >&5
5027   (eval $ac_link) 2>&5
5028   ac_status=$?
5029   echo "$as_me:5029: \$? = $ac_status" >&5
5030   (exit $ac_status); } ; then
5031                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5032                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5033                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5034                 fi
5035         fi
5036         rm -f conftest*
5037         LIBS="$cf_save_LIBS"
5038 fi
5039
5040 fi
5041 echo "$as_me:5041: result: $cf_cv_check_gpm_wgetch" >&5
5042 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5043
5044 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5045         { echo "$as_me:5045: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5046 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5047 fi
5048
5049 fi
5050
5051 fi
5052
5053 # not everyone has "test -c"
5054 if test -c /dev/sysmouse 2>/dev/null ; then
5055 echo "$as_me:5055: checking if you want to use sysmouse" >&5
5056 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5057
5058 # Check whether --with-sysmouse or --without-sysmouse was given.
5059 if test "${with_sysmouse+set}" = set; then
5060   withval="$with_sysmouse"
5061   cf_with_sysmouse=$withval
5062 else
5063   cf_with_sysmouse=maybe
5064 fi;
5065         if test "$cf_with_sysmouse" != no ; then
5066         cat >conftest.$ac_ext <<_ACEOF
5067 #line 5067 "configure"
5068 #include "confdefs.h"
5069
5070 #include <osreldate.h>
5071 #if (__FreeBSD_version >= 400017)
5072 #include <sys/consio.h>
5073 #include <sys/fbio.h>
5074 #else
5075 #include <machine/console.h>
5076 #endif
5077
5078 int
5079 main ()
5080 {
5081
5082         struct mouse_info the_mouse;
5083         ioctl(0, CONS_MOUSECTL, &the_mouse);
5084
5085   ;
5086   return 0;
5087 }
5088 _ACEOF
5089 rm -f conftest.$ac_objext
5090 if { (eval echo "$as_me:5090: \"$ac_compile\"") >&5
5091   (eval $ac_compile) 2>&5
5092   ac_status=$?
5093   echo "$as_me:5093: \$? = $ac_status" >&5
5094   (exit $ac_status); } &&
5095          { ac_try='test -s conftest.$ac_objext'
5096   { (eval echo "$as_me:5096: \"$ac_try\"") >&5
5097   (eval $ac_try) 2>&5
5098   ac_status=$?
5099   echo "$as_me:5099: \$? = $ac_status" >&5
5100   (exit $ac_status); }; }; then
5101   cf_with_sysmouse=yes
5102 else
5103   echo "$as_me: failed program was:" >&5
5104 cat conftest.$ac_ext >&5
5105 cf_with_sysmouse=no
5106 fi
5107 rm -f conftest.$ac_objext conftest.$ac_ext
5108         fi
5109 echo "$as_me:5109: result: $cf_with_sysmouse" >&5
5110 echo "${ECHO_T}$cf_with_sysmouse" >&6
5111 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5112 #define USE_SYSMOUSE 1
5113 EOF
5114
5115 fi
5116
5117 if test X"$CC_G_OPT" = X"" ; then
5118         CC_G_OPT='-g'
5119         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5120 fi
5121
5122 if test X"$CXX_G_OPT" = X"" ; then
5123         CXX_G_OPT='-g'
5124         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5125 fi
5126
5127 echo "$as_me:5127: checking for default loader flags" >&5
5128 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5129 case $DFT_LWR_MODEL in
5130 libtool) LD_MODEL=''   ;;
5131 normal)  LD_MODEL=''   ;;
5132 debug)   LD_MODEL=$CC_G_OPT ;;
5133 profile) LD_MODEL='-pg';;
5134 shared)  LD_MODEL=''   ;;
5135 esac
5136 echo "$as_me:5136: result: $LD_MODEL" >&5
5137 echo "${ECHO_T}$LD_MODEL" >&6
5138
5139 case $DFT_LWR_MODEL in
5140 shared)
5141
5142 echo "$as_me:5142: checking if rpath option should be used" >&5
5143 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5144
5145 # Check whether --enable-rpath or --disable-rpath was given.
5146 if test "${enable_rpath+set}" = set; then
5147   enableval="$enable_rpath"
5148   cf_cv_ld_rpath=$enableval
5149 else
5150   cf_cv_ld_rpath=no
5151 fi;
5152 echo "$as_me:5152: result: $cf_cv_ld_rpath" >&5
5153 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5154
5155 echo "$as_me:5155: checking if shared libraries should be relinked during install" >&5
5156 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5157
5158 # Check whether --enable-relink or --disable-relink was given.
5159 if test "${enable_relink+set}" = set; then
5160   enableval="$enable_relink"
5161   cf_cv_do_relink=$enableval
5162 else
5163   cf_cv_do_relink=yes
5164 fi;
5165 echo "$as_me:5165: result: $cf_cv_do_relink" >&5
5166 echo "${ECHO_T}$cf_cv_do_relink" >&6
5167         ;;
5168 esac
5169
5170         LOCAL_LDFLAGS=
5171         LOCAL_LDFLAGS2=
5172         LD_RPATH_OPT=
5173         LD_SHARED_OPTS=
5174         INSTALL_LIB="-m 644"
5175
5176         cf_cv_do_symlinks=no
5177
5178         echo "$as_me:5178: checking if release/abi version should be used for shared libs" >&5
5179 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5180
5181 # Check whether --with-shlib-version or --without-shlib-version was given.
5182 if test "${with_shlib_version+set}" = set; then
5183   withval="$with_shlib_version"
5184   test -z "$withval" && withval=auto
5185         case $withval in #(vi
5186         yes) #(vi
5187                 cf_cv_shlib_version=auto
5188                 ;;
5189         rel|abi|auto|no) #(vi
5190                 cf_cv_shlib_version=$withval
5191                 ;;
5192         *)
5193                 { { echo "$as_me:5193: error: option value must be one of: rel, abi, auto or no" >&5
5194 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5195    { (exit 1); exit 1; }; }
5196                 ;;
5197         esac
5198
5199 else
5200   cf_cv_shlib_version=auto
5201 fi;
5202         echo "$as_me:5202: result: $cf_cv_shlib_version" >&5
5203 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5204
5205         cf_cv_rm_so_locs=no
5206
5207         # Some less-capable ports of gcc support only -fpic
5208         CC_SHARED_OPTS=
5209         if test "$GCC" = yes
5210         then
5211                 echo "$as_me:5211: checking which $CC option to use" >&5
5212 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5213                 cf_save_CFLAGS="$CFLAGS"
5214                 for CC_SHARED_OPTS in -fPIC -fpic ''
5215                 do
5216                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5217                         cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <stdio.h>
5221 int
5222 main ()
5223 {
5224 int x = 1
5225   ;
5226   return 0;
5227 }
5228 _ACEOF
5229 rm -f conftest.$ac_objext
5230 if { (eval echo "$as_me:5230: \"$ac_compile\"") >&5
5231   (eval $ac_compile) 2>&5
5232   ac_status=$?
5233   echo "$as_me:5233: \$? = $ac_status" >&5
5234   (exit $ac_status); } &&
5235          { ac_try='test -s conftest.$ac_objext'
5236   { (eval echo "$as_me:5236: \"$ac_try\"") >&5
5237   (eval $ac_try) 2>&5
5238   ac_status=$?
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); }; }; then
5241   break
5242 else
5243   echo "$as_me: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5245 fi
5246 rm -f conftest.$ac_objext conftest.$ac_ext
5247                 done
5248                 echo "$as_me:5248: result: $CC_SHARED_OPTS" >&5
5249 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5250                 CFLAGS="$cf_save_CFLAGS"
5251         fi
5252
5253         cf_cv_shlib_version_infix=no
5254
5255         case $cf_cv_system_name in
5256         aix[56]*)
5257                 if test "$GCC" = yes; then
5258                         CC_SHARED_OPTS=
5259                         MK_SHARED_LIB="$(CC) -shared"
5260                 fi
5261                 ;;
5262         beos*)
5263                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5264                 ;;
5265         cygwin*)
5266                 CC_SHARED_OPTS=
5267                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5268                 cf_cv_shlib_version=cygdll
5269                 cf_cv_shlib_version_infix=cygdll
5270                 cat >mk_shared_lib.sh <<-CF_EOF
5271                 #!/bin/sh
5272                 SHARED_LIB=\$1
5273                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5274                 shift
5275                 cat <<-EOF
5276                 Linking shared library
5277                 ** SHARED_LIB \$SHARED_LIB
5278                 ** IMPORT_LIB \$IMPORT_LIB
5279 EOF
5280                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5281 CF_EOF
5282                 chmod +x mk_shared_lib.sh
5283                 ;;
5284         darwin*)
5285                 EXTRA_CFLAGS="-no-cpp-precomp"
5286                 CC_SHARED_OPTS="-dynamic"
5287                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5288                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5289                 cf_cv_shlib_version_infix=yes
5290                 echo "$as_me:5290: checking if ld -search_paths_first works" >&5
5291 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5292 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5293   echo $ECHO_N "(cached) $ECHO_C" >&6
5294 else
5295
5296                         cf_save_LDFLAGS=$LDFLAGS
5297                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5298                         cat >conftest.$ac_ext <<_ACEOF
5299 #line 5299 "configure"
5300 #include "confdefs.h"
5301
5302 int
5303 main ()
5304 {
5305 int i;
5306   ;
5307   return 0;
5308 }
5309 _ACEOF
5310 rm -f conftest.$ac_objext conftest$ac_exeext
5311 if { (eval echo "$as_me:5311: \"$ac_link\"") >&5
5312   (eval $ac_link) 2>&5
5313   ac_status=$?
5314   echo "$as_me:5314: \$? = $ac_status" >&5
5315   (exit $ac_status); } &&
5316          { ac_try='test -s conftest$ac_exeext'
5317   { (eval echo "$as_me:5317: \"$ac_try\"") >&5
5318   (eval $ac_try) 2>&5
5319   ac_status=$?
5320   echo "$as_me:5320: \$? = $ac_status" >&5
5321   (exit $ac_status); }; }; then
5322   cf_cv_ldflags_search_paths_first=yes
5323 else
5324   echo "$as_me: failed program was:" >&5
5325 cat conftest.$ac_ext >&5
5326 cf_cv_ldflags_search_paths_first=no
5327 fi
5328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5329                                 LDFLAGS=$cf_save_LDFLAGS
5330 fi
5331 echo "$as_me:5331: result: $cf_cv_ldflags_search_paths_first" >&5
5332 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5333                 if test $cf_cv_ldflags_search_paths_first = yes; then
5334                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5335                 fi
5336                 ;;
5337         hpux*)
5338                 # (tested with gcc 2.7.2 -- I don't have c89)
5339                 if test "$GCC" = yes; then
5340                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5341                 else
5342                         CC_SHARED_OPTS='+Z'
5343                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5344                 fi
5345                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5346                 # HP-UX shared libraries must be executable, and should be
5347                 # readonly to exploit a quirk in the memory manager.
5348                 INSTALL_LIB="-m 555"
5349                 ;;
5350         irix*)
5351                 if test "$cf_cv_ld_rpath" = yes ; then
5352                         if test "$GCC" = yes; then
5353                                 LD_RPATH_OPT="-Wl,-rpath,"
5354                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5355                         else
5356                                 LD_RPATH_OPT="-rpath "
5357                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5358                         fi
5359                 fi
5360                 # tested with IRIX 5.2 and 'cc'.
5361                 if test "$GCC" != yes; then
5362                         CC_SHARED_OPTS='-KPIC'
5363                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5364                 else
5365                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5366                 fi
5367                 cf_cv_rm_so_locs=yes
5368                 ;;
5369         linux*|gnu*|k*bsd*-gnu)
5370                 if test "$DFT_LWR_MODEL" = "shared" ; then
5371                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5372                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5373                 fi
5374                 if test "$cf_cv_ld_rpath" = yes ; then
5375                         LD_RPATH_OPT="-Wl,-rpath,"
5376                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5377                 fi
5378
5379         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5380         if test "$cf_cv_shlib_version" = rel; then
5381                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5382         else
5383                 cf_cv_shared_soname='`basename $@`'
5384         fi
5385
5386                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5387                 ;;
5388         openbsd[2-9].*)
5389                 if test "$DFT_LWR_MODEL" = "shared" ; then
5390                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5391                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5392                 fi
5393                 if test "$cf_cv_ld_rpath" = yes ; then
5394                         LD_RPATH_OPT="-Wl,-rpath,"
5395                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5396                 fi
5397                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5398
5399         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5400         if test "$cf_cv_shlib_version" = rel; then
5401                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5402         else
5403                 cf_cv_shared_soname='`basename $@`'
5404         fi
5405
5406                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5407                 ;;
5408         nto-qnx*|openbsd*|freebsd[12].*)
5409                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5410                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5411                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5412                 ;;
5413         freebsd*)
5414                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5415                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5416                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5417                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5418                         LD_RPATH_OPT="-rpath "
5419                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5420                 fi
5421
5422         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5423         if test "$cf_cv_shlib_version" = rel; then
5424                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5425         else
5426                 cf_cv_shared_soname='`basename $@`'
5427         fi
5428
5429                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5430                 ;;
5431         netbsd*)
5432                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5433                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5434                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5435                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5436                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5437                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5438                         if test "$cf_cv_shlib_version" = auto; then
5439                         if test -f /usr/libexec/ld.elf_so; then
5440                                 cf_cv_shlib_version=abi
5441                         else
5442                                 cf_cv_shlib_version=rel
5443                         fi
5444                         fi
5445
5446         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5447         if test "$cf_cv_shlib_version" = rel; then
5448                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5449         else
5450                 cf_cv_shared_soname='`basename $@`'
5451         fi
5452
5453                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5454                 else
5455                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5456                 fi
5457                 ;;
5458         osf*|mls+*)
5459                 # tested with OSF/1 V3.2 and 'cc'
5460                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5461                 # link with shared libs).
5462                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5463                 case $host_os in
5464                 osf4*)
5465                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5466                         ;;
5467                 esac
5468                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5469                 if test "$DFT_LWR_MODEL" = "shared" ; then
5470                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5471                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5472                 fi
5473                 if test "$cf_cv_ld_rpath" = yes ; then
5474                         LD_RPATH_OPT="-rpath"
5475                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5476                 fi
5477                 cf_cv_rm_so_locs=yes
5478                 ;;
5479         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5480                 # tested with osr5.0.5
5481                 if test "$GCC" != yes; then
5482                         CC_SHARED_OPTS='-belf -KPIC'
5483                 fi
5484                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5485                 if test "$cf_cv_ld_rpath" = yes ; then
5486                         # only way is to set LD_RUN_PATH but no switch for it
5487                         RUN_PATH=$libdir
5488                 fi
5489                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5490                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5491                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5492                 ;;
5493         sunos4*)
5494                 # tested with SunOS 4.1.1 and gcc 2.7.0
5495                 if test "$GCC" != yes; then
5496                         CC_SHARED_OPTS='-KPIC'
5497                 fi
5498                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5499                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5500                 ;;
5501         solaris2*)
5502                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5503                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5504                 if test "$DFT_LWR_MODEL" = "shared" ; then
5505                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5506                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5507                 fi
5508                 if test "$cf_cv_ld_rpath" = yes ; then
5509                         LD_RPATH_OPT="-R"
5510                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5511                 fi
5512
5513         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5514         if test "$cf_cv_shlib_version" = rel; then
5515                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5516         else
5517                 cf_cv_shared_soname='`basename $@`'
5518         fi
5519
5520                 if test "$GCC" != yes; then
5521                         cf_save_CFLAGS="$CFLAGS"
5522                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5523                         do
5524                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5525                                 cat >conftest.$ac_ext <<_ACEOF
5526 #line 5526 "configure"
5527 #include "confdefs.h"
5528 #include <stdio.h>
5529 int
5530 main ()
5531 {
5532 printf("Hello\n");
5533   ;
5534   return 0;
5535 }
5536 _ACEOF
5537 rm -f conftest.$ac_objext
5538 if { (eval echo "$as_me:5538: \"$ac_compile\"") >&5
5539   (eval $ac_compile) 2>&5
5540   ac_status=$?
5541   echo "$as_me:5541: \$? = $ac_status" >&5
5542   (exit $ac_status); } &&
5543          { ac_try='test -s conftest.$ac_objext'
5544   { (eval echo "$as_me:5544: \"$ac_try\"") >&5
5545   (eval $ac_try) 2>&5
5546   ac_status=$?
5547   echo "$as_me:5547: \$? = $ac_status" >&5
5548   (exit $ac_status); }; }; then
5549   break
5550 else
5551   echo "$as_me: failed program was:" >&5
5552 cat conftest.$ac_ext >&5
5553 fi
5554 rm -f conftest.$ac_objext conftest.$ac_ext
5555                         done
5556                         CFLAGS="$cf_save_CFLAGS"
5557                         CC_SHARED_OPTS=$cf_shared_opts
5558                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5559                 else
5560                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5561                 fi
5562                 ;;
5563         sysv5uw7*|unix_sv*)
5564                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5565                 if test "$GCC" != yes; then
5566                         CC_SHARED_OPTS='-KPIC'
5567                 fi
5568                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5569                 ;;
5570         *)
5571                 CC_SHARED_OPTS='unknown'
5572                 MK_SHARED_LIB='echo unknown'
5573                 ;;
5574         esac
5575
5576         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5577         case "$cf_cv_shlib_version" in #(vi
5578         rel|abi)
5579                 case "$MK_SHARED_LIB" in #(vi
5580                 *'-o $@')
5581                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5582                         ;;
5583                 *)
5584                         { echo "$as_me:5584: WARNING: ignored --with-shlib-version" >&5
5585 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5586                         ;;
5587                 esac
5588                 ;;
5589         esac
5590
5591         if test -n "$LD_RPATH_OPT" ; then
5592                 echo "$as_me:5592: checking if we need a space after rpath option" >&5
5593 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5594                 cf_save_LIBS="$LIBS"
5595                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5596                 cat >conftest.$ac_ext <<_ACEOF
5597 #line 5597 "configure"
5598 #include "confdefs.h"
5599
5600 int
5601 main ()
5602 {
5603
5604   ;
5605   return 0;
5606 }
5607 _ACEOF
5608 rm -f conftest.$ac_objext conftest$ac_exeext
5609 if { (eval echo "$as_me:5609: \"$ac_link\"") >&5
5610   (eval $ac_link) 2>&5
5611   ac_status=$?
5612   echo "$as_me:5612: \$? = $ac_status" >&5
5613   (exit $ac_status); } &&
5614          { ac_try='test -s conftest$ac_exeext'
5615   { (eval echo "$as_me:5615: \"$ac_try\"") >&5
5616   (eval $ac_try) 2>&5
5617   ac_status=$?
5618   echo "$as_me:5618: \$? = $ac_status" >&5
5619   (exit $ac_status); }; }; then
5620   cf_rpath_space=no
5621 else
5622   echo "$as_me: failed program was:" >&5
5623 cat conftest.$ac_ext >&5
5624 cf_rpath_space=yes
5625 fi
5626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5627                 LIBS="$cf_save_LIBS"
5628                 echo "$as_me:5628: result: $cf_rpath_space" >&5
5629 echo "${ECHO_T}$cf_rpath_space" >&6
5630                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5631                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5632         fi
5633
5634 if test "$CC_SHARED_OPTS" = "unknown"; then
5635         for model in $cf_list_models; do
5636                 if test "$model" = "shared"; then
5637                         { { echo "$as_me:5637: error: Shared libraries are not supported in this version" >&5
5638 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5639    { (exit 1); exit 1; }; }
5640                 fi
5641         done
5642 fi
5643
5644 ###############################################################################
5645
5646 ###     use option --disable-overwrite to leave out the link to -lcurses
5647 echo "$as_me:5647: checking if you wish to install ncurses overwriting curses" >&5
5648 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5649
5650 # Check whether --enable-overwrite or --disable-overwrite was given.
5651 if test "${enable_overwrite+set}" = set; then
5652   enableval="$enable_overwrite"
5653   with_overwrite=$enableval
5654 else
5655   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5656 fi;
5657 echo "$as_me:5657: result: $with_overwrite" >&5
5658 echo "${ECHO_T}$with_overwrite" >&6
5659
5660 echo "$as_me:5660: checking if external terminfo-database is used" >&5
5661 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5662
5663 # Check whether --enable-database or --disable-database was given.
5664 if test "${enable_database+set}" = set; then
5665   enableval="$enable_database"
5666   use_database=$enableval
5667 else
5668   use_database=yes
5669 fi;
5670 echo "$as_me:5670: result: $use_database" >&5
5671 echo "${ECHO_T}$use_database" >&6
5672
5673 case $host_os in #(vi
5674 os2*) #(vi
5675         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5676         ;;
5677 *) #(vi
5678         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5679         ;;
5680 esac
5681
5682         case $cf_cv_system_name in
5683         os2*)   PATH_SEPARATOR=';'  ;;
5684         *)      PATH_SEPARATOR=':'  ;;
5685         esac
5686
5687 if test "$use_database" != no ; then
5688         cat >>confdefs.h <<\EOF
5689 #define USE_DATABASE 1
5690 EOF
5691
5692         echo "$as_me:5692: checking which terminfo source-file will be installed" >&5
5693 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5694
5695 # Check whether --enable-database or --disable-database was given.
5696 if test "${enable_database+set}" = set; then
5697   enableval="$enable_database"
5698   TERMINFO_SRC=$withval
5699 fi;
5700         echo "$as_me:5700: result: $TERMINFO_SRC" >&5
5701 echo "${ECHO_T}$TERMINFO_SRC" >&6
5702
5703         echo "$as_me:5703: checking whether to use hashed database instead of directory/tree" >&5
5704 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5705
5706 # Check whether --with-hashed-db or --without-hashed-db was given.
5707 if test "${with_hashed_db+set}" = set; then
5708   withval="$with_hashed_db"
5709
5710 else
5711   with_hashed_db=no
5712 fi;
5713         echo "$as_me:5713: result: $with_hashed_db" >&5
5714 echo "${ECHO_T}$with_hashed_db" >&6
5715 else
5716         with_hashed_db=no
5717 fi
5718
5719 echo "$as_me:5719: checking for list of fallback descriptions" >&5
5720 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5721
5722 # Check whether --with-fallbacks or --without-fallbacks was given.
5723 if test "${with_fallbacks+set}" = set; then
5724   withval="$with_fallbacks"
5725   with_fallback=$withval
5726 else
5727   with_fallback=
5728 fi;
5729 echo "$as_me:5729: result: $with_fallback" >&5
5730 echo "${ECHO_T}$with_fallback" >&6
5731 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5732
5733 echo "$as_me:5733: checking if you want modern xterm or antique" >&5
5734 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5735
5736 # Check whether --with-xterm-new or --without-xterm-new was given.
5737 if test "${with_xterm_new+set}" = set; then
5738   withval="$with_xterm_new"
5739   with_xterm_new=$withval
5740 else
5741   with_xterm_new=yes
5742 fi;
5743 case $with_xterm_new in
5744 no)     with_xterm_new=xterm-old;;
5745 *)      with_xterm_new=xterm-new;;
5746 esac
5747 echo "$as_me:5747: result: $with_xterm_new" >&5
5748 echo "${ECHO_T}$with_xterm_new" >&6
5749 WHICH_XTERM=$with_xterm_new
5750
5751 MAKE_TERMINFO=
5752 if test "$use_database" = no ; then
5753         TERMINFO="${datadir}/terminfo"
5754         MAKE_TERMINFO="#"
5755 else
5756
5757 echo "$as_me:5757: checking for list of terminfo directories" >&5
5758 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5759
5760 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5761 if test "${with_terminfo_dirs+set}" = set; then
5762   withval="$with_terminfo_dirs"
5763
5764 else
5765   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5766 fi;
5767 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5768 cf_dst_path=
5769 for cf_src_path in $withval
5770 do
5771
5772 if test "x$prefix" != xNONE; then
5773   cf_path_syntax="$prefix"
5774 else
5775   cf_path_syntax="$ac_default_prefix"
5776 fi
5777
5778 case ".$cf_src_path" in #(vi
5779 .\$\(*\)*|.\'*\'*) #(vi
5780   ;;
5781 ..|./*|.\\*) #(vi
5782   ;;
5783 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5784   ;;
5785 .\${*prefix}*) #(vi
5786   eval cf_src_path="$cf_src_path"
5787   case ".$cf_src_path" in #(vi
5788   .NONE/*)
5789     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5790     ;;
5791   esac
5792   ;; #(vi
5793 .no|.NONE/*)
5794   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5795   ;;
5796 *)
5797   { { echo "$as_me:5797: error: expected a pathname, not \"$cf_src_path\"" >&5
5798 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5799    { (exit 1); exit 1; }; }
5800   ;;
5801 esac
5802
5803   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5804   cf_dst_path="${cf_dst_path}${cf_src_path}"
5805 done
5806 IFS="$ac_save_ifs"
5807
5808 eval 'TERMINFO_DIRS="$cf_dst_path"'
5809
5810 echo "$as_me:5810: result: $TERMINFO_DIRS" >&5
5811 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5812 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5813 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5814 EOF
5815
5816 echo "$as_me:5816: checking for default terminfo directory" >&5
5817 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5818
5819 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5820 if test "${with_default_terminfo_dir+set}" = set; then
5821   withval="$with_default_terminfo_dir"
5822
5823 else
5824   withval="${TERMINFO-${datadir}/terminfo}"
5825 fi; if test -n "${datadir}/terminfo" ; then
5826
5827 if test "x$prefix" != xNONE; then
5828   cf_path_syntax="$prefix"
5829 else
5830   cf_path_syntax="$ac_default_prefix"
5831 fi
5832
5833 case ".$withval" in #(vi
5834 .\$\(*\)*|.\'*\'*) #(vi
5835   ;;
5836 ..|./*|.\\*) #(vi
5837   ;;
5838 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5839   ;;
5840 .\${*prefix}*) #(vi
5841   eval withval="$withval"
5842   case ".$withval" in #(vi
5843   .NONE/*)
5844     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5845     ;;
5846   esac
5847   ;; #(vi
5848 .no|.NONE/*)
5849   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5850   ;;
5851 *)
5852   { { echo "$as_me:5852: error: expected a pathname, not \"$withval\"" >&5
5853 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5854    { (exit 1); exit 1; }; }
5855   ;;
5856 esac
5857
5858 fi
5859 TERMINFO="$withval"
5860
5861 echo "$as_me:5861: result: $TERMINFO" >&5
5862 echo "${ECHO_T}$TERMINFO" >&6
5863 cat >>confdefs.h <<EOF
5864 #define TERMINFO "$TERMINFO"
5865 EOF
5866
5867 fi
5868
5869 ###     use option --disable-big-core to make tic run on small machines
5870 ###     We need 4Mb, check if we can allocate 50% more than that.
5871 echo "$as_me:5871: checking if big-core option selected" >&5
5872 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5873
5874 # Check whether --enable-big-core or --disable-big-core was given.
5875 if test "${enable_big_core+set}" = set; then
5876   enableval="$enable_big_core"
5877   with_big_core=$enableval
5878 else
5879   if test "$cross_compiling" = yes; then
5880   with_big_core=no
5881 else
5882   cat >conftest.$ac_ext <<_ACEOF
5883 #line 5883 "configure"
5884 #include "confdefs.h"
5885
5886 #include <stdlib.h>
5887 #include <string.h>
5888 int main() {
5889         unsigned long n = 6000000L;
5890         char *s = malloc(n);
5891         if (s != 0)
5892                 s[0] = s[n-1] = 0;
5893         ${cf_cv_main_return:-return}(s == 0);
5894 }
5895 _ACEOF
5896 rm -f conftest$ac_exeext
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898   (eval $ac_link) 2>&5
5899   ac_status=$?
5900   echo "$as_me:5900: \$? = $ac_status" >&5
5901   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5902   { (eval echo "$as_me:5902: \"$ac_try\"") >&5
5903   (eval $ac_try) 2>&5
5904   ac_status=$?
5905   echo "$as_me:5905: \$? = $ac_status" >&5
5906   (exit $ac_status); }; }; then
5907   with_big_core=yes
5908 else
5909   echo "$as_me: program exited with status $ac_status" >&5
5910 echo "$as_me: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 with_big_core=no
5913 fi
5914 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5915 fi
5916 fi;
5917 echo "$as_me:5917: result: $with_big_core" >&5
5918 echo "${ECHO_T}$with_big_core" >&6
5919 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5920 #define HAVE_BIG_CORE 1
5921 EOF
5922
5923 ### ISO C only guarantees 512-char strings, we have tables which load faster
5924 ### when constructed using "big" strings.  More than the C compiler, the awk
5925 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5926 echo "$as_me:5926: checking if big-strings option selected" >&5
5927 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5928
5929 # Check whether --enable-big-strings or --disable-big-strings was given.
5930 if test "${enable_big_strings+set}" = set; then
5931   enableval="$enable_big_strings"
5932   with_big_strings=$enableval
5933 else
5934
5935         case x$AWK in #(vi
5936         x)
5937                 eval with_big_strings=no
5938                 ;;
5939         *) #(vi
5940                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5941                         | $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
5942                         eval with_big_strings=yes
5943                 else
5944                         eval with_big_strings=no
5945                 fi
5946                 ;;
5947         esac
5948
5949 fi;
5950 echo "$as_me:5950: result: $with_big_strings" >&5
5951 echo "${ECHO_T}$with_big_strings" >&6
5952
5953 USE_BIG_STRINGS=0
5954 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5955
5956 ###     use option --enable-termcap to compile in the termcap fallback support
5957 echo "$as_me:5957: checking if you want termcap-fallback support" >&5
5958 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5959
5960 # Check whether --enable-termcap or --disable-termcap was given.
5961 if test "${enable_termcap+set}" = set; then
5962   enableval="$enable_termcap"
5963   with_termcap=$enableval
5964 else
5965   with_termcap=no
5966 fi;
5967 echo "$as_me:5967: result: $with_termcap" >&5
5968 echo "${ECHO_T}$with_termcap" >&6
5969
5970 if test "$with_termcap" != "yes" ; then
5971         if test "$use_database" = no ; then
5972                 if test -z "$with_fallback" ; then
5973                         { { echo "$as_me:5973: error: You have disabled the database w/o specifying fallbacks" >&5
5974 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5975    { (exit 1); exit 1; }; }
5976                 fi
5977         fi
5978         cat >>confdefs.h <<\EOF
5979 #define PURE_TERMINFO 1
5980 EOF
5981
5982 else
5983
5984 if test "$with_ticlib" != no ; then
5985         { { echo "$as_me:5985: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5986 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5987    { (exit 1); exit 1; }; }
5988 fi
5989
5990 cat >>confdefs.h <<\EOF
5991 #define USE_TERMCAP 1
5992 EOF
5993
5994 echo "$as_me:5994: checking for list of termcap files" >&5
5995 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5996
5997 # Check whether --with-termpath or --without-termpath was given.
5998 if test "${with_termpath+set}" = set; then
5999   withval="$with_termpath"
6000
6001 else
6002   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6003 fi;
6004 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6005 cf_dst_path=
6006 for cf_src_path in $withval
6007 do
6008
6009 if test "x$prefix" != xNONE; then
6010   cf_path_syntax="$prefix"
6011 else
6012   cf_path_syntax="$ac_default_prefix"
6013 fi
6014
6015 case ".$cf_src_path" in #(vi
6016 .\$\(*\)*|.\'*\'*) #(vi
6017   ;;
6018 ..|./*|.\\*) #(vi
6019   ;;
6020 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6021   ;;
6022 .\${*prefix}*) #(vi
6023   eval cf_src_path="$cf_src_path"
6024   case ".$cf_src_path" in #(vi
6025   .NONE/*)
6026     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6027     ;;
6028   esac
6029   ;; #(vi
6030 .no|.NONE/*)
6031   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6032   ;;
6033 *)
6034   { { echo "$as_me:6034: error: expected a pathname, not \"$cf_src_path\"" >&5
6035 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6036    { (exit 1); exit 1; }; }
6037   ;;
6038 esac
6039
6040   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6041   cf_dst_path="${cf_dst_path}${cf_src_path}"
6042 done
6043 IFS="$ac_save_ifs"
6044
6045 eval 'TERMPATH="$cf_dst_path"'
6046
6047 echo "$as_me:6047: result: $TERMPATH" >&5
6048 echo "${ECHO_T}$TERMPATH" >&6
6049 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6050 #define TERMPATH "$TERMPATH"
6051 EOF
6052
6053 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6054 echo "$as_me:6054: checking if fast termcap-loader is needed" >&5
6055 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6056
6057 # Check whether --enable-getcap or --disable-getcap was given.
6058 if test "${enable_getcap+set}" = set; then
6059   enableval="$enable_getcap"
6060   with_getcap=$enableval
6061 else
6062   with_getcap=no
6063 fi;
6064 echo "$as_me:6064: result: $with_getcap" >&5
6065 echo "${ECHO_T}$with_getcap" >&6
6066 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6067 #define USE_GETCAP 1
6068 EOF
6069
6070 echo "$as_me:6070: checking if translated termcaps will be cached in ~/.terminfo" >&5
6071 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6072
6073 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6074 if test "${enable_getcap_cache+set}" = set; then
6075   enableval="$enable_getcap_cache"
6076   with_getcap_cache=$enableval
6077 else
6078   with_getcap_cache=no
6079 fi;
6080 echo "$as_me:6080: result: $with_getcap_cache" >&5
6081 echo "${ECHO_T}$with_getcap_cache" >&6
6082 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6083 #define USE_GETCAP_CACHE 1
6084 EOF
6085
6086 fi
6087
6088 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6089 echo "$as_me:6089: checking if ~/.terminfo is wanted" >&5
6090 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6091
6092 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6093 if test "${enable_home_terminfo+set}" = set; then
6094   enableval="$enable_home_terminfo"
6095   with_home_terminfo=$enableval
6096 else
6097   with_home_terminfo=yes
6098 fi;
6099 echo "$as_me:6099: result: $with_home_terminfo" >&5
6100 echo "${ECHO_T}$with_home_terminfo" >&6
6101 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6102 #define USE_HOME_TERMINFO 1
6103 EOF
6104
6105 echo "$as_me:6105: checking if you want to use restricted environment when running as root" >&5
6106 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6107
6108 # Check whether --enable-root-environ or --disable-root-environ was given.
6109 if test "${enable_root_environ+set}" = set; then
6110   enableval="$enable_root_environ"
6111   with_root_environ=$enableval
6112 else
6113   with_root_environ=yes
6114 fi;
6115 echo "$as_me:6115: result: $with_root_environ" >&5
6116 echo "${ECHO_T}$with_root_environ" >&6
6117 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6118 #define USE_ROOT_ENVIRON 1
6119 EOF
6120
6121 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6122 ###   to reduce storage requirements for the terminfo database.
6123
6124 for ac_func in \
6125         remove \
6126         unlink
6127 do
6128 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6129 echo "$as_me:6129: checking for $ac_func" >&5
6130 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6131 if eval "test \"\${$as_ac_var+set}\" = set"; then
6132   echo $ECHO_N "(cached) $ECHO_C" >&6
6133 else
6134   cat >conftest.$ac_ext <<_ACEOF
6135 #line 6135 "configure"
6136 #include "confdefs.h"
6137 /* System header to define __stub macros and hopefully few prototypes,
6138     which can conflict with char $ac_func (); below.  */
6139 #include <assert.h>
6140 /* Override any gcc2 internal prototype to avoid an error.  */
6141 #ifdef __cplusplus
6142 extern "C"
6143 #endif
6144 /* We use char because int might match the return type of a gcc2
6145    builtin and then its argument prototype would still apply.  */
6146 char $ac_func ();
6147 char (*f) ();
6148
6149 int
6150 main ()
6151 {
6152 /* The GNU C library defines this for functions which it implements
6153     to always fail with ENOSYS.  Some functions are actually named
6154     something starting with __ and the normal name is an alias.  */
6155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6156 choke me
6157 #else
6158 f = $ac_func;
6159 #endif
6160
6161   ;
6162   return 0;
6163 }
6164 _ACEOF
6165 rm -f conftest.$ac_objext conftest$ac_exeext
6166 if { (eval echo "$as_me:6166: \"$ac_link\"") >&5
6167   (eval $ac_link) 2>&5
6168   ac_status=$?
6169   echo "$as_me:6169: \$? = $ac_status" >&5
6170   (exit $ac_status); } &&
6171          { ac_try='test -s conftest$ac_exeext'
6172   { (eval echo "$as_me:6172: \"$ac_try\"") >&5
6173   (eval $ac_try) 2>&5
6174   ac_status=$?
6175   echo "$as_me:6175: \$? = $ac_status" >&5
6176   (exit $ac_status); }; }; then
6177   eval "$as_ac_var=yes"
6178 else
6179   echo "$as_me: failed program was:" >&5
6180 cat conftest.$ac_ext >&5
6181 eval "$as_ac_var=no"
6182 fi
6183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6184 fi
6185 echo "$as_me:6185: result: `eval echo '${'$as_ac_var'}'`" >&5
6186 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6187 if test `eval echo '${'$as_ac_var'}'` = yes; then
6188   cat >>confdefs.h <<EOF
6189 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6190 EOF
6191
6192 fi
6193 done
6194
6195 if test "$cross_compiling" = yes ; then
6196
6197 for ac_func in \
6198                 link \
6199                 symlink
6200 do
6201 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6202 echo "$as_me:6202: checking for $ac_func" >&5
6203 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6204 if eval "test \"\${$as_ac_var+set}\" = set"; then
6205   echo $ECHO_N "(cached) $ECHO_C" >&6
6206 else
6207   cat >conftest.$ac_ext <<_ACEOF
6208 #line 6208 "configure"
6209 #include "confdefs.h"
6210 /* System header to define __stub macros and hopefully few prototypes,
6211     which can conflict with char $ac_func (); below.  */
6212 #include <assert.h>
6213 /* Override any gcc2 internal prototype to avoid an error.  */
6214 #ifdef __cplusplus
6215 extern "C"
6216 #endif
6217 /* We use char because int might match the return type of a gcc2
6218    builtin and then its argument prototype would still apply.  */
6219 char $ac_func ();
6220 char (*f) ();
6221
6222 int
6223 main ()
6224 {
6225 /* The GNU C library defines this for functions which it implements
6226     to always fail with ENOSYS.  Some functions are actually named
6227     something starting with __ and the normal name is an alias.  */
6228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6229 choke me
6230 #else
6231 f = $ac_func;
6232 #endif
6233
6234   ;
6235   return 0;
6236 }
6237 _ACEOF
6238 rm -f conftest.$ac_objext conftest$ac_exeext
6239 if { (eval echo "$as_me:6239: \"$ac_link\"") >&5
6240   (eval $ac_link) 2>&5
6241   ac_status=$?
6242   echo "$as_me:6242: \$? = $ac_status" >&5
6243   (exit $ac_status); } &&
6244          { ac_try='test -s conftest$ac_exeext'
6245   { (eval echo "$as_me:6245: \"$ac_try\"") >&5
6246   (eval $ac_try) 2>&5
6247   ac_status=$?
6248   echo "$as_me:6248: \$? = $ac_status" >&5
6249   (exit $ac_status); }; }; then
6250   eval "$as_ac_var=yes"
6251 else
6252   echo "$as_me: failed program was:" >&5
6253 cat conftest.$ac_ext >&5
6254 eval "$as_ac_var=no"
6255 fi
6256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6257 fi
6258 echo "$as_me:6258: result: `eval echo '${'$as_ac_var'}'`" >&5
6259 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6260 if test `eval echo '${'$as_ac_var'}'` = yes; then
6261   cat >>confdefs.h <<EOF
6262 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6263 EOF
6264
6265 fi
6266 done
6267
6268 else
6269         echo "$as_me:6269: checking if link/symlink functions work" >&5
6270 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6271 if test "${cf_cv_link_funcs+set}" = set; then
6272   echo $ECHO_N "(cached) $ECHO_C" >&6
6273 else
6274
6275                 cf_cv_link_funcs=
6276                 for cf_func in link symlink ; do
6277                         if test "$cross_compiling" = yes; then
6278
6279                         eval 'ac_cv_func_'$cf_func'=error'
6280 else
6281   cat >conftest.$ac_ext <<_ACEOF
6282 #line 6282 "configure"
6283 #include "confdefs.h"
6284
6285 #include <sys/types.h>
6286 #include <sys/stat.h>
6287 #ifdef HAVE_UNISTD_H
6288 #include <unistd.h>
6289 #endif
6290 int main()
6291 {
6292         int fail = 0;
6293         char *src = "config.log";
6294         char *dst = "conftest.chk";
6295         struct stat src_sb;
6296         struct stat dst_sb;
6297
6298         stat(src, &src_sb);
6299         fail = ($cf_func("config.log", "conftest.chk") < 0)
6300             || (stat(dst, &dst_sb) < 0)
6301             || (dst_sb.st_mtime != src_sb.st_mtime);
6302 #ifdef HAVE_UNLINK
6303         unlink(dst);
6304 #else
6305         remove(dst);
6306 #endif
6307         ${cf_cv_main_return:-return} (fail);
6308 }
6309
6310 _ACEOF
6311 rm -f conftest$ac_exeext
6312 if { (eval echo "$as_me:6312: \"$ac_link\"") >&5
6313   (eval $ac_link) 2>&5
6314   ac_status=$?
6315   echo "$as_me:6315: \$? = $ac_status" >&5
6316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6317   { (eval echo "$as_me:6317: \"$ac_try\"") >&5
6318   (eval $ac_try) 2>&5
6319   ac_status=$?
6320   echo "$as_me:6320: \$? = $ac_status" >&5
6321   (exit $ac_status); }; }; then
6322
6323                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6324                         eval 'ac_cv_func_'$cf_func'=yes'
6325 else
6326   echo "$as_me: program exited with status $ac_status" >&5
6327 echo "$as_me: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6329
6330                         eval 'ac_cv_func_'$cf_func'=no'
6331 fi
6332 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6333 fi
6334                 done
6335                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6336
6337 fi
6338 echo "$as_me:6338: result: $cf_cv_link_funcs" >&5
6339 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6340         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6341 #define HAVE_LINK 1
6342 EOF
6343
6344         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6345 #define HAVE_SYMLINK 1
6346 EOF
6347
6348 fi
6349
6350 with_links=no
6351 with_symlinks=no
6352
6353 # soft links (symbolic links) are useful for some systems where hard links do
6354 # not work, or to make it simpler to copy terminfo trees around.
6355 if test "$ac_cv_func_symlink" = yes ; then
6356     echo "$as_me:6356: checking if tic should use symbolic links" >&5
6357 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6358
6359 # Check whether --enable-symlinks or --disable-symlinks was given.
6360 if test "${enable_symlinks+set}" = set; then
6361   enableval="$enable_symlinks"
6362   with_symlinks=$enableval
6363 else
6364   with_symlinks=no
6365 fi;
6366     echo "$as_me:6366: result: $with_symlinks" >&5
6367 echo "${ECHO_T}$with_symlinks" >&6
6368 fi
6369
6370 # If we have hard links and did not choose to use soft links instead, there is
6371 # no reason to make this choice optional - use the hard links.
6372 if test "$with_symlinks" = no ; then
6373     echo "$as_me:6373: checking if tic should use hard links" >&5
6374 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6375     if test "$ac_cv_func_link" = yes ; then
6376         with_links=yes
6377     else
6378         with_links=no
6379     fi
6380     echo "$as_me:6380: result: $with_links" >&5
6381 echo "${ECHO_T}$with_links" >&6
6382 fi
6383
6384 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6385 #define USE_LINKS 1
6386 EOF
6387
6388 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6389 #define USE_SYMLINKS 1
6390 EOF
6391
6392 ###   use option --enable-broken-linker to force on use of broken-linker support
6393 echo "$as_me:6393: checking if you want broken-linker support code" >&5
6394 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6395
6396 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6397 if test "${enable_broken_linker+set}" = set; then
6398   enableval="$enable_broken_linker"
6399   with_broken_linker=$enableval
6400 else
6401   with_broken_linker=${BROKEN_LINKER-no}
6402 fi;
6403 echo "$as_me:6403: result: $with_broken_linker" >&5
6404 echo "${ECHO_T}$with_broken_linker" >&6
6405
6406 BROKEN_LINKER=0
6407 if test "$with_broken_linker" = yes ; then
6408         cat >>confdefs.h <<\EOF
6409 #define BROKEN_LINKER 1
6410 EOF
6411
6412         BROKEN_LINKER=1
6413 elif test "$DFT_LWR_MODEL" = shared ; then
6414         case $cf_cv_system_name in #(vi
6415         cygwin*)
6416                 cat >>confdefs.h <<\EOF
6417 #define BROKEN_LINKER 1
6418 EOF
6419
6420                 BROKEN_LINKER=1
6421                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6422
6423 echo "${as_me-configure}:6423: testing cygwin linker is broken anyway ..." 1>&5
6424
6425                 ;;
6426         esac
6427 fi
6428
6429 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6430 echo "$as_me:6430: checking if tputs should process BSD-style prefix padding" >&5
6431 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6432
6433 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6434 if test "${enable_bsdpad+set}" = set; then
6435   enableval="$enable_bsdpad"
6436   with_bsdpad=$enableval
6437 else
6438   with_bsdpad=no
6439 fi;
6440 echo "$as_me:6440: result: $with_bsdpad" >&5
6441 echo "${ECHO_T}$with_bsdpad" >&6
6442 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6443 #define BSD_TPUTS 1
6444 EOF
6445
6446 ###   use option --enable-widec to turn on use of wide-character support
6447 NCURSES_CH_T=chtype
6448 NCURSES_LIBUTF8=0
6449
6450 NEED_WCHAR_H=0
6451 NCURSES_MBSTATE_T=0
6452 NCURSES_WCHAR_T=0
6453 NCURSES_WINT_T=0
6454
6455 # Check to define _XOPEN_SOURCE "automatically"
6456
6457 echo "$as_me:6457: checking if $CC -U and -D options work together" >&5
6458 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6459 if test "${cf_cv_cc_u_d_options+set}" = set; then
6460   echo $ECHO_N "(cached) $ECHO_C" >&6
6461 else
6462
6463         cf_save_CPPFLAGS="$CPPFLAGS"
6464         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6465         cat >conftest.$ac_ext <<_ACEOF
6466 #line 6466 "configure"
6467 #include "confdefs.h"
6468
6469 int
6470 main ()
6471 {
6472
6473 #ifndef U_D_OPTIONS
6474 make an undefined-error
6475 #endif
6476 #ifdef  D_U_OPTIONS
6477 make a defined-error
6478 #endif
6479
6480   ;
6481   return 0;
6482 }
6483 _ACEOF
6484 rm -f conftest.$ac_objext
6485 if { (eval echo "$as_me:6485: \"$ac_compile\"") >&5
6486   (eval $ac_compile) 2>&5
6487   ac_status=$?
6488   echo "$as_me:6488: \$? = $ac_status" >&5
6489   (exit $ac_status); } &&
6490          { ac_try='test -s conftest.$ac_objext'
6491   { (eval echo "$as_me:6491: \"$ac_try\"") >&5
6492   (eval $ac_try) 2>&5
6493   ac_status=$?
6494   echo "$as_me:6494: \$? = $ac_status" >&5
6495   (exit $ac_status); }; }; then
6496
6497         cf_cv_cc_u_d_options=yes
6498 else
6499   echo "$as_me: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6501
6502         cf_cv_cc_u_d_options=no
6503 fi
6504 rm -f conftest.$ac_objext conftest.$ac_ext
6505         CPPFLAGS="$cf_save_CPPFLAGS"
6506
6507 fi
6508 echo "$as_me:6508: result: $cf_cv_cc_u_d_options" >&5
6509 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6510
6511 cf_XOPEN_SOURCE=500
6512 cf_POSIX_C_SOURCE=199506L
6513
6514 case $host_os in #(vi
6515 aix[456]*) #(vi
6516         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6517         ;;
6518 freebsd*|dragonfly*) #(vi
6519         # 5.x headers associate
6520         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6521         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6522         cf_POSIX_C_SOURCE=200112L
6523         cf_XOPEN_SOURCE=600
6524         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6525         ;;
6526 hpux*) #(vi
6527         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6528         ;;
6529 irix[56].*) #(vi
6530         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6531         ;;
6532 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6533
6534 echo "$as_me:6534: checking if we must define _GNU_SOURCE" >&5
6535 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6536 if test "${cf_cv_gnu_source+set}" = set; then
6537   echo $ECHO_N "(cached) $ECHO_C" >&6
6538 else
6539
6540 cat >conftest.$ac_ext <<_ACEOF
6541 #line 6541 "configure"
6542 #include "confdefs.h"
6543 #include <sys/types.h>
6544 int
6545 main ()
6546 {
6547
6548 #ifndef _XOPEN_SOURCE
6549 make an error
6550 #endif
6551   ;
6552   return 0;
6553 }
6554 _ACEOF
6555 rm -f conftest.$ac_objext
6556 if { (eval echo "$as_me:6556: \"$ac_compile\"") >&5
6557   (eval $ac_compile) 2>&5
6558   ac_status=$?
6559   echo "$as_me:6559: \$? = $ac_status" >&5
6560   (exit $ac_status); } &&
6561          { ac_try='test -s conftest.$ac_objext'
6562   { (eval echo "$as_me:6562: \"$ac_try\"") >&5
6563   (eval $ac_try) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); }; }; then
6567   cf_cv_gnu_source=no
6568 else
6569   echo "$as_me: failed program was:" >&5
6570 cat conftest.$ac_ext >&5
6571 cf_save="$CPPFLAGS"
6572          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6573          cat >conftest.$ac_ext <<_ACEOF
6574 #line 6574 "configure"
6575 #include "confdefs.h"
6576 #include <sys/types.h>
6577 int
6578 main ()
6579 {
6580
6581 #ifdef _XOPEN_SOURCE
6582 make an error
6583 #endif
6584   ;
6585   return 0;
6586 }
6587 _ACEOF
6588 rm -f conftest.$ac_objext
6589 if { (eval echo "$as_me:6589: \"$ac_compile\"") >&5
6590   (eval $ac_compile) 2>&5
6591   ac_status=$?
6592   echo "$as_me:6592: \$? = $ac_status" >&5
6593   (exit $ac_status); } &&
6594          { ac_try='test -s conftest.$ac_objext'
6595   { (eval echo "$as_me:6595: \"$ac_try\"") >&5
6596   (eval $ac_try) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); }; }; then
6600   cf_cv_gnu_source=no
6601 else
6602   echo "$as_me: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 cf_cv_gnu_source=yes
6605 fi
6606 rm -f conftest.$ac_objext conftest.$ac_ext
6607         CPPFLAGS="$cf_save"
6608
6609 fi
6610 rm -f conftest.$ac_objext conftest.$ac_ext
6611
6612 fi
6613 echo "$as_me:6613: result: $cf_cv_gnu_source" >&5
6614 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6615 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6616
6617         ;;
6618 mirbsd*) #(vi
6619         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6620         ;;
6621 netbsd*) #(vi
6622         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6623         ;;
6624 openbsd*) #(vi
6625         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6626         ;;
6627 osf[45]*) #(vi
6628         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6629         ;;
6630 nto-qnx*) #(vi
6631         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6632         ;;
6633 sco*) #(vi
6634         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6635         ;;
6636 solaris*) #(vi
6637         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6638         ;;
6639 *)
6640         echo "$as_me:6640: checking if we should define _XOPEN_SOURCE" >&5
6641 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6642 if test "${cf_cv_xopen_source+set}" = set; then
6643   echo $ECHO_N "(cached) $ECHO_C" >&6
6644 else
6645
6646         cat >conftest.$ac_ext <<_ACEOF
6647 #line 6647 "configure"
6648 #include "confdefs.h"
6649 #include <sys/types.h>
6650 int
6651 main ()
6652 {
6653
6654 #ifndef _XOPEN_SOURCE
6655 make an error
6656 #endif
6657   ;
6658   return 0;
6659 }
6660 _ACEOF
6661 rm -f conftest.$ac_objext
6662 if { (eval echo "$as_me:6662: \"$ac_compile\"") >&5
6663   (eval $ac_compile) 2>&5
6664   ac_status=$?
6665   echo "$as_me:6665: \$? = $ac_status" >&5
6666   (exit $ac_status); } &&
6667          { ac_try='test -s conftest.$ac_objext'
6668   { (eval echo "$as_me:6668: \"$ac_try\"") >&5
6669   (eval $ac_try) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); }; }; then
6673   cf_cv_xopen_source=no
6674 else
6675   echo "$as_me: failed program was:" >&5
6676 cat conftest.$ac_ext >&5
6677 cf_save="$CPPFLAGS"
6678          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6679          cat >conftest.$ac_ext <<_ACEOF
6680 #line 6680 "configure"
6681 #include "confdefs.h"
6682 #include <sys/types.h>
6683 int
6684 main ()
6685 {
6686
6687 #ifdef _XOPEN_SOURCE
6688 make an error
6689 #endif
6690   ;
6691   return 0;
6692 }
6693 _ACEOF
6694 rm -f conftest.$ac_objext
6695 if { (eval echo "$as_me:6695: \"$ac_compile\"") >&5
6696   (eval $ac_compile) 2>&5
6697   ac_status=$?
6698   echo "$as_me:6698: \$? = $ac_status" >&5
6699   (exit $ac_status); } &&
6700          { ac_try='test -s conftest.$ac_objext'
6701   { (eval echo "$as_me:6701: \"$ac_try\"") >&5
6702   (eval $ac_try) 2>&5
6703   ac_status=$?
6704   echo "$as_me:6704: \$? = $ac_status" >&5
6705   (exit $ac_status); }; }; then
6706   cf_cv_xopen_source=no
6707 else
6708   echo "$as_me: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6710 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6711 fi
6712 rm -f conftest.$ac_objext conftest.$ac_ext
6713         CPPFLAGS="$cf_save"
6714
6715 fi
6716 rm -f conftest.$ac_objext conftest.$ac_ext
6717
6718 fi
6719 echo "$as_me:6719: result: $cf_cv_xopen_source" >&5
6720 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6721         if test "$cf_cv_xopen_source" != no ; then
6722
6723 # remove _XOPEN_SOURCE symbol from $CFLAGS
6724 CFLAGS=`echo "$CFLAGS" | \
6725         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6726                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6727
6728 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6729 CPPFLAGS=`echo "$CPPFLAGS" | \
6730         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6731                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6732
6733                 test "$cf_cv_cc_u_d_options" = yes && \
6734                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6735                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6736         fi
6737
6738 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6739
6740 cf_save_CFLAGS="$CFLAGS"
6741 cf_save_CPPFLAGS="$CPPFLAGS"
6742
6743 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6744 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6745         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6746                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6747
6748 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6749 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6750         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6751                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6752
6753 echo "$as_me:6753: checking if we should define _POSIX_C_SOURCE" >&5
6754 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6755 if test "${cf_cv_posix_c_source+set}" = set; then
6756   echo $ECHO_N "(cached) $ECHO_C" >&6
6757 else
6758
6759 echo "${as_me-configure}:6759: testing if the symbol is already defined go no further ..." 1>&5
6760
6761         cat >conftest.$ac_ext <<_ACEOF
6762 #line 6762 "configure"
6763 #include "confdefs.h"
6764 #include <sys/types.h>
6765 int
6766 main ()
6767 {
6768
6769 #ifndef _POSIX_C_SOURCE
6770 make an error
6771 #endif
6772   ;
6773   return 0;
6774 }
6775 _ACEOF
6776 rm -f conftest.$ac_objext
6777 if { (eval echo "$as_me:6777: \"$ac_compile\"") >&5
6778   (eval $ac_compile) 2>&5
6779   ac_status=$?
6780   echo "$as_me:6780: \$? = $ac_status" >&5
6781   (exit $ac_status); } &&
6782          { ac_try='test -s conftest.$ac_objext'
6783   { (eval echo "$as_me:6783: \"$ac_try\"") >&5
6784   (eval $ac_try) 2>&5
6785   ac_status=$?
6786   echo "$as_me:6786: \$? = $ac_status" >&5
6787   (exit $ac_status); }; }; then
6788   cf_cv_posix_c_source=no
6789 else
6790   echo "$as_me: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 cf_want_posix_source=no
6793          case .$cf_POSIX_C_SOURCE in #(vi
6794          .[12]??*) #(vi
6795                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6796                 ;;
6797          .2) #(vi
6798                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6799                 cf_want_posix_source=yes
6800                 ;;
6801          .*)
6802                 cf_want_posix_source=yes
6803                 ;;
6804          esac
6805          if test "$cf_want_posix_source" = yes ; then
6806                 cat >conftest.$ac_ext <<_ACEOF
6807 #line 6807 "configure"
6808 #include "confdefs.h"
6809 #include <sys/types.h>
6810 int
6811 main ()
6812 {
6813
6814 #ifdef _POSIX_SOURCE
6815 make an error
6816 #endif
6817   ;
6818   return 0;
6819 }
6820 _ACEOF
6821 rm -f conftest.$ac_objext
6822 if { (eval echo "$as_me:6822: \"$ac_compile\"") >&5
6823   (eval $ac_compile) 2>&5
6824   ac_status=$?
6825   echo "$as_me:6825: \$? = $ac_status" >&5
6826   (exit $ac_status); } &&
6827          { ac_try='test -s conftest.$ac_objext'
6828   { (eval echo "$as_me:6828: \"$ac_try\"") >&5
6829   (eval $ac_try) 2>&5
6830   ac_status=$?
6831   echo "$as_me:6831: \$? = $ac_status" >&5
6832   (exit $ac_status); }; }; then
6833   :
6834 else
6835   echo "$as_me: failed program was:" >&5
6836 cat conftest.$ac_ext >&5
6837 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6838 fi
6839 rm -f conftest.$ac_objext conftest.$ac_ext
6840          fi
6841
6842 echo "${as_me-configure}:6842: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6843
6844          CFLAGS="$cf_trim_CFLAGS"
6845          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6846
6847 echo "${as_me-configure}:6847: testing if the second compile does not leave our definition intact error ..." 1>&5
6848
6849          cat >conftest.$ac_ext <<_ACEOF
6850 #line 6850 "configure"
6851 #include "confdefs.h"
6852 #include <sys/types.h>
6853 int
6854 main ()
6855 {
6856
6857 #ifndef _POSIX_C_SOURCE
6858 make an error
6859 #endif
6860   ;
6861   return 0;
6862 }
6863 _ACEOF
6864 rm -f conftest.$ac_objext
6865 if { (eval echo "$as_me:6865: \"$ac_compile\"") >&5
6866   (eval $ac_compile) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); } &&
6870          { ac_try='test -s conftest.$ac_objext'
6871   { (eval echo "$as_me:6871: \"$ac_try\"") >&5
6872   (eval $ac_try) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); }; }; then
6876   :
6877 else
6878   echo "$as_me: failed program was:" >&5
6879 cat conftest.$ac_ext >&5
6880 cf_cv_posix_c_source=no
6881 fi
6882 rm -f conftest.$ac_objext conftest.$ac_ext
6883          CFLAGS="$cf_save_CFLAGS"
6884          CPPFLAGS="$cf_save_CPPFLAGS"
6885
6886 fi
6887 rm -f conftest.$ac_objext conftest.$ac_ext
6888
6889 fi
6890 echo "$as_me:6890: result: $cf_cv_posix_c_source" >&5
6891 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6892
6893 if test "$cf_cv_posix_c_source" != no ; then
6894         CFLAGS="$cf_trim_CFLAGS"
6895         CPPFLAGS="$cf_trim_CPPFLAGS"
6896         if test "$cf_cv_cc_u_d_options" = yes ; then
6897                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6898                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6899                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6900         fi
6901         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6902 fi
6903
6904         ;;
6905 esac
6906
6907 # Work around breakage on OS X
6908
6909 echo "$as_me:6909: checking if SIGWINCH is defined" >&5
6910 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6911 if test "${cf_cv_define_sigwinch+set}" = set; then
6912   echo $ECHO_N "(cached) $ECHO_C" >&6
6913 else
6914
6915         cat >conftest.$ac_ext <<_ACEOF
6916 #line 6916 "configure"
6917 #include "confdefs.h"
6918
6919 #include <sys/types.h>
6920 #include <sys/signal.h>
6921
6922 int
6923 main ()
6924 {
6925 int x = SIGWINCH
6926   ;
6927   return 0;
6928 }
6929 _ACEOF
6930 rm -f conftest.$ac_objext
6931 if { (eval echo "$as_me:6931: \"$ac_compile\"") >&5
6932   (eval $ac_compile) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); } &&
6936          { ac_try='test -s conftest.$ac_objext'
6937   { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938   (eval $ac_try) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); }; }; then
6942   cf_cv_define_sigwinch=yes
6943 else
6944   echo "$as_me: failed program was:" >&5
6945 cat conftest.$ac_ext >&5
6946 cat >conftest.$ac_ext <<_ACEOF
6947 #line 6947 "configure"
6948 #include "confdefs.h"
6949
6950 #undef _XOPEN_SOURCE
6951 #undef _POSIX_SOURCE
6952 #undef _POSIX_C_SOURCE
6953 #include <sys/types.h>
6954 #include <sys/signal.h>
6955
6956 int
6957 main ()
6958 {
6959 int x = SIGWINCH
6960   ;
6961   return 0;
6962 }
6963 _ACEOF
6964 rm -f conftest.$ac_objext
6965 if { (eval echo "$as_me:6965: \"$ac_compile\"") >&5
6966   (eval $ac_compile) 2>&5
6967   ac_status=$?
6968   echo "$as_me:6968: \$? = $ac_status" >&5
6969   (exit $ac_status); } &&
6970          { ac_try='test -s conftest.$ac_objext'
6971   { (eval echo "$as_me:6971: \"$ac_try\"") >&5
6972   (eval $ac_try) 2>&5
6973   ac_status=$?
6974   echo "$as_me:6974: \$? = $ac_status" >&5
6975   (exit $ac_status); }; }; then
6976   cf_cv_define_sigwinch=maybe
6977 else
6978   echo "$as_me: failed program was:" >&5
6979 cat conftest.$ac_ext >&5
6980 cf_cv_define_sigwinch=no
6981 fi
6982 rm -f conftest.$ac_objext conftest.$ac_ext
6983
6984 fi
6985 rm -f conftest.$ac_objext conftest.$ac_ext
6986
6987 fi
6988 echo "$as_me:6988: result: $cf_cv_define_sigwinch" >&5
6989 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6990
6991 if test "$cf_cv_define_sigwinch" = maybe ; then
6992 echo "$as_me:6992: checking for actual SIGWINCH definition" >&5
6993 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6994 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6995   echo $ECHO_N "(cached) $ECHO_C" >&6
6996 else
6997
6998 cf_cv_fixup_sigwinch=unknown
6999 cf_sigwinch=32
7000 while test $cf_sigwinch != 1
7001 do
7002         cat >conftest.$ac_ext <<_ACEOF
7003 #line 7003 "configure"
7004 #include "confdefs.h"
7005
7006 #undef _XOPEN_SOURCE
7007 #undef _POSIX_SOURCE
7008 #undef _POSIX_C_SOURCE
7009 #include <sys/types.h>
7010 #include <sys/signal.h>
7011
7012 int
7013 main ()
7014 {
7015
7016 #if SIGWINCH != $cf_sigwinch
7017 make an error
7018 #endif
7019 int x = SIGWINCH
7020   ;
7021   return 0;
7022 }
7023 _ACEOF
7024 rm -f conftest.$ac_objext
7025 if { (eval echo "$as_me:7025: \"$ac_compile\"") >&5
7026   (eval $ac_compile) 2>&5
7027   ac_status=$?
7028   echo "$as_me:7028: \$? = $ac_status" >&5
7029   (exit $ac_status); } &&
7030          { ac_try='test -s conftest.$ac_objext'
7031   { (eval echo "$as_me:7031: \"$ac_try\"") >&5
7032   (eval $ac_try) 2>&5
7033   ac_status=$?
7034   echo "$as_me:7034: \$? = $ac_status" >&5
7035   (exit $ac_status); }; }; then
7036   cf_cv_fixup_sigwinch=$cf_sigwinch
7037          break
7038 else
7039   echo "$as_me: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7041 fi
7042 rm -f conftest.$ac_objext conftest.$ac_ext
7043
7044 cf_sigwinch=`expr $cf_sigwinch - 1`
7045 done
7046
7047 fi
7048 echo "$as_me:7048: result: $cf_cv_fixup_sigwinch" >&5
7049 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7050
7051         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7052                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7053         fi
7054 fi
7055
7056 # Checks for CODESET support.
7057
7058   echo "$as_me:7058: checking for nl_langinfo and CODESET" >&5
7059 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7060 if test "${am_cv_langinfo_codeset+set}" = set; then
7061   echo $ECHO_N "(cached) $ECHO_C" >&6
7062 else
7063   cat >conftest.$ac_ext <<_ACEOF
7064 #line 7064 "configure"
7065 #include "confdefs.h"
7066 #include <langinfo.h>
7067 int
7068 main ()
7069 {
7070 char* cs = nl_langinfo(CODESET);
7071   ;
7072   return 0;
7073 }
7074 _ACEOF
7075 rm -f conftest.$ac_objext conftest$ac_exeext
7076 if { (eval echo "$as_me:7076: \"$ac_link\"") >&5
7077   (eval $ac_link) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); } &&
7081          { ac_try='test -s conftest$ac_exeext'
7082   { (eval echo "$as_me:7082: \"$ac_try\"") >&5
7083   (eval $ac_try) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); }; }; then
7087   am_cv_langinfo_codeset=yes
7088 else
7089   echo "$as_me: failed program was:" >&5
7090 cat conftest.$ac_ext >&5
7091 am_cv_langinfo_codeset=no
7092 fi
7093 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7094
7095 fi
7096 echo "$as_me:7096: result: $am_cv_langinfo_codeset" >&5
7097 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7098   if test $am_cv_langinfo_codeset = yes; then
7099
7100 cat >>confdefs.h <<\EOF
7101 #define HAVE_LANGINFO_CODESET 1
7102 EOF
7103
7104   fi
7105
7106 # use these variables to work around a defect in gcc's fixincludes.
7107 NCURSES_OK_WCHAR_T=
7108 NCURSES_OK_WINT_T=
7109
7110 echo "$as_me:7110: checking if you want wide-character code" >&5
7111 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7112
7113 # Check whether --enable-widec or --disable-widec was given.
7114 if test "${enable_widec+set}" = set; then
7115   enableval="$enable_widec"
7116   with_widec=$enableval
7117 else
7118   with_widec=no
7119 fi;
7120 echo "$as_me:7120: result: $with_widec" >&5
7121 echo "${ECHO_T}$with_widec" >&6
7122 if test "$with_widec" = yes ; then
7123         LIB_SUFFIX="w${LIB_SUFFIX}"
7124         cat >>confdefs.h <<\EOF
7125 #define USE_WIDEC_SUPPORT 1
7126 EOF
7127
7128 echo "$as_me:7128: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7129 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7130 cat >conftest.$ac_ext <<_ACEOF
7131 #line 7131 "configure"
7132 #include "confdefs.h"
7133 #include <sys/types.h>
7134
7135 int
7136 main ()
7137 {
7138
7139 #ifndef _XOPEN_SOURCE_EXTENDED
7140 make an error
7141 #endif
7142   ;
7143   return 0;
7144 }
7145 _ACEOF
7146 rm -f conftest.$ac_objext
7147 if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5
7148   (eval $ac_compile) 2>&5
7149   ac_status=$?
7150   echo "$as_me:7150: \$? = $ac_status" >&5
7151   (exit $ac_status); } &&
7152          { ac_try='test -s conftest.$ac_objext'
7153   { (eval echo "$as_me:7153: \"$ac_try\"") >&5
7154   (eval $ac_try) 2>&5
7155   ac_status=$?
7156   echo "$as_me:7156: \$? = $ac_status" >&5
7157   (exit $ac_status); }; }; then
7158   cf_result=no
7159 else
7160   echo "$as_me: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 cf_result=yes
7163 fi
7164 rm -f conftest.$ac_objext conftest.$ac_ext
7165 echo "$as_me:7165: result: $cf_result" >&5
7166 echo "${ECHO_T}$cf_result" >&6
7167
7168 if test "$cf_result" = yes ; then
7169         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7170 elif test "x" != "x" ; then
7171         echo "$as_me:7171: checking checking for compatible value versus " >&5
7172 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7173         cat >conftest.$ac_ext <<_ACEOF
7174 #line 7174 "configure"
7175 #include "confdefs.h"
7176 #include <sys/types.h>
7177
7178 int
7179 main ()
7180 {
7181
7182 #if _XOPEN_SOURCE_EXTENDED- < 0
7183 make an error
7184 #endif
7185   ;
7186   return 0;
7187 }
7188 _ACEOF
7189 rm -f conftest.$ac_objext
7190 if { (eval echo "$as_me:7190: \"$ac_compile\"") >&5
7191   (eval $ac_compile) 2>&5
7192   ac_status=$?
7193   echo "$as_me:7193: \$? = $ac_status" >&5
7194   (exit $ac_status); } &&
7195          { ac_try='test -s conftest.$ac_objext'
7196   { (eval echo "$as_me:7196: \"$ac_try\"") >&5
7197   (eval $ac_try) 2>&5
7198   ac_status=$?
7199   echo "$as_me:7199: \$? = $ac_status" >&5
7200   (exit $ac_status); }; }; then
7201   cf_result=yes
7202 else
7203   echo "$as_me: failed program was:" >&5
7204 cat conftest.$ac_ext >&5
7205 cf_result=no
7206 fi
7207 rm -f conftest.$ac_objext conftest.$ac_ext
7208         echo "$as_me:7208: result: $cf_result" >&5
7209 echo "${ECHO_T}$cf_result" >&6
7210         if test "$cf_result" = no ; then
7211                 # perhaps we can override it - try...
7212                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7213         fi
7214 fi
7215
7216         # with_overwrite=no
7217         NCURSES_CH_T=cchar_t
7218
7219 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7220 do
7221 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7222 echo "$as_me:7222: checking for $ac_func" >&5
7223 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7224 if eval "test \"\${$as_ac_var+set}\" = set"; then
7225   echo $ECHO_N "(cached) $ECHO_C" >&6
7226 else
7227   cat >conftest.$ac_ext <<_ACEOF
7228 #line 7228 "configure"
7229 #include "confdefs.h"
7230 /* System header to define __stub macros and hopefully few prototypes,
7231     which can conflict with char $ac_func (); below.  */
7232 #include <assert.h>
7233 /* Override any gcc2 internal prototype to avoid an error.  */
7234 #ifdef __cplusplus
7235 extern "C"
7236 #endif
7237 /* We use char because int might match the return type of a gcc2
7238    builtin and then its argument prototype would still apply.  */
7239 char $ac_func ();
7240 char (*f) ();
7241
7242 int
7243 main ()
7244 {
7245 /* The GNU C library defines this for functions which it implements
7246     to always fail with ENOSYS.  Some functions are actually named
7247     something starting with __ and the normal name is an alias.  */
7248 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7249 choke me
7250 #else
7251 f = $ac_func;
7252 #endif
7253
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext conftest$ac_exeext
7259 if { (eval echo "$as_me:7259: \"$ac_link\"") >&5
7260   (eval $ac_link) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); } &&
7264          { ac_try='test -s conftest$ac_exeext'
7265   { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266   (eval $ac_try) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); }; }; then
7270   eval "$as_ac_var=yes"
7271 else
7272   echo "$as_me: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 eval "$as_ac_var=no"
7275 fi
7276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7277 fi
7278 echo "$as_me:7278: result: `eval echo '${'$as_ac_var'}'`" >&5
7279 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7280 if test `eval echo '${'$as_ac_var'}'` = yes; then
7281   cat >>confdefs.h <<EOF
7282 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7283 EOF
7284
7285 fi
7286 done
7287
7288         if test "$ac_cv_func_putwc" != yes ; then
7289
7290 echo "$as_me:7290: checking for multibyte character support" >&5
7291 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7292 if test "${cf_cv_utf8_lib+set}" = set; then
7293   echo $ECHO_N "(cached) $ECHO_C" >&6
7294 else
7295
7296         cf_save_LIBS="$LIBS"
7297         cat >conftest.$ac_ext <<_ACEOF
7298 #line 7298 "configure"
7299 #include "confdefs.h"
7300
7301 #include <stdlib.h>
7302 int
7303 main ()
7304 {
7305 putwc(0,0);
7306   ;
7307   return 0;
7308 }
7309 _ACEOF
7310 rm -f conftest.$ac_objext conftest$ac_exeext
7311 if { (eval echo "$as_me:7311: \"$ac_link\"") >&5
7312   (eval $ac_link) 2>&5
7313   ac_status=$?
7314   echo "$as_me:7314: \$? = $ac_status" >&5
7315   (exit $ac_status); } &&
7316          { ac_try='test -s conftest$ac_exeext'
7317   { (eval echo "$as_me:7317: \"$ac_try\"") >&5
7318   (eval $ac_try) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); }; }; then
7322   cf_cv_utf8_lib=yes
7323 else
7324   echo "$as_me: failed program was:" >&5
7325 cat conftest.$ac_ext >&5
7326
7327 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7328 # will be set on completion of the AC_TRY_LINK below.
7329 cf_cv_header_path_utf8=
7330 cf_cv_library_path_utf8=
7331
7332 echo "${as_me-configure}:7332: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7333
7334 cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7337
7338 #include <libutf8.h>
7339 int
7340 main ()
7341 {
7342 putwc(0,0);
7343   ;
7344   return 0;
7345 }
7346 _ACEOF
7347 rm -f conftest.$ac_objext conftest$ac_exeext
7348 if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349   (eval $ac_link) 2>&5
7350   ac_status=$?
7351   echo "$as_me:7351: \$? = $ac_status" >&5
7352   (exit $ac_status); } &&
7353          { ac_try='test -s conftest$ac_exeext'
7354   { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355   (eval $ac_try) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); }; }; then
7359   cf_cv_find_linkage_utf8=yes
7360 else
7361   echo "$as_me: failed program was:" >&5
7362 cat conftest.$ac_ext >&5
7363
7364     cf_cv_find_linkage_utf8=no
7365
7366     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7367
7368 echo "${as_me-configure}:7368: testing find linkage for utf8 library ..." 1>&5
7369
7370 echo "${as_me-configure}:7370: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7371
7372     cf_save_CPPFLAGS="$CPPFLAGS"
7373     cf_test_CPPFLAGS="$CPPFLAGS"
7374
7375 cf_header_path_list=""
7376 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7377         for cf_header_path in $CPPFLAGS $CFLAGS
7378         do
7379                 case $cf_header_path in #(vi
7380                 -I*)
7381                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7382
7383 test "$cf_header_path" != "NONE" && \
7384 test -d "$cf_header_path" && \
7385  {
7386         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7387         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7388         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7389         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7390         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7391         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7392 }
7393
7394                         cf_header_path_list="$cf_header_path_list $cf_search"
7395                         ;;
7396                 esac
7397         done
7398 fi
7399
7400 cf_search=""
7401
7402 test "/usr" != "$prefix" && \
7403 test -d "/usr" && \
7404 (test $prefix = NONE || test -d $prefix) && {
7405         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7406         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7407         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7408         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7409         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7410         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7411 }
7412
7413 test "$prefix" != "NONE" && \
7414 test -d "$prefix" && \
7415  {
7416         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7417         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7418         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7419         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7420         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7421         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7422 }
7423
7424 test "/usr/local" != "$prefix" && \
7425 test -d "/usr/local" && \
7426 (test $prefix = NONE || test -d $prefix) && {
7427         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7428         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7429         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7430         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7431         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7432         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7433 }
7434
7435 test "/opt" != "$prefix" && \
7436 test -d "/opt" && \
7437 (test $prefix = NONE || test -d $prefix) && {
7438         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7439         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7440         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7441         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7442         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7443         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7444 }
7445
7446 test "$HOME" != "$prefix" && \
7447 test -d "$HOME" && \
7448 (test $prefix = NONE || test -d $prefix) && {
7449         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7450         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7451         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7452         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7453         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7454         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7455 }
7456
7457 test "$includedir" != NONE && \
7458 test "$includedir" != "/usr/include" && \
7459 test -d "$includedir" && {
7460         test -d $includedir &&    cf_search="$cf_search $includedir"
7461         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7462 }
7463
7464 test "$oldincludedir" != NONE && \
7465 test "$oldincludedir" != "/usr/include" && \
7466 test -d "$oldincludedir" && {
7467         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7468         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7469 }
7470
7471 cf_search="$cf_header_path_list $cf_search"
7472
7473     for cf_cv_header_path_utf8 in $cf_search
7474     do
7475       if test -d $cf_cv_header_path_utf8 ; then
7476         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7477
7478 echo "${as_me-configure}:7478: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7479
7480         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7481         cat >conftest.$ac_ext <<_ACEOF
7482 #line 7482 "configure"
7483 #include "confdefs.h"
7484
7485 #include <libutf8.h>
7486 int
7487 main ()
7488 {
7489 putwc(0,0);
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext
7495 if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
7496   (eval $ac_compile) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506
7507             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7508
7509 echo "${as_me-configure}:7509: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7510
7511             cf_cv_find_linkage_utf8=maybe
7512             cf_test_CPPFLAGS="$CPPFLAGS"
7513             break
7514 else
7515   echo "$as_me: failed program was:" >&5
7516 cat conftest.$ac_ext >&5
7517
7518             CPPFLAGS="$cf_save_CPPFLAGS"
7519
7520 fi
7521 rm -f conftest.$ac_objext conftest.$ac_ext
7522       fi
7523     done
7524
7525     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7526
7527 echo "${as_me-configure}:7527: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7528
7529       cf_save_LIBS="$LIBS"
7530       cf_save_LDFLAGS="$LDFLAGS"
7531
7532       if test "$cf_cv_find_linkage_utf8" != yes ; then
7533
7534 cf_library_path_list=""
7535 if test -n "${LDFLAGS}${LIBS}" ; then
7536         for cf_library_path in $LDFLAGS $LIBS
7537         do
7538                 case $cf_library_path in #(vi
7539                 -L*)
7540                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7541
7542 test "$cf_library_path" != "NONE" && \
7543 test -d "$cf_library_path" && \
7544  {
7545         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7546         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7547         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7548         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7549         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7550         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7551 }
7552
7553                         cf_library_path_list="$cf_library_path_list $cf_search"
7554                         ;;
7555                 esac
7556         done
7557 fi
7558
7559 cf_search=""
7560
7561 test "/usr" != "$prefix" && \
7562 test -d "/usr" && \
7563 (test $prefix = NONE || test -d $prefix) && {
7564         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7565         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7566         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7567         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7568         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7569         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7570 }
7571
7572 test "$prefix" != "NONE" && \
7573 test -d "$prefix" && \
7574  {
7575         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7576         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7577         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7578         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7579         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7580         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7581 }
7582
7583 test "/usr/local" != "$prefix" && \
7584 test -d "/usr/local" && \
7585 (test $prefix = NONE || test -d $prefix) && {
7586         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7587         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7588         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7589         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7590         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7591         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7592 }
7593
7594 test "/opt" != "$prefix" && \
7595 test -d "/opt" && \
7596 (test $prefix = NONE || test -d $prefix) && {
7597         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7598         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7599         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7600         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7601         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7602         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7603 }
7604
7605 test "$HOME" != "$prefix" && \
7606 test -d "$HOME" && \
7607 (test $prefix = NONE || test -d $prefix) && {
7608         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7609         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7610         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7611         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7612         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7613         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7614 }
7615
7616 cf_search="$cf_library_path_list $cf_search"
7617
7618         for cf_cv_library_path_utf8 in $cf_search
7619         do
7620           if test -d $cf_cv_library_path_utf8 ; then
7621             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7622
7623 echo "${as_me-configure}:7623: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7624
7625             CPPFLAGS="$cf_test_CPPFLAGS"
7626             LIBS="-lutf8  $cf_save_LIBS"
7627             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7628             cat >conftest.$ac_ext <<_ACEOF
7629 #line 7629 "configure"
7630 #include "confdefs.h"
7631
7632 #include <libutf8.h>
7633 int
7634 main ()
7635 {
7636 putwc(0,0);
7637   ;
7638   return 0;
7639 }
7640 _ACEOF
7641 rm -f conftest.$ac_objext conftest$ac_exeext
7642 if { (eval echo "$as_me:7642: \"$ac_link\"") >&5
7643   (eval $ac_link) 2>&5
7644   ac_status=$?
7645   echo "$as_me:7645: \$? = $ac_status" >&5
7646   (exit $ac_status); } &&
7647          { ac_try='test -s conftest$ac_exeext'
7648   { (eval echo "$as_me:7648: \"$ac_try\"") >&5
7649   (eval $ac_try) 2>&5
7650   ac_status=$?
7651   echo "$as_me:7651: \$? = $ac_status" >&5
7652   (exit $ac_status); }; }; then
7653
7654                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7655
7656 echo "${as_me-configure}:7656: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7657
7658                 cf_cv_find_linkage_utf8=yes
7659                 cf_cv_library_file_utf8="-lutf8"
7660                 break
7661 else
7662   echo "$as_me: failed program was:" >&5
7663 cat conftest.$ac_ext >&5
7664
7665                 CPPFLAGS="$cf_save_CPPFLAGS"
7666                 LIBS="$cf_save_LIBS"
7667                 LDFLAGS="$cf_save_LDFLAGS"
7668
7669 fi
7670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7671           fi
7672         done
7673         LIBS="$cf_save_LIBS"
7674         CPPFLAGS="$cf_save_CPPFLAGS"
7675         LDFLAGS="$cf_save_LDFLAGS"
7676       fi
7677
7678     else
7679       cf_cv_find_linkage_utf8=no
7680     fi
7681
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684
7685 if test "$cf_cv_find_linkage_utf8" = yes ; then
7686 cf_cv_utf8_lib=add-on
7687 else
7688 cf_cv_utf8_lib=no
7689 fi
7690
7691 fi
7692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7693 fi
7694 echo "$as_me:7694: result: $cf_cv_utf8_lib" >&5
7695 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7696
7697 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7698 # ncurses/ncursesw:
7699 if test "$cf_cv_utf8_lib" = "add-on" ; then
7700         cat >>confdefs.h <<\EOF
7701 #define HAVE_LIBUTF8_H 1
7702 EOF
7703
7704 if test -n "$cf_cv_header_path_utf8" ; then
7705   for cf_add_incdir in $cf_cv_header_path_utf8
7706   do
7707         while test $cf_add_incdir != /usr/include
7708         do
7709           if test -d $cf_add_incdir
7710           then
7711                 cf_have_incdir=no
7712                 if test -n "$CFLAGS$CPPFLAGS" ; then
7713                   # a loop is needed to ensure we can add subdirs of existing dirs
7714                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7715                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7716                           cf_have_incdir=yes; break
7717                         fi
7718                   done
7719                 fi
7720
7721                 if test "$cf_have_incdir" = no ; then
7722                   if test "$cf_add_incdir" = /usr/local/include ; then
7723                         if test "$GCC" = yes
7724                         then
7725                           cf_save_CPPFLAGS=$CPPFLAGS
7726                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7727                           cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7730 #include <stdio.h>
7731 int
7732 main ()
7733 {
7734 printf("Hello")
7735   ;
7736   return 0;
7737 }
7738 _ACEOF
7739 rm -f conftest.$ac_objext
7740 if { (eval echo "$as_me:7740: \"$ac_compile\"") >&5
7741   (eval $ac_compile) 2>&5
7742   ac_status=$?
7743   echo "$as_me:7743: \$? = $ac_status" >&5
7744   (exit $ac_status); } &&
7745          { ac_try='test -s conftest.$ac_objext'
7746   { (eval echo "$as_me:7746: \"$ac_try\"") >&5
7747   (eval $ac_try) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); }; }; then
7751   :
7752 else
7753   echo "$as_me: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7755 cf_have_incdir=yes
7756 fi
7757 rm -f conftest.$ac_objext conftest.$ac_ext
7758                           CPPFLAGS=$cf_save_CPPFLAGS
7759                         fi
7760                   fi
7761                 fi
7762
7763                 if test "$cf_have_incdir" = no ; then
7764                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7765
7766 echo "${as_me-configure}:7766: testing adding $cf_add_incdir to include-path ..." 1>&5
7767
7768                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7769
7770                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7771                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7772                   cf_add_incdir="$cf_top_incdir"
7773                 else
7774                   break
7775                 fi
7776           fi
7777         done
7778   done
7779 fi
7780
7781 if test -n "$cf_cv_library_path_utf8" ; then
7782   for cf_add_libdir in $cf_cv_library_path_utf8
7783   do
7784     if test $cf_add_libdir = /usr/lib ; then
7785       :
7786     elif test -d $cf_add_libdir
7787     then
7788       cf_have_libdir=no
7789       if test -n "$LDFLAGS$LIBS" ; then
7790         # a loop is needed to ensure we can add subdirs of existing dirs
7791         for cf_test_libdir in $LDFLAGS $LIBS ; do
7792           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7793             cf_have_libdir=yes; break
7794           fi
7795         done
7796       fi
7797       if test "$cf_have_libdir" = no ; then
7798         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7799
7800 echo "${as_me-configure}:7800: testing adding $cf_add_libdir to library-path ..." 1>&5
7801
7802         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7803       fi
7804     fi
7805   done
7806 fi
7807
7808         LIBS="-lutf8 $LIBS"
7809 fi
7810
7811                 if test "$cf_cv_utf8_lib" != no ; then
7812                         NCURSES_LIBUTF8=1
7813                 fi
7814         fi
7815
7816 # This is needed on Tru64 5.0 to declare mbstate_t
7817 echo "$as_me:7817: checking if we must include wchar.h to declare mbstate_t" >&5
7818 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7819 if test "${cf_cv_mbstate_t+set}" = set; then
7820   echo $ECHO_N "(cached) $ECHO_C" >&6
7821 else
7822
7823 cat >conftest.$ac_ext <<_ACEOF
7824 #line 7824 "configure"
7825 #include "confdefs.h"
7826
7827 #include <stdlib.h>
7828 #include <stdarg.h>
7829 #include <stdio.h>
7830 #ifdef HAVE_LIBUTF8_H
7831 #include <libutf8.h>
7832 #endif
7833 int
7834 main ()
7835 {
7836 mbstate_t state
7837   ;
7838   return 0;
7839 }
7840 _ACEOF
7841 rm -f conftest.$ac_objext
7842 if { (eval echo "$as_me:7842: \"$ac_compile\"") >&5
7843   (eval $ac_compile) 2>&5
7844   ac_status=$?
7845   echo "$as_me:7845: \$? = $ac_status" >&5
7846   (exit $ac_status); } &&
7847          { ac_try='test -s conftest.$ac_objext'
7848   { (eval echo "$as_me:7848: \"$ac_try\"") >&5
7849   (eval $ac_try) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit $ac_status); }; }; then
7853   cf_cv_mbstate_t=no
7854 else
7855   echo "$as_me: failed program was:" >&5
7856 cat conftest.$ac_ext >&5
7857 cat >conftest.$ac_ext <<_ACEOF
7858 #line 7858 "configure"
7859 #include "confdefs.h"
7860
7861 #include <stdlib.h>
7862 #include <stdarg.h>
7863 #include <stdio.h>
7864 #include <wchar.h>
7865 #ifdef HAVE_LIBUTF8_H
7866 #include <libutf8.h>
7867 #endif
7868 int
7869 main ()
7870 {
7871 mbstate_t value
7872   ;
7873   return 0;
7874 }
7875 _ACEOF
7876 rm -f conftest.$ac_objext
7877 if { (eval echo "$as_me:7877: \"$ac_compile\"") >&5
7878   (eval $ac_compile) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); } &&
7882          { ac_try='test -s conftest.$ac_objext'
7883   { (eval echo "$as_me:7883: \"$ac_try\"") >&5
7884   (eval $ac_try) 2>&5
7885   ac_status=$?
7886   echo "$as_me:7886: \$? = $ac_status" >&5
7887   (exit $ac_status); }; }; then
7888   cf_cv_mbstate_t=yes
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 cf_cv_mbstate_t=unknown
7893 fi
7894 rm -f conftest.$ac_objext conftest.$ac_ext
7895 fi
7896 rm -f conftest.$ac_objext conftest.$ac_ext
7897 fi
7898 echo "$as_me:7898: result: $cf_cv_mbstate_t" >&5
7899 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7900
7901 if test "$cf_cv_mbstate_t" = yes ; then
7902         cat >>confdefs.h <<\EOF
7903 #define NEED_WCHAR_H 1
7904 EOF
7905
7906         NEED_WCHAR_H=1
7907 fi
7908
7909 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7910 if test "$cf_cv_mbstate_t" = unknown ; then
7911         NCURSES_MBSTATE_T=1
7912 fi
7913
7914 # This is needed on Tru64 5.0 to declare wchar_t
7915 echo "$as_me:7915: checking if we must include wchar.h to declare wchar_t" >&5
7916 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7917 if test "${cf_cv_wchar_t+set}" = set; then
7918   echo $ECHO_N "(cached) $ECHO_C" >&6
7919 else
7920
7921 cat >conftest.$ac_ext <<_ACEOF
7922 #line 7922 "configure"
7923 #include "confdefs.h"
7924
7925 #include <stdlib.h>
7926 #include <stdarg.h>
7927 #include <stdio.h>
7928 #ifdef HAVE_LIBUTF8_H
7929 #include <libutf8.h>
7930 #endif
7931 int
7932 main ()
7933 {
7934 wchar_t state
7935   ;
7936   return 0;
7937 }
7938 _ACEOF
7939 rm -f conftest.$ac_objext
7940 if { (eval echo "$as_me:7940: \"$ac_compile\"") >&5
7941   (eval $ac_compile) 2>&5
7942   ac_status=$?
7943   echo "$as_me:7943: \$? = $ac_status" >&5
7944   (exit $ac_status); } &&
7945          { ac_try='test -s conftest.$ac_objext'
7946   { (eval echo "$as_me:7946: \"$ac_try\"") >&5
7947   (eval $ac_try) 2>&5
7948   ac_status=$?
7949   echo "$as_me:7949: \$? = $ac_status" >&5
7950   (exit $ac_status); }; }; then
7951   cf_cv_wchar_t=no
7952 else
7953   echo "$as_me: failed program was:" >&5
7954 cat conftest.$ac_ext >&5
7955 cat >conftest.$ac_ext <<_ACEOF
7956 #line 7956 "configure"
7957 #include "confdefs.h"
7958
7959 #include <stdlib.h>
7960 #include <stdarg.h>
7961 #include <stdio.h>
7962 #include <wchar.h>
7963 #ifdef HAVE_LIBUTF8_H
7964 #include <libutf8.h>
7965 #endif
7966 int
7967 main ()
7968 {
7969 wchar_t value
7970   ;
7971   return 0;
7972 }
7973 _ACEOF
7974 rm -f conftest.$ac_objext
7975 if { (eval echo "$as_me:7975: \"$ac_compile\"") >&5
7976   (eval $ac_compile) 2>&5
7977   ac_status=$?
7978   echo "$as_me:7978: \$? = $ac_status" >&5
7979   (exit $ac_status); } &&
7980          { ac_try='test -s conftest.$ac_objext'
7981   { (eval echo "$as_me:7981: \"$ac_try\"") >&5
7982   (eval $ac_try) 2>&5
7983   ac_status=$?
7984   echo "$as_me:7984: \$? = $ac_status" >&5
7985   (exit $ac_status); }; }; then
7986   cf_cv_wchar_t=yes
7987 else
7988   echo "$as_me: failed program was:" >&5
7989 cat conftest.$ac_ext >&5
7990 cf_cv_wchar_t=unknown
7991 fi
7992 rm -f conftest.$ac_objext conftest.$ac_ext
7993 fi
7994 rm -f conftest.$ac_objext conftest.$ac_ext
7995 fi
7996 echo "$as_me:7996: result: $cf_cv_wchar_t" >&5
7997 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7998
7999 if test "$cf_cv_wchar_t" = yes ; then
8000         cat >>confdefs.h <<\EOF
8001 #define NEED_WCHAR_H 1
8002 EOF
8003
8004         NEED_WCHAR_H=1
8005 fi
8006
8007 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8008 if test "$cf_cv_wchar_t" = unknown ; then
8009         NCURSES_WCHAR_T=1
8010 fi
8011
8012 # if we find wchar_t in either place, use substitution to provide a fallback.
8013 if test "$cf_cv_wchar_t" != unknown ; then
8014         NCURSES_OK_WCHAR_T=1
8015 fi
8016
8017 # This is needed on Tru64 5.0 to declare wint_t
8018 echo "$as_me:8018: checking if we must include wchar.h to declare wint_t" >&5
8019 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8020 if test "${cf_cv_wint_t+set}" = set; then
8021   echo $ECHO_N "(cached) $ECHO_C" >&6
8022 else
8023
8024 cat >conftest.$ac_ext <<_ACEOF
8025 #line 8025 "configure"
8026 #include "confdefs.h"
8027
8028 #include <stdlib.h>
8029 #include <stdarg.h>
8030 #include <stdio.h>
8031 #ifdef HAVE_LIBUTF8_H
8032 #include <libutf8.h>
8033 #endif
8034 int
8035 main ()
8036 {
8037 wint_t state
8038   ;
8039   return 0;
8040 }
8041 _ACEOF
8042 rm -f conftest.$ac_objext
8043 if { (eval echo "$as_me:8043: \"$ac_compile\"") >&5
8044   (eval $ac_compile) 2>&5
8045   ac_status=$?
8046   echo "$as_me:8046: \$? = $ac_status" >&5
8047   (exit $ac_status); } &&
8048          { ac_try='test -s conftest.$ac_objext'
8049   { (eval echo "$as_me:8049: \"$ac_try\"") >&5
8050   (eval $ac_try) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); }; }; then
8054   cf_cv_wint_t=no
8055 else
8056   echo "$as_me: failed program was:" >&5
8057 cat conftest.$ac_ext >&5
8058 cat >conftest.$ac_ext <<_ACEOF
8059 #line 8059 "configure"
8060 #include "confdefs.h"
8061
8062 #include <stdlib.h>
8063 #include <stdarg.h>
8064 #include <stdio.h>
8065 #include <wchar.h>
8066 #ifdef HAVE_LIBUTF8_H
8067 #include <libutf8.h>
8068 #endif
8069 int
8070 main ()
8071 {
8072 wint_t value
8073   ;
8074   return 0;
8075 }
8076 _ACEOF
8077 rm -f conftest.$ac_objext
8078 if { (eval echo "$as_me:8078: \"$ac_compile\"") >&5
8079   (eval $ac_compile) 2>&5
8080   ac_status=$?
8081   echo "$as_me:8081: \$? = $ac_status" >&5
8082   (exit $ac_status); } &&
8083          { ac_try='test -s conftest.$ac_objext'
8084   { (eval echo "$as_me:8084: \"$ac_try\"") >&5
8085   (eval $ac_try) 2>&5
8086   ac_status=$?
8087   echo "$as_me:8087: \$? = $ac_status" >&5
8088   (exit $ac_status); }; }; then
8089   cf_cv_wint_t=yes
8090 else
8091   echo "$as_me: failed program was:" >&5
8092 cat conftest.$ac_ext >&5
8093 cf_cv_wint_t=unknown
8094 fi
8095 rm -f conftest.$ac_objext conftest.$ac_ext
8096 fi
8097 rm -f conftest.$ac_objext conftest.$ac_ext
8098 fi
8099 echo "$as_me:8099: result: $cf_cv_wint_t" >&5
8100 echo "${ECHO_T}$cf_cv_wint_t" >&6
8101
8102 if test "$cf_cv_wint_t" = yes ; then
8103         cat >>confdefs.h <<\EOF
8104 #define NEED_WCHAR_H 1
8105 EOF
8106
8107         NEED_WCHAR_H=1
8108 fi
8109
8110 # if we do not find wint_t in either place, use substitution to provide a fallback.
8111 if test "$cf_cv_wint_t" = unknown ; then
8112         NCURSES_WINT_T=1
8113 fi
8114
8115 # if we find wint_t in either place, use substitution to provide a fallback.
8116 if test "$cf_cv_wint_t" != unknown ; then
8117         NCURSES_OK_WINT_T=1
8118 fi
8119
8120         if test "$NCURSES_MBSTATE_T" != 0; then
8121                 cat >>confdefs.h <<\EOF
8122 #define NEED_MBSTATE_T_DEF 1
8123 EOF
8124
8125         fi
8126 fi
8127
8128 ###   use option --disable-lp64 to allow long chtype
8129 case $cf_cv_abi_version in
8130 [345]*)
8131         default_with_lp64=no
8132         ;;
8133 *)
8134         default_with_lp64=yes
8135         ;;
8136 esac
8137
8138 echo "$as_me:8138: checking whether to enable _LP64 definition in curses.h" >&5
8139 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8140
8141 # Check whether --enable-lp64 or --disable-lp64 was given.
8142 if test "${enable_lp64+set}" = set; then
8143   enableval="$enable_lp64"
8144   with_lp64=$enableval
8145 else
8146   with_lp64=$default_with_lp64
8147 fi;
8148 echo "$as_me:8148: result: $with_lp64" >&5
8149 echo "${ECHO_T}$with_lp64" >&6
8150
8151 if test "$with_lp64" = yes ; then
8152         cf_cv_enable_lp64=1
8153 else
8154         cf_cv_enable_lp64=0
8155 fi
8156
8157 # Check whether --enable-largefile or --disable-largefile was given.
8158 if test "${enable_largefile+set}" = set; then
8159   enableval="$enable_largefile"
8160
8161 fi;
8162 if test "$enable_largefile" != no; then
8163
8164   echo "$as_me:8164: checking for special C compiler options needed for large files" >&5
8165 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8166 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8167   echo $ECHO_N "(cached) $ECHO_C" >&6
8168 else
8169   ac_cv_sys_largefile_CC=no
8170      if test "$GCC" != yes; then
8171        ac_save_CC=$CC
8172        while :; do
8173          # IRIX 6.2 and later do not support large files by default,
8174          # so use the C compiler's -n32 option if that helps.
8175          cat >conftest.$ac_ext <<_ACEOF
8176 #line 8176 "configure"
8177 #include "confdefs.h"
8178 #include <sys/types.h>
8179  /* Check that off_t can represent 2**63 - 1 correctly.
8180     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8181     since some C++ compilers masquerading as C compilers
8182     incorrectly reject 9223372036854775807.  */
8183 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8184   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8185                        && LARGE_OFF_T % 2147483647 == 1)
8186                       ? 1 : -1];
8187 int
8188 main ()
8189 {
8190
8191   ;
8192   return 0;
8193 }
8194 _ACEOF
8195          rm -f conftest.$ac_objext
8196 if { (eval echo "$as_me:8196: \"$ac_compile\"") >&5
8197   (eval $ac_compile) 2>&5
8198   ac_status=$?
8199   echo "$as_me:8199: \$? = $ac_status" >&5
8200   (exit $ac_status); } &&
8201          { ac_try='test -s conftest.$ac_objext'
8202   { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8203   (eval $ac_try) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); }; }; then
8207   break
8208 else
8209   echo "$as_me: failed program was:" >&5
8210 cat conftest.$ac_ext >&5
8211 fi
8212 rm -f conftest.$ac_objext
8213          CC="$CC -n32"
8214          rm -f conftest.$ac_objext
8215 if { (eval echo "$as_me:8215: \"$ac_compile\"") >&5
8216   (eval $ac_compile) 2>&5
8217   ac_status=$?
8218   echo "$as_me:8218: \$? = $ac_status" >&5
8219   (exit $ac_status); } &&
8220          { ac_try='test -s conftest.$ac_objext'
8221   { (eval echo "$as_me:8221: \"$ac_try\"") >&5
8222   (eval $ac_try) 2>&5
8223   ac_status=$?
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); }; }; then
8226   ac_cv_sys_largefile_CC=' -n32'; break
8227 else
8228   echo "$as_me: failed program was:" >&5
8229 cat conftest.$ac_ext >&5
8230 fi
8231 rm -f conftest.$ac_objext
8232          break
8233        done
8234        CC=$ac_save_CC
8235        rm -f conftest.$ac_ext
8236     fi
8237 fi
8238 echo "$as_me:8238: result: $ac_cv_sys_largefile_CC" >&5
8239 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8240   if test "$ac_cv_sys_largefile_CC" != no; then
8241     CC=$CC$ac_cv_sys_largefile_CC
8242   fi
8243
8244   echo "$as_me:8244: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8245 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8246 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8247   echo $ECHO_N "(cached) $ECHO_C" >&6
8248 else
8249   while :; do
8250   ac_cv_sys_file_offset_bits=no
8251   cat >conftest.$ac_ext <<_ACEOF
8252 #line 8252 "configure"
8253 #include "confdefs.h"
8254 #include <sys/types.h>
8255  /* Check that off_t can represent 2**63 - 1 correctly.
8256     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8257     since some C++ compilers masquerading as C compilers
8258     incorrectly reject 9223372036854775807.  */
8259 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8260   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8261                        && LARGE_OFF_T % 2147483647 == 1)
8262                       ? 1 : -1];
8263 int
8264 main ()
8265 {
8266
8267   ;
8268   return 0;
8269 }
8270 _ACEOF
8271 rm -f conftest.$ac_objext
8272 if { (eval echo "$as_me:8272: \"$ac_compile\"") >&5
8273   (eval $ac_compile) 2>&5
8274   ac_status=$?
8275   echo "$as_me:8275: \$? = $ac_status" >&5
8276   (exit $ac_status); } &&
8277          { ac_try='test -s conftest.$ac_objext'
8278   { (eval echo "$as_me:8278: \"$ac_try\"") >&5
8279   (eval $ac_try) 2>&5
8280   ac_status=$?
8281   echo "$as_me:8281: \$? = $ac_status" >&5
8282   (exit $ac_status); }; }; then
8283   break
8284 else
8285   echo "$as_me: failed program was:" >&5
8286 cat conftest.$ac_ext >&5
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289   cat >conftest.$ac_ext <<_ACEOF
8290 #line 8290 "configure"
8291 #include "confdefs.h"
8292 #define _FILE_OFFSET_BITS 64
8293 #include <sys/types.h>
8294  /* Check that off_t can represent 2**63 - 1 correctly.
8295     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8296     since some C++ compilers masquerading as C compilers
8297     incorrectly reject 9223372036854775807.  */
8298 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8299   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8300                        && LARGE_OFF_T % 2147483647 == 1)
8301                       ? 1 : -1];
8302 int
8303 main ()
8304 {
8305
8306   ;
8307   return 0;
8308 }
8309 _ACEOF
8310 rm -f conftest.$ac_objext
8311 if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); } &&
8316          { ac_try='test -s conftest.$ac_objext'
8317   { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); }; }; then
8322   ac_cv_sys_file_offset_bits=64; break
8323 else
8324   echo "$as_me: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 fi
8327 rm -f conftest.$ac_objext conftest.$ac_ext
8328   break
8329 done
8330 fi
8331 echo "$as_me:8331: result: $ac_cv_sys_file_offset_bits" >&5
8332 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8333 if test "$ac_cv_sys_file_offset_bits" != no; then
8334
8335 cat >>confdefs.h <<EOF
8336 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8337 EOF
8338
8339 fi
8340 rm -f conftest*
8341   echo "$as_me:8341: checking for _LARGE_FILES value needed for large files" >&5
8342 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8343 if test "${ac_cv_sys_large_files+set}" = set; then
8344   echo $ECHO_N "(cached) $ECHO_C" >&6
8345 else
8346   while :; do
8347   ac_cv_sys_large_files=no
8348   cat >conftest.$ac_ext <<_ACEOF
8349 #line 8349 "configure"
8350 #include "confdefs.h"
8351 #include <sys/types.h>
8352  /* Check that off_t can represent 2**63 - 1 correctly.
8353     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8354     since some C++ compilers masquerading as C compilers
8355     incorrectly reject 9223372036854775807.  */
8356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8357   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8358                        && LARGE_OFF_T % 2147483647 == 1)
8359                       ? 1 : -1];
8360 int
8361 main ()
8362 {
8363
8364   ;
8365   return 0;
8366 }
8367 _ACEOF
8368 rm -f conftest.$ac_objext
8369 if { (eval echo "$as_me:8369: \"$ac_compile\"") >&5
8370   (eval $ac_compile) 2>&5
8371   ac_status=$?
8372   echo "$as_me:8372: \$? = $ac_status" >&5
8373   (exit $ac_status); } &&
8374          { ac_try='test -s conftest.$ac_objext'
8375   { (eval echo "$as_me:8375: \"$ac_try\"") >&5
8376   (eval $ac_try) 2>&5
8377   ac_status=$?
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit $ac_status); }; }; then
8380   break
8381 else
8382   echo "$as_me: failed program was:" >&5
8383 cat conftest.$ac_ext >&5
8384 fi
8385 rm -f conftest.$ac_objext conftest.$ac_ext
8386   cat >conftest.$ac_ext <<_ACEOF
8387 #line 8387 "configure"
8388 #include "confdefs.h"
8389 #define _LARGE_FILES 1
8390 #include <sys/types.h>
8391  /* Check that off_t can represent 2**63 - 1 correctly.
8392     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8393     since some C++ compilers masquerading as C compilers
8394     incorrectly reject 9223372036854775807.  */
8395 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8396   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8397                        && LARGE_OFF_T % 2147483647 == 1)
8398                       ? 1 : -1];
8399 int
8400 main ()
8401 {
8402
8403   ;
8404   return 0;
8405 }
8406 _ACEOF
8407 rm -f conftest.$ac_objext
8408 if { (eval echo "$as_me:8408: \"$ac_compile\"") >&5
8409   (eval $ac_compile) 2>&5
8410   ac_status=$?
8411   echo "$as_me:8411: \$? = $ac_status" >&5
8412   (exit $ac_status); } &&
8413          { ac_try='test -s conftest.$ac_objext'
8414   { (eval echo "$as_me:8414: \"$ac_try\"") >&5
8415   (eval $ac_try) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); }; }; then
8419   ac_cv_sys_large_files=1; break
8420 else
8421   echo "$as_me: failed program was:" >&5
8422 cat conftest.$ac_ext >&5
8423 fi
8424 rm -f conftest.$ac_objext conftest.$ac_ext
8425   break
8426 done
8427 fi
8428 echo "$as_me:8428: result: $ac_cv_sys_large_files" >&5
8429 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8430 if test "$ac_cv_sys_large_files" != no; then
8431
8432 cat >>confdefs.h <<EOF
8433 #define _LARGE_FILES $ac_cv_sys_large_files
8434 EOF
8435
8436 fi
8437 rm -f conftest*
8438 fi
8439
8440     if test "$enable_largefile" != no ; then
8441         echo "$as_me:8441: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8442 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8443 if test "${ac_cv_sys_largefile_source+set}" = set; then
8444   echo $ECHO_N "(cached) $ECHO_C" >&6
8445 else
8446   while :; do
8447   ac_cv_sys_largefile_source=no
8448   cat >conftest.$ac_ext <<_ACEOF
8449 #line 8449 "configure"
8450 #include "confdefs.h"
8451 #include <stdio.h>
8452 int
8453 main ()
8454 {
8455 return !fseeko;
8456   ;
8457   return 0;
8458 }
8459 _ACEOF
8460 rm -f conftest.$ac_objext
8461 if { (eval echo "$as_me:8461: \"$ac_compile\"") >&5
8462   (eval $ac_compile) 2>&5
8463   ac_status=$?
8464   echo "$as_me:8464: \$? = $ac_status" >&5
8465   (exit $ac_status); } &&
8466          { ac_try='test -s conftest.$ac_objext'
8467   { (eval echo "$as_me:8467: \"$ac_try\"") >&5
8468   (eval $ac_try) 2>&5
8469   ac_status=$?
8470   echo "$as_me:8470: \$? = $ac_status" >&5
8471   (exit $ac_status); }; }; then
8472   break
8473 else
8474   echo "$as_me: failed program was:" >&5
8475 cat conftest.$ac_ext >&5
8476 fi
8477 rm -f conftest.$ac_objext conftest.$ac_ext
8478   cat >conftest.$ac_ext <<_ACEOF
8479 #line 8479 "configure"
8480 #include "confdefs.h"
8481 #define _LARGEFILE_SOURCE 1
8482 #include <stdio.h>
8483 int
8484 main ()
8485 {
8486 return !fseeko;
8487   ;
8488   return 0;
8489 }
8490 _ACEOF
8491 rm -f conftest.$ac_objext
8492 if { (eval echo "$as_me:8492: \"$ac_compile\"") >&5
8493   (eval $ac_compile) 2>&5
8494   ac_status=$?
8495   echo "$as_me:8495: \$? = $ac_status" >&5
8496   (exit $ac_status); } &&
8497          { ac_try='test -s conftest.$ac_objext'
8498   { (eval echo "$as_me:8498: \"$ac_try\"") >&5
8499   (eval $ac_try) 2>&5
8500   ac_status=$?
8501   echo "$as_me:8501: \$? = $ac_status" >&5
8502   (exit $ac_status); }; }; then
8503   ac_cv_sys_largefile_source=1; break
8504 else
8505   echo "$as_me: failed program was:" >&5
8506 cat conftest.$ac_ext >&5
8507 fi
8508 rm -f conftest.$ac_objext conftest.$ac_ext
8509   break
8510 done
8511 fi
8512 echo "$as_me:8512: result: $ac_cv_sys_largefile_source" >&5
8513 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8514 if test "$ac_cv_sys_largefile_source" != no; then
8515
8516 cat >>confdefs.h <<EOF
8517 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8518 EOF
8519
8520 fi
8521 rm -f conftest*
8522
8523 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8524 # in glibc 2.1.3, but that breaks too many other things.
8525 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8526 echo "$as_me:8526: checking for fseeko" >&5
8527 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8528 if test "${ac_cv_func_fseeko+set}" = set; then
8529   echo $ECHO_N "(cached) $ECHO_C" >&6
8530 else
8531   cat >conftest.$ac_ext <<_ACEOF
8532 #line 8532 "configure"
8533 #include "confdefs.h"
8534 #include <stdio.h>
8535 int
8536 main ()
8537 {
8538 return fseeko && fseeko (stdin, 0, 0);
8539   ;
8540   return 0;
8541 }
8542 _ACEOF
8543 rm -f conftest.$ac_objext conftest$ac_exeext
8544 if { (eval echo "$as_me:8544: \"$ac_link\"") >&5
8545   (eval $ac_link) 2>&5
8546   ac_status=$?
8547   echo "$as_me:8547: \$? = $ac_status" >&5
8548   (exit $ac_status); } &&
8549          { ac_try='test -s conftest$ac_exeext'
8550   { (eval echo "$as_me:8550: \"$ac_try\"") >&5
8551   (eval $ac_try) 2>&5
8552   ac_status=$?
8553   echo "$as_me:8553: \$? = $ac_status" >&5
8554   (exit $ac_status); }; }; then
8555   ac_cv_func_fseeko=yes
8556 else
8557   echo "$as_me: failed program was:" >&5
8558 cat conftest.$ac_ext >&5
8559 ac_cv_func_fseeko=no
8560 fi
8561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8562 fi
8563 echo "$as_me:8563: result: $ac_cv_func_fseeko" >&5
8564 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8565 if test $ac_cv_func_fseeko = yes; then
8566
8567 cat >>confdefs.h <<\EOF
8568 #define HAVE_FSEEKO 1
8569 EOF
8570
8571 fi
8572
8573         # Normally we would collect these definitions in the config.h,
8574         # but (like _XOPEN_SOURCE), some environments rely on having these
8575         # defined before any of the system headers are included.  Another
8576         # case comes up with C++, e.g., on AIX the compiler compiles the
8577         # header files by themselves before looking at the body files it is
8578         # told to compile.  For ncurses, those header files do not include
8579         # the config.h
8580         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8581         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8582         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8583
8584         echo "$as_me:8584: checking whether to use struct dirent64" >&5
8585 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8586 if test "${cf_cv_struct_dirent64+set}" = set; then
8587   echo $ECHO_N "(cached) $ECHO_C" >&6
8588 else
8589
8590                 cat >conftest.$ac_ext <<_ACEOF
8591 #line 8591 "configure"
8592 #include "confdefs.h"
8593
8594 #include <sys/types.h>
8595 #include <dirent.h>
8596
8597 int
8598 main ()
8599 {
8600
8601                 /* if transitional largefile support is setup, this is true */
8602                 extern struct dirent64 * readdir(DIR *);
8603                 struct dirent64 *x = readdir((DIR *)0);
8604                 struct dirent *y = readdir((DIR *)0);
8605                 int z = x - y;
8606
8607   ;
8608   return 0;
8609 }
8610 _ACEOF
8611 rm -f conftest.$ac_objext
8612 if { (eval echo "$as_me:8612: \"$ac_compile\"") >&5
8613   (eval $ac_compile) 2>&5
8614   ac_status=$?
8615   echo "$as_me:8615: \$? = $ac_status" >&5
8616   (exit $ac_status); } &&
8617          { ac_try='test -s conftest.$ac_objext'
8618   { (eval echo "$as_me:8618: \"$ac_try\"") >&5
8619   (eval $ac_try) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); }; }; then
8623   cf_cv_struct_dirent64=yes
8624 else
8625   echo "$as_me: failed program was:" >&5
8626 cat conftest.$ac_ext >&5
8627 cf_cv_struct_dirent64=no
8628 fi
8629 rm -f conftest.$ac_objext conftest.$ac_ext
8630
8631 fi
8632 echo "$as_me:8632: result: $cf_cv_struct_dirent64" >&5
8633 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8634         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8635 #define HAVE_STRUCT_DIRENT64 1
8636 EOF
8637
8638     fi
8639
8640 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8641 echo "$as_me:8641: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8642 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8643
8644 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8645 if test "${enable_tparm_varargs+set}" = set; then
8646   enableval="$enable_tparm_varargs"
8647   with_tparm_varargs=$enableval
8648 else
8649   with_tparm_varargs=yes
8650 fi;
8651 echo "$as_me:8651: result: $with_tparm_varargs" >&5
8652 echo "${ECHO_T}$with_tparm_varargs" >&6
8653 NCURSES_TPARM_VARARGS=0
8654 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8655
8656 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8657 if test "$with_ticlib" != no ; then
8658 echo "$as_me:8658: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8659 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8660
8661 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8662 if test "${enable_tic_depends+set}" = set; then
8663   enableval="$enable_tic_depends"
8664   with_tic_depends=$enableval
8665 else
8666   with_tic_depends=yes
8667 fi;
8668 echo "$as_me:8668: result: $with_tic_depends" >&5
8669 echo "${ECHO_T}$with_tic_depends" >&6
8670 else
8671         with_tic_depends=no
8672 fi
8673
8674 ###   use option --with-bool to override bool's type
8675 echo "$as_me:8675: checking for type of bool" >&5
8676 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8677
8678 # Check whether --with-bool or --without-bool was given.
8679 if test "${with_bool+set}" = set; then
8680   withval="$with_bool"
8681   NCURSES_BOOL="$withval"
8682 else
8683   NCURSES_BOOL=auto
8684 fi;
8685 echo "$as_me:8685: result: $NCURSES_BOOL" >&5
8686 echo "${ECHO_T}$NCURSES_BOOL" >&6
8687
8688 echo "$as_me:8688: checking for alternate terminal capabilities file" >&5
8689 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8690
8691 # Check whether --with-caps or --without-caps was given.
8692 if test "${with_caps+set}" = set; then
8693   withval="$with_caps"
8694   TERMINFO_CAPS=Caps.$withval
8695 else
8696   TERMINFO_CAPS=Caps
8697 fi;
8698 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8699 echo "$as_me:8699: result: $TERMINFO_CAPS" >&5
8700 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8701
8702 ###   use option --with-chtype to override chtype's type
8703 echo "$as_me:8703: checking for type of chtype" >&5
8704 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8705
8706 # Check whether --with-chtype or --without-chtype was given.
8707 if test "${with_chtype+set}" = set; then
8708   withval="$with_chtype"
8709   NCURSES_CHTYPE="$withval"
8710 else
8711   NCURSES_CHTYPE=auto
8712 fi;
8713 echo "$as_me:8713: result: $NCURSES_CHTYPE" >&5
8714 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8715
8716 ###   use option --with-ospeed to override ospeed's type
8717 echo "$as_me:8717: checking for type of ospeed" >&5
8718 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8719
8720 # Check whether --with-ospeed or --without-ospeed was given.
8721 if test "${with_ospeed+set}" = set; then
8722   withval="$with_ospeed"
8723   NCURSES_OSPEED="$withval"
8724 else
8725   NCURSES_OSPEED=short
8726 fi;
8727 echo "$as_me:8727: result: $NCURSES_OSPEED" >&5
8728 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8729
8730 ###   use option --with-mmask-t to override mmask_t's type
8731 echo "$as_me:8731: checking for type of mmask_t" >&5
8732 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8733
8734 # Check whether --with-mmask-t or --without-mmask-t was given.
8735 if test "${with_mmask_t+set}" = set; then
8736   withval="$with_mmask_t"
8737   NCURSES_MMASK_T="$withval"
8738 else
8739   NCURSES_MMASK_T=auto
8740 fi;
8741 echo "$as_me:8741: result: $NCURSES_MMASK_T" >&5
8742 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8743
8744 ### Enable compiling-in rcs id's
8745 echo "$as_me:8745: checking if RCS identifiers should be compiled-in" >&5
8746 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8747
8748 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8749 if test "${with_rcs_ids+set}" = set; then
8750   withval="$with_rcs_ids"
8751   with_rcs_ids=$withval
8752 else
8753   with_rcs_ids=no
8754 fi;
8755 echo "$as_me:8755: result: $with_rcs_ids" >&5
8756 echo "${ECHO_T}$with_rcs_ids" >&6
8757 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8758 #define USE_RCS_IDS 1
8759 EOF
8760
8761 ###############################################################################
8762
8763 echo "$as_me:8763: checking format of man-pages" >&5
8764 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8765
8766 # Check whether --with-manpage-format or --without-manpage-format was given.
8767 if test "${with_manpage_format+set}" = set; then
8768   withval="$with_manpage_format"
8769   MANPAGE_FORMAT=$withval
8770 else
8771   MANPAGE_FORMAT=unknown
8772 fi;
8773
8774 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8775 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8776
8777 cf_unknown=
8778
8779 case $MANPAGE_FORMAT in
8780 unknown)
8781   if test -z "$MANPATH" ; then
8782     MANPATH="/usr/man:/usr/share/man"
8783   fi
8784
8785   # look for the 'date' man-page (it's most likely to be installed!)
8786   MANPAGE_FORMAT=
8787   cf_preform=no
8788   cf_catonly=yes
8789   cf_example=date
8790
8791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8792   for cf_dir in $MANPATH; do
8793     test -z "$cf_dir" && cf_dir=/usr/man
8794     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
8795     do
8796       cf_test=`echo $cf_name | sed -e 's/*//'`
8797       if test "x$cf_test" = "x$cf_name" ; then
8798
8799         case "$cf_name" in
8800         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8801         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8802         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8803         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8804         esac
8805
8806         case "$cf_name" in
8807         $cf_dir/man*)
8808           cf_catonly=no
8809           ;;
8810         $cf_dir/cat*)
8811           cf_preform=yes
8812           ;;
8813         esac
8814         break
8815       fi
8816
8817       # if we found a match in either man* or cat*, stop looking
8818       if test -n "$MANPAGE_FORMAT" ; then
8819         cf_found=no
8820         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8821         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8822         case "$cf_name" in
8823         $cf_dir/cat*)
8824           cf_found=yes
8825           ;;
8826         esac
8827         test $cf_found=yes && break
8828       fi
8829     done
8830     # only check the first directory in $MANPATH where we find manpages
8831     if test -n "$MANPAGE_FORMAT" ; then
8832        break
8833     fi
8834   done
8835   # if we did not find the example, just assume it is normal
8836   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8837   IFS="$ac_save_ifs"
8838   ;;
8839 *)
8840   for cf_option in $MANPAGE_FORMAT; do
8841      case $cf_option in #(vi
8842      gzip|compress|BSDI|normal|formatted|catonly)
8843        ;;
8844      *)
8845        cf_unknown="$cf_unknown $cf_option"
8846        ;;
8847      esac
8848   done
8849   ;;
8850 esac
8851
8852 echo "$as_me:8852: result: $MANPAGE_FORMAT" >&5
8853 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8854 if test -n "$cf_unknown" ; then
8855   { echo "$as_me:8855: WARNING: Unexpected manpage-format $cf_unknown" >&5
8856 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8857 fi
8858
8859 echo "$as_me:8859: checking for manpage renaming" >&5
8860 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8861
8862 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8863 if test "${with_manpage_renames+set}" = set; then
8864   withval="$with_manpage_renames"
8865   MANPAGE_RENAMES=$withval
8866 else
8867   MANPAGE_RENAMES=yes
8868 fi;
8869
8870 case ".$MANPAGE_RENAMES" in #(vi
8871 .no) #(vi
8872   ;;
8873 .|.yes)
8874   # Debian 'man' program?
8875   if test -f /etc/debian_version ; then
8876     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8877   else
8878     MANPAGE_RENAMES=no
8879   fi
8880   ;;
8881 esac
8882
8883 if test "$MANPAGE_RENAMES" != no ; then
8884   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8885     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8886   elif test ! -f $MANPAGE_RENAMES ; then
8887     { { echo "$as_me:8887: error: not a filename: $MANPAGE_RENAMES" >&5
8888 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8889    { (exit 1); exit 1; }; }
8890   fi
8891
8892   test ! -d man && mkdir man
8893
8894   # Construct a sed-script to perform renaming within man-pages
8895   if test -n "$MANPAGE_RENAMES" ; then
8896     test ! -d man && mkdir man
8897     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8898   fi
8899 fi
8900
8901 echo "$as_me:8901: result: $MANPAGE_RENAMES" >&5
8902 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8903
8904 echo "$as_me:8904: checking if manpage aliases will be installed" >&5
8905 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8906
8907 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8908 if test "${with_manpage_aliases+set}" = set; then
8909   withval="$with_manpage_aliases"
8910   MANPAGE_ALIASES=$withval
8911 else
8912   MANPAGE_ALIASES=yes
8913 fi;
8914
8915 echo "$as_me:8915: result: $MANPAGE_ALIASES" >&5
8916 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8917
8918 if test "$LN_S" = "ln -s"; then
8919         cf_use_symlinks=yes
8920 else
8921         cf_use_symlinks=no
8922 fi
8923
8924 MANPAGE_SYMLINKS=no
8925 if test "$MANPAGE_ALIASES" = yes ; then
8926 echo "$as_me:8926: checking if manpage symlinks should be used" >&5
8927 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8928
8929 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8930 if test "${with_manpage_symlinks+set}" = set; then
8931   withval="$with_manpage_symlinks"
8932   MANPAGE_SYMLINKS=$withval
8933 else
8934   MANPAGE_SYMLINKS=$cf_use_symlinks
8935 fi;
8936
8937 if test "$$cf_use_symlinks" = no; then
8938 if test "$MANPAGE_SYMLINKS" = yes ; then
8939         { echo "$as_me:8939: WARNING: cannot make symlinks" >&5
8940 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8941         MANPAGE_SYMLINKS=no
8942 fi
8943 fi
8944
8945 echo "$as_me:8945: result: $MANPAGE_SYMLINKS" >&5
8946 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8947 fi
8948
8949 echo "$as_me:8949: checking for manpage tbl" >&5
8950 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8951
8952 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8953 if test "${with_manpage_tbl+set}" = set; then
8954   withval="$with_manpage_tbl"
8955   MANPAGE_TBL=$withval
8956 else
8957   MANPAGE_TBL=no
8958 fi;
8959
8960 echo "$as_me:8960: result: $MANPAGE_TBL" >&5
8961 echo "${ECHO_T}$MANPAGE_TBL" >&6
8962
8963   if test "$prefix" = "NONE" ; then
8964      cf_prefix="$ac_default_prefix"
8965   else
8966      cf_prefix="$prefix"
8967   fi
8968
8969   case "$MANPAGE_FORMAT" in # (vi
8970   *catonly*) # (vi
8971     cf_format=yes
8972     cf_inboth=no
8973     ;;
8974   *formatted*) # (vi
8975     cf_format=yes
8976     cf_inboth=yes
8977     ;;
8978   *)
8979     cf_format=no
8980     cf_inboth=no
8981     ;;
8982   esac
8983
8984 test ! -d man && mkdir man
8985
8986 cf_so_strip=
8987 cf_compress=
8988 case "$MANPAGE_FORMAT" in #(vi
8989 *compress*) #(vi
8990         cf_so_strip="Z"
8991         cf_compress=compress
8992   ;;
8993 *gzip*) #(vi
8994         cf_so_strip="gz"
8995         cf_compress=gzip
8996   ;;
8997 esac
8998
8999 cf_edit_man=./edit_man.sh
9000 cf_man_alias=`pwd`/man_alias.sed
9001
9002 cat >$cf_edit_man <<CF_EOF
9003 #! /bin/sh
9004 # this script is generated by the configure-script CF_MAN_PAGES macro.
9005
9006 prefix="$cf_prefix"
9007 datadir="$datadir"
9008
9009 NCURSES_MAJOR="$NCURSES_MAJOR"
9010 NCURSES_MINOR="$NCURSES_MINOR"
9011 NCURSES_PATCH="$NCURSES_PATCH"
9012
9013 NCURSES_OSPEED="$NCURSES_OSPEED"
9014 TERMINFO="$TERMINFO"
9015
9016 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9017
9018 INSTALL="$INSTALL"
9019 INSTALL_DATA="$INSTALL_DATA"
9020
9021 transform="$program_transform_name"
9022
9023 TMP=\${TMPDIR-/tmp}/man\$\$
9024 trap "rm -f \$TMP" 0 1 2 5 15
9025
9026 form=\$1
9027 shift || exit 1
9028
9029 verb=\$1
9030 shift || exit 1
9031
9032 mandir=\$1
9033 shift || exit 1
9034
9035 srcdir=\$1
9036 top_srcdir=\$srcdir/..
9037 shift || exit 1
9038
9039 if test "\$form" = normal ; then
9040         if test "$cf_format" = yes ; then
9041         if test "$cf_inboth" = no ; then
9042                 sh \$0 format \$verb \$mandir \$srcdir \$*
9043                 exit $?
9044         fi
9045         fi
9046         cf_subdir=\$mandir/man
9047         cf_tables=$MANPAGE_TBL
9048 else
9049         cf_subdir=\$mandir/cat
9050         cf_tables=yes
9051 fi
9052
9053 # process the list of source-files
9054 for i in \$* ; do
9055 case \$i in #(vi
9056 *.orig|*.rej) ;; #(vi
9057 *.[0-9]*)
9058         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9059         if test \$verb = installing ; then
9060         if test ! -d \$cf_subdir\${section} ; then
9061                 \$MKDIRS \$cf_subdir\$section
9062         fi
9063         fi
9064
9065         # replace variables in man page
9066         if test ! -f $cf_man_alias ; then
9067 cat >>$cf_man_alias <<-CF_EOF2
9068                 s,@DATADIR@,\$datadir,g
9069                 s,@TERMINFO@,\$TERMINFO,g
9070                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9071                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9072                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9073                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9074 CF_EOF
9075
9076         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9077         do
9078                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9079                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9080 cat >>$cf_edit_man <<-CF_EOF
9081                 s,@$cf_NAME@,$cf_name,
9082 CF_EOF
9083         done
9084
9085 cat >>$cf_edit_man <<CF_EOF
9086 CF_EOF2
9087                 echo "...made $cf_man_alias"
9088         fi
9089
9090         aliases=
9091         cf_source=\`basename \$i\`
9092         inalias=\$cf_source
9093         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9094         if test ! -f \$inalias ; then
9095                 echo .. skipped \$cf_source
9096                 continue
9097         fi
9098 CF_EOF
9099
9100 if test "$MANPAGE_ALIASES" != no ; then
9101 cat >>$cf_edit_man <<CF_EOF
9102         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9103 CF_EOF
9104 fi
9105
9106 if test "$MANPAGE_RENAMES" = no ; then
9107 cat >>$cf_edit_man <<CF_EOF
9108         # perform program transformations for section 1 man pages
9109         if test \$section = 1 ; then
9110                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9111         else
9112                 cf_target=\$cf_subdir\${section}/\$cf_source
9113         fi
9114 CF_EOF
9115 else
9116 cat >>$cf_edit_man <<CF_EOF
9117         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9118         if test -z "\$cf_target" ; then
9119                 echo '? missing rename for '\$cf_source
9120                 cf_target="\$cf_source"
9121         fi
9122         cf_target="\$cf_subdir\${section}/\${cf_target}"
9123
9124 CF_EOF
9125 fi
9126
9127 cat >>$cf_edit_man <<CF_EOF
9128         sed     -f $cf_man_alias \\
9129 CF_EOF
9130
9131 if test -f $MANPAGE_RENAMES ; then
9132 cat >>$cf_edit_man <<CF_EOF
9133                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9134 CF_EOF
9135 else
9136 cat >>$cf_edit_man <<CF_EOF
9137                 < \$i >\$TMP
9138 CF_EOF
9139 fi
9140
9141 cat >>$cf_edit_man <<CF_EOF
9142 if test \$cf_tables = yes ; then
9143         tbl \$TMP >\$TMP.out
9144         mv \$TMP.out \$TMP
9145 fi
9146 CF_EOF
9147
9148 if test $with_curses_h != yes ; then
9149 cat >>$cf_edit_man <<CF_EOF
9150         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9151         mv \$TMP.out \$TMP
9152 CF_EOF
9153 fi
9154
9155 cat >>$cf_edit_man <<CF_EOF
9156         if test \$form = format ; then
9157                 nroff -man \$TMP >\$TMP.out
9158                 mv \$TMP.out \$TMP
9159         fi
9160 CF_EOF
9161
9162 if test -n "$cf_compress" ; then
9163 cat >>$cf_edit_man <<CF_EOF
9164         if test \$verb = installing ; then
9165         if ( $cf_compress -f \$TMP )
9166         then
9167                 mv \$TMP.$cf_so_strip \$TMP
9168         fi
9169         fi
9170         cf_target="\$cf_target.$cf_so_strip"
9171 CF_EOF
9172 fi
9173
9174 case "$MANPAGE_FORMAT" in #(vi
9175 *BSDI*)
9176 cat >>$cf_edit_man <<CF_EOF
9177         if test \$form = format ; then
9178                 # BSDI installs only .0 suffixes in the cat directories
9179                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9180         fi
9181 CF_EOF
9182   ;;
9183 esac
9184
9185 cat >>$cf_edit_man <<CF_EOF
9186         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9187         if test \$verb = installing ; then
9188                 echo \$verb \$cf_target
9189                 \$INSTALL_DATA \$TMP \$cf_target
9190                 test -d \$cf_subdir\${section} &&
9191                 test -n "\$aliases" && (
9192                         cd \$cf_subdir\${section} && (
9193                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9194                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9195                                 cf_target=\`basename \$cf_target\`
9196                                 for cf_alias in \$aliases
9197                                 do
9198                                         if test \$section = 1 ; then
9199                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9200                                         fi
9201
9202                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9203                                                 if test -f \$cf_alias\${suffix} ; then
9204                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9205                                                         then
9206                                                                 continue
9207                                                         fi
9208                                                 fi
9209                                                 echo .. \$verb alias \$cf_alias\${suffix}
9210                                                 rm -f \$cf_alias\${suffix}
9211                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9212                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9213                                                 echo ".so \$cf_source" >\$TMP
9214 CF_EOF
9215 if test -n "$cf_compress" ; then
9216 cat >>$cf_edit_man <<CF_EOF
9217                                                 if test -n "$cf_so_strip" ; then
9218                                                         $cf_compress -f \$TMP
9219                                                         mv \$TMP.$cf_so_strip \$TMP
9220                                                 fi
9221 CF_EOF
9222 fi
9223 cat >>$cf_edit_man <<CF_EOF
9224                                                 echo .. \$verb alias \$cf_alias\${suffix}
9225                                                 rm -f \$cf_alias\${suffix}
9226                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9227                                         fi
9228                                 done
9229                         )
9230                 )
9231         elif test \$verb = removing ; then
9232                 test -f \$cf_target && (
9233                         echo \$verb \$cf_target
9234                         rm -f \$cf_target
9235                 )
9236                 test -d \$cf_subdir\${section} &&
9237                 test -n "\$aliases" && (
9238                         cd \$cf_subdir\${section} && (
9239                                 for cf_alias in \$aliases
9240                                 do
9241                                         if test \$section = 1 ; then
9242                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9243                                         fi
9244
9245                                         echo .. \$verb alias \$cf_alias\${suffix}
9246                                         rm -f \$cf_alias\${suffix}
9247                                 done
9248                         )
9249                 )
9250         else
9251 #               echo ".hy 0"
9252                 cat \$TMP
9253         fi
9254         ;;
9255 esac
9256 done
9257
9258 if test $cf_inboth = yes ; then
9259 if test \$form != format ; then
9260         sh \$0 format \$verb \$mandir \$srcdir \$*
9261 fi
9262 fi
9263
9264 exit 0
9265 CF_EOF
9266 chmod 755 $cf_edit_man
9267
9268 ###############################################################################
9269
9270 ### Note that some functions (such as const) are normally disabled anyway.
9271 echo "$as_me:9271: checking if you want to build with function extensions" >&5
9272 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9273
9274 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9275 if test "${enable_ext_funcs+set}" = set; then
9276   enableval="$enable_ext_funcs"
9277   with_ext_funcs=$enableval
9278 else
9279   with_ext_funcs=yes
9280 fi;
9281 echo "$as_me:9281: result: $with_ext_funcs" >&5
9282 echo "${ECHO_T}$with_ext_funcs" >&6
9283 if test "$with_ext_funcs" = yes ; then
9284         NCURSES_EXT_FUNCS=1
9285         cat >>confdefs.h <<\EOF
9286 #define HAVE_CURSES_VERSION 1
9287 EOF
9288
9289         cat >>confdefs.h <<\EOF
9290 #define HAVE_HAS_KEY 1
9291 EOF
9292
9293         cat >>confdefs.h <<\EOF
9294 #define HAVE_RESIZETERM 1
9295 EOF
9296
9297         cat >>confdefs.h <<\EOF
9298 #define HAVE_RESIZE_TERM 1
9299 EOF
9300
9301         cat >>confdefs.h <<\EOF
9302 #define HAVE_USE_DEFAULT_COLORS 1
9303 EOF
9304
9305         cat >>confdefs.h <<\EOF
9306 #define HAVE_WRESIZE 1
9307 EOF
9308
9309         cat >>confdefs.h <<\EOF
9310 #define NCURSES_EXT_FUNCS 1
9311 EOF
9312
9313         GENERATED_EXT_FUNCS=generated
9314 else
9315         NCURSES_EXT_FUNCS=0
9316         GENERATED_EXT_FUNCS=
9317 fi
9318
9319 echo "$as_me:9319: checking if you want to build with experimental SCREEN extensions" >&5
9320 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9321
9322 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9323 if test "${enable_sp_funcs+set}" = set; then
9324   enableval="$enable_sp_funcs"
9325   with_sp_funcs=$enableval
9326 else
9327   with_sp_funcs=no
9328 fi;
9329 echo "$as_me:9329: result: $with_sp_funcs" >&5
9330 echo "${ECHO_T}$with_sp_funcs" >&6
9331 if test "$with_sp_funcs" = yes ; then
9332         NCURSES_SP_FUNCS=1
9333         cat >>confdefs.h <<\EOF
9334 #define NCURSES_SP_FUNCS 1
9335 EOF
9336
9337         GENERATED_SP_FUNCS=generated
9338 else
9339         NCURSES_SP_FUNCS=0
9340         GENERATED_SP_FUNCS=
9341 fi
9342
9343 ###   use option --enable-const to turn on use of const beyond that in XSI.
9344 echo "$as_me:9344: checking for extended use of const keyword" >&5
9345 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9346
9347 # Check whether --enable-const or --disable-const was given.
9348 if test "${enable_const+set}" = set; then
9349   enableval="$enable_const"
9350   with_ext_const=$enableval
9351 else
9352   with_ext_const=no
9353 fi;
9354 echo "$as_me:9354: result: $with_ext_const" >&5
9355 echo "${ECHO_T}$with_ext_const" >&6
9356 NCURSES_CONST='/*nothing*/'
9357 if test "$with_ext_const" = yes ; then
9358         NCURSES_CONST=const
9359 fi
9360
9361 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9362 echo "$as_me:9362: checking if you want to use extended colors" >&5
9363 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9364
9365 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9366 if test "${enable_ext_colors+set}" = set; then
9367   enableval="$enable_ext_colors"
9368   with_ext_colors=$enableval
9369 else
9370   with_ext_colors=no
9371 fi;
9372 echo "$as_me:9372: result: $with_ext_colors" >&5
9373 echo "${ECHO_T}$with_ext_colors" >&6
9374 NCURSES_EXT_COLORS=0
9375 if test "$with_ext_colors" = yes ; then
9376         if test "$with_widec" != yes ; then
9377                 { { echo "$as_me:9377: error: This option applies only to wide-character library" >&5
9378 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9379    { (exit 1); exit 1; }; }
9380         else
9381                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9382
9383 if test "${with_abi_version+set}" != set; then
9384         case $cf_cv_rel_version in
9385         5.*)
9386                 cf_cv_rel_version=6.0
9387                 cf_cv_abi_version=6
9388                 { echo "$as_me:9388: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9389 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9390                 ;;
9391         esac
9392 fi
9393
9394         fi
9395         NCURSES_EXT_COLORS=1
9396         cat >>confdefs.h <<\EOF
9397 #define NCURSES_EXT_COLORS 1
9398 EOF
9399
9400 fi
9401
9402 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9403 echo "$as_me:9403: checking if you want to use extended mouse encoding" >&5
9404 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9405
9406 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9407 if test "${enable_ext_mouse+set}" = set; then
9408   enableval="$enable_ext_mouse"
9409   with_ext_mouse=$enableval
9410 else
9411   with_ext_mouse=no
9412 fi;
9413 echo "$as_me:9413: result: $with_ext_mouse" >&5
9414 echo "${ECHO_T}$with_ext_mouse" >&6
9415 NCURSES_MOUSE_VERSION=1
9416 if test "$with_ext_mouse" = yes ; then
9417         NCURSES_MOUSE_VERSION=2
9418
9419 if test "${with_abi_version+set}" != set; then
9420         case $cf_cv_rel_version in
9421         5.*)
9422                 cf_cv_rel_version=6.0
9423                 cf_cv_abi_version=6
9424                 { echo "$as_me:9424: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9425 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9426                 ;;
9427         esac
9428 fi
9429
9430 fi
9431
9432 echo "$as_me:9432: checking if you want \$NCURSES_NO_PADDING code" >&5
9433 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9434
9435 # Check whether --enable-no-padding or --disable-no-padding was given.
9436 if test "${enable_no_padding+set}" = set; then
9437   enableval="$enable_no_padding"
9438   with_no_padding=$enableval
9439 else
9440   with_no_padding=$with_ext_funcs
9441 fi;
9442 echo "$as_me:9442: result: $with_no_padding" >&5
9443 echo "${ECHO_T}$with_no_padding" >&6
9444 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9445 #define NCURSES_NO_PADDING 1
9446 EOF
9447
9448 echo "$as_me:9448: checking for ANSI C header files" >&5
9449 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9450 if test "${ac_cv_header_stdc+set}" = set; then
9451   echo $ECHO_N "(cached) $ECHO_C" >&6
9452 else
9453   cat >conftest.$ac_ext <<_ACEOF
9454 #line 9454 "configure"
9455 #include "confdefs.h"
9456 #include <stdlib.h>
9457 #include <stdarg.h>
9458 #include <string.h>
9459 #include <float.h>
9460
9461 _ACEOF
9462 if { (eval echo "$as_me:9462: \"$ac_cpp conftest.$ac_ext\"") >&5
9463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9464   ac_status=$?
9465   egrep -v '^ *\+' conftest.er1 >conftest.err
9466   rm -f conftest.er1
9467   cat conftest.err >&5
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); } >/dev/null; then
9470   if test -s conftest.err; then
9471     ac_cpp_err=$ac_c_preproc_warn_flag
9472   else
9473     ac_cpp_err=
9474   fi
9475 else
9476   ac_cpp_err=yes
9477 fi
9478 if test -z "$ac_cpp_err"; then
9479   ac_cv_header_stdc=yes
9480 else
9481   echo "$as_me: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   ac_cv_header_stdc=no
9484 fi
9485 rm -f conftest.err conftest.$ac_ext
9486
9487 if test $ac_cv_header_stdc = yes; then
9488   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9489   cat >conftest.$ac_ext <<_ACEOF
9490 #line 9490 "configure"
9491 #include "confdefs.h"
9492 #include <string.h>
9493
9494 _ACEOF
9495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9496   egrep "memchr" >/dev/null 2>&1; then
9497   :
9498 else
9499   ac_cv_header_stdc=no
9500 fi
9501 rm -f conftest*
9502
9503 fi
9504
9505 if test $ac_cv_header_stdc = yes; then
9506   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9507   cat >conftest.$ac_ext <<_ACEOF
9508 #line 9508 "configure"
9509 #include "confdefs.h"
9510 #include <stdlib.h>
9511
9512 _ACEOF
9513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9514   egrep "free" >/dev/null 2>&1; then
9515   :
9516 else
9517   ac_cv_header_stdc=no
9518 fi
9519 rm -f conftest*
9520
9521 fi
9522
9523 if test $ac_cv_header_stdc = yes; then
9524   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9525   if test "$cross_compiling" = yes; then
9526   :
9527 else
9528   cat >conftest.$ac_ext <<_ACEOF
9529 #line 9529 "configure"
9530 #include "confdefs.h"
9531 #include <ctype.h>
9532 #if ((' ' & 0x0FF) == 0x020)
9533 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9534 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9535 #else
9536 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9537                      || ('j' <= (c) && (c) <= 'r') \
9538                      || ('s' <= (c) && (c) <= 'z'))
9539 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9540 #endif
9541
9542 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9543 int
9544 main ()
9545 {
9546   int i;
9547   for (i = 0; i < 256; i++)
9548     if (XOR (islower (i), ISLOWER (i))
9549         || toupper (i) != TOUPPER (i))
9550       $ac_main_return(2);
9551   $ac_main_return (0);
9552 }
9553 _ACEOF
9554 rm -f conftest$ac_exeext
9555 if { (eval echo "$as_me:9555: \"$ac_link\"") >&5
9556   (eval $ac_link) 2>&5
9557   ac_status=$?
9558   echo "$as_me:9558: \$? = $ac_status" >&5
9559   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9560   { (eval echo "$as_me:9560: \"$ac_try\"") >&5
9561   (eval $ac_try) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); }; }; then
9565   :
9566 else
9567   echo "$as_me: program exited with status $ac_status" >&5
9568 echo "$as_me: failed program was:" >&5
9569 cat conftest.$ac_ext >&5
9570 ac_cv_header_stdc=no
9571 fi
9572 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9573 fi
9574 fi
9575 fi
9576 echo "$as_me:9576: result: $ac_cv_header_stdc" >&5
9577 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9578 if test $ac_cv_header_stdc = yes; then
9579
9580 cat >>confdefs.h <<\EOF
9581 #define STDC_HEADERS 1
9582 EOF
9583
9584 fi
9585
9586 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9587
9588 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9589                   inttypes.h stdint.h unistd.h
9590 do
9591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9592 echo "$as_me:9592: checking for $ac_header" >&5
9593 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9595   echo $ECHO_N "(cached) $ECHO_C" >&6
9596 else
9597   cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600 $ac_includes_default
9601 #include <$ac_header>
9602 _ACEOF
9603 rm -f conftest.$ac_objext
9604 if { (eval echo "$as_me:9604: \"$ac_compile\"") >&5
9605   (eval $ac_compile) 2>&5
9606   ac_status=$?
9607   echo "$as_me:9607: \$? = $ac_status" >&5
9608   (exit $ac_status); } &&
9609          { ac_try='test -s conftest.$ac_objext'
9610   { (eval echo "$as_me:9610: \"$ac_try\"") >&5
9611   (eval $ac_try) 2>&5
9612   ac_status=$?
9613   echo "$as_me:9613: \$? = $ac_status" >&5
9614   (exit $ac_status); }; }; then
9615   eval "$as_ac_Header=yes"
9616 else
9617   echo "$as_me: failed program was:" >&5
9618 cat conftest.$ac_ext >&5
9619 eval "$as_ac_Header=no"
9620 fi
9621 rm -f conftest.$ac_objext conftest.$ac_ext
9622 fi
9623 echo "$as_me:9623: result: `eval echo '${'$as_ac_Header'}'`" >&5
9624 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9625 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9626   cat >>confdefs.h <<EOF
9627 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9628 EOF
9629
9630 fi
9631 done
9632
9633 echo "$as_me:9633: checking for signed char" >&5
9634 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9635 if test "${ac_cv_type_signed_char+set}" = set; then
9636   echo $ECHO_N "(cached) $ECHO_C" >&6
9637 else
9638   cat >conftest.$ac_ext <<_ACEOF
9639 #line 9639 "configure"
9640 #include "confdefs.h"
9641 $ac_includes_default
9642 int
9643 main ()
9644 {
9645 if ((signed char *) 0)
9646   return 0;
9647 if (sizeof (signed char))
9648   return 0;
9649   ;
9650   return 0;
9651 }
9652 _ACEOF
9653 rm -f conftest.$ac_objext
9654 if { (eval echo "$as_me:9654: \"$ac_compile\"") >&5
9655   (eval $ac_compile) 2>&5
9656   ac_status=$?
9657   echo "$as_me:9657: \$? = $ac_status" >&5
9658   (exit $ac_status); } &&
9659          { ac_try='test -s conftest.$ac_objext'
9660   { (eval echo "$as_me:9660: \"$ac_try\"") >&5
9661   (eval $ac_try) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit $ac_status); }; }; then
9665   ac_cv_type_signed_char=yes
9666 else
9667   echo "$as_me: failed program was:" >&5
9668 cat conftest.$ac_ext >&5
9669 ac_cv_type_signed_char=no
9670 fi
9671 rm -f conftest.$ac_objext conftest.$ac_ext
9672 fi
9673 echo "$as_me:9673: result: $ac_cv_type_signed_char" >&5
9674 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9675
9676 echo "$as_me:9676: checking size of signed char" >&5
9677 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9678 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9679   echo $ECHO_N "(cached) $ECHO_C" >&6
9680 else
9681   if test "$ac_cv_type_signed_char" = yes; then
9682   if test "$cross_compiling" = yes; then
9683   # Depending upon the size, compute the lo and hi bounds.
9684 cat >conftest.$ac_ext <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9687 $ac_includes_default
9688 int
9689 main ()
9690 {
9691 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9692   ;
9693   return 0;
9694 }
9695 _ACEOF
9696 rm -f conftest.$ac_objext
9697 if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
9698   (eval $ac_compile) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); } &&
9702          { ac_try='test -s conftest.$ac_objext'
9703   { (eval echo "$as_me:9703: \"$ac_try\"") >&5
9704   (eval $ac_try) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); }; }; then
9708   ac_lo=0 ac_mid=0
9709   while :; do
9710     cat >conftest.$ac_ext <<_ACEOF
9711 #line 9711 "configure"
9712 #include "confdefs.h"
9713 $ac_includes_default
9714 int
9715 main ()
9716 {
9717 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9718   ;
9719   return 0;
9720 }
9721 _ACEOF
9722 rm -f conftest.$ac_objext
9723 if { (eval echo "$as_me:9723: \"$ac_compile\"") >&5
9724   (eval $ac_compile) 2>&5
9725   ac_status=$?
9726   echo "$as_me:9726: \$? = $ac_status" >&5
9727   (exit $ac_status); } &&
9728          { ac_try='test -s conftest.$ac_objext'
9729   { (eval echo "$as_me:9729: \"$ac_try\"") >&5
9730   (eval $ac_try) 2>&5
9731   ac_status=$?
9732   echo "$as_me:9732: \$? = $ac_status" >&5
9733   (exit $ac_status); }; }; then
9734   ac_hi=$ac_mid; break
9735 else
9736   echo "$as_me: failed program was:" >&5
9737 cat conftest.$ac_ext >&5
9738 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9739 fi
9740 rm -f conftest.$ac_objext conftest.$ac_ext
9741   done
9742 else
9743   echo "$as_me: failed program was:" >&5
9744 cat conftest.$ac_ext >&5
9745 ac_hi=-1 ac_mid=-1
9746   while :; do
9747     cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 $ac_includes_default
9751 int
9752 main ()
9753 {
9754 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9755   ;
9756   return 0;
9757 }
9758 _ACEOF
9759 rm -f conftest.$ac_objext
9760 if { (eval echo "$as_me:9760: \"$ac_compile\"") >&5
9761   (eval $ac_compile) 2>&5
9762   ac_status=$?
9763   echo "$as_me:9763: \$? = $ac_status" >&5
9764   (exit $ac_status); } &&
9765          { ac_try='test -s conftest.$ac_objext'
9766   { (eval echo "$as_me:9766: \"$ac_try\"") >&5
9767   (eval $ac_try) 2>&5
9768   ac_status=$?
9769   echo "$as_me:9769: \$? = $ac_status" >&5
9770   (exit $ac_status); }; }; then
9771   ac_lo=$ac_mid; break
9772 else
9773   echo "$as_me: failed program was:" >&5
9774 cat conftest.$ac_ext >&5
9775 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9776 fi
9777 rm -f conftest.$ac_objext conftest.$ac_ext
9778   done
9779 fi
9780 rm -f conftest.$ac_objext conftest.$ac_ext
9781 # Binary search between lo and hi bounds.
9782 while test "x$ac_lo" != "x$ac_hi"; do
9783   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9784   cat >conftest.$ac_ext <<_ACEOF
9785 #line 9785 "configure"
9786 #include "confdefs.h"
9787 $ac_includes_default
9788 int
9789 main ()
9790 {
9791 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9792   ;
9793   return 0;
9794 }
9795 _ACEOF
9796 rm -f conftest.$ac_objext
9797 if { (eval echo "$as_me:9797: \"$ac_compile\"") >&5
9798   (eval $ac_compile) 2>&5
9799   ac_status=$?
9800   echo "$as_me:9800: \$? = $ac_status" >&5
9801   (exit $ac_status); } &&
9802          { ac_try='test -s conftest.$ac_objext'
9803   { (eval echo "$as_me:9803: \"$ac_try\"") >&5
9804   (eval $ac_try) 2>&5
9805   ac_status=$?
9806   echo "$as_me:9806: \$? = $ac_status" >&5
9807   (exit $ac_status); }; }; then
9808   ac_hi=$ac_mid
9809 else
9810   echo "$as_me: failed program was:" >&5
9811 cat conftest.$ac_ext >&5
9812 ac_lo=`expr $ac_mid + 1`
9813 fi
9814 rm -f conftest.$ac_objext conftest.$ac_ext
9815 done
9816 ac_cv_sizeof_signed_char=$ac_lo
9817 else
9818   if test "$cross_compiling" = yes; then
9819   { { echo "$as_me:9819: error: cannot run test program while cross compiling" >&5
9820 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9821    { (exit 1); exit 1; }; }
9822 else
9823   cat >conftest.$ac_ext <<_ACEOF
9824 #line 9824 "configure"
9825 #include "confdefs.h"
9826 $ac_includes_default
9827 int
9828 main ()
9829 {
9830 FILE *f = fopen ("conftest.val", "w");
9831 if (!f)
9832   $ac_main_return (1);
9833 fprintf (f, "%d", (sizeof (signed char)));
9834 fclose (f);
9835   ;
9836   return 0;
9837 }
9838 _ACEOF
9839 rm -f conftest$ac_exeext
9840 if { (eval echo "$as_me:9840: \"$ac_link\"") >&5
9841   (eval $ac_link) 2>&5
9842   ac_status=$?
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9845   { (eval echo "$as_me:9845: \"$ac_try\"") >&5
9846   (eval $ac_try) 2>&5
9847   ac_status=$?
9848   echo "$as_me:9848: \$? = $ac_status" >&5
9849   (exit $ac_status); }; }; then
9850   ac_cv_sizeof_signed_char=`cat conftest.val`
9851 else
9852   echo "$as_me: program exited with status $ac_status" >&5
9853 echo "$as_me: failed program was:" >&5
9854 cat conftest.$ac_ext >&5
9855 fi
9856 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9857 fi
9858 fi
9859 rm -f conftest.val
9860 else
9861   ac_cv_sizeof_signed_char=0
9862 fi
9863 fi
9864 echo "$as_me:9864: result: $ac_cv_sizeof_signed_char" >&5
9865 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9866 cat >>confdefs.h <<EOF
9867 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9868 EOF
9869
9870 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9871         NCURSES_SBOOL="signed char"
9872 else
9873         NCURSES_SBOOL="char"
9874 fi
9875 echo "$as_me:9875: checking if you want to use signed Boolean array in term.h" >&5
9876 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9877
9878 # Check whether --enable-signed-char or --disable-signed-char was given.
9879 if test "${enable_signed_char+set}" = set; then
9880   enableval="$enable_signed_char"
9881   with_signed_char=$enableval
9882 else
9883   with_signed_char=no
9884 fi;
9885 echo "$as_me:9885: result: $with_signed_char" >&5
9886 echo "${ECHO_T}$with_signed_char" >&6
9887 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9888
9889 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9890 echo "$as_me:9890: checking if you want SIGWINCH handler" >&5
9891 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9892
9893 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9894 if test "${enable_sigwinch+set}" = set; then
9895   enableval="$enable_sigwinch"
9896   with_sigwinch=$enableval
9897 else
9898   with_sigwinch=$with_ext_funcs
9899 fi;
9900 echo "$as_me:9900: result: $with_sigwinch" >&5
9901 echo "${ECHO_T}$with_sigwinch" >&6
9902 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9903 #define USE_SIGWINCH 1
9904 EOF
9905
9906 ###   use option --enable-tcap-names to allow user to define new capabilities
9907 echo "$as_me:9907: checking if you want user-definable terminal capabilities like termcap" >&5
9908 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9909
9910 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9911 if test "${enable_tcap_names+set}" = set; then
9912   enableval="$enable_tcap_names"
9913   with_tcap_names=$enableval
9914 else
9915   with_tcap_names=$with_ext_funcs
9916 fi;
9917 echo "$as_me:9917: result: $with_tcap_names" >&5
9918 echo "${ECHO_T}$with_tcap_names" >&6
9919 NCURSES_XNAMES=0
9920 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9921
9922 ###############################################################################
9923 # These options are relatively safe to experiment with.
9924
9925 echo "$as_me:9925: checking if you want all development code" >&5
9926 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9927
9928 # Check whether --with-develop or --without-develop was given.
9929 if test "${with_develop+set}" = set; then
9930   withval="$with_develop"
9931   with_develop=$withval
9932 else
9933   with_develop=no
9934 fi;
9935 echo "$as_me:9935: result: $with_develop" >&5
9936 echo "${ECHO_T}$with_develop" >&6
9937
9938 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9939 echo "$as_me:9939: checking if you want hard-tabs code" >&5
9940 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9941
9942 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9943 if test "${enable_hard_tabs+set}" = set; then
9944   enableval="$enable_hard_tabs"
9945
9946 else
9947   enable_hard_tabs=$with_develop
9948 fi;
9949 echo "$as_me:9949: result: $enable_hard_tabs" >&5
9950 echo "${ECHO_T}$enable_hard_tabs" >&6
9951 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9952 #define USE_HARD_TABS 1
9953 EOF
9954
9955 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9956 echo "$as_me:9956: checking if you want limited support for xmc" >&5
9957 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9958
9959 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9960 if test "${enable_xmc_glitch+set}" = set; then
9961   enableval="$enable_xmc_glitch"
9962
9963 else
9964   enable_xmc_glitch=$with_develop
9965 fi;
9966 echo "$as_me:9966: result: $enable_xmc_glitch" >&5
9967 echo "${ECHO_T}$enable_xmc_glitch" >&6
9968 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9969 #define USE_XMC_SUPPORT 1
9970 EOF
9971
9972 ###############################################################################
9973 # These are just experimental, probably should not be in a package:
9974
9975 echo "$as_me:9975: checking if you do not want to assume colors are white-on-black" >&5
9976 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9977
9978 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9979 if test "${enable_assumed_color+set}" = set; then
9980   enableval="$enable_assumed_color"
9981   with_assumed_color=$enableval
9982 else
9983   with_assumed_color=yes
9984 fi;
9985 echo "$as_me:9985: result: $with_assumed_color" >&5
9986 echo "${ECHO_T}$with_assumed_color" >&6
9987 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9988 #define USE_ASSUMED_COLOR 1
9989 EOF
9990
9991 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9992 echo "$as_me:9992: checking if you want hashmap scrolling-optimization code" >&5
9993 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9994
9995 # Check whether --enable-hashmap or --disable-hashmap was given.
9996 if test "${enable_hashmap+set}" = set; then
9997   enableval="$enable_hashmap"
9998   with_hashmap=$enableval
9999 else
10000   with_hashmap=yes
10001 fi;
10002 echo "$as_me:10002: result: $with_hashmap" >&5
10003 echo "${ECHO_T}$with_hashmap" >&6
10004 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10005 #define USE_HASHMAP 1
10006 EOF
10007
10008 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10009 echo "$as_me:10009: checking if you want colorfgbg code" >&5
10010 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10011
10012 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10013 if test "${enable_colorfgbg+set}" = set; then
10014   enableval="$enable_colorfgbg"
10015   with_colorfgbg=$enableval
10016 else
10017   with_colorfgbg=no
10018 fi;
10019 echo "$as_me:10019: result: $with_colorfgbg" >&5
10020 echo "${ECHO_T}$with_colorfgbg" >&6
10021 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10022 #define USE_COLORFGBG 1
10023 EOF
10024
10025 # This is still experimental (20080329), but should ultimately be moved to
10026 # the script-block --with-normal, etc.
10027
10028 echo "$as_me:10028: checking if you want to link with the pthread library" >&5
10029 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10030
10031 # Check whether --with-pthread or --without-pthread was given.
10032 if test "${with_pthread+set}" = set; then
10033   withval="$with_pthread"
10034   with_pthread=$withval
10035 else
10036   with_pthread=no
10037 fi;
10038 echo "$as_me:10038: result: $with_pthread" >&5
10039 echo "${ECHO_T}$with_pthread" >&6
10040
10041 if test "$with_pthread" != no ; then
10042     echo "$as_me:10042: checking for pthread.h" >&5
10043 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10044 if test "${ac_cv_header_pthread_h+set}" = set; then
10045   echo $ECHO_N "(cached) $ECHO_C" >&6
10046 else
10047   cat >conftest.$ac_ext <<_ACEOF
10048 #line 10048 "configure"
10049 #include "confdefs.h"
10050 #include <pthread.h>
10051 _ACEOF
10052 if { (eval echo "$as_me:10052: \"$ac_cpp conftest.$ac_ext\"") >&5
10053   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10054   ac_status=$?
10055   egrep -v '^ *\+' conftest.er1 >conftest.err
10056   rm -f conftest.er1
10057   cat conftest.err >&5
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); } >/dev/null; then
10060   if test -s conftest.err; then
10061     ac_cpp_err=$ac_c_preproc_warn_flag
10062   else
10063     ac_cpp_err=
10064   fi
10065 else
10066   ac_cpp_err=yes
10067 fi
10068 if test -z "$ac_cpp_err"; then
10069   ac_cv_header_pthread_h=yes
10070 else
10071   echo "$as_me: failed program was:" >&5
10072   cat conftest.$ac_ext >&5
10073   ac_cv_header_pthread_h=no
10074 fi
10075 rm -f conftest.err conftest.$ac_ext
10076 fi
10077 echo "$as_me:10077: result: $ac_cv_header_pthread_h" >&5
10078 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10079 if test $ac_cv_header_pthread_h = yes; then
10080
10081         cat >>confdefs.h <<\EOF
10082 #define HAVE_PTHREADS_H 1
10083 EOF
10084
10085         echo "$as_me:10085: checking if we can link with the pthread library" >&5
10086 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10087         cf_save_LIBS="$LIBS"
10088         LIBS="-lpthread $LIBS"
10089         cat >conftest.$ac_ext <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092
10093 #include <pthread.h>
10094
10095 int
10096 main ()
10097 {
10098
10099         int rc = pthread_create(0,0,0,0);
10100
10101   ;
10102   return 0;
10103 }
10104 _ACEOF
10105 rm -f conftest.$ac_objext conftest$ac_exeext
10106 if { (eval echo "$as_me:10106: \"$ac_link\"") >&5
10107   (eval $ac_link) 2>&5
10108   ac_status=$?
10109   echo "$as_me:10109: \$? = $ac_status" >&5
10110   (exit $ac_status); } &&
10111          { ac_try='test -s conftest$ac_exeext'
10112   { (eval echo "$as_me:10112: \"$ac_try\"") >&5
10113   (eval $ac_try) 2>&5
10114   ac_status=$?
10115   echo "$as_me:10115: \$? = $ac_status" >&5
10116   (exit $ac_status); }; }; then
10117   with_pthread=yes
10118 else
10119   echo "$as_me: failed program was:" >&5
10120 cat conftest.$ac_ext >&5
10121 with_pthread=no
10122 fi
10123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10124         LIBS="$cf_save_LIBS"
10125         echo "$as_me:10125: result: $with_pthread" >&5
10126 echo "${ECHO_T}$with_pthread" >&6
10127
10128         if test "$with_pthread" = yes ; then
10129             LIBS="-lpthread $LIBS"
10130             cat >>confdefs.h <<\EOF
10131 #define HAVE_LIBPTHREADS 1
10132 EOF
10133
10134         else
10135             { { echo "$as_me:10135: error: Cannot link with pthread library" >&5
10136 echo "$as_me: error: Cannot link with pthread library" >&2;}
10137    { (exit 1); exit 1; }; }
10138         fi
10139
10140 fi
10141
10142 fi
10143
10144 echo "$as_me:10144: checking if you want to use weak-symbols for pthreads" >&5
10145 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10146
10147 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10148 if test "${enable_weak_symbols+set}" = set; then
10149   enableval="$enable_weak_symbols"
10150   use_weak_symbols=$withval
10151 else
10152   use_weak_symbols=no
10153 fi;
10154 echo "$as_me:10154: result: $use_weak_symbols" >&5
10155 echo "${ECHO_T}$use_weak_symbols" >&6
10156 if test "$use_weak_symbols" = yes ; then
10157
10158 echo "$as_me:10158: checking if $CC supports weak symbols" >&5
10159 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10160 if test "${cf_cv_weak_symbols+set}" = set; then
10161   echo $ECHO_N "(cached) $ECHO_C" >&6
10162 else
10163
10164 cat >conftest.$ac_ext <<_ACEOF
10165 #line 10165 "configure"
10166 #include "confdefs.h"
10167
10168 #include <stdio.h>
10169 int
10170 main ()
10171 {
10172
10173 #if defined(__GNUC__)
10174 #  if defined __USE_ISOC99
10175 #    define _cat_pragma(exp)    _Pragma(#exp)
10176 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10177 #  else
10178 #    define _weak_pragma(exp)
10179 #  endif
10180 #  define _declare(name)        __extension__ extern __typeof__(name) name
10181 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10182 #endif
10183
10184 weak_symbol(fopen);
10185
10186   ;
10187   return 0;
10188 }
10189 _ACEOF
10190 rm -f conftest.$ac_objext
10191 if { (eval echo "$as_me:10191: \"$ac_compile\"") >&5
10192   (eval $ac_compile) 2>&5
10193   ac_status=$?
10194   echo "$as_me:10194: \$? = $ac_status" >&5
10195   (exit $ac_status); } &&
10196          { ac_try='test -s conftest.$ac_objext'
10197   { (eval echo "$as_me:10197: \"$ac_try\"") >&5
10198   (eval $ac_try) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit $ac_status); }; }; then
10202   cf_cv_weak_symbols=yes
10203 else
10204   echo "$as_me: failed program was:" >&5
10205 cat conftest.$ac_ext >&5
10206 cf_cv_weak_symbols=no
10207 fi
10208 rm -f conftest.$ac_objext conftest.$ac_ext
10209
10210 fi
10211 echo "$as_me:10211: result: $cf_cv_weak_symbols" >&5
10212 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10213
10214 else
10215     cf_cv_weak_symbols=no
10216 fi
10217
10218 if test $cf_cv_weak_symbols = yes ; then
10219     cat >>confdefs.h <<\EOF
10220 #define USE_WEAK_SYMBOLS 1
10221 EOF
10222
10223 fi
10224
10225 PTHREAD=
10226 if test "$with_pthread" = "yes" ; then
10227     cat >>confdefs.h <<\EOF
10228 #define USE_PTHREADS 1
10229 EOF
10230
10231     enable_reentrant=yes
10232     if test $cf_cv_weak_symbols = yes ; then
10233         PTHREAD=-lpthread
10234     fi
10235 fi
10236
10237 # Reentrant code has to be opaque; there's little advantage to making ncurses
10238 # opaque outside of that, so there is no --enable-opaque option.  We can use
10239 # this option without --with-pthreads, but this will be always set for
10240 # pthreads.
10241 echo "$as_me:10241: checking if you want experimental reentrant code" >&5
10242 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10243
10244 # Check whether --enable-reentrant or --disable-reentrant was given.
10245 if test "${enable_reentrant+set}" = set; then
10246   enableval="$enable_reentrant"
10247   with_reentrant=$enableval
10248 else
10249   with_reentrant=no
10250 fi;
10251 echo "$as_me:10251: result: $with_reentrant" >&5
10252 echo "${ECHO_T}$with_reentrant" >&6
10253 if test "$with_reentrant" = yes ; then
10254         cf_cv_enable_reentrant=1
10255         cf_cv_enable_opaque="NCURSES_INTERNALS"
10256         NCURSES_OPAQUE=1
10257         NCURSES_SIZE_T=int
10258         if test $cf_cv_weak_symbols = yes ; then
10259
10260 # remove pthread library from $LIBS
10261 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10262
10263         else
10264                 LIB_SUFFIX="t${LIB_SUFFIX}"
10265         fi
10266         cat >>confdefs.h <<\EOF
10267 #define USE_REENTRANT 1
10268 EOF
10269
10270 if test "${with_abi_version+set}" != set; then
10271         case $cf_cv_rel_version in
10272         5.*)
10273                 cf_cv_rel_version=6.0
10274                 cf_cv_abi_version=6
10275                 { echo "$as_me:10275: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10276 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10277                 ;;
10278         esac
10279 fi
10280
10281 else
10282         cf_cv_enable_reentrant=0
10283         cf_cv_enable_opaque="NCURSES_OPAQUE"
10284         NCURSES_OPAQUE=0
10285         NCURSES_SIZE_T=short
10286 fi
10287
10288 ### Allow using a different wrap-prefix
10289 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10290         echo "$as_me:10290: checking for prefix used to wrap public variables" >&5
10291 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10292
10293 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10294 if test "${with_wrap_prefix+set}" = set; then
10295   withval="$with_wrap_prefix"
10296   NCURSES_WRAP_PREFIX=$withval
10297 else
10298   NCURSES_WRAP_PREFIX=_nc_
10299 fi;
10300         echo "$as_me:10300: result: $NCURSES_WRAP_PREFIX" >&5
10301 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10302 else
10303         NCURSES_WRAP_PREFIX=_nc_
10304 fi
10305
10306 cat >>confdefs.h <<EOF
10307 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10308 EOF
10309
10310 echo "$as_me:10310: checking if you want experimental safe-sprintf code" >&5
10311 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10312
10313 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10314 if test "${enable_safe_sprintf+set}" = set; then
10315   enableval="$enable_safe_sprintf"
10316   with_safe_sprintf=$enableval
10317 else
10318   with_safe_sprintf=no
10319 fi;
10320 echo "$as_me:10320: result: $with_safe_sprintf" >&5
10321 echo "${ECHO_T}$with_safe_sprintf" >&6
10322 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10323 #define USE_SAFE_SPRINTF 1
10324 EOF
10325
10326 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10327 # when hashmap is used scroll hints are useless
10328 if test "$with_hashmap" = no ; then
10329 echo "$as_me:10329: checking if you want to experiment without scrolling-hints code" >&5
10330 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10331
10332 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10333 if test "${enable_scroll_hints+set}" = set; then
10334   enableval="$enable_scroll_hints"
10335   with_scroll_hints=$enableval
10336 else
10337   with_scroll_hints=yes
10338 fi;
10339 echo "$as_me:10339: result: $with_scroll_hints" >&5
10340 echo "${ECHO_T}$with_scroll_hints" >&6
10341 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10342 #define USE_SCROLL_HINTS 1
10343 EOF
10344
10345 fi
10346
10347 echo "$as_me:10347: checking if you want experimental wgetch-events code" >&5
10348 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10349
10350 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10351 if test "${enable_wgetch_events+set}" = set; then
10352   enableval="$enable_wgetch_events"
10353   with_wgetch_events=$enableval
10354 else
10355   with_wgetch_events=no
10356 fi;
10357 echo "$as_me:10357: result: $with_wgetch_events" >&5
10358 echo "${ECHO_T}$with_wgetch_events" >&6
10359 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10360 #define NCURSES_WGETCH_EVENTS 1
10361 EOF
10362
10363 ###############################################################################
10364
10365 ###     use option --disable-echo to suppress full display compiling commands
10366 echo "$as_me:10366: checking if you want to display full commands during build" >&5
10367 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10368
10369 # Check whether --enable-echo or --disable-echo was given.
10370 if test "${enable_echo+set}" = set; then
10371   enableval="$enable_echo"
10372   with_echo=$enableval
10373 else
10374   with_echo=yes
10375 fi;
10376 if test "$with_echo" = yes; then
10377         ECHO_LINK=
10378 else
10379         ECHO_LINK='@ echo linking $@ ... ;'
10380         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10381         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10382 fi
10383 echo "$as_me:10383: result: $with_echo" >&5
10384 echo "${ECHO_T}$with_echo" >&6
10385
10386 ###     use option --enable-warnings to turn on all gcc warnings
10387 echo "$as_me:10387: checking if you want to see compiler warnings" >&5
10388 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10389
10390 # Check whether --enable-warnings or --disable-warnings was given.
10391 if test "${enable_warnings+set}" = set; then
10392   enableval="$enable_warnings"
10393   with_warnings=$enableval
10394 fi;
10395 echo "$as_me:10395: result: $with_warnings" >&5
10396 echo "${ECHO_T}$with_warnings" >&6
10397
10398 if test "x$with_warnings" = "xyes"; then
10399         ADAFLAGS="$ADAFLAGS -gnatg"
10400
10401 INTEL_COMPILER=no
10402
10403 if test "$GCC" = yes ; then
10404         case $host_os in
10405         linux*|gnu*)
10406                 echo "$as_me:10406: checking if this is really Intel C compiler" >&5
10407 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10408                 cf_save_CFLAGS="$CFLAGS"
10409                 CFLAGS="$CFLAGS -no-gcc"
10410                 cat >conftest.$ac_ext <<_ACEOF
10411 #line 10411 "configure"
10412 #include "confdefs.h"
10413
10414 int
10415 main ()
10416 {
10417
10418 #ifdef __INTEL_COMPILER
10419 #else
10420 make an error
10421 #endif
10422
10423   ;
10424   return 0;
10425 }
10426 _ACEOF
10427 rm -f conftest.$ac_objext
10428 if { (eval echo "$as_me:10428: \"$ac_compile\"") >&5
10429   (eval $ac_compile) 2>&5
10430   ac_status=$?
10431   echo "$as_me:10431: \$? = $ac_status" >&5
10432   (exit $ac_status); } &&
10433          { ac_try='test -s conftest.$ac_objext'
10434   { (eval echo "$as_me:10434: \"$ac_try\"") >&5
10435   (eval $ac_try) 2>&5
10436   ac_status=$?
10437   echo "$as_me:10437: \$? = $ac_status" >&5
10438   (exit $ac_status); }; }; then
10439   INTEL_COMPILER=yes
10440 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10441
10442 else
10443   echo "$as_me: failed program was:" >&5
10444 cat conftest.$ac_ext >&5
10445 fi
10446 rm -f conftest.$ac_objext conftest.$ac_ext
10447                 CFLAGS="$cf_save_CFLAGS"
10448                 echo "$as_me:10448: result: $INTEL_COMPILER" >&5
10449 echo "${ECHO_T}$INTEL_COMPILER" >&6
10450                 ;;
10451         esac
10452 fi
10453
10454 cat > conftest.$ac_ext <<EOF
10455 #line 10455 "${as_me-configure}"
10456 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10457 EOF
10458
10459 if test "$INTEL_COMPILER" = yes
10460 then
10461 # The "-wdXXX" options suppress warnings:
10462 # remark #1419: external declaration in primary source file
10463 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10464 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10465 # remark #193: zero used for undefined preprocessing identifier
10466 # remark #593: variable "curs_sb_left_arrow" was set but never used
10467 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10468 # remark #869: parameter "tw" was never referenced
10469 # remark #981: operands are evaluated in unspecified order
10470 # warning #279: controlling expression is constant
10471
10472         { echo "$as_me:10472: checking for $CC warning options..." >&5
10473 echo "$as_me: checking for $CC warning options..." >&6;}
10474         cf_save_CFLAGS="$CFLAGS"
10475         EXTRA_CFLAGS="-Wall"
10476         for cf_opt in \
10477                 wd1419 \
10478                 wd1683 \
10479                 wd1684 \
10480                 wd193 \
10481                 wd593 \
10482                 wd279 \
10483                 wd810 \
10484                 wd869 \
10485                 wd981
10486         do
10487                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10488                 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); }; then
10493                         test -n "$verbose" && echo "$as_me:10493: result: ... -$cf_opt" >&5
10494 echo "${ECHO_T}... -$cf_opt" >&6
10495                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10496                 fi
10497         done
10498         CFLAGS="$cf_save_CFLAGS"
10499
10500 elif test "$GCC" = yes
10501 then
10502         { echo "$as_me:10502: checking for $CC warning options..." >&5
10503 echo "$as_me: checking for $CC warning options..." >&6;}
10504         cf_save_CFLAGS="$CFLAGS"
10505         EXTRA_CFLAGS="-W -Wall"
10506         cf_warn_CONST=""
10507         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10508         for cf_opt in \
10509                 Wbad-function-cast \
10510                 Wcast-align \
10511                 Wcast-qual \
10512                 Winline \
10513                 Wmissing-declarations \
10514                 Wmissing-prototypes \
10515                 Wnested-externs \
10516                 Wpointer-arith \
10517                 Wshadow \
10518                 Wstrict-prototypes \
10519                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10520         do
10521                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10522                 if { (eval echo "$as_me:10522: \"$ac_compile\"") >&5
10523   (eval $ac_compile) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); }; then
10527                         test -n "$verbose" && echo "$as_me:10527: result: ... -$cf_opt" >&5
10528 echo "${ECHO_T}... -$cf_opt" >&6
10529                         case $cf_opt in #(vi
10530                         Wcast-qual) #(vi
10531                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10532                                 ;;
10533                         Winline) #(vi
10534                                 case $GCC_VERSION in
10535                                 [34].*)
10536                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10537
10538 echo "${as_me-configure}:10538: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10539
10540                                         continue;;
10541                                 esac
10542                                 ;;
10543                         esac
10544                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10545                 fi
10546         done
10547         CFLAGS="$cf_save_CFLAGS"
10548 fi
10549 rm -f conftest*
10550
10551         if test "$cf_with_cxx" = yes ; then
10552
10553 INTEL_CPLUSPLUS=no
10554
10555 if test "$GCC" = yes ; then
10556         case $host_os in
10557         linux*|gnu*)
10558                 echo "$as_me:10558: checking if this is really Intel C++ compiler" >&5
10559 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10560                 cf_save_CFLAGS="$CXXFLAGS"
10561                 CXXFLAGS="$CXXFLAGS -no-gcc"
10562                 cat >conftest.$ac_ext <<_ACEOF
10563 #line 10563 "configure"
10564 #include "confdefs.h"
10565
10566 int
10567 main ()
10568 {
10569
10570 #ifdef __INTEL_COMPILER
10571 #else
10572 make an error
10573 #endif
10574
10575   ;
10576   return 0;
10577 }
10578 _ACEOF
10579 rm -f conftest.$ac_objext
10580 if { (eval echo "$as_me:10580: \"$ac_compile\"") >&5
10581   (eval $ac_compile) 2>&5
10582   ac_status=$?
10583   echo "$as_me:10583: \$? = $ac_status" >&5
10584   (exit $ac_status); } &&
10585          { ac_try='test -s conftest.$ac_objext'
10586   { (eval echo "$as_me:10586: \"$ac_try\"") >&5
10587   (eval $ac_try) 2>&5
10588   ac_status=$?
10589   echo "$as_me:10589: \$? = $ac_status" >&5
10590   (exit $ac_status); }; }; then
10591   INTEL_CPLUSPLUS=yes
10592 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10593
10594 else
10595   echo "$as_me: failed program was:" >&5
10596 cat conftest.$ac_ext >&5
10597 fi
10598 rm -f conftest.$ac_objext conftest.$ac_ext
10599                 CXXFLAGS="$cf_save_CFLAGS"
10600                 echo "$as_me:10600: result: $INTEL_CPLUSPLUS" >&5
10601 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10602                 ;;
10603         esac
10604 fi
10605
10606 ac_ext=cc
10607 ac_cpp='$CXXCPP $CPPFLAGS'
10608 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10609 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10610 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10611 ac_main_return=return
10612
10613 cat > conftest.$ac_ext <<EOF
10614 #line 10614 "configure"
10615 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10616 EOF
10617
10618 if test "$INTEL_CPLUSPLUS" = yes
10619 then
10620 # The "-wdXXX" options suppress warnings:
10621 # remark #1419: external declaration in primary source file
10622 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10623 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10624 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10625 # remark #193: zero used for undefined preprocessing identifier
10626 # remark #593: variable "curs_sb_left_arrow" was set but never used
10627 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10628 # remark #869: parameter "tw" was never referenced
10629 # remark #981: operands are evaluated in unspecified order
10630 # warning #269: invalid format string conversion
10631
10632         { echo "$as_me:10632: checking for $CC warning options..." >&5
10633 echo "$as_me: checking for $CC warning options..." >&6;}
10634         cf_save_CXXFLAGS="$CXXFLAGS"
10635         EXTRA_CXXFLAGS="-Wall"
10636         for cf_opt in \
10637                 wd1419 \
10638                 wd1682 \
10639                 wd1683 \
10640                 wd1684 \
10641                 wd193 \
10642                 wd279 \
10643                 wd593 \
10644                 wd810 \
10645                 wd869 \
10646                 wd981
10647         do
10648                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10649                 if { (eval echo "$as_me:10649: \"$ac_compile\"") >&5
10650   (eval $ac_compile) 2>&5
10651   ac_status=$?
10652   echo "$as_me:10652: \$? = $ac_status" >&5
10653   (exit $ac_status); }; then
10654                         test -n "$verbose" && echo "$as_me:10654: result: ... -$cf_opt" >&5
10655 echo "${ECHO_T}... -$cf_opt" >&6
10656                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10657                 fi
10658         done
10659         CXXFLAGS="$cf_save_CXXFLAGS"
10660
10661 elif test "$GXX" = yes
10662 then
10663         { echo "$as_me:10663: checking for $CXX warning options..." >&5
10664 echo "$as_me: checking for $CXX warning options..." >&6;}
10665         cf_save_CXXFLAGS="$CXXFLAGS"
10666         EXTRA_CXXFLAGS="-W -Wall"
10667         cf_gxx_extra_warnings=""
10668         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10669         case "$GCC_VERSION" in
10670         [1-2].*)
10671                 ;;
10672         *)
10673                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10674                 ;;
10675         esac
10676         for cf_opt in \
10677                 Wabi \
10678                 fabi-version=0 \
10679                 Woverloaded-virtual \
10680                 Wsign-promo \
10681                 Wsynth \
10682                 Wold-style-cast \
10683                 Wcast-align \
10684                 Wcast-qual \
10685                 Wmissing-prototypes \
10686                 Wpointer-arith \
10687                 Wshadow \
10688                 Wstrict-prototypes \
10689                 Wundef $cf_gxx_extra_warnings Wno-unused
10690         do
10691                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10692                 if { (eval echo "$as_me:10692: \"$ac_compile\"") >&5
10693   (eval $ac_compile) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); }; then
10697                         test -n "$verbose" && echo "$as_me:10697: result: ... -$cf_opt" >&5
10698 echo "${ECHO_T}... -$cf_opt" >&6
10699                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10700                 else
10701                         test -n "$verbose" && echo "$as_me:10701: result: ... no -$cf_opt" >&5
10702 echo "${ECHO_T}... no -$cf_opt" >&6
10703                 fi
10704         done
10705         CXXFLAGS="$cf_save_CXXFLAGS"
10706 fi
10707
10708 rm -f conftest*
10709 ac_ext=c
10710 ac_cpp='$CPP $CPPFLAGS'
10711 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10712 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10713 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10714 ac_main_return=return
10715
10716         fi
10717 fi
10718
10719 if test "$GCC" = yes
10720 then
10721 cat > conftest.i <<EOF
10722 #ifndef GCC_PRINTF
10723 #define GCC_PRINTF 0
10724 #endif
10725 #ifndef GCC_SCANF
10726 #define GCC_SCANF 0
10727 #endif
10728 #ifndef GCC_NORETURN
10729 #define GCC_NORETURN /* nothing */
10730 #endif
10731 #ifndef GCC_UNUSED
10732 #define GCC_UNUSED /* nothing */
10733 #endif
10734 EOF
10735 if test "$GCC" = yes
10736 then
10737         { echo "$as_me:10737: checking for $CC __attribute__ directives..." >&5
10738 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10739 cat > conftest.$ac_ext <<EOF
10740 #line 10740 "${as_me-configure}"
10741 #include "confdefs.h"
10742 #include "conftest.h"
10743 #include "conftest.i"
10744 #if     GCC_PRINTF
10745 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10746 #else
10747 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10748 #endif
10749 #if     GCC_SCANF
10750 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10751 #else
10752 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10753 #endif
10754 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10755 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10756 extern void foo(void) GCC_NORETURN;
10757 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10758 EOF
10759         for cf_attribute in scanf printf unused noreturn
10760         do
10761
10762 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10763
10764                 cf_directive="__attribute__(($cf_attribute))"
10765                 echo "checking for $CC $cf_directive" 1>&5
10766                 case $cf_attribute in
10767                 scanf|printf)
10768                 cat >conftest.h <<EOF
10769 #define GCC_$cf_ATTRIBUTE 1
10770 EOF
10771                         ;;
10772                 *)
10773                 cat >conftest.h <<EOF
10774 #define GCC_$cf_ATTRIBUTE $cf_directive
10775 EOF
10776                         ;;
10777                 esac
10778                 if { (eval echo "$as_me:10778: \"$ac_compile\"") >&5
10779   (eval $ac_compile) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); }; then
10783                         test -n "$verbose" && echo "$as_me:10783: result: ... $cf_attribute" >&5
10784 echo "${ECHO_T}... $cf_attribute" >&6
10785                         cat conftest.h >>confdefs.h
10786                 fi
10787         done
10788 else
10789         fgrep define conftest.i >>confdefs.h
10790 fi
10791 rm -rf conftest*
10792 fi
10793
10794 ###     use option --enable-assertions to turn on generation of assertion code
10795 echo "$as_me:10795: checking if you want to enable runtime assertions" >&5
10796 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10797
10798 # Check whether --enable-assertions or --disable-assertions was given.
10799 if test "${enable_assertions+set}" = set; then
10800   enableval="$enable_assertions"
10801   with_assertions=$enableval
10802 else
10803   with_assertions=no
10804 fi;
10805 echo "$as_me:10805: result: $with_assertions" >&5
10806 echo "${ECHO_T}$with_assertions" >&6
10807 if test -n "$GCC"
10808 then
10809         if test "$with_assertions" = no
10810         then
10811                 cat >>confdefs.h <<\EOF
10812 #define NDEBUG 1
10813 EOF
10814
10815                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10816         else
10817                 ADAFLAGS="$ADAFLAGS -gnata"
10818         fi
10819 fi
10820
10821 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10822
10823 echo "$as_me:10823: checking if you want to use dmalloc for testing" >&5
10824 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10825
10826 # Check whether --with-dmalloc or --without-dmalloc was given.
10827 if test "${with_dmalloc+set}" = set; then
10828   withval="$with_dmalloc"
10829   cat >>confdefs.h <<\EOF
10830 #define USE_DMALLOC 1
10831 EOF
10832
10833         : ${with_cflags:=-g}
10834         : ${with_no_leaks:=yes}
10835          with_dmalloc=yes
10836 else
10837   with_dmalloc=
10838 fi;
10839 echo "$as_me:10839: result: ${with_dmalloc:-no}" >&5
10840 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10841
10842 case .$with_cflags in #(vi
10843 .*-g*)
10844         case .$CFLAGS in #(vi
10845         .*-g*) #(vi
10846                 ;;
10847         *)
10848
10849 cf_fix_cppflags=no
10850 cf_new_cflags=
10851 cf_new_cppflags=
10852 cf_new_extra_cppflags=
10853
10854 for cf_add_cflags in -g
10855 do
10856 case $cf_fix_cppflags in
10857 no)
10858         case $cf_add_cflags in #(vi
10859         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10860                 case $cf_add_cflags in
10861                 -D*)
10862                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10863
10864                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10865                         && test -z "${cf_tst_cflags}" \
10866                         && cf_fix_cppflags=yes
10867
10868                         if test $cf_fix_cppflags = yes ; then
10869                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10870                                 continue
10871                         elif test "${cf_tst_cflags}" = "\"'" ; then
10872                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10873                                 continue
10874                         fi
10875                         ;;
10876                 esac
10877                 case "$CPPFLAGS" in
10878                 *$cf_add_cflags) #(vi
10879                         ;;
10880                 *) #(vi
10881                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10882                         ;;
10883                 esac
10884                 ;;
10885         *)
10886                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10887                 ;;
10888         esac
10889         ;;
10890 yes)
10891         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10892
10893         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10894
10895         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10896         && test -z "${cf_tst_cflags}" \
10897         && cf_fix_cppflags=no
10898         ;;
10899 esac
10900 done
10901
10902 if test -n "$cf_new_cflags" ; then
10903
10904         CFLAGS="$CFLAGS $cf_new_cflags"
10905 fi
10906
10907 if test -n "$cf_new_cppflags" ; then
10908
10909         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10910 fi
10911
10912 if test -n "$cf_new_extra_cppflags" ; then
10913
10914         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10915 fi
10916
10917                 ;;
10918         esac
10919         ;;
10920 esac
10921
10922 if test "$with_dmalloc" = yes ; then
10923         echo "$as_me:10923: checking for dmalloc.h" >&5
10924 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10925 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10926   echo $ECHO_N "(cached) $ECHO_C" >&6
10927 else
10928   cat >conftest.$ac_ext <<_ACEOF
10929 #line 10929 "configure"
10930 #include "confdefs.h"
10931 #include <dmalloc.h>
10932 _ACEOF
10933 if { (eval echo "$as_me:10933: \"$ac_cpp conftest.$ac_ext\"") >&5
10934   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10935   ac_status=$?
10936   egrep -v '^ *\+' conftest.er1 >conftest.err
10937   rm -f conftest.er1
10938   cat conftest.err >&5
10939   echo "$as_me:10939: \$? = $ac_status" >&5
10940   (exit $ac_status); } >/dev/null; then
10941   if test -s conftest.err; then
10942     ac_cpp_err=$ac_c_preproc_warn_flag
10943   else
10944     ac_cpp_err=
10945   fi
10946 else
10947   ac_cpp_err=yes
10948 fi
10949 if test -z "$ac_cpp_err"; then
10950   ac_cv_header_dmalloc_h=yes
10951 else
10952   echo "$as_me: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   ac_cv_header_dmalloc_h=no
10955 fi
10956 rm -f conftest.err conftest.$ac_ext
10957 fi
10958 echo "$as_me:10958: result: $ac_cv_header_dmalloc_h" >&5
10959 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10960 if test $ac_cv_header_dmalloc_h = yes; then
10961
10962 echo "$as_me:10962: checking for dmalloc_debug in -ldmalloc" >&5
10963 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10964 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10965   echo $ECHO_N "(cached) $ECHO_C" >&6
10966 else
10967   ac_check_lib_save_LIBS=$LIBS
10968 LIBS="-ldmalloc  $LIBS"
10969 cat >conftest.$ac_ext <<_ACEOF
10970 #line 10970 "configure"
10971 #include "confdefs.h"
10972
10973 /* Override any gcc2 internal prototype to avoid an error.  */
10974 #ifdef __cplusplus
10975 extern "C"
10976 #endif
10977 /* We use char because int might match the return type of a gcc2
10978    builtin and then its argument prototype would still apply.  */
10979 char dmalloc_debug ();
10980 int
10981 main ()
10982 {
10983 dmalloc_debug ();
10984   ;
10985   return 0;
10986 }
10987 _ACEOF
10988 rm -f conftest.$ac_objext conftest$ac_exeext
10989 if { (eval echo "$as_me:10989: \"$ac_link\"") >&5
10990   (eval $ac_link) 2>&5
10991   ac_status=$?
10992   echo "$as_me:10992: \$? = $ac_status" >&5
10993   (exit $ac_status); } &&
10994          { ac_try='test -s conftest$ac_exeext'
10995   { (eval echo "$as_me:10995: \"$ac_try\"") >&5
10996   (eval $ac_try) 2>&5
10997   ac_status=$?
10998   echo "$as_me:10998: \$? = $ac_status" >&5
10999   (exit $ac_status); }; }; then
11000   ac_cv_lib_dmalloc_dmalloc_debug=yes
11001 else
11002   echo "$as_me: failed program was:" >&5
11003 cat conftest.$ac_ext >&5
11004 ac_cv_lib_dmalloc_dmalloc_debug=no
11005 fi
11006 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11007 LIBS=$ac_check_lib_save_LIBS
11008 fi
11009 echo "$as_me:11009: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11010 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11011 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11012   cat >>confdefs.h <<EOF
11013 #define HAVE_LIBDMALLOC 1
11014 EOF
11015
11016   LIBS="-ldmalloc $LIBS"
11017
11018 fi
11019
11020 fi
11021
11022 fi
11023
11024 echo "$as_me:11024: checking if you want to use dbmalloc for testing" >&5
11025 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11026
11027 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11028 if test "${with_dbmalloc+set}" = set; then
11029   withval="$with_dbmalloc"
11030   cat >>confdefs.h <<\EOF
11031 #define USE_DBMALLOC 1
11032 EOF
11033
11034         : ${with_cflags:=-g}
11035         : ${with_no_leaks:=yes}
11036          with_dbmalloc=yes
11037 else
11038   with_dbmalloc=
11039 fi;
11040 echo "$as_me:11040: result: ${with_dbmalloc:-no}" >&5
11041 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11042
11043 case .$with_cflags in #(vi
11044 .*-g*)
11045         case .$CFLAGS in #(vi
11046         .*-g*) #(vi
11047                 ;;
11048         *)
11049
11050 cf_fix_cppflags=no
11051 cf_new_cflags=
11052 cf_new_cppflags=
11053 cf_new_extra_cppflags=
11054
11055 for cf_add_cflags in -g
11056 do
11057 case $cf_fix_cppflags in
11058 no)
11059         case $cf_add_cflags in #(vi
11060         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11061                 case $cf_add_cflags in
11062                 -D*)
11063                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11064
11065                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11066                         && test -z "${cf_tst_cflags}" \
11067                         && cf_fix_cppflags=yes
11068
11069                         if test $cf_fix_cppflags = yes ; then
11070                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11071                                 continue
11072                         elif test "${cf_tst_cflags}" = "\"'" ; then
11073                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11074                                 continue
11075                         fi
11076                         ;;
11077                 esac
11078                 case "$CPPFLAGS" in
11079                 *$cf_add_cflags) #(vi
11080                         ;;
11081                 *) #(vi
11082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11083                         ;;
11084                 esac
11085                 ;;
11086         *)
11087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11088                 ;;
11089         esac
11090         ;;
11091 yes)
11092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11093
11094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11095
11096         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11097         && test -z "${cf_tst_cflags}" \
11098         && cf_fix_cppflags=no
11099         ;;
11100 esac
11101 done
11102
11103 if test -n "$cf_new_cflags" ; then
11104
11105         CFLAGS="$CFLAGS $cf_new_cflags"
11106 fi
11107
11108 if test -n "$cf_new_cppflags" ; then
11109
11110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11111 fi
11112
11113 if test -n "$cf_new_extra_cppflags" ; then
11114
11115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11116 fi
11117
11118                 ;;
11119         esac
11120         ;;
11121 esac
11122
11123 if test "$with_dbmalloc" = yes ; then
11124         echo "$as_me:11124: checking for dbmalloc.h" >&5
11125 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11126 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11127   echo $ECHO_N "(cached) $ECHO_C" >&6
11128 else
11129   cat >conftest.$ac_ext <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132 #include <dbmalloc.h>
11133 _ACEOF
11134 if { (eval echo "$as_me:11134: \"$ac_cpp conftest.$ac_ext\"") >&5
11135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11136   ac_status=$?
11137   egrep -v '^ *\+' conftest.er1 >conftest.err
11138   rm -f conftest.er1
11139   cat conftest.err >&5
11140   echo "$as_me:11140: \$? = $ac_status" >&5
11141   (exit $ac_status); } >/dev/null; then
11142   if test -s conftest.err; then
11143     ac_cpp_err=$ac_c_preproc_warn_flag
11144   else
11145     ac_cpp_err=
11146   fi
11147 else
11148   ac_cpp_err=yes
11149 fi
11150 if test -z "$ac_cpp_err"; then
11151   ac_cv_header_dbmalloc_h=yes
11152 else
11153   echo "$as_me: failed program was:" >&5
11154   cat conftest.$ac_ext >&5
11155   ac_cv_header_dbmalloc_h=no
11156 fi
11157 rm -f conftest.err conftest.$ac_ext
11158 fi
11159 echo "$as_me:11159: result: $ac_cv_header_dbmalloc_h" >&5
11160 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11161 if test $ac_cv_header_dbmalloc_h = yes; then
11162
11163 echo "$as_me:11163: checking for debug_malloc in -ldbmalloc" >&5
11164 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11165 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11166   echo $ECHO_N "(cached) $ECHO_C" >&6
11167 else
11168   ac_check_lib_save_LIBS=$LIBS
11169 LIBS="-ldbmalloc  $LIBS"
11170 cat >conftest.$ac_ext <<_ACEOF
11171 #line 11171 "configure"
11172 #include "confdefs.h"
11173
11174 /* Override any gcc2 internal prototype to avoid an error.  */
11175 #ifdef __cplusplus
11176 extern "C"
11177 #endif
11178 /* We use char because int might match the return type of a gcc2
11179    builtin and then its argument prototype would still apply.  */
11180 char debug_malloc ();
11181 int
11182 main ()
11183 {
11184 debug_malloc ();
11185   ;
11186   return 0;
11187 }
11188 _ACEOF
11189 rm -f conftest.$ac_objext conftest$ac_exeext
11190 if { (eval echo "$as_me:11190: \"$ac_link\"") >&5
11191   (eval $ac_link) 2>&5
11192   ac_status=$?
11193   echo "$as_me:11193: \$? = $ac_status" >&5
11194   (exit $ac_status); } &&
11195          { ac_try='test -s conftest$ac_exeext'
11196   { (eval echo "$as_me:11196: \"$ac_try\"") >&5
11197   (eval $ac_try) 2>&5
11198   ac_status=$?
11199   echo "$as_me:11199: \$? = $ac_status" >&5
11200   (exit $ac_status); }; }; then
11201   ac_cv_lib_dbmalloc_debug_malloc=yes
11202 else
11203   echo "$as_me: failed program was:" >&5
11204 cat conftest.$ac_ext >&5
11205 ac_cv_lib_dbmalloc_debug_malloc=no
11206 fi
11207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11208 LIBS=$ac_check_lib_save_LIBS
11209 fi
11210 echo "$as_me:11210: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11211 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11212 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11213   cat >>confdefs.h <<EOF
11214 #define HAVE_LIBDBMALLOC 1
11215 EOF
11216
11217   LIBS="-ldbmalloc $LIBS"
11218
11219 fi
11220
11221 fi
11222
11223 fi
11224
11225 echo "$as_me:11225: checking if you want to use valgrind for testing" >&5
11226 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11227
11228 # Check whether --with-valgrind or --without-valgrind was given.
11229 if test "${with_valgrind+set}" = set; then
11230   withval="$with_valgrind"
11231   cat >>confdefs.h <<\EOF
11232 #define USE_VALGRIND 1
11233 EOF
11234
11235         : ${with_cflags:=-g}
11236         : ${with_no_leaks:=yes}
11237          with_valgrind=yes
11238 else
11239   with_valgrind=
11240 fi;
11241 echo "$as_me:11241: result: ${with_valgrind:-no}" >&5
11242 echo "${ECHO_T}${with_valgrind:-no}" >&6
11243
11244 case .$with_cflags in #(vi
11245 .*-g*)
11246         case .$CFLAGS in #(vi
11247         .*-g*) #(vi
11248                 ;;
11249         *)
11250
11251 cf_fix_cppflags=no
11252 cf_new_cflags=
11253 cf_new_cppflags=
11254 cf_new_extra_cppflags=
11255
11256 for cf_add_cflags in -g
11257 do
11258 case $cf_fix_cppflags in
11259 no)
11260         case $cf_add_cflags in #(vi
11261         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11262                 case $cf_add_cflags in
11263                 -D*)
11264                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11265
11266                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11267                         && test -z "${cf_tst_cflags}" \
11268                         && cf_fix_cppflags=yes
11269
11270                         if test $cf_fix_cppflags = yes ; then
11271                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11272                                 continue
11273                         elif test "${cf_tst_cflags}" = "\"'" ; then
11274                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11275                                 continue
11276                         fi
11277                         ;;
11278                 esac
11279                 case "$CPPFLAGS" in
11280                 *$cf_add_cflags) #(vi
11281                         ;;
11282                 *) #(vi
11283                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11284                         ;;
11285                 esac
11286                 ;;
11287         *)
11288                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11289                 ;;
11290         esac
11291         ;;
11292 yes)
11293         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11294
11295         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11296
11297         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11298         && test -z "${cf_tst_cflags}" \
11299         && cf_fix_cppflags=no
11300         ;;
11301 esac
11302 done
11303
11304 if test -n "$cf_new_cflags" ; then
11305
11306         CFLAGS="$CFLAGS $cf_new_cflags"
11307 fi
11308
11309 if test -n "$cf_new_cppflags" ; then
11310
11311         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11312 fi
11313
11314 if test -n "$cf_new_extra_cppflags" ; then
11315
11316         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11317 fi
11318
11319                 ;;
11320         esac
11321         ;;
11322 esac
11323
11324 echo "$as_me:11324: checking if you want to perform memory-leak testing" >&5
11325 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11326
11327 # Check whether --enable-leaks or --disable-leaks was given.
11328 if test "${enable_leaks+set}" = set; then
11329   enableval="$enable_leaks"
11330   with_no_leaks=yes
11331 else
11332   : ${with_no_leaks:=no}
11333 fi;
11334 echo "$as_me:11334: result: $with_no_leaks" >&5
11335 echo "${ECHO_T}$with_no_leaks" >&6
11336
11337 if test "$with_no_leaks" = yes ; then
11338         cat >>confdefs.h <<\EOF
11339 #define NO_LEAKS 1
11340 EOF
11341
11342 fi
11343
11344 cat >>confdefs.h <<\EOF
11345 #define HAVE_NC_ALLOC_H 1
11346 EOF
11347
11348 ###     use option --enable-expanded to generate certain macros as functions
11349
11350 # Check whether --enable-expanded or --disable-expanded was given.
11351 if test "${enable_expanded+set}" = set; then
11352   enableval="$enable_expanded"
11353   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11354 #define NCURSES_EXPANDED 1
11355 EOF
11356
11357 fi;
11358
11359 ###     use option --disable-macros to suppress macros in favor of functions
11360
11361 # Check whether --enable-macros or --disable-macros was given.
11362 if test "${enable_macros+set}" = set; then
11363   enableval="$enable_macros"
11364   test "$enableval" = no && cat >>confdefs.h <<\EOF
11365 #define NCURSES_NOMACROS 1
11366 EOF
11367
11368 fi;
11369
11370 # Normally we only add trace() to the debug-library.  Allow this to be
11371 # extended to all models of the ncurses library:
11372 cf_all_traces=no
11373 case "$CFLAGS $CPPFLAGS" in
11374 *-DTRACE*)
11375         cf_all_traces=yes
11376         ;;
11377 esac
11378
11379 echo "$as_me:11379: checking whether to add trace feature to all models" >&5
11380 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11381
11382 # Check whether --with-trace or --without-trace was given.
11383 if test "${with_trace+set}" = set; then
11384   withval="$with_trace"
11385   cf_with_trace=$withval
11386 else
11387   cf_with_trace=$cf_all_traces
11388 fi;
11389 echo "$as_me:11389: result: $cf_with_trace" >&5
11390 echo "${ECHO_T}$cf_with_trace" >&6
11391
11392 if test "$cf_with_trace" = yes ; then
11393         LIB_TRACING=all
11394         ADA_TRACE=TRUE
11395
11396 cf_fix_cppflags=no
11397 cf_new_cflags=
11398 cf_new_cppflags=
11399 cf_new_extra_cppflags=
11400
11401 for cf_add_cflags in -DTRACE
11402 do
11403 case $cf_fix_cppflags in
11404 no)
11405         case $cf_add_cflags in #(vi
11406         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11407                 case $cf_add_cflags in
11408                 -D*)
11409                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11410
11411                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11412                         && test -z "${cf_tst_cflags}" \
11413                         && cf_fix_cppflags=yes
11414
11415                         if test $cf_fix_cppflags = yes ; then
11416                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11417                                 continue
11418                         elif test "${cf_tst_cflags}" = "\"'" ; then
11419                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11420                                 continue
11421                         fi
11422                         ;;
11423                 esac
11424                 case "$CPPFLAGS" in
11425                 *$cf_add_cflags) #(vi
11426                         ;;
11427                 *) #(vi
11428                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11429                         ;;
11430                 esac
11431                 ;;
11432         *)
11433                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11434                 ;;
11435         esac
11436         ;;
11437 yes)
11438         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11439
11440         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11441
11442         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11443         && test -z "${cf_tst_cflags}" \
11444         && cf_fix_cppflags=no
11445         ;;
11446 esac
11447 done
11448
11449 if test -n "$cf_new_cflags" ; then
11450
11451         CFLAGS="$CFLAGS $cf_new_cflags"
11452 fi
11453
11454 if test -n "$cf_new_cppflags" ; then
11455
11456         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11457 fi
11458
11459 if test -n "$cf_new_extra_cppflags" ; then
11460
11461         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11462 fi
11463
11464 else
11465         LIB_TRACING=DEBUG
11466         ADA_TRACE=FALSE
11467 fi
11468
11469 ###     Checks for libraries.
11470 case $cf_cv_system_name in #(vi
11471 *mingw32*) #(vi
11472         ;;
11473 *)
11474 echo "$as_me:11474: checking for gettimeofday" >&5
11475 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11476 if test "${ac_cv_func_gettimeofday+set}" = set; then
11477   echo $ECHO_N "(cached) $ECHO_C" >&6
11478 else
11479   cat >conftest.$ac_ext <<_ACEOF
11480 #line 11480 "configure"
11481 #include "confdefs.h"
11482 /* System header to define __stub macros and hopefully few prototypes,
11483     which can conflict with char gettimeofday (); below.  */
11484 #include <assert.h>
11485 /* Override any gcc2 internal prototype to avoid an error.  */
11486 #ifdef __cplusplus
11487 extern "C"
11488 #endif
11489 /* We use char because int might match the return type of a gcc2
11490    builtin and then its argument prototype would still apply.  */
11491 char gettimeofday ();
11492 char (*f) ();
11493
11494 int
11495 main ()
11496 {
11497 /* The GNU C library defines this for functions which it implements
11498     to always fail with ENOSYS.  Some functions are actually named
11499     something starting with __ and the normal name is an alias.  */
11500 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11501 choke me
11502 #else
11503 f = gettimeofday;
11504 #endif
11505
11506   ;
11507   return 0;
11508 }
11509 _ACEOF
11510 rm -f conftest.$ac_objext conftest$ac_exeext
11511 if { (eval echo "$as_me:11511: \"$ac_link\"") >&5
11512   (eval $ac_link) 2>&5
11513   ac_status=$?
11514   echo "$as_me:11514: \$? = $ac_status" >&5
11515   (exit $ac_status); } &&
11516          { ac_try='test -s conftest$ac_exeext'
11517   { (eval echo "$as_me:11517: \"$ac_try\"") >&5
11518   (eval $ac_try) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit $ac_status); }; }; then
11522   ac_cv_func_gettimeofday=yes
11523 else
11524   echo "$as_me: failed program was:" >&5
11525 cat conftest.$ac_ext >&5
11526 ac_cv_func_gettimeofday=no
11527 fi
11528 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11529 fi
11530 echo "$as_me:11530: result: $ac_cv_func_gettimeofday" >&5
11531 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11532 if test $ac_cv_func_gettimeofday = yes; then
11533   cat >>confdefs.h <<\EOF
11534 #define HAVE_GETTIMEOFDAY 1
11535 EOF
11536
11537 else
11538
11539 echo "$as_me:11539: checking for gettimeofday in -lbsd" >&5
11540 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11541 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11542   echo $ECHO_N "(cached) $ECHO_C" >&6
11543 else
11544   ac_check_lib_save_LIBS=$LIBS
11545 LIBS="-lbsd  $LIBS"
11546 cat >conftest.$ac_ext <<_ACEOF
11547 #line 11547 "configure"
11548 #include "confdefs.h"
11549
11550 /* Override any gcc2 internal prototype to avoid an error.  */
11551 #ifdef __cplusplus
11552 extern "C"
11553 #endif
11554 /* We use char because int might match the return type of a gcc2
11555    builtin and then its argument prototype would still apply.  */
11556 char gettimeofday ();
11557 int
11558 main ()
11559 {
11560 gettimeofday ();
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 rm -f conftest.$ac_objext conftest$ac_exeext
11566 if { (eval echo "$as_me:11566: \"$ac_link\"") >&5
11567   (eval $ac_link) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit $ac_status); } &&
11571          { ac_try='test -s conftest$ac_exeext'
11572   { (eval echo "$as_me:11572: \"$ac_try\"") >&5
11573   (eval $ac_try) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit $ac_status); }; }; then
11577   ac_cv_lib_bsd_gettimeofday=yes
11578 else
11579   echo "$as_me: failed program was:" >&5
11580 cat conftest.$ac_ext >&5
11581 ac_cv_lib_bsd_gettimeofday=no
11582 fi
11583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11584 LIBS=$ac_check_lib_save_LIBS
11585 fi
11586 echo "$as_me:11586: result: $ac_cv_lib_bsd_gettimeofday" >&5
11587 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11588 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11589   cat >>confdefs.h <<\EOF
11590 #define HAVE_GETTIMEOFDAY 1
11591 EOF
11592
11593         LIBS="$LIBS -lbsd"
11594 fi
11595
11596 fi
11597         ;;
11598 esac
11599
11600 echo "$as_me:11600: checking if -lm needed for math functions" >&5
11601 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11602 if test "${cf_cv_need_libm+set}" = set; then
11603   echo $ECHO_N "(cached) $ECHO_C" >&6
11604 else
11605
11606         cat >conftest.$ac_ext <<_ACEOF
11607 #line 11607 "configure"
11608 #include "confdefs.h"
11609
11610         #include <stdio.h>
11611         #include <math.h>
11612
11613 int
11614 main ()
11615 {
11616 double x = rand(); printf("result = %g\n", sin(x))
11617   ;
11618   return 0;
11619 }
11620 _ACEOF
11621 rm -f conftest.$ac_objext conftest$ac_exeext
11622 if { (eval echo "$as_me:11622: \"$ac_link\"") >&5
11623   (eval $ac_link) 2>&5
11624   ac_status=$?
11625   echo "$as_me:11625: \$? = $ac_status" >&5
11626   (exit $ac_status); } &&
11627          { ac_try='test -s conftest$ac_exeext'
11628   { (eval echo "$as_me:11628: \"$ac_try\"") >&5
11629   (eval $ac_try) 2>&5
11630   ac_status=$?
11631   echo "$as_me:11631: \$? = $ac_status" >&5
11632   (exit $ac_status); }; }; then
11633   cf_cv_need_libm=no
11634 else
11635   echo "$as_me: failed program was:" >&5
11636 cat conftest.$ac_ext >&5
11637 cf_cv_need_libm=yes
11638 fi
11639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11640 fi
11641 echo "$as_me:11641: result: $cf_cv_need_libm" >&5
11642 echo "${ECHO_T}$cf_cv_need_libm" >&6
11643 if test "$cf_cv_need_libm" = yes
11644 then
11645 MATH_LIB=-lm
11646 fi
11647
11648 ###     Checks for header files.
11649 echo "$as_me:11649: checking for ANSI C header files" >&5
11650 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11651 if test "${ac_cv_header_stdc+set}" = set; then
11652   echo $ECHO_N "(cached) $ECHO_C" >&6
11653 else
11654   cat >conftest.$ac_ext <<_ACEOF
11655 #line 11655 "configure"
11656 #include "confdefs.h"
11657 #include <stdlib.h>
11658 #include <stdarg.h>
11659 #include <string.h>
11660 #include <float.h>
11661
11662 _ACEOF
11663 if { (eval echo "$as_me:11663: \"$ac_cpp conftest.$ac_ext\"") >&5
11664   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11665   ac_status=$?
11666   egrep -v '^ *\+' conftest.er1 >conftest.err
11667   rm -f conftest.er1
11668   cat conftest.err >&5
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); } >/dev/null; then
11671   if test -s conftest.err; then
11672     ac_cpp_err=$ac_c_preproc_warn_flag
11673   else
11674     ac_cpp_err=
11675   fi
11676 else
11677   ac_cpp_err=yes
11678 fi
11679 if test -z "$ac_cpp_err"; then
11680   ac_cv_header_stdc=yes
11681 else
11682   echo "$as_me: failed program was:" >&5
11683   cat conftest.$ac_ext >&5
11684   ac_cv_header_stdc=no
11685 fi
11686 rm -f conftest.err conftest.$ac_ext
11687
11688 if test $ac_cv_header_stdc = yes; then
11689   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11690   cat >conftest.$ac_ext <<_ACEOF
11691 #line 11691 "configure"
11692 #include "confdefs.h"
11693 #include <string.h>
11694
11695 _ACEOF
11696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11697   egrep "memchr" >/dev/null 2>&1; then
11698   :
11699 else
11700   ac_cv_header_stdc=no
11701 fi
11702 rm -f conftest*
11703
11704 fi
11705
11706 if test $ac_cv_header_stdc = yes; then
11707   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #include <stdlib.h>
11712
11713 _ACEOF
11714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11715   egrep "free" >/dev/null 2>&1; then
11716   :
11717 else
11718   ac_cv_header_stdc=no
11719 fi
11720 rm -f conftest*
11721
11722 fi
11723
11724 if test $ac_cv_header_stdc = yes; then
11725   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11726   if test "$cross_compiling" = yes; then
11727   :
11728 else
11729   cat >conftest.$ac_ext <<_ACEOF
11730 #line 11730 "configure"
11731 #include "confdefs.h"
11732 #include <ctype.h>
11733 #if ((' ' & 0x0FF) == 0x020)
11734 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11735 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11736 #else
11737 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11738                      || ('j' <= (c) && (c) <= 'r') \
11739                      || ('s' <= (c) && (c) <= 'z'))
11740 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11741 #endif
11742
11743 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11744 int
11745 main ()
11746 {
11747   int i;
11748   for (i = 0; i < 256; i++)
11749     if (XOR (islower (i), ISLOWER (i))
11750         || toupper (i) != TOUPPER (i))
11751       $ac_main_return(2);
11752   $ac_main_return (0);
11753 }
11754 _ACEOF
11755 rm -f conftest$ac_exeext
11756 if { (eval echo "$as_me:11756: \"$ac_link\"") >&5
11757   (eval $ac_link) 2>&5
11758   ac_status=$?
11759   echo "$as_me:11759: \$? = $ac_status" >&5
11760   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); }; }; then
11766   :
11767 else
11768   echo "$as_me: program exited with status $ac_status" >&5
11769 echo "$as_me: failed program was:" >&5
11770 cat conftest.$ac_ext >&5
11771 ac_cv_header_stdc=no
11772 fi
11773 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11774 fi
11775 fi
11776 fi
11777 echo "$as_me:11777: result: $ac_cv_header_stdc" >&5
11778 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11779 if test $ac_cv_header_stdc = yes; then
11780
11781 cat >>confdefs.h <<\EOF
11782 #define STDC_HEADERS 1
11783 EOF
11784
11785 fi
11786
11787 ac_header_dirent=no
11788 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11789   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11790 echo "$as_me:11790: checking for $ac_hdr that defines DIR" >&5
11791 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11793   echo $ECHO_N "(cached) $ECHO_C" >&6
11794 else
11795   cat >conftest.$ac_ext <<_ACEOF
11796 #line 11796 "configure"
11797 #include "confdefs.h"
11798 #include <sys/types.h>
11799 #include <$ac_hdr>
11800
11801 int
11802 main ()
11803 {
11804 if ((DIR *) 0)
11805 return 0;
11806   ;
11807   return 0;
11808 }
11809 _ACEOF
11810 rm -f conftest.$ac_objext
11811 if { (eval echo "$as_me:11811: \"$ac_compile\"") >&5
11812   (eval $ac_compile) 2>&5
11813   ac_status=$?
11814   echo "$as_me:11814: \$? = $ac_status" >&5
11815   (exit $ac_status); } &&
11816          { ac_try='test -s conftest.$ac_objext'
11817   { (eval echo "$as_me:11817: \"$ac_try\"") >&5
11818   (eval $ac_try) 2>&5
11819   ac_status=$?
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); }; }; then
11822   eval "$as_ac_Header=yes"
11823 else
11824   echo "$as_me: failed program was:" >&5
11825 cat conftest.$ac_ext >&5
11826 eval "$as_ac_Header=no"
11827 fi
11828 rm -f conftest.$ac_objext conftest.$ac_ext
11829 fi
11830 echo "$as_me:11830: result: `eval echo '${'$as_ac_Header'}'`" >&5
11831 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11832 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11833   cat >>confdefs.h <<EOF
11834 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11835 EOF
11836
11837 ac_header_dirent=$ac_hdr; break
11838 fi
11839
11840 done
11841 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11842 if test $ac_header_dirent = dirent.h; then
11843   echo "$as_me:11843: checking for opendir in -ldir" >&5
11844 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11845 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11846   echo $ECHO_N "(cached) $ECHO_C" >&6
11847 else
11848   ac_check_lib_save_LIBS=$LIBS
11849 LIBS="-ldir  $LIBS"
11850 cat >conftest.$ac_ext <<_ACEOF
11851 #line 11851 "configure"
11852 #include "confdefs.h"
11853
11854 /* Override any gcc2 internal prototype to avoid an error.  */
11855 #ifdef __cplusplus
11856 extern "C"
11857 #endif
11858 /* We use char because int might match the return type of a gcc2
11859    builtin and then its argument prototype would still apply.  */
11860 char opendir ();
11861 int
11862 main ()
11863 {
11864 opendir ();
11865   ;
11866   return 0;
11867 }
11868 _ACEOF
11869 rm -f conftest.$ac_objext conftest$ac_exeext
11870 if { (eval echo "$as_me:11870: \"$ac_link\"") >&5
11871   (eval $ac_link) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); } &&
11875          { ac_try='test -s conftest$ac_exeext'
11876   { (eval echo "$as_me:11876: \"$ac_try\"") >&5
11877   (eval $ac_try) 2>&5
11878   ac_status=$?
11879   echo "$as_me:11879: \$? = $ac_status" >&5
11880   (exit $ac_status); }; }; then
11881   ac_cv_lib_dir_opendir=yes
11882 else
11883   echo "$as_me: failed program was:" >&5
11884 cat conftest.$ac_ext >&5
11885 ac_cv_lib_dir_opendir=no
11886 fi
11887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11888 LIBS=$ac_check_lib_save_LIBS
11889 fi
11890 echo "$as_me:11890: result: $ac_cv_lib_dir_opendir" >&5
11891 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11892 if test $ac_cv_lib_dir_opendir = yes; then
11893   LIBS="$LIBS -ldir"
11894 fi
11895
11896 else
11897   echo "$as_me:11897: checking for opendir in -lx" >&5
11898 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11899 if test "${ac_cv_lib_x_opendir+set}" = set; then
11900   echo $ECHO_N "(cached) $ECHO_C" >&6
11901 else
11902   ac_check_lib_save_LIBS=$LIBS
11903 LIBS="-lx  $LIBS"
11904 cat >conftest.$ac_ext <<_ACEOF
11905 #line 11905 "configure"
11906 #include "confdefs.h"
11907
11908 /* Override any gcc2 internal prototype to avoid an error.  */
11909 #ifdef __cplusplus
11910 extern "C"
11911 #endif
11912 /* We use char because int might match the return type of a gcc2
11913    builtin and then its argument prototype would still apply.  */
11914 char opendir ();
11915 int
11916 main ()
11917 {
11918 opendir ();
11919   ;
11920   return 0;
11921 }
11922 _ACEOF
11923 rm -f conftest.$ac_objext conftest$ac_exeext
11924 if { (eval echo "$as_me:11924: \"$ac_link\"") >&5
11925   (eval $ac_link) 2>&5
11926   ac_status=$?
11927   echo "$as_me:11927: \$? = $ac_status" >&5
11928   (exit $ac_status); } &&
11929          { ac_try='test -s conftest$ac_exeext'
11930   { (eval echo "$as_me:11930: \"$ac_try\"") >&5
11931   (eval $ac_try) 2>&5
11932   ac_status=$?
11933   echo "$as_me:11933: \$? = $ac_status" >&5
11934   (exit $ac_status); }; }; then
11935   ac_cv_lib_x_opendir=yes
11936 else
11937   echo "$as_me: failed program was:" >&5
11938 cat conftest.$ac_ext >&5
11939 ac_cv_lib_x_opendir=no
11940 fi
11941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11942 LIBS=$ac_check_lib_save_LIBS
11943 fi
11944 echo "$as_me:11944: result: $ac_cv_lib_x_opendir" >&5
11945 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11946 if test $ac_cv_lib_x_opendir = yes; then
11947   LIBS="$LIBS -lx"
11948 fi
11949
11950 fi
11951
11952 echo "$as_me:11952: checking whether time.h and sys/time.h may both be included" >&5
11953 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11954 if test "${ac_cv_header_time+set}" = set; then
11955   echo $ECHO_N "(cached) $ECHO_C" >&6
11956 else
11957   cat >conftest.$ac_ext <<_ACEOF
11958 #line 11958 "configure"
11959 #include "confdefs.h"
11960 #include <sys/types.h>
11961 #include <sys/time.h>
11962 #include <time.h>
11963
11964 int
11965 main ()
11966 {
11967 if ((struct tm *) 0)
11968 return 0;
11969   ;
11970   return 0;
11971 }
11972 _ACEOF
11973 rm -f conftest.$ac_objext
11974 if { (eval echo "$as_me:11974: \"$ac_compile\"") >&5
11975   (eval $ac_compile) 2>&5
11976   ac_status=$?
11977   echo "$as_me:11977: \$? = $ac_status" >&5
11978   (exit $ac_status); } &&
11979          { ac_try='test -s conftest.$ac_objext'
11980   { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981   (eval $ac_try) 2>&5
11982   ac_status=$?
11983   echo "$as_me:11983: \$? = $ac_status" >&5
11984   (exit $ac_status); }; }; then
11985   ac_cv_header_time=yes
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 cat conftest.$ac_ext >&5
11989 ac_cv_header_time=no
11990 fi
11991 rm -f conftest.$ac_objext conftest.$ac_ext
11992 fi
11993 echo "$as_me:11993: result: $ac_cv_header_time" >&5
11994 echo "${ECHO_T}$ac_cv_header_time" >&6
11995 if test $ac_cv_header_time = yes; then
11996
11997 cat >>confdefs.h <<\EOF
11998 #define TIME_WITH_SYS_TIME 1
11999 EOF
12000
12001 fi
12002
12003 echo "$as_me:12003: checking for regular-expression headers" >&5
12004 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12005 if test "${cf_cv_regex+set}" = set; then
12006   echo $ECHO_N "(cached) $ECHO_C" >&6
12007 else
12008
12009 cat >conftest.$ac_ext <<_ACEOF
12010 #line 12010 "configure"
12011 #include "confdefs.h"
12012 #include <sys/types.h>
12013 #include <regex.h>
12014 int
12015 main ()
12016 {
12017
12018         regex_t *p;
12019         int x = regcomp(p, "", 0);
12020         int y = regexec(p, "", 0, 0, 0);
12021         regfree(p);
12022
12023   ;
12024   return 0;
12025 }
12026 _ACEOF
12027 rm -f conftest.$ac_objext conftest$ac_exeext
12028 if { (eval echo "$as_me:12028: \"$ac_link\"") >&5
12029   (eval $ac_link) 2>&5
12030   ac_status=$?
12031   echo "$as_me:12031: \$? = $ac_status" >&5
12032   (exit $ac_status); } &&
12033          { ac_try='test -s conftest$ac_exeext'
12034   { (eval echo "$as_me:12034: \"$ac_try\"") >&5
12035   (eval $ac_try) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); }; }; then
12039   cf_cv_regex="regex.h"
12040 else
12041   echo "$as_me: failed program was:" >&5
12042 cat conftest.$ac_ext >&5
12043
12044         cat >conftest.$ac_ext <<_ACEOF
12045 #line 12045 "configure"
12046 #include "confdefs.h"
12047 #include <regexp.h>
12048 int
12049 main ()
12050 {
12051
12052                 char *p = compile("", "", "", 0);
12053                 int x = step("", "");
12054
12055   ;
12056   return 0;
12057 }
12058 _ACEOF
12059 rm -f conftest.$ac_objext conftest$ac_exeext
12060 if { (eval echo "$as_me:12060: \"$ac_link\"") >&5
12061   (eval $ac_link) 2>&5
12062   ac_status=$?
12063   echo "$as_me:12063: \$? = $ac_status" >&5
12064   (exit $ac_status); } &&
12065          { ac_try='test -s conftest$ac_exeext'
12066   { (eval echo "$as_me:12066: \"$ac_try\"") >&5
12067   (eval $ac_try) 2>&5
12068   ac_status=$?
12069   echo "$as_me:12069: \$? = $ac_status" >&5
12070   (exit $ac_status); }; }; then
12071   cf_cv_regex="regexp.h"
12072 else
12073   echo "$as_me: failed program was:" >&5
12074 cat conftest.$ac_ext >&5
12075
12076                 cf_save_LIBS="$LIBS"
12077                 LIBS="-lgen $LIBS"
12078                 cat >conftest.$ac_ext <<_ACEOF
12079 #line 12079 "configure"
12080 #include "confdefs.h"
12081 #include <regexpr.h>
12082 int
12083 main ()
12084 {
12085
12086                         char *p = compile("", "", "");
12087                         int x = step("", "");
12088
12089   ;
12090   return 0;
12091 }
12092 _ACEOF
12093 rm -f conftest.$ac_objext conftest$ac_exeext
12094 if { (eval echo "$as_me:12094: \"$ac_link\"") >&5
12095   (eval $ac_link) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit $ac_status); } &&
12099          { ac_try='test -s conftest$ac_exeext'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit $ac_status); }; }; then
12105   cf_cv_regex="regexpr.h"
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 cat conftest.$ac_ext >&5
12109 LIBS="$cf_save_LIBS"
12110 fi
12111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12112 fi
12113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12114 fi
12115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12116
12117 fi
12118
12119 echo "$as_me:12119: result: $cf_cv_regex" >&5
12120 echo "${ECHO_T}$cf_cv_regex" >&6
12121 case $cf_cv_regex in
12122         regex.h)   cat >>confdefs.h <<\EOF
12123 #define HAVE_REGEX_H_FUNCS 1
12124 EOF
12125  ;;
12126         regexp.h)  cat >>confdefs.h <<\EOF
12127 #define HAVE_REGEXP_H_FUNCS 1
12128 EOF
12129  ;;
12130         regexpr.h) cat >>confdefs.h <<\EOF
12131 #define HAVE_REGEXPR_H_FUNCS 1
12132 EOF
12133  ;;
12134 esac
12135
12136 for ac_header in \
12137 fcntl.h \
12138 getopt.h \
12139 limits.h \
12140 locale.h \
12141 poll.h \
12142 sys/bsdtypes.h \
12143 sys/ioctl.h \
12144 sys/param.h \
12145 sys/poll.h \
12146 sys/select.h \
12147 sys/time.h \
12148 sys/times.h \
12149 ttyent.h \
12150 unistd.h \
12151 wctype.h \
12152
12153 do
12154 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12155 echo "$as_me:12155: checking for $ac_header" >&5
12156 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12157 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12158   echo $ECHO_N "(cached) $ECHO_C" >&6
12159 else
12160   cat >conftest.$ac_ext <<_ACEOF
12161 #line 12161 "configure"
12162 #include "confdefs.h"
12163 #include <$ac_header>
12164 _ACEOF
12165 if { (eval echo "$as_me:12165: \"$ac_cpp conftest.$ac_ext\"") >&5
12166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12167   ac_status=$?
12168   egrep -v '^ *\+' conftest.er1 >conftest.err
12169   rm -f conftest.er1
12170   cat conftest.err >&5
12171   echo "$as_me:12171: \$? = $ac_status" >&5
12172   (exit $ac_status); } >/dev/null; then
12173   if test -s conftest.err; then
12174     ac_cpp_err=$ac_c_preproc_warn_flag
12175   else
12176     ac_cpp_err=
12177   fi
12178 else
12179   ac_cpp_err=yes
12180 fi
12181 if test -z "$ac_cpp_err"; then
12182   eval "$as_ac_Header=yes"
12183 else
12184   echo "$as_me: failed program was:" >&5
12185   cat conftest.$ac_ext >&5
12186   eval "$as_ac_Header=no"
12187 fi
12188 rm -f conftest.err conftest.$ac_ext
12189 fi
12190 echo "$as_me:12190: result: `eval echo '${'$as_ac_Header'}'`" >&5
12191 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12192 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12193   cat >>confdefs.h <<EOF
12194 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12195 EOF
12196
12197 fi
12198 done
12199
12200 # check for ISC (this may also define _POSIX_SOURCE)
12201 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12202 if test "$ISC" = yes ; then
12203
12204 echo "$as_me:12204: checking for main in -lcposix" >&5
12205 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12206 if test "${ac_cv_lib_cposix_main+set}" = set; then
12207   echo $ECHO_N "(cached) $ECHO_C" >&6
12208 else
12209   ac_check_lib_save_LIBS=$LIBS
12210 LIBS="-lcposix  $LIBS"
12211 cat >conftest.$ac_ext <<_ACEOF
12212 #line 12212 "configure"
12213 #include "confdefs.h"
12214
12215 int
12216 main ()
12217 {
12218 main ();
12219   ;
12220   return 0;
12221 }
12222 _ACEOF
12223 rm -f conftest.$ac_objext conftest$ac_exeext
12224 if { (eval echo "$as_me:12224: \"$ac_link\"") >&5
12225   (eval $ac_link) 2>&5
12226   ac_status=$?
12227   echo "$as_me:12227: \$? = $ac_status" >&5
12228   (exit $ac_status); } &&
12229          { ac_try='test -s conftest$ac_exeext'
12230   { (eval echo "$as_me:12230: \"$ac_try\"") >&5
12231   (eval $ac_try) 2>&5
12232   ac_status=$?
12233   echo "$as_me:12233: \$? = $ac_status" >&5
12234   (exit $ac_status); }; }; then
12235   ac_cv_lib_cposix_main=yes
12236 else
12237   echo "$as_me: failed program was:" >&5
12238 cat conftest.$ac_ext >&5
12239 ac_cv_lib_cposix_main=no
12240 fi
12241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12242 LIBS=$ac_check_lib_save_LIBS
12243 fi
12244 echo "$as_me:12244: result: $ac_cv_lib_cposix_main" >&5
12245 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12246 if test $ac_cv_lib_cposix_main = yes; then
12247   cat >>confdefs.h <<EOF
12248 #define HAVE_LIBCPOSIX 1
12249 EOF
12250
12251   LIBS="-lcposix $LIBS"
12252
12253 fi
12254
12255         echo "$as_me:12255: checking for bzero in -linet" >&5
12256 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12257 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12258   echo $ECHO_N "(cached) $ECHO_C" >&6
12259 else
12260   ac_check_lib_save_LIBS=$LIBS
12261 LIBS="-linet  $LIBS"
12262 cat >conftest.$ac_ext <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 /* Override any gcc2 internal prototype to avoid an error.  */
12267 #ifdef __cplusplus
12268 extern "C"
12269 #endif
12270 /* We use char because int might match the return type of a gcc2
12271    builtin and then its argument prototype would still apply.  */
12272 char bzero ();
12273 int
12274 main ()
12275 {
12276 bzero ();
12277   ;
12278   return 0;
12279 }
12280 _ACEOF
12281 rm -f conftest.$ac_objext conftest$ac_exeext
12282 if { (eval echo "$as_me:12282: \"$ac_link\"") >&5
12283   (eval $ac_link) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); } &&
12287          { ac_try='test -s conftest$ac_exeext'
12288   { (eval echo "$as_me:12288: \"$ac_try\"") >&5
12289   (eval $ac_try) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); }; }; then
12293   ac_cv_lib_inet_bzero=yes
12294 else
12295   echo "$as_me: failed program was:" >&5
12296 cat conftest.$ac_ext >&5
12297 ac_cv_lib_inet_bzero=no
12298 fi
12299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12300 LIBS=$ac_check_lib_save_LIBS
12301 fi
12302 echo "$as_me:12302: result: $ac_cv_lib_inet_bzero" >&5
12303 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12304 if test $ac_cv_lib_inet_bzero = yes; then
12305   LIBS="$LIBS -linet"
12306 fi
12307 fi
12308
12309 echo "$as_me:12309: checking if sys/time.h works with sys/select.h" >&5
12310 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12311 if test "${cf_cv_sys_time_select+set}" = set; then
12312   echo $ECHO_N "(cached) $ECHO_C" >&6
12313 else
12314
12315 cat >conftest.$ac_ext <<_ACEOF
12316 #line 12316 "configure"
12317 #include "confdefs.h"
12318
12319 #include <sys/types.h>
12320 #ifdef HAVE_SYS_TIME_H
12321 #include <sys/time.h>
12322 #endif
12323 #ifdef HAVE_SYS_SELECT_H
12324 #include <sys/select.h>
12325 #endif
12326
12327 int
12328 main ()
12329 {
12330
12331   ;
12332   return 0;
12333 }
12334 _ACEOF
12335 rm -f conftest.$ac_objext
12336 if { (eval echo "$as_me:12336: \"$ac_compile\"") >&5
12337   (eval $ac_compile) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); } &&
12341          { ac_try='test -s conftest.$ac_objext'
12342   { (eval echo "$as_me:12342: \"$ac_try\"") >&5
12343   (eval $ac_try) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); }; }; then
12347   cf_cv_sys_time_select=yes
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 cat conftest.$ac_ext >&5
12351 cf_cv_sys_time_select=no
12352 fi
12353 rm -f conftest.$ac_objext conftest.$ac_ext
12354
12355 fi
12356
12357 echo "$as_me:12357: result: $cf_cv_sys_time_select" >&5
12358 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12359 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12360 #define HAVE_SYS_TIME_SELECT 1
12361 EOF
12362
12363 ###     checks for compiler characteristics
12364 ac_ext=c
12365 ac_cpp='$CPP $CPPFLAGS'
12366 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12367 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12368 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12369 ac_main_return=return
12370
12371 echo "$as_me:12371: checking for $CC option to accept ANSI C" >&5
12372 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12373 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12374   echo $ECHO_N "(cached) $ECHO_C" >&6
12375 else
12376   ac_cv_prog_cc_stdc=no
12377 ac_save_CC=$CC
12378 cat >conftest.$ac_ext <<_ACEOF
12379 #line 12379 "configure"
12380 #include "confdefs.h"
12381 #include <stdarg.h>
12382 #include <stdio.h>
12383 #include <sys/types.h>
12384 #include <sys/stat.h>
12385 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12386 struct buf { int x; };
12387 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12388 static char *e (p, i)
12389      char **p;
12390      int i;
12391 {
12392   return p[i];
12393 }
12394 static char *f (char * (*g) (char **, int), char **p, ...)
12395 {
12396   char *s;
12397   va_list v;
12398   va_start (v,p);
12399   s = g (p, va_arg (v,int));
12400   va_end (v);
12401   return s;
12402 }
12403 int test (int i, double x);
12404 struct s1 {int (*f) (int a);};
12405 struct s2 {int (*f) (double a);};
12406 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12407 int argc;
12408 char **argv;
12409 int
12410 main ()
12411 {
12412 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 # Don't try gcc -ansi; that turns off useful extensions and
12418 # breaks some systems' header files.
12419 # AIX                   -qlanglvl=ansi
12420 # Ultrix and OSF/1      -std1
12421 # HP-UX 10.20 and later -Ae
12422 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12423 # SVR4                  -Xc -D__EXTENSIONS__
12424 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12425 do
12426   CC="$ac_save_CC $ac_arg"
12427   rm -f conftest.$ac_objext
12428 if { (eval echo "$as_me:12428: \"$ac_compile\"") >&5
12429   (eval $ac_compile) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit $ac_status); } &&
12433          { ac_try='test -s conftest.$ac_objext'
12434   { (eval echo "$as_me:12434: \"$ac_try\"") >&5
12435   (eval $ac_try) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit $ac_status); }; }; then
12439   ac_cv_prog_cc_stdc=$ac_arg
12440 break
12441 else
12442   echo "$as_me: failed program was:" >&5
12443 cat conftest.$ac_ext >&5
12444 fi
12445 rm -f conftest.$ac_objext
12446 done
12447 rm -f conftest.$ac_ext conftest.$ac_objext
12448 CC=$ac_save_CC
12449
12450 fi
12451
12452 case "x$ac_cv_prog_cc_stdc" in
12453   x|xno)
12454     echo "$as_me:12454: result: none needed" >&5
12455 echo "${ECHO_T}none needed" >&6 ;;
12456   *)
12457     echo "$as_me:12457: result: $ac_cv_prog_cc_stdc" >&5
12458 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12459     CC="$CC $ac_cv_prog_cc_stdc" ;;
12460 esac
12461
12462 echo "$as_me:12462: checking for an ANSI C-conforming const" >&5
12463 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12464 if test "${ac_cv_c_const+set}" = set; then
12465   echo $ECHO_N "(cached) $ECHO_C" >&6
12466 else
12467   cat >conftest.$ac_ext <<_ACEOF
12468 #line 12468 "configure"
12469 #include "confdefs.h"
12470
12471 int
12472 main ()
12473 {
12474 /* FIXME: Include the comments suggested by Paul. */
12475 #ifndef __cplusplus
12476   /* Ultrix mips cc rejects this.  */
12477   typedef int charset[2];
12478   const charset x;
12479   /* SunOS 4.1.1 cc rejects this.  */
12480   char const *const *ccp;
12481   char **p;
12482   /* NEC SVR4.0.2 mips cc rejects this.  */
12483   struct point {int x, y;};
12484   static struct point const zero = {0,0};
12485   /* AIX XL C 1.02.0.0 rejects this.
12486      It does not let you subtract one const X* pointer from another in
12487      an arm of an if-expression whose if-part is not a constant
12488      expression */
12489   const char *g = "string";
12490   ccp = &g + (g ? g-g : 0);
12491   /* HPUX 7.0 cc rejects these. */
12492   ++ccp;
12493   p = (char**) ccp;
12494   ccp = (char const *const *) p;
12495   { /* SCO 3.2v4 cc rejects this.  */
12496     char *t;
12497     char const *s = 0 ? (char *) 0 : (char const *) 0;
12498
12499     *t++ = 0;
12500   }
12501   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12502     int x[] = {25, 17};
12503     const int *foo = &x[0];
12504     ++foo;
12505   }
12506   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12507     typedef const int *iptr;
12508     iptr p = 0;
12509     ++p;
12510   }
12511   { /* AIX XL C 1.02.0.0 rejects this saying
12512        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12513     struct s { int j; const int *ap[3]; };
12514     struct s *b; b->j = 5;
12515   }
12516   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12517     const int foo = 10;
12518   }
12519 #endif
12520
12521   ;
12522   return 0;
12523 }
12524 _ACEOF
12525 rm -f conftest.$ac_objext
12526 if { (eval echo "$as_me:12526: \"$ac_compile\"") >&5
12527   (eval $ac_compile) 2>&5
12528   ac_status=$?
12529   echo "$as_me:12529: \$? = $ac_status" >&5
12530   (exit $ac_status); } &&
12531          { ac_try='test -s conftest.$ac_objext'
12532   { (eval echo "$as_me:12532: \"$ac_try\"") >&5
12533   (eval $ac_try) 2>&5
12534   ac_status=$?
12535   echo "$as_me:12535: \$? = $ac_status" >&5
12536   (exit $ac_status); }; }; then
12537   ac_cv_c_const=yes
12538 else
12539   echo "$as_me: failed program was:" >&5
12540 cat conftest.$ac_ext >&5
12541 ac_cv_c_const=no
12542 fi
12543 rm -f conftest.$ac_objext conftest.$ac_ext
12544 fi
12545 echo "$as_me:12545: result: $ac_cv_c_const" >&5
12546 echo "${ECHO_T}$ac_cv_c_const" >&6
12547 if test $ac_cv_c_const = no; then
12548
12549 cat >>confdefs.h <<\EOF
12550 #define const
12551 EOF
12552
12553 fi
12554
12555 echo "$as_me:12555: checking for inline" >&5
12556 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12557 if test "${ac_cv_c_inline+set}" = set; then
12558   echo $ECHO_N "(cached) $ECHO_C" >&6
12559 else
12560   ac_cv_c_inline=no
12561 for ac_kw in inline __inline__ __inline; do
12562   cat >conftest.$ac_ext <<_ACEOF
12563 #line 12563 "configure"
12564 #include "confdefs.h"
12565 #ifndef __cplusplus
12566 static $ac_kw int static_foo () {return 0; }
12567 $ac_kw int foo () {return 0; }
12568 #endif
12569
12570 _ACEOF
12571 rm -f conftest.$ac_objext
12572 if { (eval echo "$as_me:12572: \"$ac_compile\"") >&5
12573   (eval $ac_compile) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest.$ac_objext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   ac_cv_c_inline=$ac_kw; break
12584 else
12585   echo "$as_me: failed program was:" >&5
12586 cat conftest.$ac_ext >&5
12587 fi
12588 rm -f conftest.$ac_objext conftest.$ac_ext
12589 done
12590
12591 fi
12592 echo "$as_me:12592: result: $ac_cv_c_inline" >&5
12593 echo "${ECHO_T}$ac_cv_c_inline" >&6
12594 case $ac_cv_c_inline in
12595   inline | yes) ;;
12596   no)
12597 cat >>confdefs.h <<\EOF
12598 #define inline
12599 EOF
12600  ;;
12601   *)  cat >>confdefs.h <<EOF
12602 #define inline $ac_cv_c_inline
12603 EOF
12604  ;;
12605 esac
12606
12607 NCURSES_INLINE=
12608 if test "$ac_cv_c_inline" != no ; then
12609   NCURSES_INLINE=inline
12610   if test "$INTEL_COMPILER" = yes
12611   then
12612     :
12613   elif test "$GCC" = yes
12614   then
12615     echo "$as_me:12615: checking if gcc supports options to tune inlining" >&5
12616 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12617 if test "${cf_cv_gcc_inline+set}" = set; then
12618   echo $ECHO_N "(cached) $ECHO_C" >&6
12619 else
12620
12621       cf_save_CFLAGS=$CFLAGS
12622       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12623       cat >conftest.$ac_ext <<_ACEOF
12624 #line 12624 "configure"
12625 #include "confdefs.h"
12626 inline int foo(void) { return 1; }
12627 int
12628 main ()
12629 {
12630 ${cf_cv_main_return:-return} foo()
12631   ;
12632   return 0;
12633 }
12634 _ACEOF
12635 rm -f conftest.$ac_objext
12636 if { (eval echo "$as_me:12636: \"$ac_compile\"") >&5
12637   (eval $ac_compile) 2>&5
12638   ac_status=$?
12639   echo "$as_me:12639: \$? = $ac_status" >&5
12640   (exit $ac_status); } &&
12641          { ac_try='test -s conftest.$ac_objext'
12642   { (eval echo "$as_me:12642: \"$ac_try\"") >&5
12643   (eval $ac_try) 2>&5
12644   ac_status=$?
12645   echo "$as_me:12645: \$? = $ac_status" >&5
12646   (exit $ac_status); }; }; then
12647   cf_cv_gcc_inline=yes
12648 else
12649   echo "$as_me: failed program was:" >&5
12650 cat conftest.$ac_ext >&5
12651 cf_cv_gcc_inline=no
12652 fi
12653 rm -f conftest.$ac_objext conftest.$ac_ext
12654       CFLAGS=$cf_save_CFLAGS
12655
12656 fi
12657 echo "$as_me:12657: result: $cf_cv_gcc_inline" >&5
12658 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12659     if test "$cf_cv_gcc_inline" = yes ; then
12660
12661 cf_fix_cppflags=no
12662 cf_new_cflags=
12663 cf_new_cppflags=
12664 cf_new_extra_cppflags=
12665
12666 for cf_add_cflags in --param max-inline-insns-single=1200
12667 do
12668 case $cf_fix_cppflags in
12669 no)
12670         case $cf_add_cflags in #(vi
12671         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12672                 case $cf_add_cflags in
12673                 -D*)
12674                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12675
12676                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12677                         && test -z "${cf_tst_cflags}" \
12678                         && cf_fix_cppflags=yes
12679
12680                         if test $cf_fix_cppflags = yes ; then
12681                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12682                                 continue
12683                         elif test "${cf_tst_cflags}" = "\"'" ; then
12684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12685                                 continue
12686                         fi
12687                         ;;
12688                 esac
12689                 case "$CPPFLAGS" in
12690                 *$cf_add_cflags) #(vi
12691                         ;;
12692                 *) #(vi
12693                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12694                         ;;
12695                 esac
12696                 ;;
12697         *)
12698                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12699                 ;;
12700         esac
12701         ;;
12702 yes)
12703         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12704
12705         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12706
12707         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12708         && test -z "${cf_tst_cflags}" \
12709         && cf_fix_cppflags=no
12710         ;;
12711 esac
12712 done
12713
12714 if test -n "$cf_new_cflags" ; then
12715
12716         CFLAGS="$CFLAGS $cf_new_cflags"
12717 fi
12718
12719 if test -n "$cf_new_cppflags" ; then
12720
12721         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12722 fi
12723
12724 if test -n "$cf_new_extra_cppflags" ; then
12725
12726         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12727 fi
12728
12729     fi
12730   fi
12731 fi
12732
12733 echo "$as_me:12733: checking for signal global datatype" >&5
12734 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12735 if test "${cf_cv_sig_atomic_t+set}" = set; then
12736   echo $ECHO_N "(cached) $ECHO_C" >&6
12737 else
12738
12739         for cf_type in \
12740                 "volatile sig_atomic_t" \
12741                 "sig_atomic_t" \
12742                 "int"
12743         do
12744         cat >conftest.$ac_ext <<_ACEOF
12745 #line 12745 "configure"
12746 #include "confdefs.h"
12747
12748 #include <sys/types.h>
12749 #include <signal.h>
12750 #include <stdio.h>
12751
12752 extern $cf_type x;
12753 $cf_type x;
12754 static void handler(int sig)
12755 {
12756         x = 5;
12757 }
12758 int
12759 main ()
12760 {
12761 signal(SIGINT, handler);
12762                  x = 1
12763   ;
12764   return 0;
12765 }
12766 _ACEOF
12767 rm -f conftest.$ac_objext
12768 if { (eval echo "$as_me:12768: \"$ac_compile\"") >&5
12769   (eval $ac_compile) 2>&5
12770   ac_status=$?
12771   echo "$as_me:12771: \$? = $ac_status" >&5
12772   (exit $ac_status); } &&
12773          { ac_try='test -s conftest.$ac_objext'
12774   { (eval echo "$as_me:12774: \"$ac_try\"") >&5
12775   (eval $ac_try) 2>&5
12776   ac_status=$?
12777   echo "$as_me:12777: \$? = $ac_status" >&5
12778   (exit $ac_status); }; }; then
12779   cf_cv_sig_atomic_t=$cf_type
12780 else
12781   echo "$as_me: failed program was:" >&5
12782 cat conftest.$ac_ext >&5
12783 cf_cv_sig_atomic_t=no
12784 fi
12785 rm -f conftest.$ac_objext conftest.$ac_ext
12786                 test "$cf_cv_sig_atomic_t" != no && break
12787         done
12788
12789 fi
12790
12791 echo "$as_me:12791: result: $cf_cv_sig_atomic_t" >&5
12792 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12793 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12794 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12795 EOF
12796
12797 if test $NCURSES_CHTYPE = auto ; then
12798
12799 echo "$as_me:12799: checking for type of chtype" >&5
12800 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12801 if test "${cf_cv_typeof_chtype+set}" = set; then
12802   echo $ECHO_N "(cached) $ECHO_C" >&6
12803 else
12804
12805                 if test "$cross_compiling" = yes; then
12806   cf_cv_typeof_chtype=long
12807 else
12808   cat >conftest.$ac_ext <<_ACEOF
12809 #line 12809 "configure"
12810 #include "confdefs.h"
12811
12812 #define WANT_BITS 31
12813 #include <stdio.h>
12814 int main()
12815 {
12816         FILE *fp = fopen("cf_test.out", "w");
12817         if (fp != 0) {
12818                 char *result = "long";
12819                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12820                         int n;
12821                         unsigned int x, y;
12822                         for (n = 0; n < WANT_BITS; n++) {
12823                                 x = (1 << n);
12824                                 y = (x >> n);
12825                                 if (y != 1 || x == 0) {
12826                                         x = 0;
12827                                         break;
12828                                 }
12829                         }
12830                         /*
12831                          * If x is nonzero, an int is big enough for the bits
12832                          * that we want.
12833                          */
12834                         result = (x != 0) ? "int" : "long";
12835                 }
12836                 fputs(result, fp);
12837                 fclose(fp);
12838         }
12839         ${cf_cv_main_return:-return}(0);
12840 }
12841
12842 _ACEOF
12843 rm -f conftest$ac_exeext
12844 if { (eval echo "$as_me:12844: \"$ac_link\"") >&5
12845   (eval $ac_link) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12849   { (eval echo "$as_me:12849: \"$ac_try\"") >&5
12850   (eval $ac_try) 2>&5
12851   ac_status=$?
12852   echo "$as_me:12852: \$? = $ac_status" >&5
12853   (exit $ac_status); }; }; then
12854   cf_cv_typeof_chtype=`cat cf_test.out`
12855 else
12856   echo "$as_me: program exited with status $ac_status" >&5
12857 echo "$as_me: failed program was:" >&5
12858 cat conftest.$ac_ext >&5
12859 cf_cv_typeof_chtype=long
12860 fi
12861 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12862 fi
12863                 rm -f cf_test.out
12864
12865 fi
12866
12867 echo "$as_me:12867: result: $cf_cv_typeof_chtype" >&5
12868 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12869
12870 cat >>confdefs.h <<EOF
12871 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12872 EOF
12873
12874 else
12875         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12876 fi
12877 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12878
12879 echo "$as_me:12879: checking if unsigned literals are legal" >&5
12880 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12881 if test "${cf_cv_unsigned_literals+set}" = set; then
12882   echo $ECHO_N "(cached) $ECHO_C" >&6
12883 else
12884
12885         cat >conftest.$ac_ext <<_ACEOF
12886 #line 12886 "configure"
12887 #include "confdefs.h"
12888
12889 int
12890 main ()
12891 {
12892 long x = 1L + 1UL + 1U + 1
12893   ;
12894   return 0;
12895 }
12896 _ACEOF
12897 rm -f conftest.$ac_objext
12898 if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
12899   (eval $ac_compile) 2>&5
12900   ac_status=$?
12901   echo "$as_me:12901: \$? = $ac_status" >&5
12902   (exit $ac_status); } &&
12903          { ac_try='test -s conftest.$ac_objext'
12904   { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905   (eval $ac_try) 2>&5
12906   ac_status=$?
12907   echo "$as_me:12907: \$? = $ac_status" >&5
12908   (exit $ac_status); }; }; then
12909   cf_cv_unsigned_literals=yes
12910 else
12911   echo "$as_me: failed program was:" >&5
12912 cat conftest.$ac_ext >&5
12913 cf_cv_unsigned_literals=no
12914 fi
12915 rm -f conftest.$ac_objext conftest.$ac_ext
12916
12917 fi
12918
12919 echo "$as_me:12919: result: $cf_cv_unsigned_literals" >&5
12920 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12921
12922 cf_cv_1UL="1"
12923 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12924 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12925
12926 if test $NCURSES_MMASK_T = auto ; then
12927         cf_cv_typeof_mmask_t=long
12928 else
12929         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12930 fi
12931 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12932
12933 ###     Checks for external-data
12934
12935 echo "$as_me:12935: checking if external errno is declared" >&5
12936 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12937 if test "${cf_cv_dcl_errno+set}" = set; then
12938   echo $ECHO_N "(cached) $ECHO_C" >&6
12939 else
12940
12941     cat >conftest.$ac_ext <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944
12945 #ifdef HAVE_STDLIB_H
12946 #include <stdlib.h>
12947 #endif
12948 #include <stdio.h>
12949 #include <sys/types.h>
12950 #include <errno.h>
12951 int
12952 main ()
12953 {
12954 int x = (int) errno
12955   ;
12956   return 0;
12957 }
12958 _ACEOF
12959 rm -f conftest.$ac_objext
12960 if { (eval echo "$as_me:12960: \"$ac_compile\"") >&5
12961   (eval $ac_compile) 2>&5
12962   ac_status=$?
12963   echo "$as_me:12963: \$? = $ac_status" >&5
12964   (exit $ac_status); } &&
12965          { ac_try='test -s conftest.$ac_objext'
12966   { (eval echo "$as_me:12966: \"$ac_try\"") >&5
12967   (eval $ac_try) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit $ac_status); }; }; then
12971   cf_cv_dcl_errno=yes
12972 else
12973   echo "$as_me: failed program was:" >&5
12974 cat conftest.$ac_ext >&5
12975 cf_cv_dcl_errno=no
12976 fi
12977 rm -f conftest.$ac_objext conftest.$ac_ext
12978
12979 fi
12980 echo "$as_me:12980: result: $cf_cv_dcl_errno" >&5
12981 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12982
12983 if test "$cf_cv_dcl_errno" = no ; then
12984
12985 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12986
12987     cat >>confdefs.h <<EOF
12988 #define $cf_result 1
12989 EOF
12990
12991 fi
12992
12993 # It's possible (for near-UNIX clones) that the data doesn't exist
12994
12995 echo "$as_me:12995: checking if external errno exists" >&5
12996 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12997 if test "${cf_cv_have_errno+set}" = set; then
12998   echo $ECHO_N "(cached) $ECHO_C" >&6
12999 else
13000
13001     cat >conftest.$ac_ext <<_ACEOF
13002 #line 13002 "configure"
13003 #include "confdefs.h"
13004
13005 #undef errno
13006 extern int errno;
13007
13008 int
13009 main ()
13010 {
13011 errno = 2
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 rm -f conftest.$ac_objext conftest$ac_exeext
13017 if { (eval echo "$as_me:13017: \"$ac_link\"") >&5
13018   (eval $ac_link) 2>&5
13019   ac_status=$?
13020   echo "$as_me:13020: \$? = $ac_status" >&5
13021   (exit $ac_status); } &&
13022          { ac_try='test -s conftest$ac_exeext'
13023   { (eval echo "$as_me:13023: \"$ac_try\"") >&5
13024   (eval $ac_try) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit $ac_status); }; }; then
13028   cf_cv_have_errno=yes
13029 else
13030   echo "$as_me: failed program was:" >&5
13031 cat conftest.$ac_ext >&5
13032 cf_cv_have_errno=no
13033 fi
13034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13035
13036 fi
13037 echo "$as_me:13037: result: $cf_cv_have_errno" >&5
13038 echo "${ECHO_T}$cf_cv_have_errno" >&6
13039
13040 if test "$cf_cv_have_errno" = yes ; then
13041
13042 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13043
13044     cat >>confdefs.h <<EOF
13045 #define $cf_result 1
13046 EOF
13047
13048 fi
13049
13050 echo "$as_me:13050: checking if data-only library module links" >&5
13051 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13052 if test "${cf_cv_link_dataonly+set}" = set; then
13053   echo $ECHO_N "(cached) $ECHO_C" >&6
13054 else
13055
13056         rm -f conftest.a
13057         cat >conftest.$ac_ext <<EOF
13058 #line 13058 "configure"
13059 int     testdata[3] = { 123, 456, 789 };
13060 EOF
13061         if { (eval echo "$as_me:13061: \"$ac_compile\"") >&5
13062   (eval $ac_compile) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); } ; then
13066                 mv conftest.o data.o && \
13067                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13068         fi
13069         rm -f conftest.$ac_ext data.o
13070         cat >conftest.$ac_ext <<EOF
13071 #line 13071 "configure"
13072 int     testfunc()
13073 {
13074 #if defined(NeXT)
13075         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13076 #else
13077         extern int testdata[3];
13078         return testdata[0] == 123
13079            &&  testdata[1] == 456
13080            &&  testdata[2] == 789;
13081 #endif
13082 }
13083 EOF
13084         if { (eval echo "$as_me:13084: \"$ac_compile\"") >&5
13085   (eval $ac_compile) 2>&5
13086   ac_status=$?
13087   echo "$as_me:13087: \$? = $ac_status" >&5
13088   (exit $ac_status); }; then
13089                 mv conftest.o func.o && \
13090                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13091         fi
13092         rm -f conftest.$ac_ext func.o
13093         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13094         cf_saveLIBS="$LIBS"
13095         LIBS="conftest.a $LIBS"
13096         if test "$cross_compiling" = yes; then
13097   cf_cv_link_dataonly=unknown
13098 else
13099   cat >conftest.$ac_ext <<_ACEOF
13100 #line 13100 "configure"
13101 #include "confdefs.h"
13102
13103         int main()
13104         {
13105                 extern int testfunc();
13106                 ${cf_cv_main_return:-return} (!testfunc());
13107         }
13108
13109 _ACEOF
13110 rm -f conftest$ac_exeext
13111 if { (eval echo "$as_me:13111: \"$ac_link\"") >&5
13112   (eval $ac_link) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13116   { (eval echo "$as_me:13116: \"$ac_try\"") >&5
13117   (eval $ac_try) 2>&5
13118   ac_status=$?
13119   echo "$as_me:13119: \$? = $ac_status" >&5
13120   (exit $ac_status); }; }; then
13121   cf_cv_link_dataonly=yes
13122 else
13123   echo "$as_me: program exited with status $ac_status" >&5
13124 echo "$as_me: failed program was:" >&5
13125 cat conftest.$ac_ext >&5
13126 cf_cv_link_dataonly=no
13127 fi
13128 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13129 fi
13130         LIBS="$cf_saveLIBS"
13131
13132 fi
13133
13134 echo "$as_me:13134: result: $cf_cv_link_dataonly" >&5
13135 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13136
13137 if test "$cf_cv_link_dataonly" = no ; then
13138         cat >>confdefs.h <<\EOF
13139 #define BROKEN_LINKER 1
13140 EOF
13141
13142         BROKEN_LINKER=1
13143 fi
13144
13145 ###     Checks for library functions.
13146
13147 for ac_func in \
13148 getcwd \
13149 getegid \
13150 geteuid \
13151 getttynam \
13152 issetugid \
13153 poll \
13154 remove \
13155 select \
13156 setbuf \
13157 setbuffer \
13158 setvbuf \
13159 sigaction \
13160 sigvec \
13161 strdup \
13162 strstr \
13163 tcgetpgrp \
13164 times \
13165 vsnprintf \
13166
13167 do
13168 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13169 echo "$as_me:13169: checking for $ac_func" >&5
13170 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13171 if eval "test \"\${$as_ac_var+set}\" = set"; then
13172   echo $ECHO_N "(cached) $ECHO_C" >&6
13173 else
13174   cat >conftest.$ac_ext <<_ACEOF
13175 #line 13175 "configure"
13176 #include "confdefs.h"
13177 /* System header to define __stub macros and hopefully few prototypes,
13178     which can conflict with char $ac_func (); below.  */
13179 #include <assert.h>
13180 /* Override any gcc2 internal prototype to avoid an error.  */
13181 #ifdef __cplusplus
13182 extern "C"
13183 #endif
13184 /* We use char because int might match the return type of a gcc2
13185    builtin and then its argument prototype would still apply.  */
13186 char $ac_func ();
13187 char (*f) ();
13188
13189 int
13190 main ()
13191 {
13192 /* The GNU C library defines this for functions which it implements
13193     to always fail with ENOSYS.  Some functions are actually named
13194     something starting with __ and the normal name is an alias.  */
13195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13196 choke me
13197 #else
13198 f = $ac_func;
13199 #endif
13200
13201   ;
13202   return 0;
13203 }
13204 _ACEOF
13205 rm -f conftest.$ac_objext conftest$ac_exeext
13206 if { (eval echo "$as_me:13206: \"$ac_link\"") >&5
13207   (eval $ac_link) 2>&5
13208   ac_status=$?
13209   echo "$as_me:13209: \$? = $ac_status" >&5
13210   (exit $ac_status); } &&
13211          { ac_try='test -s conftest$ac_exeext'
13212   { (eval echo "$as_me:13212: \"$ac_try\"") >&5
13213   (eval $ac_try) 2>&5
13214   ac_status=$?
13215   echo "$as_me:13215: \$? = $ac_status" >&5
13216   (exit $ac_status); }; }; then
13217   eval "$as_ac_var=yes"
13218 else
13219   echo "$as_me: failed program was:" >&5
13220 cat conftest.$ac_ext >&5
13221 eval "$as_ac_var=no"
13222 fi
13223 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13224 fi
13225 echo "$as_me:13225: result: `eval echo '${'$as_ac_var'}'`" >&5
13226 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13227 if test `eval echo '${'$as_ac_var'}'` = yes; then
13228   cat >>confdefs.h <<EOF
13229 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13230 EOF
13231
13232 fi
13233 done
13234
13235 if test "$with_getcap" = "yes" ; then
13236
13237 echo "$as_me:13237: checking for terminal-capability database functions" >&5
13238 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13239 if test "${cf_cv_cgetent+set}" = set; then
13240   echo $ECHO_N "(cached) $ECHO_C" >&6
13241 else
13242
13243 cat >conftest.$ac_ext <<_ACEOF
13244 #line 13244 "configure"
13245 #include "confdefs.h"
13246
13247 #include <stdlib.h>
13248 int
13249 main ()
13250 {
13251
13252         char temp[128];
13253         char *buf = temp;
13254         char *db_array = temp;
13255         cgetent(&buf, /* int *, */ &db_array, "vt100");
13256         cgetcap(buf, "tc", '=');
13257         cgetmatch(buf, "tc");
13258
13259   ;
13260   return 0;
13261 }
13262 _ACEOF
13263 rm -f conftest.$ac_objext conftest$ac_exeext
13264 if { (eval echo "$as_me:13264: \"$ac_link\"") >&5
13265   (eval $ac_link) 2>&5
13266   ac_status=$?
13267   echo "$as_me:13267: \$? = $ac_status" >&5
13268   (exit $ac_status); } &&
13269          { ac_try='test -s conftest$ac_exeext'
13270   { (eval echo "$as_me:13270: \"$ac_try\"") >&5
13271   (eval $ac_try) 2>&5
13272   ac_status=$?
13273   echo "$as_me:13273: \$? = $ac_status" >&5
13274   (exit $ac_status); }; }; then
13275   cf_cv_cgetent=yes
13276 else
13277   echo "$as_me: failed program was:" >&5
13278 cat conftest.$ac_ext >&5
13279 cf_cv_cgetent=no
13280 fi
13281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13282
13283 fi
13284
13285 echo "$as_me:13285: result: $cf_cv_cgetent" >&5
13286 echo "${ECHO_T}$cf_cv_cgetent" >&6
13287 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13288 #define HAVE_BSD_CGETENT 1
13289 EOF
13290
13291 fi
13292
13293 echo "$as_me:13293: checking for isascii" >&5
13294 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13295 if test "${cf_cv_have_isascii+set}" = set; then
13296   echo $ECHO_N "(cached) $ECHO_C" >&6
13297 else
13298
13299         cat >conftest.$ac_ext <<_ACEOF
13300 #line 13300 "configure"
13301 #include "confdefs.h"
13302 #include <ctype.h>
13303 int
13304 main ()
13305 {
13306 int x = isascii(' ')
13307   ;
13308   return 0;
13309 }
13310 _ACEOF
13311 rm -f conftest.$ac_objext conftest$ac_exeext
13312 if { (eval echo "$as_me:13312: \"$ac_link\"") >&5
13313   (eval $ac_link) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); } &&
13317          { ac_try='test -s conftest$ac_exeext'
13318   { (eval echo "$as_me:13318: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   cf_cv_have_isascii=yes
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 cat conftest.$ac_ext >&5
13327 cf_cv_have_isascii=no
13328 fi
13329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13330
13331 fi
13332 echo "$as_me:13332: result: $cf_cv_have_isascii" >&5
13333 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13334 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13335 #define HAVE_ISASCII 1
13336 EOF
13337
13338 if test "$ac_cv_func_sigaction" = yes; then
13339 echo "$as_me:13339: checking whether sigaction needs _POSIX_SOURCE" >&5
13340 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13341 cat >conftest.$ac_ext <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13344
13345 #include <sys/types.h>
13346 #include <signal.h>
13347 int
13348 main ()
13349 {
13350 struct sigaction act
13351   ;
13352   return 0;
13353 }
13354 _ACEOF
13355 rm -f conftest.$ac_objext
13356 if { (eval echo "$as_me:13356: \"$ac_compile\"") >&5
13357   (eval $ac_compile) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); } &&
13361          { ac_try='test -s conftest.$ac_objext'
13362   { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); }; }; then
13367   sigact_bad=no
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371
13372 cat >conftest.$ac_ext <<_ACEOF
13373 #line 13373 "configure"
13374 #include "confdefs.h"
13375
13376 #define _POSIX_SOURCE
13377 #include <sys/types.h>
13378 #include <signal.h>
13379 int
13380 main ()
13381 {
13382 struct sigaction act
13383   ;
13384   return 0;
13385 }
13386 _ACEOF
13387 rm -f conftest.$ac_objext
13388 if { (eval echo "$as_me:13388: \"$ac_compile\"") >&5
13389   (eval $ac_compile) 2>&5
13390   ac_status=$?
13391   echo "$as_me:13391: \$? = $ac_status" >&5
13392   (exit $ac_status); } &&
13393          { ac_try='test -s conftest.$ac_objext'
13394   { (eval echo "$as_me:13394: \"$ac_try\"") >&5
13395   (eval $ac_try) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); }; }; then
13399   sigact_bad=yes
13400          cat >>confdefs.h <<\EOF
13401 #define SVR4_ACTION 1
13402 EOF
13403
13404 else
13405   echo "$as_me: failed program was:" >&5
13406 cat conftest.$ac_ext >&5
13407 sigact_bad=unknown
13408 fi
13409 rm -f conftest.$ac_objext conftest.$ac_ext
13410 fi
13411 rm -f conftest.$ac_objext conftest.$ac_ext
13412 echo "$as_me:13412: result: $sigact_bad" >&5
13413 echo "${ECHO_T}$sigact_bad" >&6
13414 fi
13415
13416 echo "$as_me:13416: checking if nanosleep really works" >&5
13417 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13418 if test "${cf_cv_func_nanosleep+set}" = set; then
13419   echo $ECHO_N "(cached) $ECHO_C" >&6
13420 else
13421
13422 if test "$cross_compiling" = yes; then
13423   cf_cv_func_nanosleep=unknown
13424 else
13425   cat >conftest.$ac_ext <<_ACEOF
13426 #line 13426 "configure"
13427 #include "confdefs.h"
13428
13429 #include <stdio.h>
13430 #include <errno.h>
13431 #include <time.h>
13432
13433 #ifdef HAVE_SYS_TIME_H
13434 #include <sys/time.h>
13435 #endif
13436
13437 int main() {
13438         struct timespec ts1, ts2;
13439         int code;
13440         ts1.tv_sec  = 0;
13441         ts1.tv_nsec = 750000000;
13442         ts2.tv_sec  = 0;
13443         ts2.tv_nsec = 0;
13444         errno = 0;
13445         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13446         ${cf_cv_main_return:-return}(code != 0);
13447 }
13448
13449 _ACEOF
13450 rm -f conftest$ac_exeext
13451 if { (eval echo "$as_me:13451: \"$ac_link\"") >&5
13452   (eval $ac_link) 2>&5
13453   ac_status=$?
13454   echo "$as_me:13454: \$? = $ac_status" >&5
13455   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13456   { (eval echo "$as_me:13456: \"$ac_try\"") >&5
13457   (eval $ac_try) 2>&5
13458   ac_status=$?
13459   echo "$as_me:13459: \$? = $ac_status" >&5
13460   (exit $ac_status); }; }; then
13461   cf_cv_func_nanosleep=yes
13462 else
13463   echo "$as_me: program exited with status $ac_status" >&5
13464 echo "$as_me: failed program was:" >&5
13465 cat conftest.$ac_ext >&5
13466 cf_cv_func_nanosleep=no
13467 fi
13468 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13469 fi
13470 fi
13471 echo "$as_me:13471: result: $cf_cv_func_nanosleep" >&5
13472 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13473
13474 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13475 #define HAVE_NANOSLEEP 1
13476 EOF
13477
13478 for ac_header in \
13479 termio.h \
13480 termios.h \
13481 unistd.h \
13482
13483 do
13484 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13485 echo "$as_me:13485: checking for $ac_header" >&5
13486 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13487 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13488   echo $ECHO_N "(cached) $ECHO_C" >&6
13489 else
13490   cat >conftest.$ac_ext <<_ACEOF
13491 #line 13491 "configure"
13492 #include "confdefs.h"
13493 #include <$ac_header>
13494 _ACEOF
13495 if { (eval echo "$as_me:13495: \"$ac_cpp conftest.$ac_ext\"") >&5
13496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13497   ac_status=$?
13498   egrep -v '^ *\+' conftest.er1 >conftest.err
13499   rm -f conftest.er1
13500   cat conftest.err >&5
13501   echo "$as_me:13501: \$? = $ac_status" >&5
13502   (exit $ac_status); } >/dev/null; then
13503   if test -s conftest.err; then
13504     ac_cpp_err=$ac_c_preproc_warn_flag
13505   else
13506     ac_cpp_err=
13507   fi
13508 else
13509   ac_cpp_err=yes
13510 fi
13511 if test -z "$ac_cpp_err"; then
13512   eval "$as_ac_Header=yes"
13513 else
13514   echo "$as_me: failed program was:" >&5
13515   cat conftest.$ac_ext >&5
13516   eval "$as_ac_Header=no"
13517 fi
13518 rm -f conftest.err conftest.$ac_ext
13519 fi
13520 echo "$as_me:13520: result: `eval echo '${'$as_ac_Header'}'`" >&5
13521 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13522 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13523   cat >>confdefs.h <<EOF
13524 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13525 EOF
13526
13527 fi
13528 done
13529
13530 if test "$ISC" = yes ; then
13531
13532 for ac_header in sys/termio.h
13533 do
13534 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13535 echo "$as_me:13535: checking for $ac_header" >&5
13536 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13537 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13538   echo $ECHO_N "(cached) $ECHO_C" >&6
13539 else
13540   cat >conftest.$ac_ext <<_ACEOF
13541 #line 13541 "configure"
13542 #include "confdefs.h"
13543 #include <$ac_header>
13544 _ACEOF
13545 if { (eval echo "$as_me:13545: \"$ac_cpp conftest.$ac_ext\"") >&5
13546   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13547   ac_status=$?
13548   egrep -v '^ *\+' conftest.er1 >conftest.err
13549   rm -f conftest.er1
13550   cat conftest.err >&5
13551   echo "$as_me:13551: \$? = $ac_status" >&5
13552   (exit $ac_status); } >/dev/null; then
13553   if test -s conftest.err; then
13554     ac_cpp_err=$ac_c_preproc_warn_flag
13555   else
13556     ac_cpp_err=
13557   fi
13558 else
13559   ac_cpp_err=yes
13560 fi
13561 if test -z "$ac_cpp_err"; then
13562   eval "$as_ac_Header=yes"
13563 else
13564   echo "$as_me: failed program was:" >&5
13565   cat conftest.$ac_ext >&5
13566   eval "$as_ac_Header=no"
13567 fi
13568 rm -f conftest.err conftest.$ac_ext
13569 fi
13570 echo "$as_me:13570: result: `eval echo '${'$as_ac_Header'}'`" >&5
13571 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13572 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13573   cat >>confdefs.h <<EOF
13574 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13575 EOF
13576
13577 fi
13578 done
13579
13580 fi
13581 if test "$ac_cv_header_termios_h" = yes ; then
13582         case "$CFLAGS $CPPFLAGS" in
13583         *-D_POSIX_SOURCE*)
13584                 termios_bad=dunno ;;
13585         *)      termios_bad=maybe ;;
13586         esac
13587         if test "$termios_bad" = maybe ; then
13588         echo "$as_me:13588: checking whether termios.h needs _POSIX_SOURCE" >&5
13589 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13590         cat >conftest.$ac_ext <<_ACEOF
13591 #line 13591 "configure"
13592 #include "confdefs.h"
13593 #include <termios.h>
13594 int
13595 main ()
13596 {
13597 struct termios foo; int x = foo.c_iflag
13598   ;
13599   return 0;
13600 }
13601 _ACEOF
13602 rm -f conftest.$ac_objext
13603 if { (eval echo "$as_me:13603: \"$ac_compile\"") >&5
13604   (eval $ac_compile) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit $ac_status); } &&
13608          { ac_try='test -s conftest.$ac_objext'
13609   { (eval echo "$as_me:13609: \"$ac_try\"") >&5
13610   (eval $ac_try) 2>&5
13611   ac_status=$?
13612   echo "$as_me:13612: \$? = $ac_status" >&5
13613   (exit $ac_status); }; }; then
13614   termios_bad=no
13615 else
13616   echo "$as_me: failed program was:" >&5
13617 cat conftest.$ac_ext >&5
13618
13619                 cat >conftest.$ac_ext <<_ACEOF
13620 #line 13620 "configure"
13621 #include "confdefs.h"
13622
13623 #define _POSIX_SOURCE
13624 #include <termios.h>
13625 int
13626 main ()
13627 {
13628 struct termios foo; int x = foo.c_iflag
13629   ;
13630   return 0;
13631 }
13632 _ACEOF
13633 rm -f conftest.$ac_objext
13634 if { (eval echo "$as_me:13634: \"$ac_compile\"") >&5
13635   (eval $ac_compile) 2>&5
13636   ac_status=$?
13637   echo "$as_me:13637: \$? = $ac_status" >&5
13638   (exit $ac_status); } &&
13639          { ac_try='test -s conftest.$ac_objext'
13640   { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641   (eval $ac_try) 2>&5
13642   ac_status=$?
13643   echo "$as_me:13643: \$? = $ac_status" >&5
13644   (exit $ac_status); }; }; then
13645   termios_bad=unknown
13646 else
13647   echo "$as_me: failed program was:" >&5
13648 cat conftest.$ac_ext >&5
13649 termios_bad=yes cat >>confdefs.h <<\EOF
13650 #define SVR4_TERMIO 1
13651 EOF
13652
13653 fi
13654 rm -f conftest.$ac_objext conftest.$ac_ext
13655
13656 fi
13657 rm -f conftest.$ac_objext conftest.$ac_ext
13658         echo "$as_me:13658: result: $termios_bad" >&5
13659 echo "${ECHO_T}$termios_bad" >&6
13660         fi
13661 fi
13662
13663 echo "$as_me:13663: checking for tcgetattr" >&5
13664 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13665 if test "${cf_cv_have_tcgetattr+set}" = set; then
13666   echo $ECHO_N "(cached) $ECHO_C" >&6
13667 else
13668
13669 cat >conftest.$ac_ext <<_ACEOF
13670 #line 13670 "configure"
13671 #include "confdefs.h"
13672
13673 #include <sys/types.h>
13674 #ifdef HAVE_UNISTD_H
13675 #include <unistd.h>
13676 #endif
13677 #ifdef HAVE_TERMIOS_H
13678 #include <termios.h>
13679 #define TTY struct termios
13680 #else
13681 #ifdef HAVE_TERMIO_H
13682 #include <termio.h>
13683 #define TTY struct termio
13684 #endif
13685 #endif
13686
13687 int
13688 main ()
13689 {
13690
13691 TTY foo;
13692 tcgetattr(1, &foo);
13693   ;
13694   return 0;
13695 }
13696 _ACEOF
13697 rm -f conftest.$ac_objext conftest$ac_exeext
13698 if { (eval echo "$as_me:13698: \"$ac_link\"") >&5
13699   (eval $ac_link) 2>&5
13700   ac_status=$?
13701   echo "$as_me:13701: \$? = $ac_status" >&5
13702   (exit $ac_status); } &&
13703          { ac_try='test -s conftest$ac_exeext'
13704   { (eval echo "$as_me:13704: \"$ac_try\"") >&5
13705   (eval $ac_try) 2>&5
13706   ac_status=$?
13707   echo "$as_me:13707: \$? = $ac_status" >&5
13708   (exit $ac_status); }; }; then
13709   cf_cv_have_tcgetattr=yes
13710 else
13711   echo "$as_me: failed program was:" >&5
13712 cat conftest.$ac_ext >&5
13713 cf_cv_have_tcgetattr=no
13714 fi
13715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13716 fi
13717 echo "$as_me:13717: result: $cf_cv_have_tcgetattr" >&5
13718 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13719 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13720 #define HAVE_TCGETATTR 1
13721 EOF
13722
13723 echo "$as_me:13723: checking for vsscanf function or workaround" >&5
13724 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13725 if test "${cf_cv_func_vsscanf+set}" = set; then
13726   echo $ECHO_N "(cached) $ECHO_C" >&6
13727 else
13728
13729 cat >conftest.$ac_ext <<_ACEOF
13730 #line 13730 "configure"
13731 #include "confdefs.h"
13732
13733 #include <stdarg.h>
13734 #include <stdio.h>
13735 int
13736 main ()
13737 {
13738
13739         va_list ap;
13740         vsscanf("from", "%d", ap)
13741   ;
13742   return 0;
13743 }
13744 _ACEOF
13745 rm -f conftest.$ac_objext conftest$ac_exeext
13746 if { (eval echo "$as_me:13746: \"$ac_link\"") >&5
13747   (eval $ac_link) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); } &&
13751          { ac_try='test -s conftest$ac_exeext'
13752   { (eval echo "$as_me:13752: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); }; }; then
13757   cf_cv_func_vsscanf=vsscanf
13758 else
13759   echo "$as_me: failed program was:" >&5
13760 cat conftest.$ac_ext >&5
13761
13762 cat >conftest.$ac_ext <<_ACEOF
13763 #line 13763 "configure"
13764 #include "confdefs.h"
13765
13766 #include <stdarg.h>
13767 #include <stdio.h>
13768 int
13769 main ()
13770 {
13771
13772     FILE strbuf;
13773     char *str = "from";
13774
13775     strbuf._flag = _IOREAD;
13776     strbuf._ptr = strbuf._base = (unsigned char *) str;
13777     strbuf._cnt = strlen(str);
13778     strbuf._file = _NFILE;
13779     return (vfscanf(&strbuf, "%d", ap))
13780   ;
13781   return 0;
13782 }
13783 _ACEOF
13784 rm -f conftest.$ac_objext conftest$ac_exeext
13785 if { (eval echo "$as_me:13785: \"$ac_link\"") >&5
13786   (eval $ac_link) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit $ac_status); } &&
13790          { ac_try='test -s conftest$ac_exeext'
13791   { (eval echo "$as_me:13791: \"$ac_try\"") >&5
13792   (eval $ac_try) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); }; }; then
13796   cf_cv_func_vsscanf=vfscanf
13797 else
13798   echo "$as_me: failed program was:" >&5
13799 cat conftest.$ac_ext >&5
13800
13801 cat >conftest.$ac_ext <<_ACEOF
13802 #line 13802 "configure"
13803 #include "confdefs.h"
13804
13805 #include <stdarg.h>
13806 #include <stdio.h>
13807 int
13808 main ()
13809 {
13810
13811     FILE strbuf;
13812     char *str = "from";
13813
13814     strbuf._flag = _IOREAD;
13815     strbuf._ptr = strbuf._base = (unsigned char *) str;
13816     strbuf._cnt = strlen(str);
13817     strbuf._file = _NFILE;
13818     return (_doscan(&strbuf, "%d", ap))
13819   ;
13820   return 0;
13821 }
13822 _ACEOF
13823 rm -f conftest.$ac_objext conftest$ac_exeext
13824 if { (eval echo "$as_me:13824: \"$ac_link\"") >&5
13825   (eval $ac_link) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); } &&
13829          { ac_try='test -s conftest$ac_exeext'
13830   { (eval echo "$as_me:13830: \"$ac_try\"") >&5
13831   (eval $ac_try) 2>&5
13832   ac_status=$?
13833   echo "$as_me:13833: \$? = $ac_status" >&5
13834   (exit $ac_status); }; }; then
13835   cf_cv_func_vsscanf=_doscan
13836 else
13837   echo "$as_me: failed program was:" >&5
13838 cat conftest.$ac_ext >&5
13839
13840 cf_cv_func_vsscanf=no
13841 fi
13842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13843 fi
13844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13845 fi
13846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13847 fi
13848 echo "$as_me:13848: result: $cf_cv_func_vsscanf" >&5
13849 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13850
13851 case $cf_cv_func_vsscanf in #(vi
13852 vsscanf) cat >>confdefs.h <<\EOF
13853 #define HAVE_VSSCANF 1
13854 EOF
13855 ;; #(vi
13856 vfscanf) cat >>confdefs.h <<\EOF
13857 #define HAVE_VFSCANF 1
13858 EOF
13859 ;; #(vi
13860 _doscan) cat >>confdefs.h <<\EOF
13861 #define HAVE__DOSCAN 1
13862 EOF
13863 ;;
13864 esac
13865
13866 echo "$as_me:13866: checking for working mkstemp" >&5
13867 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13868 if test "${cf_cv_func_mkstemp+set}" = set; then
13869   echo $ECHO_N "(cached) $ECHO_C" >&6
13870 else
13871
13872 rm -f conftest*
13873 if test "$cross_compiling" = yes; then
13874   echo "$as_me:13874: checking for mkstemp" >&5
13875 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13876 if test "${ac_cv_func_mkstemp+set}" = set; then
13877   echo $ECHO_N "(cached) $ECHO_C" >&6
13878 else
13879   cat >conftest.$ac_ext <<_ACEOF
13880 #line 13880 "configure"
13881 #include "confdefs.h"
13882 /* System header to define __stub macros and hopefully few prototypes,
13883     which can conflict with char mkstemp (); below.  */
13884 #include <assert.h>
13885 /* Override any gcc2 internal prototype to avoid an error.  */
13886 #ifdef __cplusplus
13887 extern "C"
13888 #endif
13889 /* We use char because int might match the return type of a gcc2
13890    builtin and then its argument prototype would still apply.  */
13891 char mkstemp ();
13892 char (*f) ();
13893
13894 int
13895 main ()
13896 {
13897 /* The GNU C library defines this for functions which it implements
13898     to always fail with ENOSYS.  Some functions are actually named
13899     something starting with __ and the normal name is an alias.  */
13900 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13901 choke me
13902 #else
13903 f = mkstemp;
13904 #endif
13905
13906   ;
13907   return 0;
13908 }
13909 _ACEOF
13910 rm -f conftest.$ac_objext conftest$ac_exeext
13911 if { (eval echo "$as_me:13911: \"$ac_link\"") >&5
13912   (eval $ac_link) 2>&5
13913   ac_status=$?
13914   echo "$as_me:13914: \$? = $ac_status" >&5
13915   (exit $ac_status); } &&
13916          { ac_try='test -s conftest$ac_exeext'
13917   { (eval echo "$as_me:13917: \"$ac_try\"") >&5
13918   (eval $ac_try) 2>&5
13919   ac_status=$?
13920   echo "$as_me:13920: \$? = $ac_status" >&5
13921   (exit $ac_status); }; }; then
13922   ac_cv_func_mkstemp=yes
13923 else
13924   echo "$as_me: failed program was:" >&5
13925 cat conftest.$ac_ext >&5
13926 ac_cv_func_mkstemp=no
13927 fi
13928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13929 fi
13930 echo "$as_me:13930: result: $ac_cv_func_mkstemp" >&5
13931 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13932
13933 else
13934   cat >conftest.$ac_ext <<_ACEOF
13935 #line 13935 "configure"
13936 #include "confdefs.h"
13937
13938 #include <sys/types.h>
13939 #include <stdlib.h>
13940 #include <stdio.h>
13941 #include <string.h>
13942 #include <sys/stat.h>
13943 int main()
13944 {
13945         char *tmpl = "conftestXXXXXX";
13946         char name[2][80];
13947         int n;
13948         int result = 0;
13949         int fd;
13950         struct stat sb;
13951
13952         umask(077);
13953         for (n = 0; n < 2; ++n) {
13954                 strcpy(name[n], tmpl);
13955                 if ((fd = mkstemp(name[n])) >= 0) {
13956                         if (!strcmp(name[n], tmpl)
13957                          || stat(name[n], &sb) != 0
13958                          || (sb.st_mode & S_IFMT) != S_IFREG
13959                          || (sb.st_mode & 077) != 0) {
13960                                 result = 1;
13961                         }
13962                         close(fd);
13963                 }
13964         }
13965         if (result == 0
13966          && !strcmp(name[0], name[1]))
13967                 result = 1;
13968         ${cf_cv_main_return:-return}(result);
13969 }
13970
13971 _ACEOF
13972 rm -f conftest$ac_exeext
13973 if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
13974   (eval $ac_link) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13978   { (eval echo "$as_me:13978: \"$ac_try\"") >&5
13979   (eval $ac_try) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit $ac_status); }; }; then
13983   cf_cv_func_mkstemp=yes
13984
13985 else
13986   echo "$as_me: program exited with status $ac_status" >&5
13987 echo "$as_me: failed program was:" >&5
13988 cat conftest.$ac_ext >&5
13989 cf_cv_func_mkstemp=no
13990
13991 fi
13992 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13993 fi
13994
13995 fi
13996 echo "$as_me:13996: result: $cf_cv_func_mkstemp" >&5
13997 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13998 if test "$cf_cv_func_mkstemp" = yes ; then
13999         cat >>confdefs.h <<\EOF
14000 #define HAVE_MKSTEMP 1
14001 EOF
14002
14003 fi
14004
14005 # setup for prototype of fallback for vsscanf()
14006
14007 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14008         HAVE_VSSCANF=1
14009 else
14010         HAVE_VSSCANF=0
14011 fi
14012
14013 if test "$cross_compiling" = yes ; then
14014         { echo "$as_me:14014: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14015 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14016 else
14017         echo "$as_me:14017: checking whether setvbuf arguments are reversed" >&5
14018 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14019 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 else
14022   if test "$cross_compiling" = yes; then
14023   { { echo "$as_me:14023: error: cannot run test program while cross compiling" >&5
14024 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14025    { (exit 1); exit 1; }; }
14026 else
14027   cat >conftest.$ac_ext <<_ACEOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14030 #include <stdio.h>
14031 /* If setvbuf has the reversed format, exit 0. */
14032 int
14033 main ()
14034 {
14035   /* This call has the arguments reversed.
14036      A reversed system may check and see that the address of main
14037      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14038   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14039     $ac_main_return(1);
14040   putc('\r', stdout);
14041   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14042 }
14043 _ACEOF
14044 rm -f conftest$ac_exeext
14045 if { (eval echo "$as_me:14045: \"$ac_link\"") >&5
14046   (eval $ac_link) 2>&5
14047   ac_status=$?
14048   echo "$as_me:14048: \$? = $ac_status" >&5
14049   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14050   { (eval echo "$as_me:14050: \"$ac_try\"") >&5
14051   (eval $ac_try) 2>&5
14052   ac_status=$?
14053   echo "$as_me:14053: \$? = $ac_status" >&5
14054   (exit $ac_status); }; }; then
14055   ac_cv_func_setvbuf_reversed=yes
14056 else
14057   echo "$as_me: program exited with status $ac_status" >&5
14058 echo "$as_me: failed program was:" >&5
14059 cat conftest.$ac_ext >&5
14060 ac_cv_func_setvbuf_reversed=no
14061 fi
14062 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14063 fi
14064 rm -f core core.* *.core
14065 fi
14066 echo "$as_me:14066: result: $ac_cv_func_setvbuf_reversed" >&5
14067 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14068 if test $ac_cv_func_setvbuf_reversed = yes; then
14069
14070 cat >>confdefs.h <<\EOF
14071 #define SETVBUF_REVERSED 1
14072 EOF
14073
14074 fi
14075
14076 fi
14077 echo "$as_me:14077: checking return type of signal handlers" >&5
14078 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14079 if test "${ac_cv_type_signal+set}" = set; then
14080   echo $ECHO_N "(cached) $ECHO_C" >&6
14081 else
14082   cat >conftest.$ac_ext <<_ACEOF
14083 #line 14083 "configure"
14084 #include "confdefs.h"
14085 #include <sys/types.h>
14086 #include <signal.h>
14087 #ifdef signal
14088 # undef signal
14089 #endif
14090 #ifdef __cplusplus
14091 extern "C" void (*signal (int, void (*)(int)))(int);
14092 #else
14093 void (*signal ()) ();
14094 #endif
14095
14096 int
14097 main ()
14098 {
14099 int i;
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 rm -f conftest.$ac_objext
14105 if { (eval echo "$as_me:14105: \"$ac_compile\"") >&5
14106   (eval $ac_compile) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit $ac_status); } &&
14110          { ac_try='test -s conftest.$ac_objext'
14111   { (eval echo "$as_me:14111: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit $ac_status); }; }; then
14116   ac_cv_type_signal=void
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 cat conftest.$ac_ext >&5
14120 ac_cv_type_signal=int
14121 fi
14122 rm -f conftest.$ac_objext conftest.$ac_ext
14123 fi
14124 echo "$as_me:14124: result: $ac_cv_type_signal" >&5
14125 echo "${ECHO_T}$ac_cv_type_signal" >&6
14126
14127 cat >>confdefs.h <<EOF
14128 #define RETSIGTYPE $ac_cv_type_signal
14129 EOF
14130
14131 echo "$as_me:14131: checking for type sigaction_t" >&5
14132 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14133 if test "${cf_cv_type_sigaction+set}" = set; then
14134   echo $ECHO_N "(cached) $ECHO_C" >&6
14135 else
14136
14137         cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140
14141 #include <signal.h>
14142 int
14143 main ()
14144 {
14145 sigaction_t x
14146   ;
14147   return 0;
14148 }
14149 _ACEOF
14150 rm -f conftest.$ac_objext
14151 if { (eval echo "$as_me:14151: \"$ac_compile\"") >&5
14152   (eval $ac_compile) 2>&5
14153   ac_status=$?
14154   echo "$as_me:14154: \$? = $ac_status" >&5
14155   (exit $ac_status); } &&
14156          { ac_try='test -s conftest.$ac_objext'
14157   { (eval echo "$as_me:14157: \"$ac_try\"") >&5
14158   (eval $ac_try) 2>&5
14159   ac_status=$?
14160   echo "$as_me:14160: \$? = $ac_status" >&5
14161   (exit $ac_status); }; }; then
14162   cf_cv_type_sigaction=yes
14163 else
14164   echo "$as_me: failed program was:" >&5
14165 cat conftest.$ac_ext >&5
14166 cf_cv_type_sigaction=no
14167 fi
14168 rm -f conftest.$ac_objext conftest.$ac_ext
14169 fi
14170
14171 echo "$as_me:14171: result: $cf_cv_type_sigaction" >&5
14172 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14173 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14174 #define HAVE_TYPE_SIGACTION 1
14175 EOF
14176
14177 echo "$as_me:14177: checking declaration of size-change" >&5
14178 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14179 if test "${cf_cv_sizechange+set}" = set; then
14180   echo $ECHO_N "(cached) $ECHO_C" >&6
14181 else
14182
14183     cf_cv_sizechange=unknown
14184     cf_save_CPPFLAGS="$CPPFLAGS"
14185
14186 for cf_opts in "" "NEED_PTEM_H"
14187 do
14188
14189     CPPFLAGS="$cf_save_CPPFLAGS"
14190     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14191     cat >conftest.$ac_ext <<_ACEOF
14192 #line 14192 "configure"
14193 #include "confdefs.h"
14194 #include <sys/types.h>
14195 #ifdef HAVE_TERMIOS_H
14196 #include <termios.h>
14197 #else
14198 #ifdef HAVE_TERMIO_H
14199 #include <termio.h>
14200 #endif
14201 #endif
14202 #ifdef NEED_PTEM_H
14203 /* This is a workaround for SCO:  they neglected to define struct winsize in
14204  * termios.h -- it's only in termio.h and ptem.h
14205  */
14206 #include        <sys/stream.h>
14207 #include        <sys/ptem.h>
14208 #endif
14209 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14210 #include <sys/ioctl.h>
14211 #endif
14212
14213 int
14214 main ()
14215 {
14216
14217 #ifdef TIOCGSIZE
14218         struct ttysize win;     /* FIXME: what system is this? */
14219         int y = win.ts_lines;
14220         int x = win.ts_cols;
14221 #else
14222 #ifdef TIOCGWINSZ
14223         struct winsize win;
14224         int y = win.ws_row;
14225         int x = win.ws_col;
14226 #else
14227         no TIOCGSIZE or TIOCGWINSZ
14228 #endif /* TIOCGWINSZ */
14229 #endif /* TIOCGSIZE */
14230
14231   ;
14232   return 0;
14233 }
14234 _ACEOF
14235 rm -f conftest.$ac_objext
14236 if { (eval echo "$as_me:14236: \"$ac_compile\"") >&5
14237   (eval $ac_compile) 2>&5
14238   ac_status=$?
14239   echo "$as_me:14239: \$? = $ac_status" >&5
14240   (exit $ac_status); } &&
14241          { ac_try='test -s conftest.$ac_objext'
14242   { (eval echo "$as_me:14242: \"$ac_try\"") >&5
14243   (eval $ac_try) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit $ac_status); }; }; then
14247   cf_cv_sizechange=yes
14248 else
14249   echo "$as_me: failed program was:" >&5
14250 cat conftest.$ac_ext >&5
14251 cf_cv_sizechange=no
14252 fi
14253 rm -f conftest.$ac_objext conftest.$ac_ext
14254
14255         CPPFLAGS="$cf_save_CPPFLAGS"
14256         if test "$cf_cv_sizechange" = yes ; then
14257                 echo "size-change succeeded ($cf_opts)" >&5
14258                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14259                 break
14260         fi
14261 done
14262
14263 fi
14264 echo "$as_me:14264: result: $cf_cv_sizechange" >&5
14265 echo "${ECHO_T}$cf_cv_sizechange" >&6
14266 if test "$cf_cv_sizechange" != no ; then
14267         cat >>confdefs.h <<\EOF
14268 #define HAVE_SIZECHANGE 1
14269 EOF
14270
14271         case $cf_cv_sizechange in #(vi
14272         NEED*)
14273                 cat >>confdefs.h <<EOF
14274 #define $cf_cv_sizechange  1
14275 EOF
14276
14277                 ;;
14278         esac
14279 fi
14280
14281 echo "$as_me:14281: checking for memmove" >&5
14282 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14283 if test "${ac_cv_func_memmove+set}" = set; then
14284   echo $ECHO_N "(cached) $ECHO_C" >&6
14285 else
14286   cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289 /* System header to define __stub macros and hopefully few prototypes,
14290     which can conflict with char memmove (); below.  */
14291 #include <assert.h>
14292 /* Override any gcc2 internal prototype to avoid an error.  */
14293 #ifdef __cplusplus
14294 extern "C"
14295 #endif
14296 /* We use char because int might match the return type of a gcc2
14297    builtin and then its argument prototype would still apply.  */
14298 char memmove ();
14299 char (*f) ();
14300
14301 int
14302 main ()
14303 {
14304 /* The GNU C library defines this for functions which it implements
14305     to always fail with ENOSYS.  Some functions are actually named
14306     something starting with __ and the normal name is an alias.  */
14307 #if defined (__stub_memmove) || defined (__stub___memmove)
14308 choke me
14309 #else
14310 f = memmove;
14311 #endif
14312
14313   ;
14314   return 0;
14315 }
14316 _ACEOF
14317 rm -f conftest.$ac_objext conftest$ac_exeext
14318 if { (eval echo "$as_me:14318: \"$ac_link\"") >&5
14319   (eval $ac_link) 2>&5
14320   ac_status=$?
14321   echo "$as_me:14321: \$? = $ac_status" >&5
14322   (exit $ac_status); } &&
14323          { ac_try='test -s conftest$ac_exeext'
14324   { (eval echo "$as_me:14324: \"$ac_try\"") >&5
14325   (eval $ac_try) 2>&5
14326   ac_status=$?
14327   echo "$as_me:14327: \$? = $ac_status" >&5
14328   (exit $ac_status); }; }; then
14329   ac_cv_func_memmove=yes
14330 else
14331   echo "$as_me: failed program was:" >&5
14332 cat conftest.$ac_ext >&5
14333 ac_cv_func_memmove=no
14334 fi
14335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14336 fi
14337 echo "$as_me:14337: result: $ac_cv_func_memmove" >&5
14338 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14339 if test $ac_cv_func_memmove = yes; then
14340   :
14341 else
14342
14343 echo "$as_me:14343: checking for bcopy" >&5
14344 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14345 if test "${ac_cv_func_bcopy+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348   cat >conftest.$ac_ext <<_ACEOF
14349 #line 14349 "configure"
14350 #include "confdefs.h"
14351 /* System header to define __stub macros and hopefully few prototypes,
14352     which can conflict with char bcopy (); below.  */
14353 #include <assert.h>
14354 /* Override any gcc2 internal prototype to avoid an error.  */
14355 #ifdef __cplusplus
14356 extern "C"
14357 #endif
14358 /* We use char because int might match the return type of a gcc2
14359    builtin and then its argument prototype would still apply.  */
14360 char bcopy ();
14361 char (*f) ();
14362
14363 int
14364 main ()
14365 {
14366 /* The GNU C library defines this for functions which it implements
14367     to always fail with ENOSYS.  Some functions are actually named
14368     something starting with __ and the normal name is an alias.  */
14369 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14370 choke me
14371 #else
14372 f = bcopy;
14373 #endif
14374
14375   ;
14376   return 0;
14377 }
14378 _ACEOF
14379 rm -f conftest.$ac_objext conftest$ac_exeext
14380 if { (eval echo "$as_me:14380: \"$ac_link\"") >&5
14381   (eval $ac_link) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit $ac_status); } &&
14385          { ac_try='test -s conftest$ac_exeext'
14386   { (eval echo "$as_me:14386: \"$ac_try\"") >&5
14387   (eval $ac_try) 2>&5
14388   ac_status=$?
14389   echo "$as_me:14389: \$? = $ac_status" >&5
14390   (exit $ac_status); }; }; then
14391   ac_cv_func_bcopy=yes
14392 else
14393   echo "$as_me: failed program was:" >&5
14394 cat conftest.$ac_ext >&5
14395 ac_cv_func_bcopy=no
14396 fi
14397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14398 fi
14399 echo "$as_me:14399: result: $ac_cv_func_bcopy" >&5
14400 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14401 if test $ac_cv_func_bcopy = yes; then
14402
14403         echo "$as_me:14403: checking if bcopy does overlapping moves" >&5
14404 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14405 if test "${cf_cv_good_bcopy+set}" = set; then
14406   echo $ECHO_N "(cached) $ECHO_C" >&6
14407 else
14408
14409                 if test "$cross_compiling" = yes; then
14410   cf_cv_good_bcopy=unknown
14411 else
14412   cat >conftest.$ac_ext <<_ACEOF
14413 #line 14413 "configure"
14414 #include "confdefs.h"
14415
14416 int main() {
14417         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14418         char temp[40];
14419         bcopy(data, temp, sizeof(data));
14420         bcopy(temp+10, temp, 15);
14421         bcopy(temp+5, temp+15, 10);
14422         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14423 }
14424
14425 _ACEOF
14426 rm -f conftest$ac_exeext
14427 if { (eval echo "$as_me:14427: \"$ac_link\"") >&5
14428   (eval $ac_link) 2>&5
14429   ac_status=$?
14430   echo "$as_me:14430: \$? = $ac_status" >&5
14431   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14432   { (eval echo "$as_me:14432: \"$ac_try\"") >&5
14433   (eval $ac_try) 2>&5
14434   ac_status=$?
14435   echo "$as_me:14435: \$? = $ac_status" >&5
14436   (exit $ac_status); }; }; then
14437   cf_cv_good_bcopy=yes
14438 else
14439   echo "$as_me: program exited with status $ac_status" >&5
14440 echo "$as_me: failed program was:" >&5
14441 cat conftest.$ac_ext >&5
14442 cf_cv_good_bcopy=no
14443 fi
14444 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14445 fi
14446
14447 fi
14448 echo "$as_me:14448: result: $cf_cv_good_bcopy" >&5
14449 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14450
14451 else
14452   cf_cv_good_bcopy=no
14453 fi
14454
14455         if test "$cf_cv_good_bcopy" = yes ; then
14456                 cat >>confdefs.h <<\EOF
14457 #define USE_OK_BCOPY 1
14458 EOF
14459
14460         else
14461                 cat >>confdefs.h <<\EOF
14462 #define USE_MY_MEMMOVE 1
14463 EOF
14464
14465         fi
14466
14467 fi
14468
14469 echo "$as_me:14469: checking if poll really works" >&5
14470 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14471 if test "${cf_cv_working_poll+set}" = set; then
14472   echo $ECHO_N "(cached) $ECHO_C" >&6
14473 else
14474
14475 if test "$cross_compiling" = yes; then
14476   cf_cv_working_poll=unknown
14477 else
14478   cat >conftest.$ac_ext <<_ACEOF
14479 #line 14479 "configure"
14480 #include "confdefs.h"
14481
14482 #include <stdio.h>
14483 #ifdef HAVE_POLL_H
14484 #include <poll.h>
14485 #else
14486 #include <sys/poll.h>
14487 #endif
14488 int main() {
14489         struct pollfd myfds;
14490         int ret;
14491
14492         myfds.fd = 0;
14493         myfds.events = POLLIN;
14494
14495         ret = poll(&myfds, 1, 100);
14496         ${cf_cv_main_return:-return}(ret != 0);
14497 }
14498 _ACEOF
14499 rm -f conftest$ac_exeext
14500 if { (eval echo "$as_me:14500: \"$ac_link\"") >&5
14501   (eval $ac_link) 2>&5
14502   ac_status=$?
14503   echo "$as_me:14503: \$? = $ac_status" >&5
14504   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14505   { (eval echo "$as_me:14505: \"$ac_try\"") >&5
14506   (eval $ac_try) 2>&5
14507   ac_status=$?
14508   echo "$as_me:14508: \$? = $ac_status" >&5
14509   (exit $ac_status); }; }; then
14510   cf_cv_working_poll=yes
14511 else
14512   echo "$as_me: program exited with status $ac_status" >&5
14513 echo "$as_me: failed program was:" >&5
14514 cat conftest.$ac_ext >&5
14515 cf_cv_working_poll=no
14516 fi
14517 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14518 fi
14519 fi
14520 echo "$as_me:14520: result: $cf_cv_working_poll" >&5
14521 echo "${ECHO_T}$cf_cv_working_poll" >&6
14522 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14523 #define HAVE_WORKING_POLL 1
14524 EOF
14525
14526 # special check for test/ditto.c
14527
14528 echo "$as_me:14528: checking for openpty in -lutil" >&5
14529 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14530 if test "${ac_cv_lib_util_openpty+set}" = set; then
14531   echo $ECHO_N "(cached) $ECHO_C" >&6
14532 else
14533   ac_check_lib_save_LIBS=$LIBS
14534 LIBS="-lutil  $LIBS"
14535 cat >conftest.$ac_ext <<_ACEOF
14536 #line 14536 "configure"
14537 #include "confdefs.h"
14538
14539 /* Override any gcc2 internal prototype to avoid an error.  */
14540 #ifdef __cplusplus
14541 extern "C"
14542 #endif
14543 /* We use char because int might match the return type of a gcc2
14544    builtin and then its argument prototype would still apply.  */
14545 char openpty ();
14546 int
14547 main ()
14548 {
14549 openpty ();
14550   ;
14551   return 0;
14552 }
14553 _ACEOF
14554 rm -f conftest.$ac_objext conftest$ac_exeext
14555 if { (eval echo "$as_me:14555: \"$ac_link\"") >&5
14556   (eval $ac_link) 2>&5
14557   ac_status=$?
14558   echo "$as_me:14558: \$? = $ac_status" >&5
14559   (exit $ac_status); } &&
14560          { ac_try='test -s conftest$ac_exeext'
14561   { (eval echo "$as_me:14561: \"$ac_try\"") >&5
14562   (eval $ac_try) 2>&5
14563   ac_status=$?
14564   echo "$as_me:14564: \$? = $ac_status" >&5
14565   (exit $ac_status); }; }; then
14566   ac_cv_lib_util_openpty=yes
14567 else
14568   echo "$as_me: failed program was:" >&5
14569 cat conftest.$ac_ext >&5
14570 ac_cv_lib_util_openpty=no
14571 fi
14572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14573 LIBS=$ac_check_lib_save_LIBS
14574 fi
14575 echo "$as_me:14575: result: $ac_cv_lib_util_openpty" >&5
14576 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14577 if test $ac_cv_lib_util_openpty = yes; then
14578   cf_cv_lib_util=yes
14579 else
14580   cf_cv_lib_util=no
14581 fi
14582
14583 echo "$as_me:14583: checking for openpty header" >&5
14584 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14585 if test "${cf_cv_func_openpty+set}" = set; then
14586   echo $ECHO_N "(cached) $ECHO_C" >&6
14587 else
14588
14589     cf_save_LIBS="$LIBS"
14590     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14591     for cf_header in pty.h libutil.h util.h
14592     do
14593     cat >conftest.$ac_ext <<_ACEOF
14594 #line 14594 "configure"
14595 #include "confdefs.h"
14596
14597 #include <$cf_header>
14598
14599 int
14600 main ()
14601 {
14602
14603     int x = openpty((int *)0, (int *)0, (char *)0,
14604                    (struct termios *)0, (struct winsize *)0);
14605
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612   (eval $ac_link) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); } &&
14616          { ac_try='test -s conftest$ac_exeext'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); }; }; then
14622
14623         cf_cv_func_openpty=$cf_header
14624         break
14625
14626 else
14627   echo "$as_me: failed program was:" >&5
14628 cat conftest.$ac_ext >&5
14629
14630         cf_cv_func_openpty=no
14631
14632 fi
14633 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14634     done
14635     LIBS="$cf_save_LIBS"
14636
14637 fi
14638 echo "$as_me:14638: result: $cf_cv_func_openpty" >&5
14639 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14640
14641 if test "$cf_cv_func_openpty" != no ; then
14642     cat >>confdefs.h <<EOF
14643 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14644 EOF
14645
14646     cat >>confdefs.h <<\EOF
14647 #define USE_XTERM_PTY 1
14648 EOF
14649
14650     if test "$cf_cv_lib_util" = yes ; then
14651         TEST_LIBS="-lutil $TEST_LIBS"
14652     fi
14653 fi
14654
14655 if test "$with_hashed_db" != no ; then
14656         cat >>confdefs.h <<\EOF
14657 #define USE_HASHED_DB 1
14658 EOF
14659
14660 case $with_hashed_db in #(vi
14661 yes|*able*) #(vi
14662     ;;
14663 *)
14664     if test -d "$with_hashed_db" ; then
14665
14666 if test -n "$with_hashed_db/include" ; then
14667   for cf_add_incdir in $with_hashed_db/include
14668   do
14669         while test $cf_add_incdir != /usr/include
14670         do
14671           if test -d $cf_add_incdir
14672           then
14673                 cf_have_incdir=no
14674                 if test -n "$CFLAGS$CPPFLAGS" ; then
14675                   # a loop is needed to ensure we can add subdirs of existing dirs
14676                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14677                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14678                           cf_have_incdir=yes; break
14679                         fi
14680                   done
14681                 fi
14682
14683                 if test "$cf_have_incdir" = no ; then
14684                   if test "$cf_add_incdir" = /usr/local/include ; then
14685                         if test "$GCC" = yes
14686                         then
14687                           cf_save_CPPFLAGS=$CPPFLAGS
14688                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14689                           cat >conftest.$ac_ext <<_ACEOF
14690 #line 14690 "configure"
14691 #include "confdefs.h"
14692 #include <stdio.h>
14693 int
14694 main ()
14695 {
14696 printf("Hello")
14697   ;
14698   return 0;
14699 }
14700 _ACEOF
14701 rm -f conftest.$ac_objext
14702 if { (eval echo "$as_me:14702: \"$ac_compile\"") >&5
14703   (eval $ac_compile) 2>&5
14704   ac_status=$?
14705   echo "$as_me:14705: \$? = $ac_status" >&5
14706   (exit $ac_status); } &&
14707          { ac_try='test -s conftest.$ac_objext'
14708   { (eval echo "$as_me:14708: \"$ac_try\"") >&5
14709   (eval $ac_try) 2>&5
14710   ac_status=$?
14711   echo "$as_me:14711: \$? = $ac_status" >&5
14712   (exit $ac_status); }; }; then
14713   :
14714 else
14715   echo "$as_me: failed program was:" >&5
14716 cat conftest.$ac_ext >&5
14717 cf_have_incdir=yes
14718 fi
14719 rm -f conftest.$ac_objext conftest.$ac_ext
14720                           CPPFLAGS=$cf_save_CPPFLAGS
14721                         fi
14722                   fi
14723                 fi
14724
14725                 if test "$cf_have_incdir" = no ; then
14726                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14727
14728 echo "${as_me-configure}:14728: testing adding $cf_add_incdir to include-path ..." 1>&5
14729
14730                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14731
14732                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14733                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14734                   cf_add_incdir="$cf_top_incdir"
14735                 else
14736                   break
14737                 fi
14738           fi
14739         done
14740   done
14741 fi
14742
14743 if test -n "$with_hashed_db/lib" ; then
14744   for cf_add_libdir in $with_hashed_db/lib
14745   do
14746     if test $cf_add_libdir = /usr/lib ; then
14747       :
14748     elif test -d $cf_add_libdir
14749     then
14750       cf_have_libdir=no
14751       if test -n "$LDFLAGS$LIBS" ; then
14752         # a loop is needed to ensure we can add subdirs of existing dirs
14753         for cf_test_libdir in $LDFLAGS $LIBS ; do
14754           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14755             cf_have_libdir=yes; break
14756           fi
14757         done
14758       fi
14759       if test "$cf_have_libdir" = no ; then
14760         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14761
14762 echo "${as_me-configure}:14762: testing adding $cf_add_libdir to library-path ..." 1>&5
14763
14764         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14765       fi
14766     fi
14767   done
14768 fi
14769
14770     fi
14771 esac
14772
14773 echo "$as_me:14773: checking for db.h" >&5
14774 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14775 if test "${ac_cv_header_db_h+set}" = set; then
14776   echo $ECHO_N "(cached) $ECHO_C" >&6
14777 else
14778   cat >conftest.$ac_ext <<_ACEOF
14779 #line 14779 "configure"
14780 #include "confdefs.h"
14781 #include <db.h>
14782 _ACEOF
14783 if { (eval echo "$as_me:14783: \"$ac_cpp conftest.$ac_ext\"") >&5
14784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14785   ac_status=$?
14786   egrep -v '^ *\+' conftest.er1 >conftest.err
14787   rm -f conftest.er1
14788   cat conftest.err >&5
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); } >/dev/null; then
14791   if test -s conftest.err; then
14792     ac_cpp_err=$ac_c_preproc_warn_flag
14793   else
14794     ac_cpp_err=
14795   fi
14796 else
14797   ac_cpp_err=yes
14798 fi
14799 if test -z "$ac_cpp_err"; then
14800   ac_cv_header_db_h=yes
14801 else
14802   echo "$as_me: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804   ac_cv_header_db_h=no
14805 fi
14806 rm -f conftest.err conftest.$ac_ext
14807 fi
14808 echo "$as_me:14808: result: $ac_cv_header_db_h" >&5
14809 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14810 if test $ac_cv_header_db_h = yes; then
14811
14812 echo "$as_me:14812: checking for version of db" >&5
14813 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14814 if test "${cf_cv_hashed_db_version+set}" = set; then
14815   echo $ECHO_N "(cached) $ECHO_C" >&6
14816 else
14817
14818 cf_cv_hashed_db_version=unknown
14819
14820 for cf_db_version in 1 2 3 4 5
14821 do
14822
14823 echo "${as_me-configure}:14823: testing checking for db version $cf_db_version ..." 1>&5
14824
14825         cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828
14829 $ac_includes_default
14830 #include <db.h>
14831
14832 #ifdef DB_VERSION_MAJOR
14833         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14834 #if $cf_db_version == DB_VERSION_MAJOR
14835         /* ok */
14836 #else
14837         make an error
14838 #endif
14839 #else
14840 #if $cf_db_version == 1
14841         /* ok: assuming this is DB 1.8.5 */
14842 #else
14843         make an error
14844 #endif
14845 #endif
14846
14847 int
14848 main ()
14849 {
14850 DBT *foo = 0
14851   ;
14852   return 0;
14853 }
14854 _ACEOF
14855 rm -f conftest.$ac_objext
14856 if { (eval echo "$as_me:14856: \"$ac_compile\"") >&5
14857   (eval $ac_compile) 2>&5
14858   ac_status=$?
14859   echo "$as_me:14859: \$? = $ac_status" >&5
14860   (exit $ac_status); } &&
14861          { ac_try='test -s conftest.$ac_objext'
14862   { (eval echo "$as_me:14862: \"$ac_try\"") >&5
14863   (eval $ac_try) 2>&5
14864   ac_status=$?
14865   echo "$as_me:14865: \$? = $ac_status" >&5
14866   (exit $ac_status); }; }; then
14867
14868         cf_cv_hashed_db_version=$cf_db_version
14869         break
14870
14871 else
14872   echo "$as_me: failed program was:" >&5
14873 cat conftest.$ac_ext >&5
14874 fi
14875 rm -f conftest.$ac_objext conftest.$ac_ext
14876 done
14877
14878 fi
14879 echo "$as_me:14879: result: $cf_cv_hashed_db_version" >&5
14880 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14881
14882 if test "$cf_cv_hashed_db_version" = unknown ; then
14883         { { echo "$as_me:14883: error: Cannot determine version of db" >&5
14884 echo "$as_me: error: Cannot determine version of db" >&2;}
14885    { (exit 1); exit 1; }; }
14886 else
14887
14888 echo "$as_me:14888: checking for db libraries" >&5
14889 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14890 if test "${cf_cv_hashed_db_libs+set}" = set; then
14891   echo $ECHO_N "(cached) $ECHO_C" >&6
14892 else
14893
14894 cf_cv_hashed_db_libs=unknown
14895 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14896 do
14897         cf_save_libs="$LIBS"
14898         if test -n "$cf_db_libs"; then
14899                 LIBS="-l$cf_db_libs $LIBS"
14900         fi
14901
14902 echo "${as_me-configure}:14902: testing checking for library "$cf_db_libs" ..." 1>&5
14903
14904         cat >conftest.$ac_ext <<_ACEOF
14905 #line 14905 "configure"
14906 #include "confdefs.h"
14907
14908 $ac_includes_default
14909 #include <db.h>
14910
14911 int
14912 main ()
14913 {
14914
14915         char *path = "/tmp/foo";
14916 #ifdef DB_VERSION_MAJOR
14917 #if DB_VERSION_MAJOR >= 4
14918         DB *result = 0;
14919         db_create(&result, NULL, 0);
14920         result->open(result,
14921                 NULL,
14922                 path,
14923                 path,
14924                 DB_HASH,
14925                 DB_CREATE,
14926                 0644);
14927 #elif DB_VERSION_MAJOR >= 3
14928         DB *result = 0;
14929         db_create(&result, NULL, 0);
14930         result->open(result,
14931                 path,
14932                 path,
14933                 DB_HASH,
14934                 DB_CREATE,
14935                 0644);
14936 #elif DB_VERSION_MAJOR >= 2
14937         DB *result = 0;
14938         db_open(path,
14939                 DB_HASH,
14940                 DB_CREATE,
14941                 0644,
14942                 (DB_ENV *) 0,
14943                 (DB_INFO *) 0,
14944                 &result);
14945 #endif /* DB_VERSION_MAJOR */
14946 #else
14947         DB *result = dbopen(path,
14948                      2,
14949                      0644,
14950                      DB_HASH,
14951                      0);
14952 #endif
14953         ${cf_cv_main_return:-return}(result != 0)
14954
14955   ;
14956   return 0;
14957 }
14958 _ACEOF
14959 rm -f conftest.$ac_objext conftest$ac_exeext
14960 if { (eval echo "$as_me:14960: \"$ac_link\"") >&5
14961   (eval $ac_link) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit $ac_status); } &&
14965          { ac_try='test -s conftest$ac_exeext'
14966   { (eval echo "$as_me:14966: \"$ac_try\"") >&5
14967   (eval $ac_try) 2>&5
14968   ac_status=$?
14969   echo "$as_me:14969: \$? = $ac_status" >&5
14970   (exit $ac_status); }; }; then
14971
14972         if test -n "$cf_db_libs" ; then
14973                 cf_cv_hashed_db_libs=$cf_db_libs
14974         else
14975                 cf_cv_hashed_db_libs=default
14976         fi
14977         LIBS="$cf_save_libs"
14978         break
14979
14980 else
14981   echo "$as_me: failed program was:" >&5
14982 cat conftest.$ac_ext >&5
14983 fi
14984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14985         LIBS="$cf_save_libs"
14986 done
14987
14988 fi
14989 echo "$as_me:14989: result: $cf_cv_hashed_db_libs" >&5
14990 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14991
14992         if test "$cf_cv_hashed_db_libs" = unknown ; then
14993                 { { echo "$as_me:14993: error: Cannot determine library for db" >&5
14994 echo "$as_me: error: Cannot determine library for db" >&2;}
14995    { (exit 1); exit 1; }; }
14996         elif test "$cf_cv_hashed_db_libs" != default ; then
14997                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14998         fi
14999 fi
15000
15001 else
15002
15003         { { echo "$as_me:15003: error: Cannot find db.h" >&5
15004 echo "$as_me: error: Cannot find db.h" >&2;}
15005    { (exit 1); exit 1; }; }
15006
15007 fi
15008
15009 fi
15010
15011 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15012         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15013         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15014 fi
15015
15016 # Just in case, check if the C compiler has a bool type.
15017
15018 echo "$as_me:15018: checking if we should include stdbool.h" >&5
15019 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15020
15021 if test "${cf_cv_header_stdbool_h+set}" = set; then
15022   echo $ECHO_N "(cached) $ECHO_C" >&6
15023 else
15024
15025         cat >conftest.$ac_ext <<_ACEOF
15026 #line 15026 "configure"
15027 #include "confdefs.h"
15028
15029 int
15030 main ()
15031 {
15032 bool foo = false
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext
15038 if { (eval echo "$as_me:15038: \"$ac_compile\"") >&5
15039   (eval $ac_compile) 2>&5
15040   ac_status=$?
15041   echo "$as_me:15041: \$? = $ac_status" >&5
15042   (exit $ac_status); } &&
15043          { ac_try='test -s conftest.$ac_objext'
15044   { (eval echo "$as_me:15044: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   cf_cv_header_stdbool_h=0
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 cat conftest.$ac_ext >&5
15053 cat >conftest.$ac_ext <<_ACEOF
15054 #line 15054 "configure"
15055 #include "confdefs.h"
15056
15057 #ifndef __BEOS__
15058 #include <stdbool.h>
15059 #endif
15060
15061 int
15062 main ()
15063 {
15064 bool foo = false
15065   ;
15066   return 0;
15067 }
15068 _ACEOF
15069 rm -f conftest.$ac_objext
15070 if { (eval echo "$as_me:15070: \"$ac_compile\"") >&5
15071   (eval $ac_compile) 2>&5
15072   ac_status=$?
15073   echo "$as_me:15073: \$? = $ac_status" >&5
15074   (exit $ac_status); } &&
15075          { ac_try='test -s conftest.$ac_objext'
15076   { (eval echo "$as_me:15076: \"$ac_try\"") >&5
15077   (eval $ac_try) 2>&5
15078   ac_status=$?
15079   echo "$as_me:15079: \$? = $ac_status" >&5
15080   (exit $ac_status); }; }; then
15081   cf_cv_header_stdbool_h=1
15082 else
15083   echo "$as_me: failed program was:" >&5
15084 cat conftest.$ac_ext >&5
15085 cf_cv_header_stdbool_h=0
15086 fi
15087 rm -f conftest.$ac_objext conftest.$ac_ext
15088 fi
15089 rm -f conftest.$ac_objext conftest.$ac_ext
15090 fi
15091
15092 if test "$cf_cv_header_stdbool_h" = 1
15093 then    echo "$as_me:15093: result: yes" >&5
15094 echo "${ECHO_T}yes" >&6
15095 else    echo "$as_me:15095: result: no" >&5
15096 echo "${ECHO_T}no" >&6
15097 fi
15098
15099 echo "$as_me:15099: checking for builtin bool type" >&5
15100 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15101
15102 if test "${cf_cv_cc_bool_type+set}" = set; then
15103   echo $ECHO_N "(cached) $ECHO_C" >&6
15104 else
15105
15106         cat >conftest.$ac_ext <<_ACEOF
15107 #line 15107 "configure"
15108 #include "confdefs.h"
15109
15110 #include <stdio.h>
15111 #include <sys/types.h>
15112
15113 int
15114 main ()
15115 {
15116 bool x = false
15117   ;
15118   return 0;
15119 }
15120 _ACEOF
15121 rm -f conftest.$ac_objext
15122 if { (eval echo "$as_me:15122: \"$ac_compile\"") >&5
15123   (eval $ac_compile) 2>&5
15124   ac_status=$?
15125   echo "$as_me:15125: \$? = $ac_status" >&5
15126   (exit $ac_status); } &&
15127          { ac_try='test -s conftest.$ac_objext'
15128   { (eval echo "$as_me:15128: \"$ac_try\"") >&5
15129   (eval $ac_try) 2>&5
15130   ac_status=$?
15131   echo "$as_me:15131: \$? = $ac_status" >&5
15132   (exit $ac_status); }; }; then
15133   cf_cv_cc_bool_type=1
15134 else
15135   echo "$as_me: failed program was:" >&5
15136 cat conftest.$ac_ext >&5
15137 cf_cv_cc_bool_type=0
15138 fi
15139 rm -f conftest.$ac_objext conftest.$ac_ext
15140
15141 fi
15142
15143 if test "$cf_cv_cc_bool_type" = 1
15144 then    echo "$as_me:15144: result: yes" >&5
15145 echo "${ECHO_T}yes" >&6
15146 else    echo "$as_me:15146: result: no" >&5
15147 echo "${ECHO_T}no" >&6
15148 fi
15149
15150 # Check for C++ compiler characteristics (and ensure that it's there!)
15151 if test -n "$CXX" ; then
15152         ac_ext=cc
15153 ac_cpp='$CXXCPP $CPPFLAGS'
15154 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15155 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15156 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15157 ac_main_return=return
15158
15159 if test -n "$GXX" ; then
15160 case $cf_cv_system_name in #(vi
15161 os2*) #(vi
15162         cf_stdcpp_libname=stdcpp
15163         ;;
15164 *)
15165         cf_stdcpp_libname=stdc++
15166         ;;
15167 esac
15168 echo "$as_me:15168: checking for library $cf_stdcpp_libname" >&5
15169 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15170 if test "${cf_cv_libstdcpp+set}" = set; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173
15174         cf_save="$LIBS"
15175         LIBS="$LIBS -l$cf_stdcpp_libname"
15176 cat >conftest.$ac_ext <<_ACEOF
15177 #line 15177 "configure"
15178 #include "confdefs.h"
15179
15180 #include <strstream.h>
15181 int
15182 main ()
15183 {
15184
15185 char buf[80];
15186 strstreambuf foo(buf, sizeof(buf))
15187
15188   ;
15189   return 0;
15190 }
15191 _ACEOF
15192 rm -f conftest.$ac_objext conftest$ac_exeext
15193 if { (eval echo "$as_me:15193: \"$ac_link\"") >&5
15194   (eval $ac_link) 2>&5
15195   ac_status=$?
15196   echo "$as_me:15196: \$? = $ac_status" >&5
15197   (exit $ac_status); } &&
15198          { ac_try='test -s conftest$ac_exeext'
15199   { (eval echo "$as_me:15199: \"$ac_try\"") >&5
15200   (eval $ac_try) 2>&5
15201   ac_status=$?
15202   echo "$as_me:15202: \$? = $ac_status" >&5
15203   (exit $ac_status); }; }; then
15204   cf_cv_libstdcpp=yes
15205 else
15206   echo "$as_me: failed program was:" >&5
15207 cat conftest.$ac_ext >&5
15208 cf_cv_libstdcpp=no
15209 fi
15210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15211         LIBS="$cf_save"
15212
15213 fi
15214 echo "$as_me:15214: result: $cf_cv_libstdcpp" >&5
15215 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15216 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15217 fi
15218
15219         echo "$as_me:15219: checking whether $CXX understands -c and -o together" >&5
15220 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15221 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15222   echo $ECHO_N "(cached) $ECHO_C" >&6
15223 else
15224
15225 cat > conftest.$ac_ext <<CF_EOF
15226 #include <stdio.h>
15227 int main()
15228 {
15229         ${cf_cv_main_return:-return}(0);
15230 }
15231 CF_EOF
15232 # We do the test twice because some compilers refuse to overwrite an
15233 # existing .o file with -o, though they will create one.
15234 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15235 if { (eval echo "$as_me:15235: \"$ac_try\"") >&5
15236   (eval $ac_try) 2>&5
15237   ac_status=$?
15238   echo "$as_me:15238: \$? = $ac_status" >&5
15239   (exit $ac_status); } &&
15240   test -f conftest2.$ac_objext && { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15241   (eval $ac_try) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit $ac_status); };
15245 then
15246   eval cf_cv_prog_CXX_c_o=yes
15247 else
15248   eval cf_cv_prog_CXX_c_o=no
15249 fi
15250 rm -f conftest*
15251
15252 fi
15253 if test $cf_cv_prog_CXX_c_o = yes; then
15254   echo "$as_me:15254: result: yes" >&5
15255 echo "${ECHO_T}yes" >&6
15256 else
15257   echo "$as_me:15257: result: no" >&5
15258 echo "${ECHO_T}no" >&6
15259 fi
15260
15261         case $GXX_VERSION in
15262         1*|2.0-6*)
15263                 cf_cxx_library=yes
15264                 ;;
15265         *-2.7*|2.7*)
15266
15267 cf_cxx_library=unknown
15268 case $cf_cv_system_name in #(vi
15269 os2*) #(vi
15270         cf_gpp_libname=gpp
15271         ;;
15272 *)
15273         cf_gpp_libname=g++
15274         ;;
15275 esac
15276 if test "$GXX" = yes; then
15277         echo "$as_me:15277: checking for lib$cf_gpp_libname" >&5
15278 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15279         cf_save="$LIBS"
15280         LIBS="$LIBS -l$cf_gpp_libname"
15281         cat >conftest.$ac_ext <<_ACEOF
15282 #line 15282 "configure"
15283 #include "confdefs.h"
15284
15285 #include <$cf_gpp_libname/builtin.h>
15286
15287 int
15288 main ()
15289 {
15290 two_arg_error_handler_t foo2 = lib_error_handler
15291   ;
15292   return 0;
15293 }
15294 _ACEOF
15295 rm -f conftest.$ac_objext conftest$ac_exeext
15296 if { (eval echo "$as_me:15296: \"$ac_link\"") >&5
15297   (eval $ac_link) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); } &&
15301          { ac_try='test -s conftest$ac_exeext'
15302   { (eval echo "$as_me:15302: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:15305: \$? = $ac_status" >&5
15306   (exit $ac_status); }; }; then
15307   cf_cxx_library=yes
15308          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15309          if test "$cf_gpp_libname" = cpp ; then
15310             cat >>confdefs.h <<\EOF
15311 #define HAVE_GPP_BUILTIN_H 1
15312 EOF
15313
15314          else
15315             cat >>confdefs.h <<\EOF
15316 #define HAVE_GXX_BUILTIN_H 1
15317 EOF
15318
15319          fi
15320 else
15321   echo "$as_me: failed program was:" >&5
15322 cat conftest.$ac_ext >&5
15323 cat >conftest.$ac_ext <<_ACEOF
15324 #line 15324 "configure"
15325 #include "confdefs.h"
15326
15327 #include <builtin.h>
15328
15329 int
15330 main ()
15331 {
15332 two_arg_error_handler_t foo2 = lib_error_handler
15333   ;
15334   return 0;
15335 }
15336 _ACEOF
15337 rm -f conftest.$ac_objext conftest$ac_exeext
15338 if { (eval echo "$as_me:15338: \"$ac_link\"") >&5
15339   (eval $ac_link) 2>&5
15340   ac_status=$?
15341   echo "$as_me:15341: \$? = $ac_status" >&5
15342   (exit $ac_status); } &&
15343          { ac_try='test -s conftest$ac_exeext'
15344   { (eval echo "$as_me:15344: \"$ac_try\"") >&5
15345   (eval $ac_try) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); }; }; then
15349   cf_cxx_library=yes
15350          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15351          cat >>confdefs.h <<\EOF
15352 #define HAVE_BUILTIN_H 1
15353 EOF
15354
15355 else
15356   echo "$as_me: failed program was:" >&5
15357 cat conftest.$ac_ext >&5
15358 cf_cxx_library=no
15359 fi
15360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15361 fi
15362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15363         LIBS="$cf_save"
15364         echo "$as_me:15364: result: $cf_cxx_library" >&5
15365 echo "${ECHO_T}$cf_cxx_library" >&6
15366 fi
15367
15368                 ;;
15369         *)
15370                 cf_cxx_library=no
15371                 ;;
15372         esac
15373
15374         ac_ext=cc
15375 ac_cpp='$CXXCPP $CPPFLAGS'
15376 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15377 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15378 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15379 ac_main_return=return
15380 echo "$as_me:15380: checking how to run the C++ preprocessor" >&5
15381 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15382 if test -z "$CXXCPP"; then
15383   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15384   echo $ECHO_N "(cached) $ECHO_C" >&6
15385 else
15386       # Double quotes because CXXCPP needs to be expanded
15387     for CXXCPP in "$CXX -E" "/lib/cpp"
15388     do
15389       ac_preproc_ok=false
15390 for ac_cxx_preproc_warn_flag in '' yes
15391 do
15392   # Use a header file that comes with gcc, so configuring glibc
15393   # with a fresh cross-compiler works.
15394   # On the NeXT, cc -E runs the code through the compiler's parser,
15395   # not just through cpp. "Syntax error" is here to catch this case.
15396   cat >conftest.$ac_ext <<_ACEOF
15397 #line 15397 "configure"
15398 #include "confdefs.h"
15399 #include <assert.h>
15400                      Syntax error
15401 _ACEOF
15402 if { (eval echo "$as_me:15402: \"$ac_cpp conftest.$ac_ext\"") >&5
15403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15404   ac_status=$?
15405   egrep -v '^ *\+' conftest.er1 >conftest.err
15406   rm -f conftest.er1
15407   cat conftest.err >&5
15408   echo "$as_me:15408: \$? = $ac_status" >&5
15409   (exit $ac_status); } >/dev/null; then
15410   if test -s conftest.err; then
15411     ac_cpp_err=$ac_cxx_preproc_warn_flag
15412   else
15413     ac_cpp_err=
15414   fi
15415 else
15416   ac_cpp_err=yes
15417 fi
15418 if test -z "$ac_cpp_err"; then
15419   :
15420 else
15421   echo "$as_me: failed program was:" >&5
15422   cat conftest.$ac_ext >&5
15423   # Broken: fails on valid input.
15424 continue
15425 fi
15426 rm -f conftest.err conftest.$ac_ext
15427
15428   # OK, works on sane cases.  Now check whether non-existent headers
15429   # can be detected and how.
15430   cat >conftest.$ac_ext <<_ACEOF
15431 #line 15431 "configure"
15432 #include "confdefs.h"
15433 #include <ac_nonexistent.h>
15434 _ACEOF
15435 if { (eval echo "$as_me:15435: \"$ac_cpp conftest.$ac_ext\"") >&5
15436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15437   ac_status=$?
15438   egrep -v '^ *\+' conftest.er1 >conftest.err
15439   rm -f conftest.er1
15440   cat conftest.err >&5
15441   echo "$as_me:15441: \$? = $ac_status" >&5
15442   (exit $ac_status); } >/dev/null; then
15443   if test -s conftest.err; then
15444     ac_cpp_err=$ac_cxx_preproc_warn_flag
15445   else
15446     ac_cpp_err=
15447   fi
15448 else
15449   ac_cpp_err=yes
15450 fi
15451 if test -z "$ac_cpp_err"; then
15452   # Broken: success on invalid input.
15453 continue
15454 else
15455   echo "$as_me: failed program was:" >&5
15456   cat conftest.$ac_ext >&5
15457   # Passes both tests.
15458 ac_preproc_ok=:
15459 break
15460 fi
15461 rm -f conftest.err conftest.$ac_ext
15462
15463 done
15464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15465 rm -f conftest.err conftest.$ac_ext
15466 if $ac_preproc_ok; then
15467   break
15468 fi
15469
15470     done
15471     ac_cv_prog_CXXCPP=$CXXCPP
15472
15473 fi
15474   CXXCPP=$ac_cv_prog_CXXCPP
15475 else
15476   ac_cv_prog_CXXCPP=$CXXCPP
15477 fi
15478 echo "$as_me:15478: result: $CXXCPP" >&5
15479 echo "${ECHO_T}$CXXCPP" >&6
15480 ac_preproc_ok=false
15481 for ac_cxx_preproc_warn_flag in '' yes
15482 do
15483   # Use a header file that comes with gcc, so configuring glibc
15484   # with a fresh cross-compiler works.
15485   # On the NeXT, cc -E runs the code through the compiler's parser,
15486   # not just through cpp. "Syntax error" is here to catch this case.
15487   cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15490 #include <assert.h>
15491                      Syntax error
15492 _ACEOF
15493 if { (eval echo "$as_me:15493: \"$ac_cpp conftest.$ac_ext\"") >&5
15494   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15495   ac_status=$?
15496   egrep -v '^ *\+' conftest.er1 >conftest.err
15497   rm -f conftest.er1
15498   cat conftest.err >&5
15499   echo "$as_me:15499: \$? = $ac_status" >&5
15500   (exit $ac_status); } >/dev/null; then
15501   if test -s conftest.err; then
15502     ac_cpp_err=$ac_cxx_preproc_warn_flag
15503   else
15504     ac_cpp_err=
15505   fi
15506 else
15507   ac_cpp_err=yes
15508 fi
15509 if test -z "$ac_cpp_err"; then
15510   :
15511 else
15512   echo "$as_me: failed program was:" >&5
15513   cat conftest.$ac_ext >&5
15514   # Broken: fails on valid input.
15515 continue
15516 fi
15517 rm -f conftest.err conftest.$ac_ext
15518
15519   # OK, works on sane cases.  Now check whether non-existent headers
15520   # can be detected and how.
15521   cat >conftest.$ac_ext <<_ACEOF
15522 #line 15522 "configure"
15523 #include "confdefs.h"
15524 #include <ac_nonexistent.h>
15525 _ACEOF
15526 if { (eval echo "$as_me:15526: \"$ac_cpp conftest.$ac_ext\"") >&5
15527   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15528   ac_status=$?
15529   egrep -v '^ *\+' conftest.er1 >conftest.err
15530   rm -f conftest.er1
15531   cat conftest.err >&5
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit $ac_status); } >/dev/null; then
15534   if test -s conftest.err; then
15535     ac_cpp_err=$ac_cxx_preproc_warn_flag
15536   else
15537     ac_cpp_err=
15538   fi
15539 else
15540   ac_cpp_err=yes
15541 fi
15542 if test -z "$ac_cpp_err"; then
15543   # Broken: success on invalid input.
15544 continue
15545 else
15546   echo "$as_me: failed program was:" >&5
15547   cat conftest.$ac_ext >&5
15548   # Passes both tests.
15549 ac_preproc_ok=:
15550 break
15551 fi
15552 rm -f conftest.err conftest.$ac_ext
15553
15554 done
15555 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15556 rm -f conftest.err conftest.$ac_ext
15557 if $ac_preproc_ok; then
15558   :
15559 else
15560   { { echo "$as_me:15560: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15561 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15562    { (exit 1); exit 1; }; }
15563 fi
15564
15565 ac_ext=cc
15566 ac_cpp='$CXXCPP $CPPFLAGS'
15567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15568 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15570 ac_main_return=return
15571
15572 for ac_header in iostream typeinfo
15573 do
15574 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15575 echo "$as_me:15575: checking for $ac_header" >&5
15576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15578   echo $ECHO_N "(cached) $ECHO_C" >&6
15579 else
15580   cat >conftest.$ac_ext <<_ACEOF
15581 #line 15581 "configure"
15582 #include "confdefs.h"
15583 #include <$ac_header>
15584 _ACEOF
15585 if { (eval echo "$as_me:15585: \"$ac_cpp conftest.$ac_ext\"") >&5
15586   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15587   ac_status=$?
15588   egrep -v '^ *\+' conftest.er1 >conftest.err
15589   rm -f conftest.er1
15590   cat conftest.err >&5
15591   echo "$as_me:15591: \$? = $ac_status" >&5
15592   (exit $ac_status); } >/dev/null; then
15593   if test -s conftest.err; then
15594     ac_cpp_err=$ac_cxx_preproc_warn_flag
15595   else
15596     ac_cpp_err=
15597   fi
15598 else
15599   ac_cpp_err=yes
15600 fi
15601 if test -z "$ac_cpp_err"; then
15602   eval "$as_ac_Header=yes"
15603 else
15604   echo "$as_me: failed program was:" >&5
15605   cat conftest.$ac_ext >&5
15606   eval "$as_ac_Header=no"
15607 fi
15608 rm -f conftest.err conftest.$ac_ext
15609 fi
15610 echo "$as_me:15610: result: `eval echo '${'$as_ac_Header'}'`" >&5
15611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15613   cat >>confdefs.h <<EOF
15614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15615 EOF
15616
15617 fi
15618 done
15619
15620     if test x"$ac_cv_header_iostream" = xyes ; then
15621         echo "$as_me:15621: checking if iostream uses std-namespace" >&5
15622 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15623         cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626
15627 #include <iostream>
15628 using std::endl;
15629 using std::cerr;
15630 int
15631 main ()
15632 {
15633
15634 cerr << "testing" << endl;
15635
15636   ;
15637   return 0;
15638 }
15639 _ACEOF
15640 rm -f conftest.$ac_objext
15641 if { (eval echo "$as_me:15641: \"$ac_compile\"") >&5
15642   (eval $ac_compile) 2>&5
15643   ac_status=$?
15644   echo "$as_me:15644: \$? = $ac_status" >&5
15645   (exit $ac_status); } &&
15646          { ac_try='test -s conftest.$ac_objext'
15647   { (eval echo "$as_me:15647: \"$ac_try\"") >&5
15648   (eval $ac_try) 2>&5
15649   ac_status=$?
15650   echo "$as_me:15650: \$? = $ac_status" >&5
15651   (exit $ac_status); }; }; then
15652   cf_iostream_namespace=yes
15653 else
15654   echo "$as_me: failed program was:" >&5
15655 cat conftest.$ac_ext >&5
15656 cf_iostream_namespace=no
15657 fi
15658 rm -f conftest.$ac_objext conftest.$ac_ext
15659         echo "$as_me:15659: result: $cf_iostream_namespace" >&5
15660 echo "${ECHO_T}$cf_iostream_namespace" >&6
15661         if test "$cf_iostream_namespace" = yes ; then
15662             cat >>confdefs.h <<\EOF
15663 #define IOSTREAM_NAMESPACE 1
15664 EOF
15665
15666         fi
15667     fi
15668
15669 echo "$as_me:15669: checking if we should include stdbool.h" >&5
15670 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15671
15672 if test "${cf_cv_header_stdbool_h+set}" = set; then
15673   echo $ECHO_N "(cached) $ECHO_C" >&6
15674 else
15675
15676         cat >conftest.$ac_ext <<_ACEOF
15677 #line 15677 "configure"
15678 #include "confdefs.h"
15679
15680 int
15681 main ()
15682 {
15683 bool foo = false
15684   ;
15685   return 0;
15686 }
15687 _ACEOF
15688 rm -f conftest.$ac_objext
15689 if { (eval echo "$as_me:15689: \"$ac_compile\"") >&5
15690   (eval $ac_compile) 2>&5
15691   ac_status=$?
15692   echo "$as_me:15692: \$? = $ac_status" >&5
15693   (exit $ac_status); } &&
15694          { ac_try='test -s conftest.$ac_objext'
15695   { (eval echo "$as_me:15695: \"$ac_try\"") >&5
15696   (eval $ac_try) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); }; }; then
15700   cf_cv_header_stdbool_h=0
15701 else
15702   echo "$as_me: failed program was:" >&5
15703 cat conftest.$ac_ext >&5
15704 cat >conftest.$ac_ext <<_ACEOF
15705 #line 15705 "configure"
15706 #include "confdefs.h"
15707
15708 #ifndef __BEOS__
15709 #include <stdbool.h>
15710 #endif
15711
15712 int
15713 main ()
15714 {
15715 bool foo = false
15716   ;
15717   return 0;
15718 }
15719 _ACEOF
15720 rm -f conftest.$ac_objext
15721 if { (eval echo "$as_me:15721: \"$ac_compile\"") >&5
15722   (eval $ac_compile) 2>&5
15723   ac_status=$?
15724   echo "$as_me:15724: \$? = $ac_status" >&5
15725   (exit $ac_status); } &&
15726          { ac_try='test -s conftest.$ac_objext'
15727   { (eval echo "$as_me:15727: \"$ac_try\"") >&5
15728   (eval $ac_try) 2>&5
15729   ac_status=$?
15730   echo "$as_me:15730: \$? = $ac_status" >&5
15731   (exit $ac_status); }; }; then
15732   cf_cv_header_stdbool_h=1
15733 else
15734   echo "$as_me: failed program was:" >&5
15735 cat conftest.$ac_ext >&5
15736 cf_cv_header_stdbool_h=0
15737 fi
15738 rm -f conftest.$ac_objext conftest.$ac_ext
15739 fi
15740 rm -f conftest.$ac_objext conftest.$ac_ext
15741 fi
15742
15743 if test "$cf_cv_header_stdbool_h" = 1
15744 then    echo "$as_me:15744: result: yes" >&5
15745 echo "${ECHO_T}yes" >&6
15746 else    echo "$as_me:15746: result: no" >&5
15747 echo "${ECHO_T}no" >&6
15748 fi
15749
15750 echo "$as_me:15750: checking for builtin bool type" >&5
15751 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15752
15753 if test "${cf_cv_builtin_bool+set}" = set; then
15754   echo $ECHO_N "(cached) $ECHO_C" >&6
15755 else
15756
15757         cat >conftest.$ac_ext <<_ACEOF
15758 #line 15758 "configure"
15759 #include "confdefs.h"
15760
15761 #include <stdio.h>
15762 #include <sys/types.h>
15763
15764 int
15765 main ()
15766 {
15767 bool x = false
15768   ;
15769   return 0;
15770 }
15771 _ACEOF
15772 rm -f conftest.$ac_objext
15773 if { (eval echo "$as_me:15773: \"$ac_compile\"") >&5
15774   (eval $ac_compile) 2>&5
15775   ac_status=$?
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit $ac_status); } &&
15778          { ac_try='test -s conftest.$ac_objext'
15779   { (eval echo "$as_me:15779: \"$ac_try\"") >&5
15780   (eval $ac_try) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit $ac_status); }; }; then
15784   cf_cv_builtin_bool=1
15785 else
15786   echo "$as_me: failed program was:" >&5
15787 cat conftest.$ac_ext >&5
15788 cf_cv_builtin_bool=0
15789 fi
15790 rm -f conftest.$ac_objext conftest.$ac_ext
15791
15792 fi
15793
15794 if test "$cf_cv_builtin_bool" = 1
15795 then    echo "$as_me:15795: result: yes" >&5
15796 echo "${ECHO_T}yes" >&6
15797 else    echo "$as_me:15797: result: no" >&5
15798 echo "${ECHO_T}no" >&6
15799 fi
15800
15801 echo "$as_me:15801: checking for size of bool" >&5
15802 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15803 if test "${cf_cv_type_of_bool+set}" = set; then
15804   echo $ECHO_N "(cached) $ECHO_C" >&6
15805 else
15806
15807         rm -f cf_test.out
15808         if test "$cross_compiling" = yes; then
15809   cf_cv_type_of_bool=unknown
15810 else
15811   cat >conftest.$ac_ext <<_ACEOF
15812 #line 15812 "configure"
15813 #include "confdefs.h"
15814
15815 #include <stdlib.h>
15816 #include <stdio.h>
15817
15818 #if defined(__cplusplus)
15819
15820 #ifdef HAVE_GXX_BUILTIN_H
15821 #include <g++/builtin.h>
15822 #elif HAVE_GPP_BUILTIN_H
15823 #include <gpp/builtin.h>
15824 #elif HAVE_BUILTIN_H
15825 #include <builtin.h>
15826 #endif
15827
15828 #else
15829
15830 #if $cf_cv_header_stdbool_h
15831 #include <stdbool.h>
15832 #endif
15833
15834 #endif
15835
15836 main()
15837 {
15838         FILE *fp = fopen("cf_test.out", "w");
15839         if (fp != 0) {
15840                 bool x = true;
15841                 if ((bool)(-x) >= 0)
15842                         fputs("unsigned ", fp);
15843                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15844                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15845                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15846                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15847                 fclose(fp);
15848         }
15849         ${cf_cv_main_return:-return}(0);
15850 }
15851
15852 _ACEOF
15853 rm -f conftest$ac_exeext
15854 if { (eval echo "$as_me:15854: \"$ac_link\"") >&5
15855   (eval $ac_link) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15859   { (eval echo "$as_me:15859: \"$ac_try\"") >&5
15860   (eval $ac_try) 2>&5
15861   ac_status=$?
15862   echo "$as_me:15862: \$? = $ac_status" >&5
15863   (exit $ac_status); }; }; then
15864   cf_cv_type_of_bool=`cat cf_test.out`
15865                  if test -z "$cf_cv_type_of_bool"; then
15866                    cf_cv_type_of_bool=unknown
15867                  fi
15868 else
15869   echo "$as_me: program exited with status $ac_status" >&5
15870 echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 cf_cv_type_of_bool=unknown
15873 fi
15874 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15875 fi
15876
15877 fi
15878
15879         rm -f cf_test.out
15880 echo "$as_me:15880: result: $cf_cv_type_of_bool" >&5
15881 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15882 if test "$cf_cv_type_of_bool" = unknown ; then
15883         case .$NCURSES_BOOL in #(vi
15884         .auto|.) NCURSES_BOOL=unsigned;;
15885         esac
15886         { echo "$as_me:15886: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15887 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15888         cf_cv_type_of_bool=$NCURSES_BOOL
15889 fi
15890
15891 echo "$as_me:15891: checking for special defines needed for etip.h" >&5
15892 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15893 cf_save_CXXFLAGS="$CXXFLAGS"
15894 cf_result="none"
15895 for cf_math in "" MATH_H
15896 do
15897 for cf_excp in "" MATH_EXCEPTION
15898 do
15899         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15900         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15901         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15902 cat >conftest.$ac_ext <<_ACEOF
15903 #line 15903 "configure"
15904 #include "confdefs.h"
15905
15906 #include <etip.h.in>
15907
15908 int
15909 main ()
15910 {
15911
15912   ;
15913   return 0;
15914 }
15915 _ACEOF
15916 rm -f conftest.$ac_objext
15917 if { (eval echo "$as_me:15917: \"$ac_compile\"") >&5
15918   (eval $ac_compile) 2>&5
15919   ac_status=$?
15920   echo "$as_me:15920: \$? = $ac_status" >&5
15921   (exit $ac_status); } &&
15922          { ac_try='test -s conftest.$ac_objext'
15923   { (eval echo "$as_me:15923: \"$ac_try\"") >&5
15924   (eval $ac_try) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); }; }; then
15928
15929         test -n "$cf_math" && cat >>confdefs.h <<EOF
15930 #define ETIP_NEEDS_${cf_math} 1
15931 EOF
15932
15933         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15934 #define ETIP_NEEDS_${cf_excp} 1
15935 EOF
15936
15937         cf_result="$cf_math $cf_excp"
15938         break
15939
15940 else
15941   echo "$as_me: failed program was:" >&5
15942 cat conftest.$ac_ext >&5
15943 fi
15944 rm -f conftest.$ac_objext conftest.$ac_ext
15945 done
15946 done
15947 echo "$as_me:15947: result: $cf_result" >&5
15948 echo "${ECHO_T}$cf_result" >&6
15949 CXXFLAGS="$cf_save_CXXFLAGS"
15950
15951 if test -n "$CXX"; then
15952 echo "$as_me:15952: checking if $CXX accepts parameter initialization" >&5
15953 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15954 if test "${cf_cv_cpp_param_init+set}" = set; then
15955   echo $ECHO_N "(cached) $ECHO_C" >&6
15956 else
15957
15958         ac_ext=cc
15959 ac_cpp='$CXXCPP $CPPFLAGS'
15960 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15961 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15962 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15963 ac_main_return=return
15964
15965         if test "$cross_compiling" = yes; then
15966   cf_cv_cpp_param_init=unknown
15967 else
15968   cat >conftest.$ac_ext <<_ACEOF
15969 #line 15969 "configure"
15970 #include "confdefs.h"
15971
15972 class TEST {
15973 private:
15974         int value;
15975 public:
15976         TEST(int x = 1);
15977         ~TEST();
15978 };
15979
15980 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15981 {
15982         value = x;
15983 }
15984 void main() { }
15985
15986 _ACEOF
15987 rm -f conftest$ac_exeext
15988 if { (eval echo "$as_me:15988: \"$ac_link\"") >&5
15989   (eval $ac_link) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15993   { (eval echo "$as_me:15993: \"$ac_try\"") >&5
15994   (eval $ac_try) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); }; }; then
15998   cf_cv_cpp_param_init=yes
15999 else
16000   echo "$as_me: program exited with status $ac_status" >&5
16001 echo "$as_me: failed program was:" >&5
16002 cat conftest.$ac_ext >&5
16003 cf_cv_cpp_param_init=no
16004 fi
16005 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16006 fi
16007         ac_ext=cc
16008 ac_cpp='$CXXCPP $CPPFLAGS'
16009 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16010 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16011 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16012 ac_main_return=return
16013
16014 fi
16015 echo "$as_me:16015: result: $cf_cv_cpp_param_init" >&5
16016 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16017 fi
16018 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16019 #define CPP_HAS_PARAM_INIT 1
16020 EOF
16021
16022 if test -n "$CXX"; then
16023
16024 echo "$as_me:16024: checking if $CXX accepts static_cast" >&5
16025 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16026 if test "${cf_cv_cpp_static_cast+set}" = set; then
16027   echo $ECHO_N "(cached) $ECHO_C" >&6
16028 else
16029
16030         ac_ext=cc
16031 ac_cpp='$CXXCPP $CPPFLAGS'
16032 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16033 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16034 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16035 ac_main_return=return
16036
16037         cat >conftest.$ac_ext <<_ACEOF
16038 #line 16038 "configure"
16039 #include "confdefs.h"
16040
16041 class NCursesPanel
16042 {
16043 public:
16044   NCursesPanel(int nlines,
16045                int ncols,
16046                int begin_y = 0,
16047                int begin_x = 0)
16048   {
16049   }
16050
16051   ~NCursesPanel();
16052 };
16053
16054 template<class T> class NCursesUserPanel : public NCursesPanel
16055 {
16056 public:
16057   NCursesUserPanel (int nlines,
16058                     int ncols,
16059                     int begin_y = 0,
16060                     int begin_x = 0,
16061                     const T* p_UserData = static_cast<T*>(0))
16062     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16063   {
16064   };
16065   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16066   {
16067   };
16068
16069   virtual ~NCursesUserPanel() {};
16070 };
16071
16072 int
16073 main ()
16074 {
16075
16076         const char* p_UserData = static_cast<char*>(0)
16077   ;
16078   return 0;
16079 }
16080 _ACEOF
16081 rm -f conftest.$ac_objext
16082 if { (eval echo "$as_me:16082: \"$ac_compile\"") >&5
16083   (eval $ac_compile) 2>&5
16084   ac_status=$?
16085   echo "$as_me:16085: \$? = $ac_status" >&5
16086   (exit $ac_status); } &&
16087          { ac_try='test -s conftest.$ac_objext'
16088   { (eval echo "$as_me:16088: \"$ac_try\"") >&5
16089   (eval $ac_try) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); }; }; then
16093   cf_cv_cpp_static_cast=yes
16094 else
16095   echo "$as_me: failed program was:" >&5
16096 cat conftest.$ac_ext >&5
16097 cf_cv_cpp_static_cast=no
16098 fi
16099 rm -f conftest.$ac_objext conftest.$ac_ext
16100
16101         ac_ext=cc
16102 ac_cpp='$CXXCPP $CPPFLAGS'
16103 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16104 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16105 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16106 ac_main_return=return
16107
16108 fi
16109 echo "$as_me:16109: result: $cf_cv_cpp_static_cast" >&5
16110 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16111
16112 fi
16113
16114 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16115 #define CPP_HAS_STATIC_CAST 1
16116 EOF
16117
16118         CXX_AR='$(AR)'
16119         CXX_ARFLAGS='$(ARFLAGS)'
16120         case $cf_cv_system_name in #(vi
16121         irix*) #(vi
16122             if test "$GXX" != yes ; then
16123                 CXX_AR='$(CXX)'
16124                 CXX_ARFLAGS='-ar -o'
16125             fi
16126             ;;
16127         sco3.2v5*) #(vi
16128             CXXLDFLAGS="-u main"
16129             ;;
16130         solaris2*)
16131             if test "$GXX" != yes ; then
16132                 CXX_AR='$(CXX)'
16133                 CXX_ARFLAGS='-xar -o'
16134             fi
16135             ;;
16136         esac
16137
16138 else
16139         cf_cxx_library=no
16140         cf_cv_builtin_bool=1
16141
16142         # Just because we are not configuring against C++ right now does not
16143         # mean that a user will not want to use C++.  Some distributors disable
16144         # the C++ portion of this configuration as a shortcut (or just to avoid
16145         # compiling the demo in the c++ directory).  So we need a reasonable
16146         # default for the 'bool' type.
16147         #
16148         # Caveat: since the storage of the bool type is not standardized, it
16149         # may change.
16150
16151         if test "$NCURSES_BOOL" != auto ; then
16152                 cf_cv_type_of_bool=$NCURSES_BOOL
16153                 cf_cv_header_stdbool_h=0
16154         else
16155                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16156
16157 echo "$as_me:16157: checking for size of bool" >&5
16158 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16159 if test "${cf_cv_type_of_bool+set}" = set; then
16160   echo $ECHO_N "(cached) $ECHO_C" >&6
16161 else
16162
16163         rm -f cf_test.out
16164         if test "$cross_compiling" = yes; then
16165   cf_cv_type_of_bool=unknown
16166 else
16167   cat >conftest.$ac_ext <<_ACEOF
16168 #line 16168 "configure"
16169 #include "confdefs.h"
16170
16171 #include <stdlib.h>
16172 #include <stdio.h>
16173
16174 #if defined(__cplusplus)
16175
16176 #ifdef HAVE_GXX_BUILTIN_H
16177 #include <g++/builtin.h>
16178 #elif HAVE_GPP_BUILTIN_H
16179 #include <gpp/builtin.h>
16180 #elif HAVE_BUILTIN_H
16181 #include <builtin.h>
16182 #endif
16183
16184 #else
16185
16186 #if $cf_cv_header_stdbool_h
16187 #include <stdbool.h>
16188 #endif
16189
16190 #endif
16191
16192 main()
16193 {
16194         FILE *fp = fopen("cf_test.out", "w");
16195         if (fp != 0) {
16196                 bool x = true;
16197                 if ((bool)(-x) >= 0)
16198                         fputs("unsigned ", fp);
16199                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16200                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16201                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16202                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16203                 fclose(fp);
16204         }
16205         ${cf_cv_main_return:-return}(0);
16206 }
16207
16208 _ACEOF
16209 rm -f conftest$ac_exeext
16210 if { (eval echo "$as_me:16210: \"$ac_link\"") >&5
16211   (eval $ac_link) 2>&5
16212   ac_status=$?
16213   echo "$as_me:16213: \$? = $ac_status" >&5
16214   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16215   { (eval echo "$as_me:16215: \"$ac_try\"") >&5
16216   (eval $ac_try) 2>&5
16217   ac_status=$?
16218   echo "$as_me:16218: \$? = $ac_status" >&5
16219   (exit $ac_status); }; }; then
16220   cf_cv_type_of_bool=`cat cf_test.out`
16221                  if test -z "$cf_cv_type_of_bool"; then
16222                    cf_cv_type_of_bool=unknown
16223                  fi
16224 else
16225   echo "$as_me: program exited with status $ac_status" >&5
16226 echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 cf_cv_type_of_bool=unknown
16229 fi
16230 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16231 fi
16232
16233 fi
16234
16235         rm -f cf_test.out
16236 echo "$as_me:16236: result: $cf_cv_type_of_bool" >&5
16237 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16238 if test "$cf_cv_type_of_bool" = unknown ; then
16239         case .$NCURSES_BOOL in #(vi
16240         .auto|.) NCURSES_BOOL=unsigned;;
16241         esac
16242         { echo "$as_me:16242: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16243 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16244         cf_cv_type_of_bool=$NCURSES_BOOL
16245 fi
16246
16247                 else
16248                         echo "$as_me:16248: checking for fallback type of bool" >&5
16249 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16250                         case "$host_cpu" in #(vi
16251                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16252                         *)      cf_cv_type_of_bool=int  ;;
16253                         esac
16254                         echo "$as_me:16254: result: $cf_cv_type_of_bool" >&5
16255 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16256                 fi
16257         fi
16258 fi
16259
16260 # If the C compiler did not declare bool, and we did not determine that the C++
16261 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16262 # ncurses library use the same type as C++ bool.  Note that this allows one to
16263 # specify the type of bool in a configure-script option and postpone
16264 # integration with the C++ compiler provided that the types are compatible.
16265 USE_CXX_BOOL=1
16266 if test $cf_cv_cc_bool_type = 1
16267 then
16268         # oops: C has a bool.  Unlikely, but C++ could differ.
16269         USE_CXX_BOOL=0
16270 elif test $cf_cv_builtin_bool = 0
16271 then
16272         # C++ has no bool
16273         USE_CXX_BOOL=0
16274 else
16275         # this is the normal case
16276         USE_CXX_BOOL='defined(__cplusplus)'
16277 fi
16278
16279 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16280
16281 if test "$cf_with_ada" != "no" ; then
16282     if test "$with_libtool" != "no"; then
16283         { echo "$as_me:16283: WARNING: libtool does not support Ada - disabling feature" >&5
16284 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16285         cf_with_ada=no
16286     fi
16287 fi
16288
16289 if test "$cf_with_ada" != "no" ; then
16290 cf_ada_make=gnatmake
16291 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16292 set dummy $cf_ada_make; ac_word=$2
16293 echo "$as_me:16293: checking for $ac_word" >&5
16294 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16295 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16296   echo $ECHO_N "(cached) $ECHO_C" >&6
16297 else
16298   if test -n "$gnat_exists"; then
16299   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16300 else
16301   ac_save_IFS=$IFS; IFS=$ac_path_separator
16302 ac_dummy="$PATH"
16303 for ac_dir in $ac_dummy; do
16304   IFS=$ac_save_IFS
16305   test -z "$ac_dir" && ac_dir=.
16306   $as_executable_p "$ac_dir/$ac_word" || continue
16307 ac_cv_prog_gnat_exists="yes"
16308 echo "$as_me:16308: found $ac_dir/$ac_word" >&5
16309 break
16310 done
16311
16312   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16313 fi
16314 fi
16315 gnat_exists=$ac_cv_prog_gnat_exists
16316 if test -n "$gnat_exists"; then
16317   echo "$as_me:16317: result: $gnat_exists" >&5
16318 echo "${ECHO_T}$gnat_exists" >&6
16319 else
16320   echo "$as_me:16320: result: no" >&5
16321 echo "${ECHO_T}no" >&6
16322 fi
16323
16324 if test "$ac_cv_prog_gnat_exists" = no; then
16325    cf_ada_make=
16326 else
16327
16328 echo "$as_me:16328: checking for gnat version" >&5
16329 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16330 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16331   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16332 echo "$as_me:16332: result: $cf_gnat_version" >&5
16333 echo "${ECHO_T}$cf_gnat_version" >&6
16334
16335 case $cf_gnat_version in
16336   3.1[1-9]*|3.[2-9]*|[4-9].*)
16337     cf_cv_prog_gnat_correct=yes
16338     ;;
16339   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16340      cf_cv_prog_gnat_correct=no
16341      ;;
16342 esac
16343 case $cf_gnat_version in
16344   3.[1-9]*|[4-9].*)
16345       cf_compile_generics=generics
16346       cf_generic_objects="\${GENOBJS}"
16347       ;;
16348   *)  cf_compile_generics=
16349       cf_generic_objects=
16350       ;;
16351 esac
16352
16353    # Extract the first word of "m4", so it can be a program name with args.
16354 set dummy m4; ac_word=$2
16355 echo "$as_me:16355: checking for $ac_word" >&5
16356 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16357 if test "${ac_cv_prog_M4_exists+set}" = set; then
16358   echo $ECHO_N "(cached) $ECHO_C" >&6
16359 else
16360   if test -n "$M4_exists"; then
16361   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16362 else
16363   ac_save_IFS=$IFS; IFS=$ac_path_separator
16364 ac_dummy="$PATH"
16365 for ac_dir in $ac_dummy; do
16366   IFS=$ac_save_IFS
16367   test -z "$ac_dir" && ac_dir=.
16368   $as_executable_p "$ac_dir/$ac_word" || continue
16369 ac_cv_prog_M4_exists="yes"
16370 echo "$as_me:16370: found $ac_dir/$ac_word" >&5
16371 break
16372 done
16373
16374   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16375 fi
16376 fi
16377 M4_exists=$ac_cv_prog_M4_exists
16378 if test -n "$M4_exists"; then
16379   echo "$as_me:16379: result: $M4_exists" >&5
16380 echo "${ECHO_T}$M4_exists" >&6
16381 else
16382   echo "$as_me:16382: result: no" >&5
16383 echo "${ECHO_T}no" >&6
16384 fi
16385
16386    if test "$ac_cv_prog_M4_exists" = no; then
16387       cf_cv_prog_gnat_correct=no
16388       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16389    fi
16390    if test "$cf_cv_prog_gnat_correct" = yes; then
16391       echo "$as_me:16391: checking if GNAT works" >&5
16392 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16393
16394 rm -f conftest*
16395 cat >>conftest.ads <<CF_EOF
16396 procedure conftest;
16397 CF_EOF
16398 cat >>conftest.adb <<CF_EOF
16399 with Text_IO;
16400 with GNAT.OS_Lib;
16401 procedure conftest is
16402 begin
16403    Text_IO.Put ("Hello World");
16404    Text_IO.New_Line;
16405    GNAT.OS_Lib.OS_Exit (0);
16406 end conftest;
16407 CF_EOF
16408 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16409    if ( ./conftest 1>&5 2>&1 ) ; then
16410       cf_cv_prog_gnat_correct=yes
16411    else
16412       cf_cv_prog_gnat_correct=no
16413    fi
16414 else
16415    cf_cv_prog_gnat_correct=no
16416 fi
16417 rm -f conftest*
16418
16419       echo "$as_me:16419: result: $cf_cv_prog_gnat_correct" >&5
16420 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16421    fi
16422 fi
16423 if test "$cf_cv_prog_gnat_correct" = yes; then
16424    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16425
16426    echo "$as_me:16426: checking if GNAT pragma Unreferenced works" >&5
16427 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16428
16429 rm -f conftest*
16430 cat >>conftest.ads <<CF_EOF
16431 procedure conftest;
16432 CF_EOF
16433 cat >>conftest.adb <<CF_EOF
16434 with Text_IO;
16435 with GNAT.OS_Lib;
16436 procedure conftest is
16437    test : Integer;
16438    pragma Unreferenced (test);
16439 begin
16440    test := 1;
16441    Text_IO.Put ("Hello World");
16442    Text_IO.New_Line;
16443    GNAT.OS_Lib.OS_Exit (0);
16444 end conftest;
16445 CF_EOF
16446 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16447       cf_cv_pragma_unreferenced=yes
16448 else
16449    cf_cv_pragma_unreferenced=no
16450 fi
16451 rm -f conftest*
16452
16453    echo "$as_me:16453: result: $cf_cv_pragma_unreferenced" >&5
16454 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16455
16456    # if the pragma is supported, use it (needed in the Trace code).
16457    if test $cf_cv_pragma_unreferenced = yes ; then
16458       PRAGMA_UNREF=TRUE
16459    else
16460       PRAGMA_UNREF=FALSE
16461    fi
16462
16463 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16464 if test "${with_ada_compiler+set}" = set; then
16465   withval="$with_ada_compiler"
16466   cf_ada_compiler=$withval
16467 else
16468   cf_ada_compiler=gnatmake
16469 fi;
16470
16471    cf_ada_package=terminal_interface
16472
16473 # Check whether --with-ada-include or --without-ada-include was given.
16474 if test "${with_ada_include+set}" = set; then
16475   withval="$with_ada_include"
16476
16477 else
16478   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16479 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16480
16481 if test "x$prefix" != xNONE; then
16482   cf_path_syntax="$prefix"
16483 else
16484   cf_path_syntax="$ac_default_prefix"
16485 fi
16486
16487 case ".$withval" in #(vi
16488 .\$\(*\)*|.\'*\'*) #(vi
16489   ;;
16490 ..|./*|.\\*) #(vi
16491   ;;
16492 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16493   ;;
16494 .\${*prefix}*) #(vi
16495   eval withval="$withval"
16496   case ".$withval" in #(vi
16497   .NONE/*)
16498     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16499     ;;
16500   esac
16501   ;; #(vi
16502 .no|.NONE/*)
16503   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16504   ;;
16505 *)
16506   { { echo "$as_me:16506: error: expected a pathname, not \"$withval\"" >&5
16507 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16508    { (exit 1); exit 1; }; }
16509   ;;
16510 esac
16511
16512 fi
16513 ADA_INCLUDE="$withval"
16514
16515 # Check whether --with-ada-objects or --without-ada-objects was given.
16516 if test "${with_ada_objects+set}" = set; then
16517   withval="$with_ada_objects"
16518
16519 else
16520   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16521 fi; if test -n "$prefix/lib/ada/adalib" ; then
16522
16523 if test "x$prefix" != xNONE; then
16524   cf_path_syntax="$prefix"
16525 else
16526   cf_path_syntax="$ac_default_prefix"
16527 fi
16528
16529 case ".$withval" in #(vi
16530 .\$\(*\)*|.\'*\'*) #(vi
16531   ;;
16532 ..|./*|.\\*) #(vi
16533   ;;
16534 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16535   ;;
16536 .\${*prefix}*) #(vi
16537   eval withval="$withval"
16538   case ".$withval" in #(vi
16539   .NONE/*)
16540     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16541     ;;
16542   esac
16543   ;; #(vi
16544 .no|.NONE/*)
16545   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16546   ;;
16547 *)
16548   { { echo "$as_me:16548: error: expected a pathname, not \"$withval\"" >&5
16549 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16550    { (exit 1); exit 1; }; }
16551   ;;
16552 esac
16553
16554 fi
16555 ADA_OBJECTS="$withval"
16556
16557 fi
16558 fi
16559 else
16560    cf_with_ada=no
16561 fi
16562
16563 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16564 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16565 ###
16566 ### ticlib modules may be a separate library, otherwise contained in termlib.
16567 ### termlib modules may be a separate library, otherwise contained in ncurses.
16568 ###
16569 ### The of "+" or " " between the tokens controls the way the script
16570 ### chooses to split module lists into libraries.
16571 ###
16572 ### (see CF_LIB_RULES).
16573 echo "$as_me:16573: checking for library subsets" >&5
16574 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16575 LIB_SUBSETS=
16576
16577 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16578         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16579         if test "$with_ticlib" != no ; then
16580                 LIB_SUBSETS="${LIB_SUBSETS} "
16581         else
16582                 LIB_SUBSETS="${LIB_SUBSETS}+"
16583         fi
16584 fi
16585
16586 LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
16587
16588 case $cf_cv_system_name in #(vi
16589 *mingw32*) #(vi
16590         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16591         ;;
16592 *) #(vi
16593         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16594         ;;
16595 esac
16596
16597 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16598 if test "$with_termlib" != no ; then
16599         LIB_SUBSETS="${LIB_SUBSETS} "
16600 else
16601         LIB_SUBSETS="${LIB_SUBSETS}+"
16602 fi
16603
16604 LIB_SUBSETS="${LIB_SUBSETS}base"
16605
16606 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16607 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16608
16609 echo "$as_me:16609: result: $LIB_SUBSETS" >&5
16610 echo "${ECHO_T}$LIB_SUBSETS" >&6
16611
16612 ### Construct the list of include-directories to be generated
16613
16614 CPPFLAGS="$CPPFLAGS -I. -I../include"
16615 if test "$srcdir" != "."; then
16616         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16617 fi
16618 if test "$GCC" != yes; then
16619         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16620 elif test "$includedir" != "/usr/include"; then
16621         if test "$includedir" = '${prefix}/include' ; then
16622                 if test $prefix != /usr ; then
16623                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16624                 fi
16625         else
16626                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16627         fi
16628 fi
16629
16630 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16631 if test "$srcdir" != "."; then
16632         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16633 fi
16634 if test "$GCC" != yes; then
16635         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16636 elif test "$includedir" != "/usr/include"; then
16637         if test "$includedir" = '${prefix}/include' ; then
16638                 if test $prefix != /usr ; then
16639                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16640                 fi
16641         else
16642                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16643         fi
16644 fi
16645
16646 ### Build up pieces for makefile rules
16647 echo "$as_me:16647: checking default library suffix" >&5
16648 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16649
16650         case $DFT_LWR_MODEL in
16651         libtool) DFT_ARG_SUFFIX=''   ;;
16652         normal)  DFT_ARG_SUFFIX=''   ;;
16653         debug)   DFT_ARG_SUFFIX='_g' ;;
16654         profile) DFT_ARG_SUFFIX='_p' ;;
16655         shared)  DFT_ARG_SUFFIX=''   ;;
16656         esac
16657         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16658 echo "$as_me:16658: result: $DFT_ARG_SUFFIX" >&5
16659 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16660
16661 echo "$as_me:16661: checking default library-dependency suffix" >&5
16662 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16663
16664         case $DFT_LWR_MODEL in #(vi
16665         libtool) #(vi
16666                 DFT_LIB_SUFFIX='.la'
16667                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16668                 ;;
16669         normal) #(vi
16670                 DFT_LIB_SUFFIX='.a'
16671                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16672                 ;;
16673         debug) #(vi
16674                 DFT_LIB_SUFFIX='_g.a'
16675                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16676                 ;;
16677         profile) #(vi
16678                 DFT_LIB_SUFFIX='_p.a'
16679                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16680                 ;;
16681         shared) #(vi
16682                 case $cf_cv_system_name in
16683                 aix[56]*) #(vi
16684                         DFT_LIB_SUFFIX='.a'
16685                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16686                         ;;
16687                 cygwin*) #(vi
16688                         DFT_LIB_SUFFIX='.dll'
16689                         DFT_DEP_SUFFIX='.dll.a'
16690                         ;;
16691                 darwin*) #(vi
16692                         DFT_LIB_SUFFIX='.dylib'
16693                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16694                         ;;
16695                 hpux*) #(vi
16696                         case $target in
16697                         ia64*) #(vi
16698                                 DFT_LIB_SUFFIX='.so'
16699                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16700                                 ;;
16701                         *) #(vi
16702                                 DFT_LIB_SUFFIX='.sl'
16703                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16704                                 ;;
16705                         esac
16706                         ;;
16707                 *)      DFT_LIB_SUFFIX='.so'
16708                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16709                         ;;
16710                 esac
16711         esac
16712         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16713         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16714 echo "$as_me:16714: result: $DFT_DEP_SUFFIX" >&5
16715 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16716
16717 echo "$as_me:16717: checking default object directory" >&5
16718 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16719
16720         case $DFT_LWR_MODEL in
16721         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16722         normal)  DFT_OBJ_SUBDIR='objects' ;;
16723         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16724         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16725         shared)
16726                 case $cf_cv_system_name in #(vi
16727                 cygwin) #(vi
16728                         DFT_OBJ_SUBDIR='objects' ;;
16729                 *)
16730                         DFT_OBJ_SUBDIR='obj_s' ;;
16731                 esac
16732         esac
16733 echo "$as_me:16733: result: $DFT_OBJ_SUBDIR" >&5
16734 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16735
16736 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16737 if test "$cf_with_cxx" = yes ; then
16738 echo "$as_me:16738: checking c++ library-dependency suffix" >&5
16739 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16740 if test "$with_libtool" != "no"; then
16741         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16742 else
16743
16744         case normal in #(vi
16745         libtool) #(vi
16746                 CXX_LIB_SUFFIX='.la'
16747                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16748                 ;;
16749         normal) #(vi
16750                 CXX_LIB_SUFFIX='.a'
16751                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16752                 ;;
16753         debug) #(vi
16754                 CXX_LIB_SUFFIX='_g.a'
16755                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16756                 ;;
16757         profile) #(vi
16758                 CXX_LIB_SUFFIX='_p.a'
16759                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16760                 ;;
16761         shared) #(vi
16762                 case $cf_cv_system_name in
16763                 aix[56]*) #(vi
16764                         CXX_LIB_SUFFIX='.a'
16765                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16766                         ;;
16767                 cygwin*) #(vi
16768                         CXX_LIB_SUFFIX='.dll'
16769                         CXX_DEP_SUFFIX='.dll.a'
16770                         ;;
16771                 darwin*) #(vi
16772                         CXX_LIB_SUFFIX='.dylib'
16773                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16774                         ;;
16775                 hpux*) #(vi
16776                         case $target in
16777                         ia64*) #(vi
16778                                 CXX_LIB_SUFFIX='.so'
16779                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16780                                 ;;
16781                         *) #(vi
16782                                 CXX_LIB_SUFFIX='.sl'
16783                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16784                                 ;;
16785                         esac
16786                         ;;
16787                 *)      CXX_LIB_SUFFIX='.so'
16788                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16789                         ;;
16790                 esac
16791         esac
16792         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16793         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16794 fi
16795 echo "$as_me:16795: result: $CXX_LIB_SUFFIX" >&5
16796 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16797
16798 fi
16799
16800 # do not want -ldl in build except as needed for -lncurses dependency
16801 if test "$with_dlsym" = yes ; then
16802 if test $DFT_LWR_MODEL = shared || \
16803    test $DFT_LWR_MODEL = libtool ; then
16804
16805 # remove dl library from $LIBS
16806 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16807
16808 fi
16809 fi
16810 ### Set up low-level terminfo dependencies for makefiles.
16811
16812 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16813 # do not need libdl
16814 TICS_LIST=
16815 if test "$with_dlsym" = yes ; then
16816
16817 # remove dl library from $SHLIB_LIST
16818 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16819
16820 fi
16821
16822 if test "$with_ticlib" != no ; then
16823
16824         if test "$with_ticlib" != yes ; then
16825                 TICS_NAME=$with_ticlib
16826                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16827                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16828                 TICS_LIB_SUFFIX="${with_ticlib}"
16829         else
16830                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16831                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16832                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16833         fi
16834         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16835 else
16836         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16837 fi
16838
16839 if test "$with_termlib" != no ; then
16840
16841         if test "$with_termlib" != yes ; then
16842                 TINFO_NAME=$with_termlib
16843                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16844                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16845                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16846                 TINFO_LIB_SUFFIX="${with_termlib}"
16847         else
16848                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16849                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16850                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16851                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16852         fi
16853
16854         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16855         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16856         if test "$DFT_LWR_MODEL" = "libtool"; then
16857                 TEST_ARGS="${TEST_DEPS}"
16858                 TEST_ARG2="${TEST_DEP2}"
16859                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16860                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
16861                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
16862         else
16863                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16864                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16865                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16866                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16867                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16868         fi
16869 else
16870         # the next lines are needed for linking libtic over libncurses
16871         TINFO_NAME=${LIB_NAME}
16872         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16873         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16874         if test "$with_tic_depends" = yes ; then
16875                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16876         else
16877                 TICS_LIST="$SHLIB_LIST"
16878         fi
16879
16880         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16881 fi
16882
16883 if test "$DFT_LWR_MODEL" = shared ; then
16884         case $cf_cv_system_name in #(vi
16885         cygwin*)
16886                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16887                 TINFO_SUFFIX=.dll
16888                 ;;
16889         esac
16890 fi
16891
16892 if test "$with_dlsym" = yes ; then
16893
16894 # remove dl library from $TICS_LIST
16895 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16896
16897 fi
16898
16899 if test "$DFT_LWR_MODEL" = "libtool"; then
16900     OBJEXT=lo
16901 fi
16902
16903 # needed for Ada95
16904 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16905
16906 case $DFT_LWR_MODEL in
16907 normal|debug|profile)
16908
16909 if test "$GCC" = yes ; then
16910         case $cf_cv_system_name in #(
16911         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
16912                 LDFLAGS_STATIC=
16913                 LDFLAGS_SHARED=
16914                 ;;
16915     *)  #( normally, except when broken
16916         LDFLAGS_STATIC=-static
16917         LDFLAGS_SHARED=-dynamic
16918         ;;
16919     esac
16920 else
16921         case $cf_cv_system_name in #(
16922         aix[456]*)      #( from ld manpage
16923                 LDFLAGS_STATIC=-bstatic
16924                 LDFLAGS_SHARED=-bdynamic
16925                 ;;
16926         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16927                 # We could also use just "archive" and "shared".
16928                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16929                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16930                 ;;
16931         irix*)          #( from ld manpage IRIX64
16932                 LDFLAGS_STATIC=-Bstatic
16933                 LDFLAGS_SHARED=-Bdynamic
16934                 ;;
16935         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16936                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16937                 LDFLAGS_STATIC=-noso
16938                 LDFLAGS_SHARED=-so_archive
16939                 ;;
16940         solaris2*)
16941                 LDFLAGS_STATIC=-Bstatic
16942                 LDFLAGS_SHARED=-Bdynamic
16943                 ;;
16944         esac
16945 fi
16946
16947         ;;
16948 esac
16949
16950 echo "$as_me:16950: checking where we will install curses.h" >&5
16951 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16952 test "$with_overwrite" = no && \
16953 test "x$includedir" = 'x${prefix}/include' && \
16954         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16955 echo "$as_me:16955: result: $includedir" >&5
16956 echo "${ECHO_T}$includedir" >&6
16957
16958 ### Resolve a conflict between normal and wide-curses by forcing applications
16959 ### that will need libutf8 to add it to their configure script.
16960 if test "$with_overwrite" != no ; then
16961 if test "$NCURSES_LIBUTF8" = 1 ; then
16962         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16963         { echo "$as_me:16963: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16964 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16965 fi
16966 fi
16967 WITH_OVERWRITE=$with_overwrite
16968
16969 # used to separate tack out of the tree
16970 NCURSES_TREE=
16971
16972 ### predefined stuff for the test programs
16973 cat >>confdefs.h <<\EOF
16974 #define HAVE_SLK_COLOR 1
16975 EOF
16976
16977 ### Construct the list of subdirectories for which we'll customize makefiles
16978 ### with the appropriate compile-rules.
16979
16980 echo "$as_me:16980: checking for src modules" >&5
16981 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16982
16983 # dependencies and linker-arguments for test-programs
16984 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16985 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16986 if test "$DFT_LWR_MODEL" = "libtool"; then
16987         TEST_ARGS="${TEST_DEPS}"
16988         TEST_ARG2="${TEST_DEP2}"
16989 else
16990         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16991         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16992 fi
16993
16994 cf_cv_src_modules=
16995 for cf_dir in $modules_to_build
16996 do
16997         if test -f $srcdir/$cf_dir/modules; then
16998
16999                 # We may/may not have tack in the distribution, though the
17000                 # makefile is.
17001                 if test $cf_dir = tack ; then
17002                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17003                                 continue
17004                         fi
17005                 fi
17006
17007                 if test -z "$cf_cv_src_modules"; then
17008                         cf_cv_src_modules=$cf_dir
17009                 else
17010                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17011                 fi
17012
17013                 # Make the ncurses_cfg.h file record the library interface files as
17014                 # well.  These are header files that are the same name as their
17015                 # directory.  Ncurses is the only library that does not follow
17016                 # that pattern.
17017                 if test $cf_dir = tack ; then
17018                         continue
17019                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17020
17021 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17022
17023                         cat >>confdefs.h <<EOF
17024 #define HAVE_${cf_have_include}_H 1
17025 EOF
17026
17027                         cat >>confdefs.h <<EOF
17028 #define HAVE_LIB${cf_have_include} 1
17029 EOF
17030
17031                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17032                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17033                         if test "$DFT_LWR_MODEL" = "libtool"; then
17034                                 TEST_ARGS="${TEST_DEPS}"
17035                                 TEST_ARG2="${TEST_DEP2}"
17036                         else
17037                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17038                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17039                         fi
17040                 fi
17041         fi
17042 done
17043 echo "$as_me:17043: result: $cf_cv_src_modules" >&5
17044 echo "${ECHO_T}$cf_cv_src_modules" >&6
17045
17046 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17047 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17048
17049 SRC_SUBDIRS=
17050 if test "x$cf_with_manpages" != xno ; then
17051         SRC_SUBDIRS="$SRC_SUBDIRS man"
17052 fi
17053 SRC_SUBDIRS="$SRC_SUBDIRS include"
17054 for cf_dir in $cf_cv_src_modules
17055 do
17056         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17057 done
17058 SRC_SUBDIRS="$SRC_SUBDIRS test"
17059 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17060 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17061
17062 ADA_SUBDIRS=
17063 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17064         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17065         ADA_SUBDIRS="gen src samples"
17066 fi
17067
17068 SUB_MAKEFILES=
17069 for cf_dir in $SRC_SUBDIRS
17070 do
17071         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17072 done
17073
17074 if test -n "$ADA_SUBDIRS"; then
17075         for cf_dir in $ADA_SUBDIRS
17076         do
17077                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17078         done
17079
17080 fi
17081
17082 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17083    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17084 fi
17085
17086 DIRS_TO_MAKE="lib"
17087 for cf_item in $cf_list_models
17088 do
17089
17090         case $cf_item in
17091         libtool) cf_subdir='obj_lo'  ;;
17092         normal)  cf_subdir='objects' ;;
17093         debug)   cf_subdir='obj_g' ;;
17094         profile) cf_subdir='obj_p' ;;
17095         shared)
17096                 case $cf_cv_system_name in #(vi
17097                 cygwin) #(vi
17098                         cf_subdir='objects' ;;
17099                 *)
17100                         cf_subdir='obj_s' ;;
17101                 esac
17102         esac
17103
17104         for cf_item2 in $DIRS_TO_MAKE
17105         do
17106                 test $cf_item2 = $cf_subdir && break
17107         done
17108         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17109 done
17110 for cf_dir in $DIRS_TO_MAKE
17111 do
17112         test ! -d $cf_dir && mkdir $cf_dir
17113 done
17114
17115 cat >>confdefs.h <<EOF
17116 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17117 EOF
17118
17119 cat >>confdefs.h <<EOF
17120 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17121 EOF
17122
17123 ### Now that we're done running tests, add the compiler-warnings, if any
17124
17125 cf_fix_cppflags=no
17126 cf_new_cflags=
17127 cf_new_cppflags=
17128 cf_new_extra_cppflags=
17129
17130 for cf_add_cflags in $EXTRA_CFLAGS
17131 do
17132 case $cf_fix_cppflags in
17133 no)
17134         case $cf_add_cflags in #(vi
17135         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17136                 case $cf_add_cflags in
17137                 -D*)
17138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17139
17140                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17141                         && test -z "${cf_tst_cflags}" \
17142                         && cf_fix_cppflags=yes
17143
17144                         if test $cf_fix_cppflags = yes ; then
17145                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17146                                 continue
17147                         elif test "${cf_tst_cflags}" = "\"'" ; then
17148                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17149                                 continue
17150                         fi
17151                         ;;
17152                 esac
17153                 case "$CPPFLAGS" in
17154                 *$cf_add_cflags) #(vi
17155                         ;;
17156                 *) #(vi
17157                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17158                         ;;
17159                 esac
17160                 ;;
17161         *)
17162                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17163                 ;;
17164         esac
17165         ;;
17166 yes)
17167         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17168
17169         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17170
17171         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17172         && test -z "${cf_tst_cflags}" \
17173         && cf_fix_cppflags=no
17174         ;;
17175 esac
17176 done
17177
17178 if test -n "$cf_new_cflags" ; then
17179
17180         CFLAGS="$CFLAGS $cf_new_cflags"
17181 fi
17182
17183 if test -n "$cf_new_cppflags" ; then
17184
17185         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17186 fi
17187
17188 if test -n "$cf_new_extra_cppflags" ; then
17189
17190         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17191 fi
17192
17193 ### If we're building with rpath, try to link non-standard libs that way too.
17194 if test "$DFT_LWR_MODEL" = "shared"; then
17195
17196 echo "$as_me:17196: checking for updated LDFLAGS" >&5
17197 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17198 if test -n "$LDFLAGS" ; then
17199 echo "$as_me:17199: result: maybe" >&5
17200 echo "${ECHO_T}maybe" >&6
17201 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17202
17203 echo "${as_me-configure}:17203: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17204
17205 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17206
17207 echo "${as_me-configure}:17207: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17208
17209 case "$EXTRA_LDFLAGS" in #(vi
17210 -Wl,-rpath,*) #(vi
17211         cf_rpath_hack="-Wl,-rpath,"
17212         ;;
17213 -R\ *)
17214         cf_rpath_hack="-R "
17215         ;;
17216 -R*)
17217         cf_rpath_hack="-R"
17218         ;;
17219 *)
17220         cf_rpath_hack=
17221         ;;
17222 esac
17223 if test -n "$cf_rpath_hack" ; then
17224         cf_rpath_dst=
17225         for cf_rpath_src in $LDFLAGS
17226         do
17227                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17228
17229 echo "${as_me-configure}:17229: testing Filtering $cf_rpath_src ..." 1>&5
17230
17231                 case $cf_rpath_src in #(vi
17232                 -L*) #(vi
17233                         if test "$cf_rpath_hack" = "-R " ; then
17234                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17235                         else
17236                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17237                         fi
17238                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17239
17240 echo "${as_me-configure}:17240: testing ...Filter $cf_rpath_tmp ..." 1>&5
17241
17242                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17243                         ;;
17244                 esac
17245                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17246         done
17247         LDFLAGS=$cf_rpath_dst
17248         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17249
17250 echo "${as_me-configure}:17250: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17251
17252         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17253
17254 echo "${as_me-configure}:17254: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17255
17256 fi
17257 else
17258 echo "$as_me:17258: result: no" >&5
17259 echo "${ECHO_T}no" >&6
17260 fi
17261
17262 fi
17263
17264 ### Define substitutions for header files to avoid name-pollution
17265
17266 if test "$cf_cv_have_tcgetattr" = yes ; then
17267         HAVE_TCGETATTR=1
17268 else
17269         HAVE_TCGETATTR=0
17270 fi
17271
17272 if test "$ac_cv_header_termio_h" = yes ; then
17273         HAVE_TERMIO_H=1
17274 else
17275         HAVE_TERMIO_H=0
17276 fi
17277
17278 if test "$ac_cv_header_termios_h" = yes ; then
17279         HAVE_TERMIOS_H=1
17280 else
17281         HAVE_TERMIOS_H=0
17282 fi
17283
17284 ################################################################################
17285 test "$use_database" = yes && \
17286 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17287
17288 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17289
17290 if test x"$enable_pc_files" = xyes ; then \
17291 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17292 MAKE_PC_FILES=
17293 else
17294 MAKE_PC_FILES="#"
17295 fi
17296
17297 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"
17298 ac_config_commands="$ac_config_commands default"
17299 cat >confcache <<\_ACEOF
17300 # This file is a shell script that caches the results of configure
17301 # tests run on this system so they can be shared between configure
17302 # scripts and configure runs, see configure's option --config-cache.
17303 # It is not useful on other systems.  If it contains results you don't
17304 # want to keep, you may remove or edit it.
17305 #
17306 # config.status only pays attention to the cache file if you give it
17307 # the --recheck option to rerun configure.
17308 #
17309 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17310 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17311 # following values.
17312
17313 _ACEOF
17314
17315 # The following way of writing the cache mishandles newlines in values,
17316 # but we know of no workaround that is simple, portable, and efficient.
17317 # So, don't put newlines in cache variables' values.
17318 # Ultrix sh set writes to stderr and can't be redirected directly,
17319 # and sets the high bit in the cache file unless we assign to the vars.
17320 {
17321   (set) 2>&1 |
17322     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17323     *ac_space=\ *)
17324       # `set' does not quote correctly, so add quotes (double-quote
17325       # substitution turns \\\\ into \\, and sed turns \\ into \).
17326       sed -n \
17327         "s/'/'\\\\''/g;
17328           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17329       ;;
17330     *)
17331       # `set' quotes correctly as required by POSIX, so do not add quotes.
17332       sed -n \
17333         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17334       ;;
17335     esac;
17336 } |
17337   sed '
17338      t clear
17339      : clear
17340      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17341      t end
17342      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17343      : end' >>confcache
17344 if cmp -s $cache_file confcache; then :; else
17345   if test -w $cache_file; then
17346     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17347     cat confcache >$cache_file
17348   else
17349     echo "not updating unwritable cache $cache_file"
17350   fi
17351 fi
17352 rm -f confcache
17353
17354 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17355 # Let make expand exec_prefix.
17356 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17357
17358 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17359 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17360 # trailing colons and then remove the whole line if VPATH becomes empty
17361 # (actually we leave an empty line to preserve line numbers).
17362 if test "x$srcdir" = x.; then
17363   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17364 s/:*\$(srcdir):*/:/;
17365 s/:*\${srcdir}:*/:/;
17366 s/:*@srcdir@:*/:/;
17367 s/^\([^=]*=[    ]*\):*/\1/;
17368 s/:*$//;
17369 s/^[^=]*=[      ]*$//;
17370 }'
17371 fi
17372
17373 DEFS=-DHAVE_CONFIG_H
17374
17375 : ${CONFIG_STATUS=./config.status}
17376 ac_clean_files_save=$ac_clean_files
17377 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17378 { echo "$as_me:17378: creating $CONFIG_STATUS" >&5
17379 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17380 cat >$CONFIG_STATUS <<_ACEOF
17381 #! $SHELL
17382 # Generated automatically by configure.
17383 # Run this file to recreate the current configuration.
17384 # Compiler output produced by configure, useful for debugging
17385 # configure, is in config.log if it exists.
17386
17387 debug=false
17388 SHELL=\${CONFIG_SHELL-$SHELL}
17389 ac_cs_invocation="\$0 \$@"
17390
17391 _ACEOF
17392
17393 cat >>$CONFIG_STATUS <<\_ACEOF
17394 # Be Bourne compatible
17395 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17396   emulate sh
17397   NULLCMD=:
17398 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17399   set -o posix
17400 fi
17401
17402 # Name of the executable.
17403 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17404
17405 if expr a : '\(a\)' >/dev/null 2>&1; then
17406   as_expr=expr
17407 else
17408   as_expr=false
17409 fi
17410
17411 rm -f conf$$ conf$$.exe conf$$.file
17412 echo >conf$$.file
17413 if ln -s conf$$.file conf$$ 2>/dev/null; then
17414   # We could just check for DJGPP; but this test a) works b) is more generic
17415   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17416   if test -f conf$$.exe; then
17417     # Don't use ln at all; we don't have any links
17418     as_ln_s='cp -p'
17419   else
17420     as_ln_s='ln -s'
17421   fi
17422 elif ln conf$$.file conf$$ 2>/dev/null; then
17423   as_ln_s=ln
17424 else
17425   as_ln_s='cp -p'
17426 fi
17427 rm -f conf$$ conf$$.exe conf$$.file
17428
17429 as_executable_p="test -f"
17430
17431 # Support unset when possible.
17432 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17433   as_unset=unset
17434 else
17435   as_unset=false
17436 fi
17437
17438 # NLS nuisances.
17439 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17440 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17441 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17442 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17443 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17444 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17445 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17446 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17447
17448 # IFS
17449 # We need space, tab and new line, in precisely that order.
17450 as_nl='
17451 '
17452 IFS="   $as_nl"
17453
17454 # CDPATH.
17455 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17456
17457 exec 6>&1
17458
17459 _ACEOF
17460
17461 # Files that config.status was made for.
17462 if test -n "$ac_config_files"; then
17463   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17464 fi
17465
17466 if test -n "$ac_config_headers"; then
17467   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17468 fi
17469
17470 if test -n "$ac_config_links"; then
17471   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17472 fi
17473
17474 if test -n "$ac_config_commands"; then
17475   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17476 fi
17477
17478 cat >>$CONFIG_STATUS <<\EOF
17479
17480 ac_cs_usage="\
17481 \`$as_me' instantiates files from templates according to the
17482 current configuration.
17483
17484 Usage: $0 [OPTIONS] [FILE]...
17485
17486   -h, --help       print this help, then exit
17487   -V, --version    print version number, then exit
17488   -d, --debug      don't remove temporary files
17489       --recheck    update $as_me by reconfiguring in the same conditions
17490   --file=FILE[:TEMPLATE]
17491                    instantiate the configuration file FILE
17492   --header=FILE[:TEMPLATE]
17493                    instantiate the configuration header FILE
17494
17495 Configuration files:
17496 $config_files
17497
17498 Configuration headers:
17499 $config_headers
17500
17501 Configuration commands:
17502 $config_commands
17503
17504 Report bugs to <bug-autoconf@gnu.org>."
17505 EOF
17506
17507 cat >>$CONFIG_STATUS <<EOF
17508 ac_cs_version="\\
17509 config.status
17510 configured by $0, generated by GNU Autoconf 2.52.20081225,
17511   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17512
17513 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17514 Free Software Foundation, Inc.
17515 This config.status script is free software; the Free Software Foundation
17516 gives unlimited permission to copy, distribute and modify it."
17517 srcdir=$srcdir
17518 INSTALL="$INSTALL"
17519 EOF
17520
17521 cat >>$CONFIG_STATUS <<\EOF
17522 # If no file are specified by the user, then we need to provide default
17523 # value.  By we need to know if files were specified by the user.
17524 ac_need_defaults=:
17525 while test $# != 0
17526 do
17527   case $1 in
17528   --*=*)
17529     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17530     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17531     shift
17532     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17533     shift
17534     ;;
17535   -*);;
17536   *) # This is not an option, so the user has probably given explicit
17537      # arguments.
17538      ac_need_defaults=false;;
17539   esac
17540
17541   case $1 in
17542   # Handling of the options.
17543 EOF
17544 cat >>$CONFIG_STATUS <<EOF
17545   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17546     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17547     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17548 EOF
17549 cat >>$CONFIG_STATUS <<\EOF
17550   --version | --vers* | -V )
17551     echo "$ac_cs_version"; exit 0 ;;
17552   --he | --h)
17553     # Conflict between --help and --header
17554     { { echo "$as_me:17554: error: ambiguous option: $1
17555 Try \`$0 --help' for more information." >&5
17556 echo "$as_me: error: ambiguous option: $1
17557 Try \`$0 --help' for more information." >&2;}
17558    { (exit 1); exit 1; }; };;
17559   --help | --hel | -h )
17560     echo "$ac_cs_usage"; exit 0 ;;
17561   --debug | --d* | -d )
17562     debug=: ;;
17563   --file | --fil | --fi | --f )
17564     shift
17565     CONFIG_FILES="$CONFIG_FILES $1"
17566     ac_need_defaults=false;;
17567   --header | --heade | --head | --hea )
17568     shift
17569     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17570     ac_need_defaults=false;;
17571
17572   # This is an error.
17573   -*) { { echo "$as_me:17573: error: unrecognized option: $1
17574 Try \`$0 --help' for more information." >&5
17575 echo "$as_me: error: unrecognized option: $1
17576 Try \`$0 --help' for more information." >&2;}
17577    { (exit 1); exit 1; }; } ;;
17578
17579   *) ac_config_targets="$ac_config_targets $1" ;;
17580
17581   esac
17582   shift
17583 done
17584
17585 exec 5>>config.log
17586 cat >&5 << _ACEOF
17587
17588 ## ----------------------- ##
17589 ## Running config.status.  ##
17590 ## ----------------------- ##
17591
17592 This file was extended by $as_me 2.52.20081225, executed with
17593   CONFIG_FILES    = $CONFIG_FILES
17594   CONFIG_HEADERS  = $CONFIG_HEADERS
17595   CONFIG_LINKS    = $CONFIG_LINKS
17596   CONFIG_COMMANDS = $CONFIG_COMMANDS
17597   > $ac_cs_invocation
17598 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17599
17600 _ACEOF
17601 EOF
17602
17603 cat >>$CONFIG_STATUS <<EOF
17604 #
17605 # INIT-COMMANDS section.
17606 #
17607
17608 ### Special initialization commands, used to pass information from the
17609 ### configuration-run into config.status
17610
17611 AWK="$AWK"
17612 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17613 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17614 ECHO_LINK="$ECHO_LINK"
17615 LDCONFIG="$LDCONFIG"
17616 LIB_NAME="$LIB_NAME"
17617 LIB_SUBSETS="$LIB_SUBSETS"
17618 LIB_SUFFIX="$LIB_SUFFIX"
17619 LIB_TRACING="$LIB_TRACING"
17620 MAKE_TERMINFO="$MAKE_TERMINFO"
17621 NCURSES_MAJOR="$NCURSES_MAJOR"
17622 NCURSES_MINOR="$NCURSES_MINOR"
17623 NCURSES_OSPEED="$NCURSES_OSPEED"
17624 NCURSES_PATCH="$NCURSES_PATCH"
17625 SRC_SUBDIRS="$SRC_SUBDIRS"
17626 TERMINFO="$TERMINFO"
17627 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17628 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17629 TICS_NAME="$TICS_NAME"
17630 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17631 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17632 TINFO_NAME="$TINFO_NAME"
17633 TINFO_SUFFIX="$TINFO_SUFFIX"
17634 WITH_CURSES_H="$with_curses_h"
17635 WITH_ECHO="$with_echo"
17636 WITH_OVERWRITE="$with_overwrite"
17637 cf_LIST_MODELS="$cf_list_models"
17638 cf_cv_abi_version="$cf_cv_abi_version"
17639 cf_cv_do_relink="$cf_cv_do_relink"
17640 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17641 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17642 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17643 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17644 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17645 cf_cv_rel_version="$cf_cv_rel_version"
17646 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17647 cf_cv_shared_soname='$cf_cv_shared_soname'
17648 cf_cv_shlib_version="$cf_cv_shlib_version"
17649 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17650 cf_cv_system_name="$cf_cv_system_name"
17651 cf_with_cxx_binding="$cf_with_cxx_binding"
17652 cf_with_manpages="$cf_with_manpages"
17653 host="$host"
17654 target="$target"
17655
17656 EOF
17657
17658 cat >>$CONFIG_STATUS <<\EOF
17659 for ac_config_target in $ac_config_targets
17660 do
17661   case "$ac_config_target" in
17662   # Handling of arguments.
17663   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17664   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17665   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17666   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17667   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17668   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17669   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17670   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17671   *) { { echo "$as_me:17671: error: invalid argument: $ac_config_target" >&5
17672 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17673    { (exit 1); exit 1; }; };;
17674   esac
17675 done
17676
17677 # If the user did not use the arguments to specify the items to instantiate,
17678 # then the envvar interface is used.  Set only those that are not.
17679 # We use the long form for the default assignment because of an extremely
17680 # bizarre bug on SunOS 4.1.3.
17681 if $ac_need_defaults; then
17682   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17683   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17684   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17685 fi
17686
17687 # Create a temporary directory, and hook for its removal unless debugging.
17688 $debug ||
17689 {
17690   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17691   trap '{ (exit 1); exit 1; }' 1 2 13 15
17692 }
17693
17694 # Create a (secure) tmp directory for tmp files.
17695 : ${TMPDIR=/tmp}
17696 {
17697   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17698   test -n "$tmp" && test -d "$tmp"
17699 }  ||
17700 {
17701   tmp=$TMPDIR/cs$$-$RANDOM
17702   (umask 077 && mkdir $tmp)
17703 } ||
17704 {
17705    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17706    { (exit 1); exit 1; }
17707 }
17708
17709 EOF
17710
17711 cat >>$CONFIG_STATUS <<EOF
17712
17713 #
17714 # CONFIG_FILES section.
17715 #
17716
17717 # No need to generate the scripts if there are no CONFIG_FILES.
17718 # This happens for instance when ./config.status config.h
17719 if test -n "\$CONFIG_FILES"; then
17720   # Protect against being on the right side of a sed subst in config.status.
17721   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17722    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17723 s,@SHELL@,$SHELL,;t t
17724 s,@exec_prefix@,$exec_prefix,;t t
17725 s,@prefix@,$prefix,;t t
17726 s,@program_transform_name@,$program_transform_name,;t t
17727 s,@bindir@,$bindir,;t t
17728 s,@sbindir@,$sbindir,;t t
17729 s,@libexecdir@,$libexecdir,;t t
17730 s,@datadir@,$datadir,;t t
17731 s,@sysconfdir@,$sysconfdir,;t t
17732 s,@sharedstatedir@,$sharedstatedir,;t t
17733 s,@localstatedir@,$localstatedir,;t t
17734 s,@libdir@,$libdir,;t t
17735 s,@includedir@,$includedir,;t t
17736 s,@oldincludedir@,$oldincludedir,;t t
17737 s,@infodir@,$infodir,;t t
17738 s,@mandir@,$mandir,;t t
17739 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17740 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17741 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17742 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17743 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17744 s,@build_alias@,$build_alias,;t t
17745 s,@host_alias@,$host_alias,;t t
17746 s,@target_alias@,$target_alias,;t t
17747 s,@ECHO_C@,$ECHO_C,;t t
17748 s,@ECHO_N@,$ECHO_N,;t t
17749 s,@ECHO_T@,$ECHO_T,;t t
17750 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17751 s,@DEFS@,$DEFS,;t t
17752 s,@LIBS@,$LIBS,;t t
17753 s,@top_builddir@,$top_builddir,;t t
17754 s,@EGREP@,$EGREP,;t t
17755 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17756 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17757 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17758 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17759 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17760 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17761 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17762 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17763 s,@build@,$build,;t t
17764 s,@build_cpu@,$build_cpu,;t t
17765 s,@build_vendor@,$build_vendor,;t t
17766 s,@build_os@,$build_os,;t t
17767 s,@host@,$host,;t t
17768 s,@host_cpu@,$host_cpu,;t t
17769 s,@host_vendor@,$host_vendor,;t t
17770 s,@host_os@,$host_os,;t t
17771 s,@target@,$target,;t t
17772 s,@target_cpu@,$target_cpu,;t t
17773 s,@target_vendor@,$target_vendor,;t t
17774 s,@target_os@,$target_os,;t t
17775 s,@CC@,$CC,;t t
17776 s,@CFLAGS@,$CFLAGS,;t t
17777 s,@LDFLAGS@,$LDFLAGS,;t t
17778 s,@CPPFLAGS@,$CPPFLAGS,;t t
17779 s,@ac_ct_CC@,$ac_ct_CC,;t t
17780 s,@EXEEXT@,$EXEEXT,;t t
17781 s,@OBJEXT@,$OBJEXT,;t t
17782 s,@CPP@,$CPP,;t t
17783 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17784 s,@PROG_EXT@,$PROG_EXT,;t t
17785 s,@LDCONFIG@,$LDCONFIG,;t t
17786 s,@CXX@,$CXX,;t t
17787 s,@CXXFLAGS@,$CXXFLAGS,;t t
17788 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17789 s,@AWK@,$AWK,;t t
17790 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17791 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17792 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17793 s,@LINT@,$LINT,;t t
17794 s,@LINT_OPTS@,$LINT_OPTS,;t t
17795 s,@LN_S@,$LN_S,;t t
17796 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17797 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17798 s,@SET_MAKE@,$SET_MAKE,;t t
17799 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17800 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17801 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17802 s,@RANLIB@,$RANLIB,;t t
17803 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17804 s,@LD@,$LD,;t t
17805 s,@ac_ct_LD@,$ac_ct_LD,;t t
17806 s,@AR@,$AR,;t t
17807 s,@ac_ct_AR@,$ac_ct_AR,;t t
17808 s,@ARFLAGS@,$ARFLAGS,;t t
17809 s,@DESTDIR@,$DESTDIR,;t t
17810 s,@BUILD_CC@,$BUILD_CC,;t t
17811 s,@BUILD_CPP@,$BUILD_CPP,;t t
17812 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17813 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17814 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17815 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17816 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17817 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17818 s,@cf_list_models@,$cf_list_models,;t t
17819 s,@LIBTOOL@,$LIBTOOL,;t t
17820 s,@LT_UNDEF@,$LT_UNDEF,;t t
17821 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17822 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17823 s,@LIB_CREATE@,$LIB_CREATE,;t t
17824 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17825 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17826 s,@LIB_PREP@,$LIB_PREP,;t t
17827 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17828 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17829 s,@LIB_LINK@,$LIB_LINK,;t t
17830 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17831 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17832 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17833 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17834 s,@TICS_NAME@,$TICS_NAME,;t t
17835 s,@TINFO_NAME@,$TINFO_NAME,;t t
17836 s,@LIB_NAME@,$LIB_NAME,;t t
17837 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17838 s,@CC_G_OPT@,$CC_G_OPT,;t t
17839 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17840 s,@LD_MODEL@,$LD_MODEL,;t t
17841 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17842 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17843 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17844 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17845 s,@LINK_PROGS@,$LINK_PROGS,;t t
17846 s,@LINK_TESTS@,$LINK_TESTS,;t t
17847 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17848 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17849 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17850 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17851 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17852 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17853 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17854 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17855 s,@TERMINFO@,$TERMINFO,;t t
17856 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17857 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17858 s,@TERMPATH@,$TERMPATH,;t t
17859 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17860 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17861 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17862 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17863 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17864 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17865 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17866 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17867 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17868 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17869 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17870 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17871 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17872 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17873 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17874 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17875 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17876 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17877 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17878 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17879 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17880 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17881 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17882 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17883 s,@PTHREAD@,$PTHREAD,;t t
17884 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17885 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17886 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17887 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17888 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17889 s,@ECHO_LINK@,$ECHO_LINK,;t t
17890 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17891 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17892 s,@ADA_TRACE@,$ADA_TRACE,;t t
17893 s,@MATH_LIB@,$MATH_LIB,;t t
17894 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17895 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17896 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17897 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17898 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17899 s,@TEST_LIBS@,$TEST_LIBS,;t t
17900 s,@CXXCPP@,$CXXCPP,;t t
17901 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17902 s,@CXX_AR@,$CXX_AR,;t t
17903 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17904 s,@CXXLIBS@,$CXXLIBS,;t t
17905 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17906 s,@gnat_exists@,$gnat_exists,;t t
17907 s,@M4_exists@,$M4_exists,;t t
17908 s,@cf_ada_make@,$cf_ada_make,;t t
17909 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17910 s,@cf_ada_package@,$cf_ada_package,;t t
17911 s,@ADAFLAGS@,$ADAFLAGS,;t t
17912 s,@cf_compile_generics@,$cf_compile_generics,;t t
17913 s,@cf_generic_objects@,$cf_generic_objects,;t t
17914 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17915 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17916 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17917 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17918 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17919 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17920 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17921 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17922 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17923 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17924 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17925 s,@TICS_ARGS@,$TICS_ARGS,;t t
17926 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17927 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17928 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17929 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17930 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17931 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17932 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17933 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17934 s,@TICS_LIST@,$TICS_LIST,;t t
17935 s,@TINFO_LIST@,$TINFO_LIST,;t t
17936 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17937 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17938 s,@TEST_ARGS@,$TEST_ARGS,;t t
17939 s,@TEST_DEPS@,$TEST_DEPS,;t t
17940 s,@TEST_ARG2@,$TEST_ARG2,;t t
17941 s,@TEST_DEP2@,$TEST_DEP2,;t t
17942 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17943 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17944 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17945 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17946 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17947 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17948 CEOF
17949
17950 EOF
17951
17952   cat >>$CONFIG_STATUS <<\EOF
17953   # Split the substitutions into bite-sized pieces for seds with
17954   # small command number limits, like on Digital OSF/1 and HP-UX.
17955   ac_max_sed_lines=48
17956   ac_sed_frag=1 # Number of current file.
17957   ac_beg=1 # First line for current file.
17958   ac_end=$ac_max_sed_lines # Line after last line for current file.
17959   ac_more_lines=:
17960   ac_sed_cmds=
17961   while $ac_more_lines; do
17962     if test $ac_beg -gt 1; then
17963       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17964     else
17965       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17966     fi
17967     if test ! -s $tmp/subs.frag; then
17968       ac_more_lines=false
17969     else
17970       # The purpose of the label and of the branching condition is to
17971       # speed up the sed processing (if there are no `@' at all, there
17972       # is no need to browse any of the substitutions).
17973       # These are the two extra sed commands mentioned above.
17974       (echo ':t
17975   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17976       if test -z "$ac_sed_cmds"; then
17977         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17978       else
17979         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17980       fi
17981       ac_sed_frag=`expr $ac_sed_frag + 1`
17982       ac_beg=$ac_end
17983       ac_end=`expr $ac_end + $ac_max_sed_lines`
17984     fi
17985   done
17986   if test -z "$ac_sed_cmds"; then
17987     ac_sed_cmds=cat
17988   fi
17989 fi # test -n "$CONFIG_FILES"
17990
17991 EOF
17992 cat >>$CONFIG_STATUS <<\EOF
17993 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17994   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17995   case $ac_file in
17996   - | *:- | *:-:* ) # input from stdin
17997         cat >$tmp/stdin
17998         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17999         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18000   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18001         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18002   * )   ac_file_in=$ac_file.in ;;
18003   esac
18004
18005   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18006   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18007          X"$ac_file" : 'X\(//\)[^/]' \| \
18008          X"$ac_file" : 'X\(//\)$' \| \
18009          X"$ac_file" : 'X\(/\)' \| \
18010          .     : '\(.\)' 2>/dev/null ||
18011 echo X"$ac_file" |
18012     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18013           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18014           /^X\(\/\/\)$/{ s//\1/; q; }
18015           /^X\(\/\).*/{ s//\1/; q; }
18016           s/.*/./; q'`
18017   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18018     { case "$ac_dir" in
18019   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18020   *)                      as_incr_dir=.;;
18021 esac
18022 as_dummy="$ac_dir"
18023 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18024   case $as_mkdir_dir in
18025     # Skip DOS drivespec
18026     ?:) as_incr_dir=$as_mkdir_dir ;;
18027     *)
18028       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18029       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18030     ;;
18031   esac
18032 done; }
18033
18034     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18035     # A "../" for each directory in $ac_dir_suffix.
18036     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18037   else
18038     ac_dir_suffix= ac_dots=
18039   fi
18040
18041   case $srcdir in
18042   .)  ac_srcdir=.
18043       if test -z "$ac_dots"; then
18044          ac_top_srcdir=.
18045       else
18046          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18047       fi ;;
18048   [\\/]* | ?:[\\/]* )
18049       ac_srcdir=$srcdir$ac_dir_suffix;
18050       ac_top_srcdir=$srcdir ;;
18051   *) # Relative path.
18052     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18053     ac_top_srcdir=$ac_dots$srcdir ;;
18054   esac
18055
18056   case $INSTALL in
18057   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18058   *) ac_INSTALL=$ac_dots$INSTALL ;;
18059   esac
18060
18061   if test x"$ac_file" != x-; then
18062     { echo "$as_me:18062: creating $ac_file" >&5
18063 echo "$as_me: creating $ac_file" >&6;}
18064     rm -f "$ac_file"
18065   fi
18066   # Let's still pretend it is `configure' which instantiates (i.e., don't
18067   # use $as_me), people would be surprised to read:
18068   #    /* config.h.  Generated automatically by config.status.  */
18069   configure_input="Generated automatically from `echo $ac_file_in |
18070                                                  sed 's,.*/,,'` by configure."
18071
18072   # First look for the input files in the build tree, otherwise in the
18073   # src tree.
18074   ac_file_inputs=`IFS=:
18075     for f in $ac_file_in; do
18076       case $f in
18077       -) echo $tmp/stdin ;;
18078       [\\/$]*)
18079          # Absolute (can't be DOS-style, as IFS=:)
18080          test -f "$f" || { { echo "$as_me:18080: error: cannot find input file: $f" >&5
18081 echo "$as_me: error: cannot find input file: $f" >&2;}
18082    { (exit 1); exit 1; }; }
18083          echo $f;;
18084       *) # Relative
18085          if test -f "$f"; then
18086            # Build tree
18087            echo $f
18088          elif test -f "$srcdir/$f"; then
18089            # Source tree
18090            echo $srcdir/$f
18091          else
18092            # /dev/null tree
18093            { { echo "$as_me:18093: error: cannot find input file: $f" >&5
18094 echo "$as_me: error: cannot find input file: $f" >&2;}
18095    { (exit 1); exit 1; }; }
18096          fi;;
18097       esac
18098     done` || { (exit 1); exit 1; }
18099 EOF
18100 cat >>$CONFIG_STATUS <<EOF
18101   sed "$ac_vpsub
18102 $extrasub
18103 EOF
18104 cat >>$CONFIG_STATUS <<\EOF
18105 :t
18106 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18107 s,@configure_input@,$configure_input,;t t
18108 s,@srcdir@,$ac_srcdir,;t t
18109 s,@top_srcdir@,$ac_top_srcdir,;t t
18110 s,@INSTALL@,$ac_INSTALL,;t t
18111 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18112   rm -f $tmp/stdin
18113   if test x"$ac_file" != x-; then
18114     mv $tmp/out $ac_file
18115   else
18116     cat $tmp/out
18117     rm -f $tmp/out
18118   fi
18119
18120 done
18121 EOF
18122 cat >>$CONFIG_STATUS <<\EOF
18123
18124 #
18125 # CONFIG_HEADER section.
18126 #
18127
18128 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18129 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18130 #
18131 # ac_d sets the value in "#define NAME VALUE" lines.
18132 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18133 ac_dB='[        ].*$,\1#\2'
18134 ac_dC=' '
18135 ac_dD=',;t'
18136 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18137 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18138 ac_iB='\([      ]\),\1#\2define\3'
18139 ac_iC=' '
18140 ac_iD='\4,;t'
18141 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18142 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18143 ac_uB='$,\1#\2define\3'
18144 ac_uC=' '
18145 ac_uD=',;t'
18146
18147 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18148   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18149   case $ac_file in
18150   - | *:- | *:-:* ) # input from stdin
18151         cat >$tmp/stdin
18152         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18153         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18154   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18155         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18156   * )   ac_file_in=$ac_file.in ;;
18157   esac
18158
18159   test x"$ac_file" != x- && { echo "$as_me:18159: creating $ac_file" >&5
18160 echo "$as_me: creating $ac_file" >&6;}
18161
18162   # First look for the input files in the build tree, otherwise in the
18163   # src tree.
18164   ac_file_inputs=`IFS=:
18165     for f in $ac_file_in; do
18166       case $f in
18167       -) echo $tmp/stdin ;;
18168       [\\/$]*)
18169          # Absolute (can't be DOS-style, as IFS=:)
18170          test -f "$f" || { { echo "$as_me:18170: error: cannot find input file: $f" >&5
18171 echo "$as_me: error: cannot find input file: $f" >&2;}
18172    { (exit 1); exit 1; }; }
18173          echo $f;;
18174       *) # Relative
18175          if test -f "$f"; then
18176            # Build tree
18177            echo $f
18178          elif test -f "$srcdir/$f"; then
18179            # Source tree
18180            echo $srcdir/$f
18181          else
18182            # /dev/null tree
18183            { { echo "$as_me:18183: error: cannot find input file: $f" >&5
18184 echo "$as_me: error: cannot find input file: $f" >&2;}
18185    { (exit 1); exit 1; }; }
18186          fi;;
18187       esac
18188     done` || { (exit 1); exit 1; }
18189   # Remove the trailing spaces.
18190   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18191
18192 EOF
18193
18194 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18195 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18196 # be either 'cat' or 'sort'.
18197 cat confdefs.h | uniq >conftest.vals
18198
18199 # Break up conftest.vals because some shells have a limit on
18200 # the size of here documents, and old seds have small limits too.
18201
18202 rm -f conftest.tail
18203 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18204 while grep . conftest.vals >/dev/null
18205 do
18206   # Write chunks of a limited-size here document to conftest.frag.
18207   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18208   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18209   echo 'CEOF' >> $CONFIG_STATUS
18210   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18211   rm -f conftest.vals
18212   mv conftest.tail conftest.vals
18213 done
18214 rm -f conftest.vals
18215
18216 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18217 # marker @DEFS@.
18218 echo '  cat >> conftest.edit <<CEOF
18219 /@DEFS@/r conftest.frag
18220 /@DEFS@/d
18221 CEOF
18222 sed -f conftest.edit $tmp/in > $tmp/out
18223 rm -f $tmp/in
18224 mv $tmp/out $tmp/in
18225 rm -f conftest.edit conftest.frag
18226 ' >> $CONFIG_STATUS
18227
18228 cat >>$CONFIG_STATUS <<\EOF
18229   # Let's still pretend it is `configure' which instantiates (i.e., don't
18230   # use $as_me), people would be surprised to read:
18231   #    /* config.h.  Generated automatically by config.status.  */
18232   if test x"$ac_file" = x-; then
18233     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18234   else
18235     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18236   fi
18237   cat $tmp/in >>$tmp/config.h
18238   rm -f $tmp/in
18239   if test x"$ac_file" != x-; then
18240     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18241       { echo "$as_me:18241: $ac_file is unchanged" >&5
18242 echo "$as_me: $ac_file is unchanged" >&6;}
18243     else
18244       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18245          X"$ac_file" : 'X\(//\)[^/]' \| \
18246          X"$ac_file" : 'X\(//\)$' \| \
18247          X"$ac_file" : 'X\(/\)' \| \
18248          .     : '\(.\)' 2>/dev/null ||
18249 echo X"$ac_file" |
18250     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18251           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18252           /^X\(\/\/\)$/{ s//\1/; q; }
18253           /^X\(\/\).*/{ s//\1/; q; }
18254           s/.*/./; q'`
18255       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18256         { case "$ac_dir" in
18257   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18258   *)                      as_incr_dir=.;;
18259 esac
18260 as_dummy="$ac_dir"
18261 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18262   case $as_mkdir_dir in
18263     # Skip DOS drivespec
18264     ?:) as_incr_dir=$as_mkdir_dir ;;
18265     *)
18266       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18267       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18268     ;;
18269   esac
18270 done; }
18271
18272       fi
18273       rm -f $ac_file
18274       mv $tmp/config.h $ac_file
18275     fi
18276   else
18277     cat $tmp/config.h
18278     rm -f $tmp/config.h
18279   fi
18280 done
18281 EOF
18282 cat >>$CONFIG_STATUS <<\EOF
18283
18284 #
18285 # CONFIG_COMMANDS section.
18286 #
18287 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18288   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18289   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18290
18291   case $ac_dest in
18292     default )
18293
18294 for cf_dir in test
18295 do
18296         if test ! -d $srcdir/$cf_dir; then
18297                 continue
18298         elif test -f $srcdir/$cf_dir/programs; then
18299                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18300         fi
18301 done
18302
18303         case $cf_cv_system_name in #(vi
18304         OS/2*|os2*) #(vi
18305         LIB_PREFIX=''
18306         ;;
18307         *)      LIB_PREFIX='lib'
18308         ;;
18309         esac
18310 cf_prefix=$LIB_PREFIX
18311
18312 if test $cf_cv_shlib_version = cygdll ; then
18313         TINFO_NAME=$TINFO_ARG_SUFFIX
18314         TINFO_SUFFIX=.dll
18315 fi
18316
18317 for cf_dir in $SRC_SUBDIRS
18318 do
18319         if test ! -d $srcdir/$cf_dir ; then
18320                 continue
18321         elif test -f $srcdir/$cf_dir/modules; then
18322
18323                 SHARED_LIB=
18324                 LIBS_TO_MAKE=
18325                 for cf_item in $cf_LIST_MODELS
18326                 do
18327
18328         case $cf_item in #(vi
18329         libtool) #(vi
18330                 cf_suffix='.la'
18331                 cf_depsuf=$cf_suffix
18332                 ;;
18333         normal) #(vi
18334                 cf_suffix='.a'
18335                 cf_depsuf=$cf_suffix
18336                 ;;
18337         debug) #(vi
18338                 cf_suffix='_g.a'
18339                 cf_depsuf=$cf_suffix
18340                 ;;
18341         profile) #(vi
18342                 cf_suffix='_p.a'
18343                 cf_depsuf=$cf_suffix
18344                 ;;
18345         shared) #(vi
18346                 case $cf_cv_system_name in
18347                 aix[56]*) #(vi
18348                         cf_suffix='.a'
18349                         cf_depsuf=$cf_suffix
18350                         ;;
18351                 cygwin*) #(vi
18352                         cf_suffix='.dll'
18353                         cf_depsuf='.dll.a'
18354                         ;;
18355                 darwin*) #(vi
18356                         cf_suffix='.dylib'
18357                         cf_depsuf=$cf_suffix
18358                         ;;
18359                 hpux*) #(vi
18360                         case $target in
18361                         ia64*) #(vi
18362                                 cf_suffix='.so'
18363                                 cf_depsuf=$cf_suffix
18364                                 ;;
18365                         *) #(vi
18366                                 cf_suffix='.sl'
18367                                 cf_depsuf=$cf_suffix
18368                                 ;;
18369                         esac
18370                         ;;
18371                 *)      cf_suffix='.so'
18372                         cf_depsuf=$cf_suffix
18373                         ;;
18374                 esac
18375         esac
18376         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18377         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18378
18379                         if test $cf_item = shared ; then
18380                         if test "$cf_cv_do_symlinks" = yes ; then
18381                                 case "$cf_cv_shlib_version" in #(vi
18382                                 rel) #(vi
18383                                         case "$cf_cv_system_name" in #(vi
18384                                         darwin*)
18385                                         case .${LIB_SUFFIX} in
18386                                         .w*)
18387                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18388                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18389                                                 ;;
18390                                         *)
18391                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18392                                                 ;;
18393                                         esac
18394                                         ;; #(vi
18395                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18396                                         esac
18397                                         ;;
18398                                 abi)
18399                                         case "$cf_cv_system_name" in #(vi
18400                                         darwin*)
18401                                         case .${LIB_SUFFIX} in
18402                                         .w*)
18403                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18404                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18405                                                 ;;
18406                                         *)
18407                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18408                                                 ;;
18409                                         esac
18410                                         ;; #(vi
18411                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18412                                         esac
18413                                         ;;
18414                                 esac
18415                         fi
18416                         # cygwin needs import library, and has unique naming convention
18417                         # use autodetected ${cf_prefix} for import lib and static lib, but
18418                         # use 'cyg' prefix for shared lib.
18419                         if test $cf_cv_shlib_version = cygdll ; then
18420                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18421                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18422                                 continue
18423                         fi
18424                         fi
18425                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18426                 done
18427
18428                 if test $cf_dir = ncurses ; then
18429                         cf_subsets="$LIB_SUBSETS"
18430                         cf_r_parts="$cf_subsets"
18431                         cf_liblist="$LIBS_TO_MAKE"
18432
18433                         while test -n "$cf_r_parts"
18434                         do
18435                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18436                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18437                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18438                                         cf_item=
18439                                         case $cf_l_parts in #(vi
18440                                         *termlib*) #(vi
18441                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18442                                                 ;;
18443                                         *ticlib*)
18444                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18445                                                 ;;
18446                                         *)
18447                                                 break
18448                                                 ;;
18449                                         esac
18450                                         if test -n "$cf_item"; then
18451                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18452                                         fi
18453                                 else
18454                                         break
18455                                 fi
18456                         done
18457                 else
18458                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18459                 fi
18460
18461                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18462                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18463                         $cf_dir/Makefile >$cf_dir/Makefile.out
18464                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18465
18466                 $AWK -f $srcdir/mk-0th.awk \
18467                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18468                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18469
18470                 for cf_subset in $cf_subsets
18471                 do
18472                         cf_subdirs=
18473                         for cf_item in $cf_LIST_MODELS
18474                         do
18475                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18476
18477 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18478
18479         case $cf_item in #(vi
18480         libtool) #(vi
18481                 cf_suffix='.la'
18482                 cf_depsuf=$cf_suffix
18483                 ;;
18484         normal) #(vi
18485                 cf_suffix='.a'
18486                 cf_depsuf=$cf_suffix
18487                 ;;
18488         debug) #(vi
18489                 cf_suffix='_g.a'
18490                 cf_depsuf=$cf_suffix
18491                 ;;
18492         profile) #(vi
18493                 cf_suffix='_p.a'
18494                 cf_depsuf=$cf_suffix
18495                 ;;
18496         shared) #(vi
18497                 case $cf_cv_system_name in
18498                 aix[56]*) #(vi
18499                         cf_suffix='.a'
18500                         cf_depsuf=$cf_suffix
18501                         ;;
18502                 cygwin*) #(vi
18503                         cf_suffix='.dll'
18504                         cf_depsuf='.dll.a'
18505                         ;;
18506                 darwin*) #(vi
18507                         cf_suffix='.dylib'
18508                         cf_depsuf=$cf_suffix
18509                         ;;
18510                 hpux*) #(vi
18511                         case $target in
18512                         ia64*) #(vi
18513                                 cf_suffix='.so'
18514                                 cf_depsuf=$cf_suffix
18515                                 ;;
18516                         *) #(vi
18517                                 cf_suffix='.sl'
18518                                 cf_depsuf=$cf_suffix
18519                                 ;;
18520                         esac
18521                         ;;
18522                 *)      cf_suffix='.so'
18523                         cf_depsuf=$cf_suffix
18524                         ;;
18525                 esac
18526         esac
18527         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18528         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18529
18530         case $cf_item in
18531         libtool) cf_subdir='obj_lo'  ;;
18532         normal)  cf_subdir='objects' ;;
18533         debug)   cf_subdir='obj_g' ;;
18534         profile) cf_subdir='obj_p' ;;
18535         shared)
18536                 case $cf_cv_system_name in #(vi
18537                 cygwin) #(vi
18538                         cf_subdir='objects' ;;
18539                 *)
18540                         cf_subdir='obj_s' ;;
18541                 esac
18542         esac
18543
18544                         # Test for case where we build libtinfo with a different name.
18545                         cf_libname=$cf_dir
18546                         if test $cf_dir = ncurses ; then
18547                                 case $cf_subset in
18548                                 *base*)
18549                                         cf_libname=${cf_libname}$LIB_SUFFIX
18550                                         ;;
18551                                 *termlib*)
18552                                         cf_libname=$TINFO_LIB_SUFFIX
18553                                         ;;
18554                                 ticlib*)
18555                                         cf_libname=$TICS_LIB_SUFFIX
18556                                         ;;
18557                                 esac
18558                         else
18559                                 cf_libname=${cf_libname}$LIB_SUFFIX
18560                         fi
18561                         if test -n "${DFT_ARG_SUFFIX}" ; then
18562                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18563                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18564                         fi
18565
18566                         # These dependencies really are for development, not
18567                         # builds, but they are useful in porting, too.
18568                         cf_depend="../include/ncurses_cfg.h"
18569                         if test "$srcdir" = "."; then
18570                                 cf_reldir="."
18571                         else
18572                                 cf_reldir="\${srcdir}"
18573                         fi
18574
18575                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18576                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18577                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18578                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18579                         fi
18580
18581                         cf_dir_suffix=
18582                         old_cf_suffix="$cf_suffix"
18583                         if test "$cf_cv_shlib_version_infix" = yes ; then
18584                         if test -n "$LIB_SUFFIX" ; then
18585                                 case $LIB_SUFFIX in
18586                                 w*)
18587                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18588                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18589                                         cf_dir_suffix=w
18590                                         ;;
18591                                 esac
18592                         fi
18593                         fi
18594
18595                         $AWK -f $srcdir/mk-1st.awk \
18596                                 name=${cf_libname}${cf_dir_suffix} \
18597                                 traces=$LIB_TRACING \
18598                                 MODEL=$cf_ITEM \
18599                                 model=$cf_subdir \
18600                                 prefix=$cf_prefix \
18601                                 suffix=$cf_suffix \
18602                                 subset=$cf_subset \
18603                                 TermlibRoot=$TINFO_NAME \
18604                                 TermlibSuffix=$TINFO_SUFFIX \
18605                                 ShlibVer=$cf_cv_shlib_version \
18606                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18607                                 ReLink=${cf_cv_do_relink-no} \
18608                                 DoLinks=$cf_cv_do_symlinks \
18609                                 rmSoLocs=$cf_cv_rm_so_locs \
18610                                 ldconfig="$LDCONFIG" \
18611                                 overwrite=$WITH_OVERWRITE \
18612                                 depend="$cf_depend" \
18613                                 host="$host" \
18614                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18615
18616                         cf_suffix="$old_cf_suffix"
18617
18618                         for cf_subdir2 in $cf_subdirs lib
18619                         do
18620                                 test $cf_subdir = $cf_subdir2 && break
18621                         done
18622                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18623                         $AWK -f $srcdir/mk-2nd.awk \
18624                                 name=$cf_dir \
18625                                 traces=$LIB_TRACING \
18626                                 MODEL=$cf_ITEM \
18627                                 model=$cf_subdir \
18628                                 subset=$cf_subset \
18629                                 srcdir=$srcdir \
18630                                 echo=$WITH_ECHO \
18631                                 crenames=$cf_cv_prog_CC_c_o \
18632                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18633                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18634                         cf_subdirs="$cf_subdirs $cf_subdir"
18635                         done
18636                 done
18637         fi
18638
18639         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18640 done
18641
18642 for cf_dir in $SRC_SUBDIRS
18643 do
18644         if test ! -d $srcdir/$cf_dir ; then
18645                 continue
18646         fi
18647
18648         if test -f $cf_dir/Makefile ; then
18649                 case "$cf_dir" in
18650                 Ada95) #(vi
18651                         echo 'libs \' >> Makefile
18652                         echo 'install.libs \' >> Makefile
18653                         echo 'uninstall.libs ::' >> Makefile
18654                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18655                         ;;
18656                 esac
18657         fi
18658
18659         if test -f $srcdir/$cf_dir/modules; then
18660                 echo >> Makefile
18661                 if test -f $srcdir/$cf_dir/headers; then
18662 cat >> Makefile <<CF_EOF
18663 install.includes \\
18664 uninstall.includes \\
18665 CF_EOF
18666                 fi
18667 if test "$cf_dir" != "c++" ; then
18668 echo 'lint \' >> Makefile
18669 fi
18670 cat >> Makefile <<CF_EOF
18671 libs \\
18672 lintlib \\
18673 install.libs \\
18674 uninstall.libs \\
18675 install.$cf_dir \\
18676 uninstall.$cf_dir ::
18677         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18678 CF_EOF
18679         elif test -f $srcdir/$cf_dir/headers; then
18680 cat >> Makefile <<CF_EOF
18681
18682 libs \\
18683 install.libs \\
18684 uninstall.libs \\
18685 install.includes \\
18686 uninstall.includes ::
18687         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18688 CF_EOF
18689 fi
18690 done
18691
18692 cat >> Makefile <<CF_EOF
18693
18694 install.libs uninstall.libs \\
18695 install.data uninstall.data ::
18696 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18697 CF_EOF
18698
18699 if test "x$cf_with_manpages" = xyes; then
18700 cat >> Makefile <<CF_EOF
18701
18702 install.man \\
18703 uninstall.man ::
18704         cd man && \${MAKE} \${CF_MFLAGS} \$@
18705 CF_EOF
18706 fi
18707
18708 cat >> Makefile <<CF_EOF
18709
18710 distclean ::
18711         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18712         rm -f headers.sh headers.sed mk_shared_lib.sh
18713         rm -f edit_man.* man_alias.*
18714         rm -rf \${DIRS_TO_MAKE}
18715 CF_EOF
18716
18717 # Special case: tack's manpage lives in its own directory.
18718 if test "x$cf_with_manpages" = xyes; then
18719 if test -d tack ; then
18720 if test -f $srcdir/$tack.h; then
18721 cat >> Makefile <<CF_EOF
18722
18723 install.man \\
18724 uninstall.man ::
18725         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18726 CF_EOF
18727 fi
18728 fi
18729 fi
18730
18731 rm -f headers.sed headers.sh
18732
18733 echo creating headers.sh
18734 cat >headers.sh <<CF_EOF
18735 #! /bin/sh
18736 # This shell script is generated by the 'configure' script.  It is invoked in a
18737 # subdirectory of the build tree.  It generates a sed-script in the parent
18738 # directory that is used to adjust includes for header files that reside in a
18739 # subdirectory of /usr/include, etc.
18740 PRG=""
18741 while test \$# != 3
18742 do
18743 PRG="\$PRG \$1"; shift
18744 done
18745 DST=\$1
18746 REF=\$2
18747 SRC=\$3
18748 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18749 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18750 echo installing \$SRC in \$DST
18751 CF_EOF
18752
18753 if test $WITH_CURSES_H = yes; then
18754         cat >>headers.sh <<CF_EOF
18755 case \$DST in
18756 /*/include/*)
18757         END=\`basename \$DST\`
18758         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18759         do
18760                 NAME=\`basename \$i\`
18761                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18762         done
18763         ;;
18764 *)
18765         echo "" >> \$TMPSED
18766         ;;
18767 esac
18768 CF_EOF
18769
18770 else
18771         cat >>headers.sh <<CF_EOF
18772 case \$DST in
18773 /*/include/*)
18774         END=\`basename \$DST\`
18775         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18776         do
18777                 NAME=\`basename \$i\`
18778                 if test "\$NAME" = "curses.h"
18779                 then
18780                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18781                         NAME=ncurses.h
18782                 fi
18783                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18784         done
18785         ;;
18786 *)
18787         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18788         ;;
18789 esac
18790 CF_EOF
18791 fi
18792 cat >>headers.sh <<CF_EOF
18793 rm -f \$TMPSRC
18794 sed -f \$TMPSED \$SRC > \$TMPSRC
18795 NAME=\`basename \$SRC\`
18796 CF_EOF
18797 if test $WITH_CURSES_H != yes; then
18798         cat >>headers.sh <<CF_EOF
18799 test "\$NAME" = "curses.h" && NAME=ncurses.h
18800 CF_EOF
18801 fi
18802 cat >>headers.sh <<CF_EOF
18803 # Just in case someone gzip'd manpages, remove the conflicting copy.
18804 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18805
18806 eval \$PRG \$TMPSRC \$DST/\$NAME
18807 rm -f \$TMPSRC \$TMPSED
18808 CF_EOF
18809
18810 chmod 0755 headers.sh
18811
18812 for cf_dir in $SRC_SUBDIRS
18813 do
18814         if test ! -d $srcdir/$cf_dir ; then
18815                 continue
18816         fi
18817
18818         if test -f $srcdir/$cf_dir/headers; then
18819                 $AWK -f $srcdir/mk-hdr.awk \
18820                         subset="$LIB_SUBSETS" \
18821                         compat="$WITH_CURSES_H" \
18822                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18823         fi
18824
18825         if test -f $srcdir/$cf_dir/modules; then
18826                 if test "$cf_dir" != "c++" ; then
18827                         cat >>$cf_dir/Makefile <<"CF_EOF"
18828 depend : ${AUTO_SRC}
18829         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18830
18831 # DO NOT DELETE THIS LINE -- make depend depends on it.
18832 CF_EOF
18833                 fi
18834         fi
18835 done
18836
18837  ;;
18838   esac
18839 done
18840 EOF
18841
18842 cat >>$CONFIG_STATUS <<\EOF
18843
18844 { (exit 0); exit 0; }
18845 EOF
18846 chmod +x $CONFIG_STATUS
18847 ac_clean_files=$ac_clean_files_save
18848
18849 # configure is writing to config.log, and then calls config.status.
18850 # config.status does its own redirection, appending to config.log.
18851 # Unfortunately, on DOS this fails, as config.log is still kept open
18852 # by configure, so config.status won't be able to write to it; its
18853 # output is simply discarded.  So we exec the FD to /dev/null,
18854 # effectively closing config.log, so it can be properly (re)opened and
18855 # appended to by config.status.  When coming back to configure, we
18856 # need to make the FD available again.
18857 if test "$no_create" != yes; then
18858   ac_cs_success=:
18859   exec 5>/dev/null
18860   $SHELL $CONFIG_STATUS || ac_cs_success=false
18861   exec 5>>config.log
18862   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18863   # would make configure fail if this is the last instruction.
18864   $ac_cs_success || { (exit 1); exit 1; }
18865 fi
18866 ${MAKE-make} preinstall