]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090314
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.466 .
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   --enable-safe-sprintf   compile with experimental safe-sprintf code
788   --disable-scroll-hints  compile without scroll-hints code
789   --enable-wgetch-events  compile with experimental wgetch-events code
790 Testing/development Options:
791   --enable-echo           build: display "compiling" commands (default)
792   --enable-warnings       build: turn on GCC compiler warnings
793   --enable-assertions     test: turn on generation of assertion code
794   --with-dmalloc          test: use Gray Watson's dmalloc library
795   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
796   --with-valgrind         test: use valgrind
797   --disable-leaks         test: free permanent memory, analyze leaks
798   --enable-expanded       test: generate functions for certain macros
799   --disable-macros        test: use functions rather than macros
800   --with-trace            test: add trace() function to all models of ncurses
801 Ada95 Binding Options:
802   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
803   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
804   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
805
806 Some influential environment variables:
807   CC          C compiler command
808   CFLAGS      C compiler flags
809   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
810               nonstandard directory <lib dir>
811   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
812               headers in a nonstandard directory <include dir>
813   CPP         C preprocessor
814   CXX         C++ compiler command
815   CXXFLAGS    C++ compiler flags
816   CXXCPP      C++ preprocessor
817
818 Use these variables to override the choices made by `configure' or to help
819 it to find libraries and programs with nonstandard names/locations.
820
821 EOF
822 fi
823
824 if test "$ac_init_help" = "recursive"; then
825   # If there are subdirs, report their specific --help.
826   ac_popdir=`pwd`
827   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
828     cd $ac_subdir
829     # A "../" for each directory in /$ac_subdir.
830     ac_dots=`echo $ac_subdir |
831              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
832
833     case $srcdir in
834     .) # No --srcdir option.  We are building in place.
835       ac_sub_srcdir=$srcdir ;;
836     [\\/]* | ?:[\\/]* ) # Absolute path.
837       ac_sub_srcdir=$srcdir/$ac_subdir ;;
838     *) # Relative path.
839       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
840     esac
841
842     # Check for guested configure; otherwise get Cygnus style configure.
843     if test -f $ac_sub_srcdir/configure.gnu; then
844       echo
845       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
846     elif test -f $ac_sub_srcdir/configure; then
847       echo
848       $SHELL $ac_sub_srcdir/configure  --help=recursive
849     elif test -f $ac_sub_srcdir/configure.ac ||
850            test -f $ac_sub_srcdir/configure.in; then
851       echo
852       $ac_configure --help
853     else
854       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
855     fi
856     cd $ac_popdir
857   done
858 fi
859
860 test -n "$ac_init_help" && exit 0
861 if $ac_init_version; then
862   cat <<\EOF
863
864 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
865 Free Software Foundation, Inc.
866 This configure script is free software; the Free Software Foundation
867 gives unlimited permission to copy, distribute and modify it.
868 EOF
869   exit 0
870 fi
871 exec 5>config.log
872 cat >&5 <<EOF
873 This file contains any messages produced by compilers while
874 running configure, to aid debugging if configure makes a mistake.
875
876 It was created by $as_me, which was
877 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
878
879   $ $0 $@
880
881 EOF
882 {
883 cat <<_ASUNAME
884 ## ---------- ##
885 ## Platform.  ##
886 ## ---------- ##
887
888 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
889 uname -m = `(uname -m) 2>/dev/null || echo unknown`
890 uname -r = `(uname -r) 2>/dev/null || echo unknown`
891 uname -s = `(uname -s) 2>/dev/null || echo unknown`
892 uname -v = `(uname -v) 2>/dev/null || echo unknown`
893
894 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
895 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
896
897 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
898 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
899 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
900 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
901 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
902 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
903 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
904
905 PATH = $PATH
906
907 _ASUNAME
908 } >&5
909
910 cat >&5 <<EOF
911 ## ------------ ##
912 ## Core tests.  ##
913 ## ------------ ##
914
915 EOF
916
917 # Keep a trace of the command line.
918 # Strip out --no-create and --no-recursion so they do not pile up.
919 # Also quote any args containing shell meta-characters.
920 ac_configure_args=
921 ac_sep=
922 for ac_arg
923 do
924   case $ac_arg in
925   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
926   | --no-cr | --no-c) ;;
927   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
928   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
929   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
930     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
931     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
932     ac_sep=" " ;;
933   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
934      ac_sep=" " ;;
935   esac
936   # Get rid of the leading space.
937 done
938
939 # When interrupted or exit'd, cleanup temporary files, and complete
940 # config.log.  We remove comments because anyway the quotes in there
941 # would cause problems or look ugly.
942 trap 'exit_status=$?
943   # Save into config.log some information that might help in debugging.
944   echo >&5
945   echo "## ----------------- ##" >&5
946   echo "## Cache variables.  ##" >&5
947   echo "## ----------------- ##" >&5
948   echo >&5
949   # The following way of writing the cache mishandles newlines in values,
950 {
951   (set) 2>&1 |
952     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
953     *ac_space=\ *)
954       sed -n \
955         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
956           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
957       ;;
958     *)
959       sed -n \
960         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
961       ;;
962     esac;
963 } >&5
964   sed "/^$/d" confdefs.h >conftest.log
965   if test -s conftest.log; then
966     echo >&5
967     echo "## ------------ ##" >&5
968     echo "## confdefs.h.  ##" >&5
969     echo "## ------------ ##" >&5
970     echo >&5
971     cat conftest.log >&5
972   fi
973   (echo; echo) >&5
974   test "$ac_signal" != 0 &&
975     echo "$as_me: caught signal $ac_signal" >&5
976   echo "$as_me: exit $exit_status" >&5
977   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
978     exit $exit_status
979      ' 0
980 for ac_signal in 1 2 13 15; do
981   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
982 done
983 ac_signal=0
984
985 # confdefs.h avoids OS command line length limits that DEFS can exceed.
986 rm -rf conftest* confdefs.h
987 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
988 echo >confdefs.h
989
990 # Let the site file select an alternate cache file if it wants to.
991 # Prefer explicitly selected file to automatically selected ones.
992 if test -z "$CONFIG_SITE"; then
993   if test "x$prefix" != xNONE; then
994     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
995   else
996     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
997   fi
998 fi
999 for ac_site_file in $CONFIG_SITE; do
1000   if test -r "$ac_site_file"; then
1001     { echo "$as_me:1001: loading site script $ac_site_file" >&5
1002 echo "$as_me: loading site script $ac_site_file" >&6;}
1003     cat "$ac_site_file" >&5
1004     . "$ac_site_file"
1005   fi
1006 done
1007
1008 if test -r "$cache_file"; then
1009   # Some versions of bash will fail to source /dev/null (special
1010   # files actually), so we avoid doing that.
1011   if test -f "$cache_file"; then
1012     { echo "$as_me:1012: loading cache $cache_file" >&5
1013 echo "$as_me: loading cache $cache_file" >&6;}
1014     case $cache_file in
1015       [\\/]* | ?:[\\/]* ) . $cache_file;;
1016       *)                      . ./$cache_file;;
1017     esac
1018   fi
1019 else
1020   { echo "$as_me:1020: creating cache $cache_file" >&5
1021 echo "$as_me: creating cache $cache_file" >&6;}
1022   >$cache_file
1023 fi
1024
1025 # Check that the precious variables saved in the cache have kept the same
1026 # value.
1027 ac_cache_corrupted=false
1028 for ac_var in `(set) 2>&1 |
1029                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1030   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1031   eval ac_new_set=\$ac_env_${ac_var}_set
1032   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1033   eval ac_new_val="\$ac_env_${ac_var}_value"
1034   case $ac_old_set,$ac_new_set in
1035     set,)
1036       { echo "$as_me:1036: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1037 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1038       ac_cache_corrupted=: ;;
1039     ,set)
1040       { echo "$as_me:1040: error: \`$ac_var' was not set in the previous run" >&5
1041 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1042       ac_cache_corrupted=: ;;
1043     ,);;
1044     *)
1045       if test "x$ac_old_val" != "x$ac_new_val"; then
1046         { echo "$as_me:1046: error: \`$ac_var' has changed since the previous run:" >&5
1047 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1048         { echo "$as_me:1048:   former value:  $ac_old_val" >&5
1049 echo "$as_me:   former value:  $ac_old_val" >&2;}
1050         { echo "$as_me:1050:   current value: $ac_new_val" >&5
1051 echo "$as_me:   current value: $ac_new_val" >&2;}
1052         ac_cache_corrupted=:
1053       fi;;
1054   esac
1055   # Pass precious variables to config.status.  It doesn't matter if
1056   # we pass some twice (in addition to the command line arguments).
1057   if test "$ac_new_set" = set; then
1058     case $ac_new_val in
1059     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1060       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1061       ac_configure_args="$ac_configure_args '$ac_arg'"
1062       ;;
1063     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1064        ;;
1065     esac
1066   fi
1067 done
1068 if $ac_cache_corrupted; then
1069   { echo "$as_me:1069: error: changes in the environment can compromise the build" >&5
1070 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1071   { { echo "$as_me:1071: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1072 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1073    { (exit 1); exit 1; }; }
1074 fi
1075
1076 ac_ext=c
1077 ac_cpp='$CPP $CPPFLAGS'
1078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1081 ac_main_return=return
1082
1083 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1084   *c*,-n*) ECHO_N= ECHO_C='
1085 ' ECHO_T='      ' ;;
1086   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1087   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1088 esac
1089 echo "#! $SHELL" >conftest.sh
1090 echo  "exit 0"   >>conftest.sh
1091 chmod +x conftest.sh
1092 if { (echo "$as_me:1092: PATH=\".;.\"; conftest.sh") >&5
1093   (PATH=".;."; conftest.sh) 2>&5
1094   ac_status=$?
1095   echo "$as_me:1095: \$? = $ac_status" >&5
1096   (exit $ac_status); }; then
1097   ac_path_separator=';'
1098 else
1099   ac_path_separator=:
1100 fi
1101 PATH_SEPARATOR="$ac_path_separator"
1102 rm -f conftest.sh
1103
1104 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1105
1106 top_builddir=`pwd`
1107
1108 echo "$as_me:1108: checking for egrep" >&5
1109 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1110 if test "${ac_cv_prog_egrep+set}" = set; then
1111   echo $ECHO_N "(cached) $ECHO_C" >&6
1112 else
1113   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1114     then ac_cv_prog_egrep='grep -E'
1115     else ac_cv_prog_egrep='egrep'
1116     fi
1117 fi
1118 echo "$as_me:1118: result: $ac_cv_prog_egrep" >&5
1119 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1120  EGREP=$ac_cv_prog_egrep
1121
1122 test -z "$EGREP" && { { echo "$as_me:1122: error: No egrep program found" >&5
1123 echo "$as_me: error: No egrep program found" >&2;}
1124    { (exit 1); exit 1; }; }
1125
1126 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1127 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1128 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1129 cf_cv_abi_version=${NCURSES_MAJOR}
1130 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1131 cf_cv_timestamp=`date`
1132 echo "$as_me:1132: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1133 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1134
1135 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1136
1137 # Check whether --with-rel-version or --without-rel-version was given.
1138 if test "${with_rel_version+set}" = set; then
1139   withval="$with_rel_version"
1140   { echo "$as_me:1140: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1141 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1142  cf_cv_rel_version=$withval
1143 fi;
1144
1145  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1146  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1147
1148 if test -n "$NCURSES_MAJOR" ; then
1149   case $NCURSES_MAJOR in #(vi
1150   [0-9]*) #(vi
1151         ;;
1152   *)
1153         { { echo "$as_me:1153: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1154 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1155    { (exit 1); exit 1; }; }
1156         ;;
1157   esac
1158 else
1159   { { echo "$as_me:1159: error: Release major-version value is empty" >&5
1160 echo "$as_me: error: Release major-version value is empty" >&2;}
1161    { (exit 1); exit 1; }; }
1162 fi
1163
1164 if test -n "$NCURSES_MINOR" ; then
1165   case $NCURSES_MINOR in #(vi
1166   [0-9]*) #(vi
1167         ;;
1168   *)
1169         { { echo "$as_me:1169: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1170 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1171    { (exit 1); exit 1; }; }
1172         ;;
1173   esac
1174 else
1175   { { echo "$as_me:1175: error: Release minor-version value is empty" >&5
1176 echo "$as_me: error: Release minor-version value is empty" >&2;}
1177    { (exit 1); exit 1; }; }
1178 fi
1179
1180 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1181
1182 # Check whether --with-abi-version or --without-abi-version was given.
1183 if test "${with_abi_version+set}" = set; then
1184   withval="$with_abi_version"
1185   { echo "$as_me:1185: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1186 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1187  cf_cv_abi_version=$withval
1188 fi;
1189
1190 if test -n "$cf_cv_abi_version" ; then
1191   case $cf_cv_abi_version in #(vi
1192   [0-9]*) #(vi
1193         ;;
1194   *)
1195         { { echo "$as_me:1195: error: ABI version is not a number: $cf_cv_abi_version" >&5
1196 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1197    { (exit 1); exit 1; }; }
1198         ;;
1199   esac
1200 else
1201   { { echo "$as_me:1201: error: ABI version value is empty" >&5
1202 echo "$as_me: error: ABI version value is empty" >&2;}
1203    { (exit 1); exit 1; }; }
1204 fi
1205
1206 ac_aux_dir=
1207 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1208   if test -f $ac_dir/install-sh; then
1209     ac_aux_dir=$ac_dir
1210     ac_install_sh="$ac_aux_dir/install-sh -c"
1211     break
1212   elif test -f $ac_dir/install.sh; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/install.sh -c"
1215     break
1216   elif test -f $ac_dir/shtool; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/shtool install -c"
1219     break
1220   fi
1221 done
1222 if test -z "$ac_aux_dir"; then
1223   { { echo "$as_me:1223: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1224 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1228 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1229 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1230
1231 # Make sure we can run config.sub.
1232 $ac_config_sub sun4 >/dev/null 2>&1 ||
1233   { { echo "$as_me:1233: error: cannot run $ac_config_sub" >&5
1234 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1235    { (exit 1); exit 1; }; }
1236
1237 echo "$as_me:1237: checking build system type" >&5
1238 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1239 if test "${ac_cv_build+set}" = set; then
1240   echo $ECHO_N "(cached) $ECHO_C" >&6
1241 else
1242   ac_cv_build_alias=$build_alias
1243 test -z "$ac_cv_build_alias" &&
1244   ac_cv_build_alias=`$ac_config_guess`
1245 test -z "$ac_cv_build_alias" &&
1246   { { echo "$as_me:1246: error: cannot guess build type; you must specify one" >&5
1247 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1248    { (exit 1); exit 1; }; }
1249 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1250   { { echo "$as_me:1250: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1251 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1252    { (exit 1); exit 1; }; }
1253
1254 fi
1255 echo "$as_me:1255: result: $ac_cv_build" >&5
1256 echo "${ECHO_T}$ac_cv_build" >&6
1257 build=$ac_cv_build
1258 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1259 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1260 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1261
1262 echo "$as_me:1262: checking host system type" >&5
1263 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1264 if test "${ac_cv_host+set}" = set; then
1265   echo $ECHO_N "(cached) $ECHO_C" >&6
1266 else
1267   ac_cv_host_alias=$host_alias
1268 test -z "$ac_cv_host_alias" &&
1269   ac_cv_host_alias=$ac_cv_build_alias
1270 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1271   { { echo "$as_me:1271: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1272 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1273    { (exit 1); exit 1; }; }
1274
1275 fi
1276 echo "$as_me:1276: result: $ac_cv_host" >&5
1277 echo "${ECHO_T}$ac_cv_host" >&6
1278 host=$ac_cv_host
1279 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1280 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1281 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1282
1283 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1284         echo "$as_me:1284: checking target system type" >&5
1285 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1286 if test "${ac_cv_target+set}" = set; then
1287   echo $ECHO_N "(cached) $ECHO_C" >&6
1288 else
1289   ac_cv_target_alias=$target_alias
1290 test "x$ac_cv_target_alias" = "x" &&
1291   ac_cv_target_alias=$ac_cv_host_alias
1292 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1293   { { echo "$as_me:1293: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1294 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1295    { (exit 1); exit 1; }; }
1296
1297 fi
1298 echo "$as_me:1298: result: $ac_cv_target" >&5
1299 echo "${ECHO_T}$ac_cv_target" >&6
1300 target=$ac_cv_target
1301 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1302 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1303 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1304
1305 # The aliases save the names the user supplied, while $host etc.
1306 # will get canonicalized.
1307 test -n "$target_alias" &&
1308   test "$program_prefix$program_suffix$program_transform_name" = \
1309     NONENONEs,x,x, &&
1310   program_prefix=${target_alias}-
1311         system_name="$host_os"
1312 else
1313         system_name="`(uname -s -r) 2>/dev/null`"
1314         if test -z "$system_name" ; then
1315                 system_name="`(hostname) 2>/dev/null`"
1316         fi
1317 fi
1318 test -n "$system_name" && cat >>confdefs.h <<EOF
1319 #define SYSTEM_NAME "$system_name"
1320 EOF
1321
1322 if test "${cf_cv_system_name+set}" = set; then
1323   echo $ECHO_N "(cached) $ECHO_C" >&6
1324 else
1325   cf_cv_system_name="$system_name"
1326 fi
1327
1328 test -z "$system_name" && system_name="$cf_cv_system_name"
1329 test -n "$cf_cv_system_name" && echo "$as_me:1329: result: Configuring for $cf_cv_system_name" >&5
1330 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1331
1332 if test ".$system_name" != ".$cf_cv_system_name" ; then
1333         echo "$as_me:1333: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1334 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1335         { { echo "$as_me:1335: error: \"Please remove config.cache and try again.\"" >&5
1336 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1337    { (exit 1); exit 1; }; }
1338 fi
1339
1340 # Check whether --with-system-type or --without-system-type was given.
1341 if test "${with_system_type+set}" = set; then
1342   withval="$with_system_type"
1343   { echo "$as_me:1343: WARNING: overriding system type to $withval" >&5
1344 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1345  cf_cv_system_name=$withval
1346 fi;
1347
1348 ###     Save the given $CFLAGS to allow user-override.
1349 cf_user_CFLAGS="$CFLAGS"
1350
1351 ###     Default install-location
1352
1353 echo "$as_me:1353: checking for prefix" >&5
1354 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1355 if test "x$prefix" = "xNONE" ; then
1356         case "$cf_cv_system_name" in
1357                 # non-vendor systems don't have a conflict
1358         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1359                 prefix=/usr
1360                 ;;
1361         *)      prefix=$ac_default_prefix
1362                 ;;
1363         esac
1364 fi
1365 echo "$as_me:1365: result: $prefix" >&5
1366 echo "${ECHO_T}$prefix" >&6
1367
1368 if test "x$prefix" = "xNONE" ; then
1369 echo "$as_me:1369: checking for default include-directory" >&5
1370 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1371 test -n "$verbose" && echo 1>&6
1372 for cf_symbol in \
1373         $includedir \
1374         $includedir/ncurses \
1375         $prefix/include \
1376         $prefix/include/ncurses \
1377         /usr/local/include \
1378         /usr/local/include/ncurses \
1379         /usr/include \
1380         /usr/include/ncurses
1381 do
1382         cf_dir=`eval echo $cf_symbol`
1383         if test -f $cf_dir/curses.h ; then
1384         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1385                 includedir="$cf_symbol"
1386                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1387                 break
1388         fi
1389         fi
1390         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1391 done
1392 echo "$as_me:1392: result: $includedir" >&5
1393 echo "${ECHO_T}$includedir" >&6
1394 fi
1395
1396 ###     Checks for programs.
1397 ac_ext=c
1398 ac_cpp='$CPP $CPPFLAGS'
1399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1402 ac_main_return=return
1403 if test -n "$ac_tool_prefix"; then
1404   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1405 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1406 echo "$as_me:1406: checking for $ac_word" >&5
1407 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1408 if test "${ac_cv_prog_CC+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   if test -n "$CC"; then
1412   ac_cv_prog_CC="$CC" # Let the user override the test.
1413 else
1414   ac_save_IFS=$IFS; IFS=$ac_path_separator
1415 ac_dummy="$PATH"
1416 for ac_dir in $ac_dummy; do
1417   IFS=$ac_save_IFS
1418   test -z "$ac_dir" && ac_dir=.
1419   $as_executable_p "$ac_dir/$ac_word" || continue
1420 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1421 echo "$as_me:1421: found $ac_dir/$ac_word" >&5
1422 break
1423 done
1424
1425 fi
1426 fi
1427 CC=$ac_cv_prog_CC
1428 if test -n "$CC"; then
1429   echo "$as_me:1429: result: $CC" >&5
1430 echo "${ECHO_T}$CC" >&6
1431 else
1432   echo "$as_me:1432: result: no" >&5
1433 echo "${ECHO_T}no" >&6
1434 fi
1435
1436 fi
1437 if test -z "$ac_cv_prog_CC"; then
1438   ac_ct_CC=$CC
1439   # Extract the first word of "gcc", so it can be a program name with args.
1440 set dummy gcc; ac_word=$2
1441 echo "$as_me:1441: checking for $ac_word" >&5
1442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1443 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1444   echo $ECHO_N "(cached) $ECHO_C" >&6
1445 else
1446   if test -n "$ac_ct_CC"; then
1447   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1448 else
1449   ac_save_IFS=$IFS; IFS=$ac_path_separator
1450 ac_dummy="$PATH"
1451 for ac_dir in $ac_dummy; do
1452   IFS=$ac_save_IFS
1453   test -z "$ac_dir" && ac_dir=.
1454   $as_executable_p "$ac_dir/$ac_word" || continue
1455 ac_cv_prog_ac_ct_CC="gcc"
1456 echo "$as_me:1456: found $ac_dir/$ac_word" >&5
1457 break
1458 done
1459
1460 fi
1461 fi
1462 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1463 if test -n "$ac_ct_CC"; then
1464   echo "$as_me:1464: result: $ac_ct_CC" >&5
1465 echo "${ECHO_T}$ac_ct_CC" >&6
1466 else
1467   echo "$as_me:1467: result: no" >&5
1468 echo "${ECHO_T}no" >&6
1469 fi
1470
1471   CC=$ac_ct_CC
1472 else
1473   CC="$ac_cv_prog_CC"
1474 fi
1475
1476 if test -z "$CC"; then
1477   if test -n "$ac_tool_prefix"; then
1478   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1479 set dummy ${ac_tool_prefix}cc; ac_word=$2
1480 echo "$as_me:1480: checking for $ac_word" >&5
1481 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1482 if test "${ac_cv_prog_CC+set}" = set; then
1483   echo $ECHO_N "(cached) $ECHO_C" >&6
1484 else
1485   if test -n "$CC"; then
1486   ac_cv_prog_CC="$CC" # Let the user override the test.
1487 else
1488   ac_save_IFS=$IFS; IFS=$ac_path_separator
1489 ac_dummy="$PATH"
1490 for ac_dir in $ac_dummy; do
1491   IFS=$ac_save_IFS
1492   test -z "$ac_dir" && ac_dir=.
1493   $as_executable_p "$ac_dir/$ac_word" || continue
1494 ac_cv_prog_CC="${ac_tool_prefix}cc"
1495 echo "$as_me:1495: found $ac_dir/$ac_word" >&5
1496 break
1497 done
1498
1499 fi
1500 fi
1501 CC=$ac_cv_prog_CC
1502 if test -n "$CC"; then
1503   echo "$as_me:1503: result: $CC" >&5
1504 echo "${ECHO_T}$CC" >&6
1505 else
1506   echo "$as_me:1506: result: no" >&5
1507 echo "${ECHO_T}no" >&6
1508 fi
1509
1510 fi
1511 if test -z "$ac_cv_prog_CC"; then
1512   ac_ct_CC=$CC
1513   # Extract the first word of "cc", so it can be a program name with args.
1514 set dummy cc; ac_word=$2
1515 echo "$as_me:1515: checking for $ac_word" >&5
1516 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1517 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1518   echo $ECHO_N "(cached) $ECHO_C" >&6
1519 else
1520   if test -n "$ac_ct_CC"; then
1521   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1522 else
1523   ac_save_IFS=$IFS; IFS=$ac_path_separator
1524 ac_dummy="$PATH"
1525 for ac_dir in $ac_dummy; do
1526   IFS=$ac_save_IFS
1527   test -z "$ac_dir" && ac_dir=.
1528   $as_executable_p "$ac_dir/$ac_word" || continue
1529 ac_cv_prog_ac_ct_CC="cc"
1530 echo "$as_me:1530: found $ac_dir/$ac_word" >&5
1531 break
1532 done
1533
1534 fi
1535 fi
1536 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1537 if test -n "$ac_ct_CC"; then
1538   echo "$as_me:1538: result: $ac_ct_CC" >&5
1539 echo "${ECHO_T}$ac_ct_CC" >&6
1540 else
1541   echo "$as_me:1541: result: no" >&5
1542 echo "${ECHO_T}no" >&6
1543 fi
1544
1545   CC=$ac_ct_CC
1546 else
1547   CC="$ac_cv_prog_CC"
1548 fi
1549
1550 fi
1551 if test -z "$CC"; then
1552   # Extract the first word of "cc", so it can be a program name with args.
1553 set dummy cc; ac_word=$2
1554 echo "$as_me:1554: checking for $ac_word" >&5
1555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1556 if test "${ac_cv_prog_CC+set}" = set; then
1557   echo $ECHO_N "(cached) $ECHO_C" >&6
1558 else
1559   if test -n "$CC"; then
1560   ac_cv_prog_CC="$CC" # Let the user override the test.
1561 else
1562   ac_prog_rejected=no
1563   ac_save_IFS=$IFS; IFS=$ac_path_separator
1564 ac_dummy="$PATH"
1565 for ac_dir in $ac_dummy; do
1566   IFS=$ac_save_IFS
1567   test -z "$ac_dir" && ac_dir=.
1568   $as_executable_p "$ac_dir/$ac_word" || continue
1569 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1570   ac_prog_rejected=yes
1571   continue
1572 fi
1573 ac_cv_prog_CC="cc"
1574 echo "$as_me:1574: found $ac_dir/$ac_word" >&5
1575 break
1576 done
1577
1578 if test $ac_prog_rejected = yes; then
1579   # We found a bogon in the path, so make sure we never use it.
1580   set dummy $ac_cv_prog_CC
1581   shift
1582   if test $# != 0; then
1583     # We chose a different compiler from the bogus one.
1584     # However, it has the same basename, so the bogon will be chosen
1585     # first if we set CC to just the basename; use the full file name.
1586     shift
1587     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1588     shift
1589     ac_cv_prog_CC="$@"
1590   fi
1591 fi
1592 fi
1593 fi
1594 CC=$ac_cv_prog_CC
1595 if test -n "$CC"; then
1596   echo "$as_me:1596: result: $CC" >&5
1597 echo "${ECHO_T}$CC" >&6
1598 else
1599   echo "$as_me:1599: result: no" >&5
1600 echo "${ECHO_T}no" >&6
1601 fi
1602
1603 fi
1604 if test -z "$CC"; then
1605   if test -n "$ac_tool_prefix"; then
1606   for ac_prog in cl
1607   do
1608     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1609 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1610 echo "$as_me:1610: checking for $ac_word" >&5
1611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1612 if test "${ac_cv_prog_CC+set}" = set; then
1613   echo $ECHO_N "(cached) $ECHO_C" >&6
1614 else
1615   if test -n "$CC"; then
1616   ac_cv_prog_CC="$CC" # Let the user override the test.
1617 else
1618   ac_save_IFS=$IFS; IFS=$ac_path_separator
1619 ac_dummy="$PATH"
1620 for ac_dir in $ac_dummy; do
1621   IFS=$ac_save_IFS
1622   test -z "$ac_dir" && ac_dir=.
1623   $as_executable_p "$ac_dir/$ac_word" || continue
1624 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1625 echo "$as_me:1625: found $ac_dir/$ac_word" >&5
1626 break
1627 done
1628
1629 fi
1630 fi
1631 CC=$ac_cv_prog_CC
1632 if test -n "$CC"; then
1633   echo "$as_me:1633: result: $CC" >&5
1634 echo "${ECHO_T}$CC" >&6
1635 else
1636   echo "$as_me:1636: result: no" >&5
1637 echo "${ECHO_T}no" >&6
1638 fi
1639
1640     test -n "$CC" && break
1641   done
1642 fi
1643 if test -z "$CC"; then
1644   ac_ct_CC=$CC
1645   for ac_prog in cl
1646 do
1647   # Extract the first word of "$ac_prog", so it can be a program name with args.
1648 set dummy $ac_prog; ac_word=$2
1649 echo "$as_me:1649: checking for $ac_word" >&5
1650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1651 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1652   echo $ECHO_N "(cached) $ECHO_C" >&6
1653 else
1654   if test -n "$ac_ct_CC"; then
1655   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1656 else
1657   ac_save_IFS=$IFS; IFS=$ac_path_separator
1658 ac_dummy="$PATH"
1659 for ac_dir in $ac_dummy; do
1660   IFS=$ac_save_IFS
1661   test -z "$ac_dir" && ac_dir=.
1662   $as_executable_p "$ac_dir/$ac_word" || continue
1663 ac_cv_prog_ac_ct_CC="$ac_prog"
1664 echo "$as_me:1664: found $ac_dir/$ac_word" >&5
1665 break
1666 done
1667
1668 fi
1669 fi
1670 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1671 if test -n "$ac_ct_CC"; then
1672   echo "$as_me:1672: result: $ac_ct_CC" >&5
1673 echo "${ECHO_T}$ac_ct_CC" >&6
1674 else
1675   echo "$as_me:1675: result: no" >&5
1676 echo "${ECHO_T}no" >&6
1677 fi
1678
1679   test -n "$ac_ct_CC" && break
1680 done
1681
1682   CC=$ac_ct_CC
1683 fi
1684
1685 fi
1686
1687 test -z "$CC" && { { echo "$as_me:1687: error: no acceptable cc found in \$PATH" >&5
1688 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1689    { (exit 1); exit 1; }; }
1690
1691 # Provide some information about the compiler.
1692 echo "$as_me:1692:" \
1693      "checking for C compiler version" >&5
1694 ac_compiler=`set X $ac_compile; echo $2`
1695 { (eval echo "$as_me:1695: \"$ac_compiler --version </dev/null >&5\"") >&5
1696   (eval $ac_compiler --version </dev/null >&5) 2>&5
1697   ac_status=$?
1698   echo "$as_me:1698: \$? = $ac_status" >&5
1699   (exit $ac_status); }
1700 { (eval echo "$as_me:1700: \"$ac_compiler -v </dev/null >&5\"") >&5
1701   (eval $ac_compiler -v </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705 { (eval echo "$as_me:1705: \"$ac_compiler -V </dev/null >&5\"") >&5
1706   (eval $ac_compiler -V </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710
1711 cat >conftest.$ac_ext <<_ACEOF
1712 #line 1712 "configure"
1713 #include "confdefs.h"
1714
1715 int
1716 main ()
1717 {
1718
1719   ;
1720   return 0;
1721 }
1722 _ACEOF
1723 ac_clean_files_save=$ac_clean_files
1724 ac_clean_files="$ac_clean_files a.out a.exe"
1725 # Try to create an executable without -o first, disregard a.out.
1726 # It will help us diagnose broken compilers, and finding out an intuition
1727 # of exeext.
1728 echo "$as_me:1728: checking for C compiler default output" >&5
1729 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1730 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1731 if { (eval echo "$as_me:1731: \"$ac_link_default\"") >&5
1732   (eval $ac_link_default) 2>&5
1733   ac_status=$?
1734   echo "$as_me:1734: \$? = $ac_status" >&5
1735   (exit $ac_status); }; then
1736   # Find the output, starting from the most likely.  This scheme is
1737 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1738 # resort.
1739 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1740                 ls a.out conftest 2>/dev/null;
1741                 ls a.* conftest.* 2>/dev/null`; do
1742   case $ac_file in
1743     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1744     a.out ) # We found the default executable, but exeext='' is most
1745             # certainly right.
1746             break;;
1747     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1748           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1749           export ac_cv_exeext
1750           break;;
1751     * ) break;;
1752   esac
1753 done
1754 else
1755   echo "$as_me: failed program was:" >&5
1756 cat conftest.$ac_ext >&5
1757 { { echo "$as_me:1757: error: C compiler cannot create executables" >&5
1758 echo "$as_me: error: C compiler cannot create executables" >&2;}
1759    { (exit 77); exit 77; }; }
1760 fi
1761
1762 ac_exeext=$ac_cv_exeext
1763 echo "$as_me:1763: result: $ac_file" >&5
1764 echo "${ECHO_T}$ac_file" >&6
1765
1766 # Check the compiler produces executables we can run.  If not, either
1767 # the compiler is broken, or we cross compile.
1768 echo "$as_me:1768: checking whether the C compiler works" >&5
1769 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1770 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1771 # If not cross compiling, check that we can run a simple program.
1772 if test "$cross_compiling" != yes; then
1773   if { ac_try='./$ac_file'
1774   { (eval echo "$as_me:1774: \"$ac_try\"") >&5
1775   (eval $ac_try) 2>&5
1776   ac_status=$?
1777   echo "$as_me:1777: \$? = $ac_status" >&5
1778   (exit $ac_status); }; }; then
1779     cross_compiling=no
1780   else
1781     if test "$cross_compiling" = maybe; then
1782         cross_compiling=yes
1783     else
1784         { { echo "$as_me:1784: error: cannot run C compiled programs.
1785 If you meant to cross compile, use \`--host'." >&5
1786 echo "$as_me: error: cannot run C compiled programs.
1787 If you meant to cross compile, use \`--host'." >&2;}
1788    { (exit 1); exit 1; }; }
1789     fi
1790   fi
1791 fi
1792 echo "$as_me:1792: result: yes" >&5
1793 echo "${ECHO_T}yes" >&6
1794
1795 rm -f a.out a.exe conftest$ac_cv_exeext
1796 ac_clean_files=$ac_clean_files_save
1797 # Check the compiler produces executables we can run.  If not, either
1798 # the compiler is broken, or we cross compile.
1799 echo "$as_me:1799: checking whether we are cross compiling" >&5
1800 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1801 echo "$as_me:1801: result: $cross_compiling" >&5
1802 echo "${ECHO_T}$cross_compiling" >&6
1803
1804 echo "$as_me:1804: checking for executable suffix" >&5
1805 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1806 if { (eval echo "$as_me:1806: \"$ac_link\"") >&5
1807   (eval $ac_link) 2>&5
1808   ac_status=$?
1809   echo "$as_me:1809: \$? = $ac_status" >&5
1810   (exit $ac_status); }; then
1811   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1812 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1813 # work properly (i.e., refer to `conftest.exe'), while it won't with
1814 # `rm'.
1815 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1816   case $ac_file in
1817     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1818     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1819           export ac_cv_exeext
1820           break;;
1821     * ) break;;
1822   esac
1823 done
1824 else
1825   { { echo "$as_me:1825: error: cannot compute EXEEXT: cannot compile and link" >&5
1826 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1827    { (exit 1); exit 1; }; }
1828 fi
1829
1830 rm -f conftest$ac_cv_exeext
1831 echo "$as_me:1831: result: $ac_cv_exeext" >&5
1832 echo "${ECHO_T}$ac_cv_exeext" >&6
1833
1834 rm -f conftest.$ac_ext
1835 EXEEXT=$ac_cv_exeext
1836 ac_exeext=$EXEEXT
1837 echo "$as_me:1837: checking for object suffix" >&5
1838 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1839 if test "${ac_cv_objext+set}" = set; then
1840   echo $ECHO_N "(cached) $ECHO_C" >&6
1841 else
1842   cat >conftest.$ac_ext <<_ACEOF
1843 #line 1843 "configure"
1844 #include "confdefs.h"
1845
1846 int
1847 main ()
1848 {
1849
1850   ;
1851   return 0;
1852 }
1853 _ACEOF
1854 rm -f conftest.o conftest.obj
1855 if { (eval echo "$as_me:1855: \"$ac_compile\"") >&5
1856   (eval $ac_compile) 2>&5
1857   ac_status=$?
1858   echo "$as_me:1858: \$? = $ac_status" >&5
1859   (exit $ac_status); }; then
1860   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1861   case $ac_file in
1862     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1863     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1864        break;;
1865   esac
1866 done
1867 else
1868   echo "$as_me: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1870 { { echo "$as_me:1870: error: cannot compute OBJEXT: cannot compile" >&5
1871 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1872    { (exit 1); exit 1; }; }
1873 fi
1874
1875 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1876 fi
1877 echo "$as_me:1877: result: $ac_cv_objext" >&5
1878 echo "${ECHO_T}$ac_cv_objext" >&6
1879 OBJEXT=$ac_cv_objext
1880 ac_objext=$OBJEXT
1881 echo "$as_me:1881: checking whether we are using the GNU C compiler" >&5
1882 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1883 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1884   echo $ECHO_N "(cached) $ECHO_C" >&6
1885 else
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889
1890 int
1891 main ()
1892 {
1893 #ifndef __GNUC__
1894        choke me
1895 #endif
1896
1897   ;
1898   return 0;
1899 }
1900 _ACEOF
1901 rm -f conftest.$ac_objext
1902 if { (eval echo "$as_me:1902: \"$ac_compile\"") >&5
1903   (eval $ac_compile) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); } &&
1907          { ac_try='test -s conftest.$ac_objext'
1908   { (eval echo "$as_me:1908: \"$ac_try\"") >&5
1909   (eval $ac_try) 2>&5
1910   ac_status=$?
1911   echo "$as_me:1911: \$? = $ac_status" >&5
1912   (exit $ac_status); }; }; then
1913   ac_compiler_gnu=yes
1914 else
1915   echo "$as_me: failed program was:" >&5
1916 cat conftest.$ac_ext >&5
1917 ac_compiler_gnu=no
1918 fi
1919 rm -f conftest.$ac_objext conftest.$ac_ext
1920 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1921
1922 fi
1923 echo "$as_me:1923: result: $ac_cv_c_compiler_gnu" >&5
1924 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1925 GCC=`test $ac_compiler_gnu = yes && echo yes`
1926 ac_test_CFLAGS=${CFLAGS+set}
1927 ac_save_CFLAGS=$CFLAGS
1928 CFLAGS="-g"
1929 echo "$as_me:1929: checking whether $CC accepts -g" >&5
1930 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1931 if test "${ac_cv_prog_cc_g+set}" = set; then
1932   echo $ECHO_N "(cached) $ECHO_C" >&6
1933 else
1934   cat >conftest.$ac_ext <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1937
1938 int
1939 main ()
1940 {
1941
1942   ;
1943   return 0;
1944 }
1945 _ACEOF
1946 rm -f conftest.$ac_objext
1947 if { (eval echo "$as_me:1947: \"$ac_compile\"") >&5
1948   (eval $ac_compile) 2>&5
1949   ac_status=$?
1950   echo "$as_me:1950: \$? = $ac_status" >&5
1951   (exit $ac_status); } &&
1952          { ac_try='test -s conftest.$ac_objext'
1953   { (eval echo "$as_me:1953: \"$ac_try\"") >&5
1954   (eval $ac_try) 2>&5
1955   ac_status=$?
1956   echo "$as_me:1956: \$? = $ac_status" >&5
1957   (exit $ac_status); }; }; then
1958   ac_cv_prog_cc_g=yes
1959 else
1960   echo "$as_me: failed program was:" >&5
1961 cat conftest.$ac_ext >&5
1962 ac_cv_prog_cc_g=no
1963 fi
1964 rm -f conftest.$ac_objext conftest.$ac_ext
1965 fi
1966 echo "$as_me:1966: result: $ac_cv_prog_cc_g" >&5
1967 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1968 if test "$ac_test_CFLAGS" = set; then
1969   CFLAGS=$ac_save_CFLAGS
1970 elif test $ac_cv_prog_cc_g = yes; then
1971   if test "$GCC" = yes; then
1972     CFLAGS="-g -O2"
1973   else
1974     CFLAGS="-g"
1975   fi
1976 else
1977   if test "$GCC" = yes; then
1978     CFLAGS="-O2"
1979   else
1980     CFLAGS=
1981   fi
1982 fi
1983 # Some people use a C++ compiler to compile C.  Since we use `exit',
1984 # in C++ we need to declare it.  In case someone uses the same compiler
1985 # for both compiling C and C++ we need to have the C++ compiler decide
1986 # the declaration of exit, since it's the most demanding environment.
1987 cat >conftest.$ac_ext <<_ACEOF
1988 #ifndef __cplusplus
1989   choke me
1990 #endif
1991 _ACEOF
1992 rm -f conftest.$ac_objext
1993 if { (eval echo "$as_me:1993: \"$ac_compile\"") >&5
1994   (eval $ac_compile) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); } &&
1998          { ac_try='test -s conftest.$ac_objext'
1999   { (eval echo "$as_me:1999: \"$ac_try\"") >&5
2000   (eval $ac_try) 2>&5
2001   ac_status=$?
2002   echo "$as_me:2002: \$? = $ac_status" >&5
2003   (exit $ac_status); }; }; then
2004   for ac_declaration in \
2005    ''\
2006    '#include <stdlib.h>' \
2007    'extern "C" void std::exit (int) throw (); using std::exit;' \
2008    'extern "C" void std::exit (int); using std::exit;' \
2009    'extern "C" void exit (int) throw ();' \
2010    'extern "C" void exit (int);' \
2011    'void exit (int);'
2012 do
2013   cat >conftest.$ac_ext <<_ACEOF
2014 #line 2014 "configure"
2015 #include "confdefs.h"
2016 #include <stdlib.h>
2017 $ac_declaration
2018 int
2019 main ()
2020 {
2021 exit (42);
2022   ;
2023   return 0;
2024 }
2025 _ACEOF
2026 rm -f conftest.$ac_objext
2027 if { (eval echo "$as_me:2027: \"$ac_compile\"") >&5
2028   (eval $ac_compile) 2>&5
2029   ac_status=$?
2030   echo "$as_me:2030: \$? = $ac_status" >&5
2031   (exit $ac_status); } &&
2032          { ac_try='test -s conftest.$ac_objext'
2033   { (eval echo "$as_me:2033: \"$ac_try\"") >&5
2034   (eval $ac_try) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit $ac_status); }; }; then
2038   :
2039 else
2040   echo "$as_me: failed program was:" >&5
2041 cat conftest.$ac_ext >&5
2042 continue
2043 fi
2044 rm -f conftest.$ac_objext conftest.$ac_ext
2045   cat >conftest.$ac_ext <<_ACEOF
2046 #line 2046 "configure"
2047 #include "confdefs.h"
2048 $ac_declaration
2049 int
2050 main ()
2051 {
2052 exit (42);
2053   ;
2054   return 0;
2055 }
2056 _ACEOF
2057 rm -f conftest.$ac_objext
2058 if { (eval echo "$as_me:2058: \"$ac_compile\"") >&5
2059   (eval $ac_compile) 2>&5
2060   ac_status=$?
2061   echo "$as_me:2061: \$? = $ac_status" >&5
2062   (exit $ac_status); } &&
2063          { ac_try='test -s conftest.$ac_objext'
2064   { (eval echo "$as_me:2064: \"$ac_try\"") >&5
2065   (eval $ac_try) 2>&5
2066   ac_status=$?
2067   echo "$as_me:2067: \$? = $ac_status" >&5
2068   (exit $ac_status); }; }; then
2069   break
2070 else
2071   echo "$as_me: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2073 fi
2074 rm -f conftest.$ac_objext conftest.$ac_ext
2075 done
2076 rm -f conftest*
2077 if test -n "$ac_declaration"; then
2078   echo '#ifdef __cplusplus' >>confdefs.h
2079   echo $ac_declaration      >>confdefs.h
2080   echo '#endif'             >>confdefs.h
2081 fi
2082
2083 else
2084   echo "$as_me: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 fi
2087 rm -f conftest.$ac_objext conftest.$ac_ext
2088 ac_ext=c
2089 ac_cpp='$CPP $CPPFLAGS'
2090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2093 ac_main_return=return
2094
2095 GCC_VERSION=none
2096 if test "$GCC" = yes ; then
2097         echo "$as_me:2097: checking version of $CC" >&5
2098 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2099         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2100         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2101         echo "$as_me:2101: result: $GCC_VERSION" >&5
2102 echo "${ECHO_T}$GCC_VERSION" >&6
2103 fi
2104
2105 ac_ext=c
2106 ac_cpp='$CPP $CPPFLAGS'
2107 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2108 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2109 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2110 ac_main_return=return
2111 echo "$as_me:2111: checking how to run the C preprocessor" >&5
2112 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2113 # On Suns, sometimes $CPP names a directory.
2114 if test -n "$CPP" && test -d "$CPP"; then
2115   CPP=
2116 fi
2117 if test -z "$CPP"; then
2118   if test "${ac_cv_prog_CPP+set}" = set; then
2119   echo $ECHO_N "(cached) $ECHO_C" >&6
2120 else
2121       # Double quotes because CPP needs to be expanded
2122     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2123     do
2124       ac_preproc_ok=false
2125 for ac_c_preproc_warn_flag in '' yes
2126 do
2127   # Use a header file that comes with gcc, so configuring glibc
2128   # with a fresh cross-compiler works.
2129   # On the NeXT, cc -E runs the code through the compiler's parser,
2130   # not just through cpp. "Syntax error" is here to catch this case.
2131   cat >conftest.$ac_ext <<_ACEOF
2132 #line 2132 "configure"
2133 #include "confdefs.h"
2134 #include <assert.h>
2135                      Syntax error
2136 _ACEOF
2137 if { (eval echo "$as_me:2137: \"$ac_cpp conftest.$ac_ext\"") >&5
2138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2139   ac_status=$?
2140   egrep -v '^ *\+' conftest.er1 >conftest.err
2141   rm -f conftest.er1
2142   cat conftest.err >&5
2143   echo "$as_me:2143: \$? = $ac_status" >&5
2144   (exit $ac_status); } >/dev/null; then
2145   if test -s conftest.err; then
2146     ac_cpp_err=$ac_c_preproc_warn_flag
2147   else
2148     ac_cpp_err=
2149   fi
2150 else
2151   ac_cpp_err=yes
2152 fi
2153 if test -z "$ac_cpp_err"; then
2154   :
2155 else
2156   echo "$as_me: failed program was:" >&5
2157   cat conftest.$ac_ext >&5
2158   # Broken: fails on valid input.
2159 continue
2160 fi
2161 rm -f conftest.err conftest.$ac_ext
2162
2163   # OK, works on sane cases.  Now check whether non-existent headers
2164   # can be detected and how.
2165   cat >conftest.$ac_ext <<_ACEOF
2166 #line 2166 "configure"
2167 #include "confdefs.h"
2168 #include <ac_nonexistent.h>
2169 _ACEOF
2170 if { (eval echo "$as_me:2170: \"$ac_cpp conftest.$ac_ext\"") >&5
2171   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2172   ac_status=$?
2173   egrep -v '^ *\+' conftest.er1 >conftest.err
2174   rm -f conftest.er1
2175   cat conftest.err >&5
2176   echo "$as_me:2176: \$? = $ac_status" >&5
2177   (exit $ac_status); } >/dev/null; then
2178   if test -s conftest.err; then
2179     ac_cpp_err=$ac_c_preproc_warn_flag
2180   else
2181     ac_cpp_err=
2182   fi
2183 else
2184   ac_cpp_err=yes
2185 fi
2186 if test -z "$ac_cpp_err"; then
2187   # Broken: success on invalid input.
2188 continue
2189 else
2190   echo "$as_me: failed program was:" >&5
2191   cat conftest.$ac_ext >&5
2192   # Passes both tests.
2193 ac_preproc_ok=:
2194 break
2195 fi
2196 rm -f conftest.err conftest.$ac_ext
2197
2198 done
2199 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2200 rm -f conftest.err conftest.$ac_ext
2201 if $ac_preproc_ok; then
2202   break
2203 fi
2204
2205     done
2206     ac_cv_prog_CPP=$CPP
2207
2208 fi
2209   CPP=$ac_cv_prog_CPP
2210 else
2211   ac_cv_prog_CPP=$CPP
2212 fi
2213 echo "$as_me:2213: result: $CPP" >&5
2214 echo "${ECHO_T}$CPP" >&6
2215 ac_preproc_ok=false
2216 for ac_c_preproc_warn_flag in '' yes
2217 do
2218   # Use a header file that comes with gcc, so configuring glibc
2219   # with a fresh cross-compiler works.
2220   # On the NeXT, cc -E runs the code through the compiler's parser,
2221   # not just through cpp. "Syntax error" is here to catch this case.
2222   cat >conftest.$ac_ext <<_ACEOF
2223 #line 2223 "configure"
2224 #include "confdefs.h"
2225 #include <assert.h>
2226                      Syntax error
2227 _ACEOF
2228 if { (eval echo "$as_me:2228: \"$ac_cpp conftest.$ac_ext\"") >&5
2229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2230   ac_status=$?
2231   egrep -v '^ *\+' conftest.er1 >conftest.err
2232   rm -f conftest.er1
2233   cat conftest.err >&5
2234   echo "$as_me:2234: \$? = $ac_status" >&5
2235   (exit $ac_status); } >/dev/null; then
2236   if test -s conftest.err; then
2237     ac_cpp_err=$ac_c_preproc_warn_flag
2238   else
2239     ac_cpp_err=
2240   fi
2241 else
2242   ac_cpp_err=yes
2243 fi
2244 if test -z "$ac_cpp_err"; then
2245   :
2246 else
2247   echo "$as_me: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   # Broken: fails on valid input.
2250 continue
2251 fi
2252 rm -f conftest.err conftest.$ac_ext
2253
2254   # OK, works on sane cases.  Now check whether non-existent headers
2255   # can be detected and how.
2256   cat >conftest.$ac_ext <<_ACEOF
2257 #line 2257 "configure"
2258 #include "confdefs.h"
2259 #include <ac_nonexistent.h>
2260 _ACEOF
2261 if { (eval echo "$as_me:2261: \"$ac_cpp conftest.$ac_ext\"") >&5
2262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2263   ac_status=$?
2264   egrep -v '^ *\+' conftest.er1 >conftest.err
2265   rm -f conftest.er1
2266   cat conftest.err >&5
2267   echo "$as_me:2267: \$? = $ac_status" >&5
2268   (exit $ac_status); } >/dev/null; then
2269   if test -s conftest.err; then
2270     ac_cpp_err=$ac_c_preproc_warn_flag
2271   else
2272     ac_cpp_err=
2273   fi
2274 else
2275   ac_cpp_err=yes
2276 fi
2277 if test -z "$ac_cpp_err"; then
2278   # Broken: success on invalid input.
2279 continue
2280 else
2281   echo "$as_me: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   # Passes both tests.
2284 ac_preproc_ok=:
2285 break
2286 fi
2287 rm -f conftest.err conftest.$ac_ext
2288
2289 done
2290 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2291 rm -f conftest.err conftest.$ac_ext
2292 if $ac_preproc_ok; then
2293   :
2294 else
2295   { { echo "$as_me:2295: error: C preprocessor \"$CPP\" fails sanity check" >&5
2296 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2297    { (exit 1); exit 1; }; }
2298 fi
2299
2300 ac_ext=c
2301 ac_cpp='$CPP $CPPFLAGS'
2302 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2303 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2304 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2305 ac_main_return=return
2306
2307 if test $ac_cv_c_compiler_gnu = yes; then
2308     echo "$as_me:2308: checking whether $CC needs -traditional" >&5
2309 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2310 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2311   echo $ECHO_N "(cached) $ECHO_C" >&6
2312 else
2313     ac_pattern="Autoconf.*'x'"
2314   cat >conftest.$ac_ext <<_ACEOF
2315 #line 2315 "configure"
2316 #include "confdefs.h"
2317 #include <sgtty.h>
2318 int Autoconf = TIOCGETP;
2319 _ACEOF
2320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2321   egrep "$ac_pattern" >/dev/null 2>&1; then
2322   ac_cv_prog_gcc_traditional=yes
2323 else
2324   ac_cv_prog_gcc_traditional=no
2325 fi
2326 rm -f conftest*
2327
2328   if test $ac_cv_prog_gcc_traditional = no; then
2329     cat >conftest.$ac_ext <<_ACEOF
2330 #line 2330 "configure"
2331 #include "confdefs.h"
2332 #include <termio.h>
2333 int Autoconf = TCGETA;
2334 _ACEOF
2335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2336   egrep "$ac_pattern" >/dev/null 2>&1; then
2337   ac_cv_prog_gcc_traditional=yes
2338 fi
2339 rm -f conftest*
2340
2341   fi
2342 fi
2343 echo "$as_me:2343: result: $ac_cv_prog_gcc_traditional" >&5
2344 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2345   if test $ac_cv_prog_gcc_traditional = yes; then
2346     CC="$CC -traditional"
2347   fi
2348 fi
2349
2350 echo "$as_me:2350: checking whether $CC understands -c and -o together" >&5
2351 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2352 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2353   echo $ECHO_N "(cached) $ECHO_C" >&6
2354 else
2355
2356 cat > conftest.$ac_ext <<CF_EOF
2357 #include <stdio.h>
2358 int main()
2359 {
2360         ${cf_cv_main_return:-return}(0);
2361 }
2362 CF_EOF
2363 # We do the test twice because some compilers refuse to overwrite an
2364 # existing .o file with -o, though they will create one.
2365 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2366 if { (eval echo "$as_me:2366: \"$ac_try\"") >&5
2367   (eval $ac_try) 2>&5
2368   ac_status=$?
2369   echo "$as_me:2369: \$? = $ac_status" >&5
2370   (exit $ac_status); } &&
2371   test -f conftest2.$ac_objext && { (eval echo "$as_me:2371: \"$ac_try\"") >&5
2372   (eval $ac_try) 2>&5
2373   ac_status=$?
2374   echo "$as_me:2374: \$? = $ac_status" >&5
2375   (exit $ac_status); };
2376 then
2377   eval cf_cv_prog_CC_c_o=yes
2378 else
2379   eval cf_cv_prog_CC_c_o=no
2380 fi
2381 rm -f conftest*
2382
2383 fi
2384 if test $cf_cv_prog_CC_c_o = yes; then
2385   echo "$as_me:2385: result: yes" >&5
2386 echo "${ECHO_T}yes" >&6
2387 else
2388   echo "$as_me:2388: result: no" >&5
2389 echo "${ECHO_T}no" >&6
2390 fi
2391
2392 echo "$as_me:2392: checking for POSIXized ISC" >&5
2393 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2394 if test -d /etc/conf/kconfig.d &&
2395    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2396 then
2397   echo "$as_me:2397: result: yes" >&5
2398 echo "${ECHO_T}yes" >&6
2399   ISC=yes # If later tests want to check for ISC.
2400
2401 cat >>confdefs.h <<\EOF
2402 #define _POSIX_SOURCE 1
2403 EOF
2404
2405   if test "$GCC" = yes; then
2406     CC="$CC -posix"
2407   else
2408     CC="$CC -Xp"
2409   fi
2410 else
2411   echo "$as_me:2411: result: no" >&5
2412 echo "${ECHO_T}no" >&6
2413   ISC=
2414 fi
2415
2416 echo "$as_me:2416: checking for ${CC-cc} option to accept ANSI C" >&5
2417 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2418 if test "${cf_cv_ansi_cc+set}" = set; then
2419   echo $ECHO_N "(cached) $ECHO_C" >&6
2420 else
2421
2422 cf_cv_ansi_cc=no
2423 cf_save_CFLAGS="$CFLAGS"
2424 cf_save_CPPFLAGS="$CPPFLAGS"
2425 # Don't try gcc -ansi; that turns off useful extensions and
2426 # breaks some systems' header files.
2427 # AIX                   -qlanglvl=ansi
2428 # Ultrix and OSF/1      -std1
2429 # HP-UX                 -Aa -D_HPUX_SOURCE
2430 # SVR4                  -Xc
2431 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2432 for cf_arg in "-DCC_HAS_PROTOS" \
2433         "" \
2434         -qlanglvl=ansi \
2435         -std1 \
2436         -Ae \
2437         "-Aa -D_HPUX_SOURCE" \
2438         -Xc
2439 do
2440
2441 cf_fix_cppflags=no
2442 cf_new_cflags=
2443 cf_new_cppflags=
2444 cf_new_extra_cppflags=
2445
2446 for cf_add_cflags in $cf_arg
2447 do
2448 case $cf_fix_cppflags in
2449 no)
2450         case $cf_add_cflags in #(vi
2451         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2452                 case $cf_add_cflags in
2453                 -D*)
2454                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2455
2456                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2457                         && test -z "${cf_tst_cflags}" \
2458                         && cf_fix_cppflags=yes
2459
2460                         if test $cf_fix_cppflags = yes ; then
2461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2462                                 continue
2463                         elif test "${cf_tst_cflags}" = "\"'" ; then
2464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2465                                 continue
2466                         fi
2467                         ;;
2468                 esac
2469                 case "$CPPFLAGS" in
2470                 *$cf_add_cflags) #(vi
2471                         ;;
2472                 *) #(vi
2473                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2474                         ;;
2475                 esac
2476                 ;;
2477         *)
2478                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2479                 ;;
2480         esac
2481         ;;
2482 yes)
2483         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2484
2485         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2486
2487         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2488         && test -z "${cf_tst_cflags}" \
2489         && cf_fix_cppflags=no
2490         ;;
2491 esac
2492 done
2493
2494 if test -n "$cf_new_cflags" ; then
2495
2496         CFLAGS="$CFLAGS $cf_new_cflags"
2497 fi
2498
2499 if test -n "$cf_new_cppflags" ; then
2500
2501         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2502 fi
2503
2504 if test -n "$cf_new_extra_cppflags" ; then
2505
2506         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2507 fi
2508
2509         cat >conftest.$ac_ext <<_ACEOF
2510 #line 2510 "configure"
2511 #include "confdefs.h"
2512
2513 #ifndef CC_HAS_PROTOS
2514 #if !defined(__STDC__) || (__STDC__ != 1)
2515 choke me
2516 #endif
2517 #endif
2518
2519 int
2520 main ()
2521 {
2522
2523         int test (int i, double x);
2524         struct s1 {int (*f) (int a);};
2525         struct s2 {int (*f) (double a);};
2526   ;
2527   return 0;
2528 }
2529 _ACEOF
2530 rm -f conftest.$ac_objext
2531 if { (eval echo "$as_me:2531: \"$ac_compile\"") >&5
2532   (eval $ac_compile) 2>&5
2533   ac_status=$?
2534   echo "$as_me:2534: \$? = $ac_status" >&5
2535   (exit $ac_status); } &&
2536          { ac_try='test -s conftest.$ac_objext'
2537   { (eval echo "$as_me:2537: \"$ac_try\"") >&5
2538   (eval $ac_try) 2>&5
2539   ac_status=$?
2540   echo "$as_me:2540: \$? = $ac_status" >&5
2541   (exit $ac_status); }; }; then
2542   cf_cv_ansi_cc="$cf_arg"; break
2543 else
2544   echo "$as_me: failed program was:" >&5
2545 cat conftest.$ac_ext >&5
2546 fi
2547 rm -f conftest.$ac_objext conftest.$ac_ext
2548 done
2549 CFLAGS="$cf_save_CFLAGS"
2550 CPPFLAGS="$cf_save_CPPFLAGS"
2551
2552 fi
2553 echo "$as_me:2553: result: $cf_cv_ansi_cc" >&5
2554 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2555
2556 if test "$cf_cv_ansi_cc" != "no"; then
2557 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2558
2559 cf_fix_cppflags=no
2560 cf_new_cflags=
2561 cf_new_cppflags=
2562 cf_new_extra_cppflags=
2563
2564 for cf_add_cflags in $cf_cv_ansi_cc
2565 do
2566 case $cf_fix_cppflags in
2567 no)
2568         case $cf_add_cflags in #(vi
2569         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2570                 case $cf_add_cflags in
2571                 -D*)
2572                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2573
2574                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2575                         && test -z "${cf_tst_cflags}" \
2576                         && cf_fix_cppflags=yes
2577
2578                         if test $cf_fix_cppflags = yes ; then
2579                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2580                                 continue
2581                         elif test "${cf_tst_cflags}" = "\"'" ; then
2582                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2583                                 continue
2584                         fi
2585                         ;;
2586                 esac
2587                 case "$CPPFLAGS" in
2588                 *$cf_add_cflags) #(vi
2589                         ;;
2590                 *) #(vi
2591                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2592                         ;;
2593                 esac
2594                 ;;
2595         *)
2596                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2597                 ;;
2598         esac
2599         ;;
2600 yes)
2601         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2602
2603         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2604
2605         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2606         && test -z "${cf_tst_cflags}" \
2607         && cf_fix_cppflags=no
2608         ;;
2609 esac
2610 done
2611
2612 if test -n "$cf_new_cflags" ; then
2613
2614         CFLAGS="$CFLAGS $cf_new_cflags"
2615 fi
2616
2617 if test -n "$cf_new_cppflags" ; then
2618
2619         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2620 fi
2621
2622 if test -n "$cf_new_extra_cppflags" ; then
2623
2624         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2625 fi
2626
2627 else
2628         cat >>confdefs.h <<\EOF
2629 #define CC_HAS_PROTOS 1
2630 EOF
2631
2632 fi
2633 fi
2634
2635 if test "$cf_cv_ansi_cc" = "no"; then
2636         { { echo "$as_me:2636: error: Your compiler does not appear to recognize prototypes.
2637 You have the following choices:
2638         a. adjust your compiler options
2639         b. get an up-to-date compiler
2640         c. use a wrapper such as unproto" >&5
2641 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2642 You have the following choices:
2643         a. adjust your compiler options
2644         b. get an up-to-date compiler
2645         c. use a wrapper such as unproto" >&2;}
2646    { (exit 1); exit 1; }; }
2647 fi
2648
2649 case $cf_cv_system_name in
2650 os2*)
2651     CFLAGS="$CFLAGS -Zmt"
2652     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2653     CXXFLAGS="$CXXFLAGS -Zmt"
2654     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2655     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2656     ac_cv_exeext=.exe
2657     ;;
2658 esac
2659
2660 PROG_EXT="$EXEEXT"
2661
2662 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2663 #define PROG_EXT "$PROG_EXT"
2664 EOF
2665
2666 if test "$cross_compiling" = yes ; then
2667   LDCONFIG=:
2668 else
2669 case "$cf_cv_system_name" in #(vi
2670 dragonfly*|freebsd*) #(vi
2671   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2672   ;;
2673 *) LDPATH=$PATH:/sbin:/usr/sbin
2674   # Extract the first word of "ldconfig", so it can be a program name with args.
2675 set dummy ldconfig; ac_word=$2
2676 echo "$as_me:2676: checking for $ac_word" >&5
2677 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2678 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2679   echo $ECHO_N "(cached) $ECHO_C" >&6
2680 else
2681   case $LDCONFIG in
2682   [\\/]* | ?:[\\/]*)
2683   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2684   ;;
2685   *)
2686   ac_save_IFS=$IFS; IFS=$ac_path_separator
2687 ac_dummy="$LDPATH"
2688 for ac_dir in $ac_dummy; do
2689   IFS=$ac_save_IFS
2690   test -z "$ac_dir" && ac_dir=.
2691   if $as_executable_p "$ac_dir/$ac_word"; then
2692    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2693    echo "$as_me:2693: found $ac_dir/$ac_word" >&5
2694    break
2695 fi
2696 done
2697
2698   ;;
2699 esac
2700 fi
2701 LDCONFIG=$ac_cv_path_LDCONFIG
2702
2703 if test -n "$LDCONFIG"; then
2704   echo "$as_me:2704: result: $LDCONFIG" >&5
2705 echo "${ECHO_T}$LDCONFIG" >&6
2706 else
2707   echo "$as_me:2707: result: no" >&5
2708 echo "${ECHO_T}no" >&6
2709 fi
2710
2711   ;;
2712 esac
2713 fi
2714
2715 echo "$as_me:2715: checking if you want to ensure bool is consistent with C++" >&5
2716 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2717
2718 # Check whether --with-cxx or --without-cxx was given.
2719 if test "${with_cxx+set}" = set; then
2720   withval="$with_cxx"
2721   cf_with_cxx=$withval
2722 else
2723   cf_with_cxx=yes
2724 fi;
2725 echo "$as_me:2725: result: $cf_with_cxx" >&5
2726 echo "${ECHO_T}$cf_with_cxx" >&6
2727 if test "X$cf_with_cxx" = Xno ; then
2728         CXX=""
2729         GXX=""
2730 else
2731         # with autoconf 2.13, we can change the error to a warning:
2732                 ac_ext=cc
2733 ac_cpp='$CXXCPP $CPPFLAGS'
2734 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2735 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2736 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2737 ac_main_return=return
2738 if test -n "$ac_tool_prefix"; then
2739   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2740   do
2741     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2742 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2743 echo "$as_me:2743: checking for $ac_word" >&5
2744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2745 if test "${ac_cv_prog_CXX+set}" = set; then
2746   echo $ECHO_N "(cached) $ECHO_C" >&6
2747 else
2748   if test -n "$CXX"; then
2749   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2750 else
2751   ac_save_IFS=$IFS; IFS=$ac_path_separator
2752 ac_dummy="$PATH"
2753 for ac_dir in $ac_dummy; do
2754   IFS=$ac_save_IFS
2755   test -z "$ac_dir" && ac_dir=.
2756   $as_executable_p "$ac_dir/$ac_word" || continue
2757 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2758 echo "$as_me:2758: found $ac_dir/$ac_word" >&5
2759 break
2760 done
2761
2762 fi
2763 fi
2764 CXX=$ac_cv_prog_CXX
2765 if test -n "$CXX"; then
2766   echo "$as_me:2766: result: $CXX" >&5
2767 echo "${ECHO_T}$CXX" >&6
2768 else
2769   echo "$as_me:2769: result: no" >&5
2770 echo "${ECHO_T}no" >&6
2771 fi
2772
2773     test -n "$CXX" && break
2774   done
2775 fi
2776 if test -z "$CXX"; then
2777   ac_ct_CXX=$CXX
2778   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2779 do
2780   # Extract the first word of "$ac_prog", so it can be a program name with args.
2781 set dummy $ac_prog; ac_word=$2
2782 echo "$as_me:2782: checking for $ac_word" >&5
2783 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2784 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2785   echo $ECHO_N "(cached) $ECHO_C" >&6
2786 else
2787   if test -n "$ac_ct_CXX"; then
2788   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2789 else
2790   ac_save_IFS=$IFS; IFS=$ac_path_separator
2791 ac_dummy="$PATH"
2792 for ac_dir in $ac_dummy; do
2793   IFS=$ac_save_IFS
2794   test -z "$ac_dir" && ac_dir=.
2795   $as_executable_p "$ac_dir/$ac_word" || continue
2796 ac_cv_prog_ac_ct_CXX="$ac_prog"
2797 echo "$as_me:2797: found $ac_dir/$ac_word" >&5
2798 break
2799 done
2800
2801 fi
2802 fi
2803 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2804 if test -n "$ac_ct_CXX"; then
2805   echo "$as_me:2805: result: $ac_ct_CXX" >&5
2806 echo "${ECHO_T}$ac_ct_CXX" >&6
2807 else
2808   echo "$as_me:2808: result: no" >&5
2809 echo "${ECHO_T}no" >&6
2810 fi
2811
2812   test -n "$ac_ct_CXX" && break
2813 done
2814 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2815
2816   CXX=$ac_ct_CXX
2817 fi
2818
2819 # Provide some information about the compiler.
2820 echo "$as_me:2820:" \
2821      "checking for C++ compiler version" >&5
2822 ac_compiler=`set X $ac_compile; echo $2`
2823 { (eval echo "$as_me:2823: \"$ac_compiler --version </dev/null >&5\"") >&5
2824   (eval $ac_compiler --version </dev/null >&5) 2>&5
2825   ac_status=$?
2826   echo "$as_me:2826: \$? = $ac_status" >&5
2827   (exit $ac_status); }
2828 { (eval echo "$as_me:2828: \"$ac_compiler -v </dev/null >&5\"") >&5
2829   (eval $ac_compiler -v </dev/null >&5) 2>&5
2830   ac_status=$?
2831   echo "$as_me:2831: \$? = $ac_status" >&5
2832   (exit $ac_status); }
2833 { (eval echo "$as_me:2833: \"$ac_compiler -V </dev/null >&5\"") >&5
2834   (eval $ac_compiler -V </dev/null >&5) 2>&5
2835   ac_status=$?
2836   echo "$as_me:2836: \$? = $ac_status" >&5
2837   (exit $ac_status); }
2838
2839 echo "$as_me:2839: checking whether we are using the GNU C++ compiler" >&5
2840 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2841 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844   cat >conftest.$ac_ext <<_ACEOF
2845 #line 2845 "configure"
2846 #include "confdefs.h"
2847
2848 int
2849 main ()
2850 {
2851 #ifndef __GNUC__
2852        choke me
2853 #endif
2854
2855   ;
2856   return 0;
2857 }
2858 _ACEOF
2859 rm -f conftest.$ac_objext
2860 if { (eval echo "$as_me:2860: \"$ac_compile\"") >&5
2861   (eval $ac_compile) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); } &&
2865          { ac_try='test -s conftest.$ac_objext'
2866   { (eval echo "$as_me:2866: \"$ac_try\"") >&5
2867   (eval $ac_try) 2>&5
2868   ac_status=$?
2869   echo "$as_me:2869: \$? = $ac_status" >&5
2870   (exit $ac_status); }; }; then
2871   ac_compiler_gnu=yes
2872 else
2873   echo "$as_me: failed program was:" >&5
2874 cat conftest.$ac_ext >&5
2875 ac_compiler_gnu=no
2876 fi
2877 rm -f conftest.$ac_objext conftest.$ac_ext
2878 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2879
2880 fi
2881 echo "$as_me:2881: result: $ac_cv_cxx_compiler_gnu" >&5
2882 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2883 GXX=`test $ac_compiler_gnu = yes && echo yes`
2884 ac_test_CXXFLAGS=${CXXFLAGS+set}
2885 ac_save_CXXFLAGS=$CXXFLAGS
2886 CXXFLAGS="-g"
2887 echo "$as_me:2887: checking whether $CXX accepts -g" >&5
2888 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2889 if test "${ac_cv_prog_cxx_g+set}" = set; then
2890   echo $ECHO_N "(cached) $ECHO_C" >&6
2891 else
2892   cat >conftest.$ac_ext <<_ACEOF
2893 #line 2893 "configure"
2894 #include "confdefs.h"
2895
2896 int
2897 main ()
2898 {
2899
2900   ;
2901   return 0;
2902 }
2903 _ACEOF
2904 rm -f conftest.$ac_objext
2905 if { (eval echo "$as_me:2905: \"$ac_compile\"") >&5
2906   (eval $ac_compile) 2>&5
2907   ac_status=$?
2908   echo "$as_me:2908: \$? = $ac_status" >&5
2909   (exit $ac_status); } &&
2910          { ac_try='test -s conftest.$ac_objext'
2911   { (eval echo "$as_me:2911: \"$ac_try\"") >&5
2912   (eval $ac_try) 2>&5
2913   ac_status=$?
2914   echo "$as_me:2914: \$? = $ac_status" >&5
2915   (exit $ac_status); }; }; then
2916   ac_cv_prog_cxx_g=yes
2917 else
2918   echo "$as_me: failed program was:" >&5
2919 cat conftest.$ac_ext >&5
2920 ac_cv_prog_cxx_g=no
2921 fi
2922 rm -f conftest.$ac_objext conftest.$ac_ext
2923 fi
2924 echo "$as_me:2924: result: $ac_cv_prog_cxx_g" >&5
2925 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2926 if test "$ac_test_CXXFLAGS" = set; then
2927   CXXFLAGS=$ac_save_CXXFLAGS
2928 elif test $ac_cv_prog_cxx_g = yes; then
2929   if test "$GXX" = yes; then
2930     CXXFLAGS="-g -O2"
2931   else
2932     CXXFLAGS="-g"
2933   fi
2934 else
2935   if test "$GXX" = yes; then
2936     CXXFLAGS="-O2"
2937   else
2938     CXXFLAGS=
2939   fi
2940 fi
2941 for ac_declaration in \
2942    ''\
2943    '#include <stdlib.h>' \
2944    'extern "C" void std::exit (int) throw (); using std::exit;' \
2945    'extern "C" void std::exit (int); using std::exit;' \
2946    'extern "C" void exit (int) throw ();' \
2947    'extern "C" void exit (int);' \
2948    'void exit (int);'
2949 do
2950   cat >conftest.$ac_ext <<_ACEOF
2951 #line 2951 "configure"
2952 #include "confdefs.h"
2953 #include <stdlib.h>
2954 $ac_declaration
2955 int
2956 main ()
2957 {
2958 exit (42);
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 rm -f conftest.$ac_objext
2964 if { (eval echo "$as_me:2964: \"$ac_compile\"") >&5
2965   (eval $ac_compile) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); } &&
2969          { ac_try='test -s conftest.$ac_objext'
2970   { (eval echo "$as_me:2970: \"$ac_try\"") >&5
2971   (eval $ac_try) 2>&5
2972   ac_status=$?
2973   echo "$as_me:2973: \$? = $ac_status" >&5
2974   (exit $ac_status); }; }; then
2975   :
2976 else
2977   echo "$as_me: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 continue
2980 fi
2981 rm -f conftest.$ac_objext conftest.$ac_ext
2982   cat >conftest.$ac_ext <<_ACEOF
2983 #line 2983 "configure"
2984 #include "confdefs.h"
2985 $ac_declaration
2986 int
2987 main ()
2988 {
2989 exit (42);
2990   ;
2991   return 0;
2992 }
2993 _ACEOF
2994 rm -f conftest.$ac_objext
2995 if { (eval echo "$as_me:2995: \"$ac_compile\"") >&5
2996   (eval $ac_compile) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); } &&
3000          { ac_try='test -s conftest.$ac_objext'
3001   { (eval echo "$as_me:3001: \"$ac_try\"") >&5
3002   (eval $ac_try) 2>&5
3003   ac_status=$?
3004   echo "$as_me:3004: \$? = $ac_status" >&5
3005   (exit $ac_status); }; }; then
3006   break
3007 else
3008   echo "$as_me: failed program was:" >&5
3009 cat conftest.$ac_ext >&5
3010 fi
3011 rm -f conftest.$ac_objext conftest.$ac_ext
3012 done
3013 rm -f conftest*
3014 if test -n "$ac_declaration"; then
3015   echo '#ifdef __cplusplus' >>confdefs.h
3016   echo $ac_declaration      >>confdefs.h
3017   echo '#endif'             >>confdefs.h
3018 fi
3019
3020 ac_ext=c
3021 ac_cpp='$CPP $CPPFLAGS'
3022 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3023 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3024 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3025 ac_main_return=return
3026
3027                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3028         if test "$CXX" = "g++" ; then
3029                 # Extract the first word of "g++", so it can be a program name with args.
3030 set dummy g++; ac_word=$2
3031 echo "$as_me:3031: checking for $ac_word" >&5
3032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3033 if test "${ac_cv_path_CXX+set}" = set; then
3034   echo $ECHO_N "(cached) $ECHO_C" >&6
3035 else
3036   case $CXX in
3037   [\\/]* | ?:[\\/]*)
3038   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3039   ;;
3040   *)
3041   ac_save_IFS=$IFS; IFS=$ac_path_separator
3042 ac_dummy="$PATH"
3043 for ac_dir in $ac_dummy; do
3044   IFS=$ac_save_IFS
3045   test -z "$ac_dir" && ac_dir=.
3046   if $as_executable_p "$ac_dir/$ac_word"; then
3047    ac_cv_path_CXX="$ac_dir/$ac_word"
3048    echo "$as_me:3048: found $ac_dir/$ac_word" >&5
3049    break
3050 fi
3051 done
3052
3053   ;;
3054 esac
3055 fi
3056 CXX=$ac_cv_path_CXX
3057
3058 if test -n "$CXX"; then
3059   echo "$as_me:3059: result: $CXX" >&5
3060 echo "${ECHO_T}$CXX" >&6
3061 else
3062   echo "$as_me:3062: result: no" >&5
3063 echo "${ECHO_T}no" >&6
3064 fi
3065
3066         fi
3067         if test "$CXX" = "g++" ; then
3068                 { echo "$as_me:3068: WARNING: ignoring hardcoded g++" >&5
3069 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3070                 cf_with_cxx=no; CXX=""; GXX="";
3071         fi
3072 fi
3073
3074 GXX_VERSION=none
3075 if test "$GXX" = yes; then
3076         echo "$as_me:3076: checking version of g++" >&5
3077 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3078         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3079         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3080         echo "$as_me:3080: result: $GXX_VERSION" >&5
3081 echo "${ECHO_T}$GXX_VERSION" >&6
3082 fi
3083
3084 case $GXX_VERSION in
3085 1*|2.[0-6]*)
3086         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3087         # cf_cxx_library=no
3088         { echo "$as_me:3088: WARNING: templates do not work" >&5
3089 echo "$as_me: WARNING: templates do not work" >&2;}
3090         ;;
3091 esac
3092
3093 echo "$as_me:3093: checking if you want to build C++ binding and demo" >&5
3094 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3095
3096 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3097 if test "${with_cxx_binding+set}" = set; then
3098   withval="$with_cxx_binding"
3099   cf_with_cxx_binding=$withval
3100 else
3101   cf_with_cxx_binding=$cf_with_cxx
3102 fi;
3103 echo "$as_me:3103: result: $cf_with_cxx_binding" >&5
3104 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3105
3106 echo "$as_me:3106: checking if you want to build with Ada95" >&5
3107 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3108
3109 # Check whether --with-ada or --without-ada was given.
3110 if test "${with_ada+set}" = set; then
3111   withval="$with_ada"
3112   cf_with_ada=$withval
3113 else
3114   cf_with_ada=yes
3115 fi;
3116 echo "$as_me:3116: result: $cf_with_ada" >&5
3117 echo "${ECHO_T}$cf_with_ada" >&6
3118
3119 echo "$as_me:3119: checking if you want to install manpages" >&5
3120 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3121
3122 # Check whether --with-manpages or --without-manpages was given.
3123 if test "${with_manpages+set}" = set; then
3124   withval="$with_manpages"
3125   cf_with_manpages=$withval
3126 else
3127   cf_with_manpages=yes
3128 fi;
3129 echo "$as_me:3129: result: $cf_with_manpages" >&5
3130 echo "${ECHO_T}$cf_with_manpages" >&6
3131
3132 echo "$as_me:3132: checking if you want to build programs such as tic" >&5
3133 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3134
3135 # Check whether --with-progs or --without-progs was given.
3136 if test "${with_progs+set}" = set; then
3137   withval="$with_progs"
3138   cf_with_progs=$withval
3139 else
3140   cf_with_progs=yes
3141 fi;
3142 echo "$as_me:3142: result: $cf_with_progs" >&5
3143 echo "${ECHO_T}$cf_with_progs" >&6
3144
3145 echo "$as_me:3145: checking if you wish to install curses.h" >&5
3146 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3147
3148 # Check whether --with-curses-h or --without-curses-h was given.
3149 if test "${with_curses_h+set}" = set; then
3150   withval="$with_curses_h"
3151   with_curses_h=$withval
3152 else
3153   with_curses_h=yes
3154 fi;
3155 echo "$as_me:3155: result: $with_curses_h" >&5
3156 echo "${ECHO_T}$with_curses_h" >&6
3157
3158 modules_to_build="ncurses"
3159 if test "X$cf_with_progs" != Xno ; then
3160 modules_to_build="$modules_to_build progs tack"
3161 fi
3162 modules_to_build="$modules_to_build panel menu form"
3163
3164 test "$program_prefix" != NONE &&
3165   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3166 # Use a double $ so make ignores it.
3167 test "$program_suffix" != NONE &&
3168   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3169 # Double any \ or $.  echo might interpret backslashes.
3170 # By default was `s,x,x', remove it if useless.
3171 cat <<\_ACEOF >conftest.sed
3172 s/[\\$]/&&/g;s/;s,x,x,$//
3173 _ACEOF
3174 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3175 rm conftest.sed
3176
3177 for ac_prog in mawk gawk nawk awk
3178 do
3179   # Extract the first word of "$ac_prog", so it can be a program name with args.
3180 set dummy $ac_prog; ac_word=$2
3181 echo "$as_me:3181: checking for $ac_word" >&5
3182 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3183 if test "${ac_cv_prog_AWK+set}" = set; then
3184   echo $ECHO_N "(cached) $ECHO_C" >&6
3185 else
3186   if test -n "$AWK"; then
3187   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3188 else
3189   ac_save_IFS=$IFS; IFS=$ac_path_separator
3190 ac_dummy="$PATH"
3191 for ac_dir in $ac_dummy; do
3192   IFS=$ac_save_IFS
3193   test -z "$ac_dir" && ac_dir=.
3194   $as_executable_p "$ac_dir/$ac_word" || continue
3195 ac_cv_prog_AWK="$ac_prog"
3196 echo "$as_me:3196: found $ac_dir/$ac_word" >&5
3197 break
3198 done
3199
3200 fi
3201 fi
3202 AWK=$ac_cv_prog_AWK
3203 if test -n "$AWK"; then
3204   echo "$as_me:3204: result: $AWK" >&5
3205 echo "${ECHO_T}$AWK" >&6
3206 else
3207   echo "$as_me:3207: result: no" >&5
3208 echo "${ECHO_T}no" >&6
3209 fi
3210
3211   test -n "$AWK" && break
3212 done
3213
3214 test -z "$AWK" && { { echo "$as_me:3214: error: No awk program found" >&5
3215 echo "$as_me: error: No awk program found" >&2;}
3216    { (exit 1); exit 1; }; }
3217
3218 echo "$as_me:3218: checking for egrep" >&5
3219 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3220 if test "${ac_cv_prog_egrep+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3224     then ac_cv_prog_egrep='grep -E'
3225     else ac_cv_prog_egrep='egrep'
3226     fi
3227 fi
3228 echo "$as_me:3228: result: $ac_cv_prog_egrep" >&5
3229 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3230  EGREP=$ac_cv_prog_egrep
3231
3232 test -z "$EGREP" && { { echo "$as_me:3232: error: No egrep program found" >&5
3233 echo "$as_me: error: No egrep program found" >&2;}
3234    { (exit 1); exit 1; }; }
3235
3236 # Find a good install program.  We prefer a C program (faster),
3237 # so one script is as good as another.  But avoid the broken or
3238 # incompatible versions:
3239 # SysV /etc/install, /usr/sbin/install
3240 # SunOS /usr/etc/install
3241 # IRIX /sbin/install
3242 # AIX /bin/install
3243 # AmigaOS /C/install, which installs bootblocks on floppy discs
3244 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3245 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3246 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3247 # ./install, which can be erroneously created by make from ./install.sh.
3248 echo "$as_me:3248: checking for a BSD compatible install" >&5
3249 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3250 if test -z "$INSTALL"; then
3251 if test "${ac_cv_path_install+set}" = set; then
3252   echo $ECHO_N "(cached) $ECHO_C" >&6
3253 else
3254     ac_save_IFS=$IFS; IFS=$ac_path_separator
3255   for ac_dir in $PATH; do
3256     IFS=$ac_save_IFS
3257     # Account for people who put trailing slashes in PATH elements.
3258     case $ac_dir/ in
3259     / | ./ | .// | /cC/* \
3260     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3261     | /usr/ucb/* ) ;;
3262     *)
3263       # OSF1 and SCO ODT 3.0 have their own names for install.
3264       # Don't use installbsd from OSF since it installs stuff as root
3265       # by default.
3266       for ac_prog in ginstall scoinst install; do
3267         if $as_executable_p "$ac_dir/$ac_prog"; then
3268           if test $ac_prog = install &&
3269             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3270             # AIX install.  It has an incompatible calling convention.
3271             :
3272           elif test $ac_prog = install &&
3273             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3274             # program-specific install script used by HP pwplus--don't use.
3275             :
3276           else
3277             ac_cv_path_install="$ac_dir/$ac_prog -c"
3278             break 2
3279           fi
3280         fi
3281       done
3282       ;;
3283     esac
3284   done
3285
3286 fi
3287   if test "${ac_cv_path_install+set}" = set; then
3288     INSTALL=$ac_cv_path_install
3289   else
3290     # As a last resort, use the slow shell script.  We don't cache a
3291     # path for INSTALL within a source directory, because that will
3292     # break other packages using the cache if that directory is
3293     # removed, or if the path is relative.
3294     INSTALL=$ac_install_sh
3295   fi
3296 fi
3297 echo "$as_me:3297: result: $INSTALL" >&5
3298 echo "${ECHO_T}$INSTALL" >&6
3299
3300 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3301 # It thinks the first close brace ends the variable substitution.
3302 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3303
3304 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3305
3306 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3307
3308 case $INSTALL in
3309 /*)
3310   ;;
3311 *)
3312   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3313   test -z "$cf_dir" && cf_dir=.
3314   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3315   ;;
3316 esac
3317
3318 for ac_prog in tdlint lint alint
3319 do
3320   # Extract the first word of "$ac_prog", so it can be a program name with args.
3321 set dummy $ac_prog; ac_word=$2
3322 echo "$as_me:3322: checking for $ac_word" >&5
3323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3324 if test "${ac_cv_prog_LINT+set}" = set; then
3325   echo $ECHO_N "(cached) $ECHO_C" >&6
3326 else
3327   if test -n "$LINT"; then
3328   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3329 else
3330   ac_save_IFS=$IFS; IFS=$ac_path_separator
3331 ac_dummy="$PATH"
3332 for ac_dir in $ac_dummy; do
3333   IFS=$ac_save_IFS
3334   test -z "$ac_dir" && ac_dir=.
3335   $as_executable_p "$ac_dir/$ac_word" || continue
3336 ac_cv_prog_LINT="$ac_prog"
3337 echo "$as_me:3337: found $ac_dir/$ac_word" >&5
3338 break
3339 done
3340
3341 fi
3342 fi
3343 LINT=$ac_cv_prog_LINT
3344 if test -n "$LINT"; then
3345   echo "$as_me:3345: result: $LINT" >&5
3346 echo "${ECHO_T}$LINT" >&6
3347 else
3348   echo "$as_me:3348: result: no" >&5
3349 echo "${ECHO_T}no" >&6
3350 fi
3351
3352   test -n "$LINT" && break
3353 done
3354
3355 echo "$as_me:3355: checking whether ln -s works" >&5
3356 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3357 LN_S=$as_ln_s
3358 if test "$LN_S" = "ln -s"; then
3359   echo "$as_me:3359: result: yes" >&5
3360 echo "${ECHO_T}yes" >&6
3361 else
3362   echo "$as_me:3362: result: no, using $LN_S" >&5
3363 echo "${ECHO_T}no, using $LN_S" >&6
3364 fi
3365
3366 echo "$as_me:3366: checking for long file names" >&5
3367 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3368 if test "${ac_cv_sys_long_file_names+set}" = set; then
3369   echo $ECHO_N "(cached) $ECHO_C" >&6
3370 else
3371   ac_cv_sys_long_file_names=yes
3372 # Test for long file names in all the places we know might matter:
3373 #      .                the current directory, where building will happen
3374 #      $prefix/lib      where we will be installing things
3375 #      $exec_prefix/lib likewise
3376 # eval it to expand exec_prefix.
3377 #      $TMPDIR          if set, where it might want to write temporary files
3378 # if $TMPDIR is not set:
3379 #      /tmp             where it might want to write temporary files
3380 #      /var/tmp         likewise
3381 #      /usr/tmp         likewise
3382 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3383   ac_tmpdirs=$TMPDIR
3384 else
3385   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3386 fi
3387 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3388   test -d $ac_dir || continue
3389   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3390   ac_xdir=$ac_dir/cf$$
3391   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3392   ac_tf1=$ac_xdir/conftest9012345
3393   ac_tf2=$ac_xdir/conftest9012346
3394   (echo 1 >$ac_tf1) 2>/dev/null
3395   (echo 2 >$ac_tf2) 2>/dev/null
3396   ac_val=`cat $ac_tf1 2>/dev/null`
3397   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3398     ac_cv_sys_long_file_names=no
3399     rm -rf $ac_xdir 2>/dev/null
3400     break
3401   fi
3402   rm -rf $ac_xdir 2>/dev/null
3403 done
3404 fi
3405 echo "$as_me:3405: result: $ac_cv_sys_long_file_names" >&5
3406 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3407 if test $ac_cv_sys_long_file_names = yes; then
3408
3409 cat >>confdefs.h <<\EOF
3410 #define HAVE_LONG_FILE_NAMES 1
3411 EOF
3412
3413 fi
3414
3415 # if we find pkg-config, check if we should install the ".pc" files.
3416
3417 echo "$as_me:3417: checking if you want to use pkg-config" >&5
3418 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3419
3420 # Check whether --with-pkg-config or --without-pkg-config was given.
3421 if test "${with_pkg_config+set}" = set; then
3422   withval="$with_pkg_config"
3423   cf_pkg_config=$withval
3424 else
3425   cf_pkg_config=yes
3426 fi;
3427 echo "$as_me:3427: result: $cf_pkg_config" >&5
3428 echo "${ECHO_T}$cf_pkg_config" >&6
3429
3430 case $cf_pkg_config in #(vi
3431 no) #(vi
3432         PKG_CONFIG=none
3433         ;;
3434 yes) #(vi
3435         # Extract the first word of "pkg-config", so it can be a program name with args.
3436 set dummy pkg-config; ac_word=$2
3437 echo "$as_me:3437: checking for $ac_word" >&5
3438 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3439 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3440   echo $ECHO_N "(cached) $ECHO_C" >&6
3441 else
3442   case $PKG_CONFIG in
3443   [\\/]* | ?:[\\/]*)
3444   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3445   ;;
3446   *)
3447   ac_save_IFS=$IFS; IFS=$ac_path_separator
3448 ac_dummy="$PATH"
3449 for ac_dir in $ac_dummy; do
3450   IFS=$ac_save_IFS
3451   test -z "$ac_dir" && ac_dir=.
3452   if $as_executable_p "$ac_dir/$ac_word"; then
3453    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3454    echo "$as_me:3454: found $ac_dir/$ac_word" >&5
3455    break
3456 fi
3457 done
3458
3459   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3460   ;;
3461 esac
3462 fi
3463 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3464
3465 if test -n "$PKG_CONFIG"; then
3466   echo "$as_me:3466: result: $PKG_CONFIG" >&5
3467 echo "${ECHO_T}$PKG_CONFIG" >&6
3468 else
3469   echo "$as_me:3469: result: no" >&5
3470 echo "${ECHO_T}no" >&6
3471 fi
3472
3473         ;;
3474 *)
3475         PKG_CONFIG=$withval
3476         ;;
3477 esac
3478
3479 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3480 if test "$PKG_CONFIG" != none ; then
3481
3482 if test "x$prefix" != xNONE; then
3483   cf_path_syntax="$prefix"
3484 else
3485   cf_path_syntax="$ac_default_prefix"
3486 fi
3487
3488 case ".$PKG_CONFIG" in #(vi
3489 .\$\(*\)*|.\'*\'*) #(vi
3490   ;;
3491 ..|./*|.\\*) #(vi
3492   ;;
3493 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3494   ;;
3495 .\${*prefix}*) #(vi
3496   eval PKG_CONFIG="$PKG_CONFIG"
3497   case ".$PKG_CONFIG" in #(vi
3498   .NONE/*)
3499     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3500     ;;
3501   esac
3502   ;; #(vi
3503 .no|.NONE/*)
3504   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3505   ;;
3506 *)
3507   { { echo "$as_me:3507: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3508 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3509    { (exit 1); exit 1; }; }
3510   ;;
3511 esac
3512
3513 fi
3514
3515 if test "$PKG_CONFIG" != no ; then
3516         echo "$as_me:3516: checking if we should install .pc files for $PKG_CONFIG" >&5
3517 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3518
3519         # Leave this as something that can be overridden in the environment.
3520         if test -z "$PKG_CONFIG_LIBDIR" ; then
3521                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3522         fi
3523
3524         if test -d "$PKG_CONFIG_LIBDIR" ; then
3525
3526 # Check whether --enable-pc-files or --disable-pc-files was given.
3527 if test "${enable_pc_files+set}" = set; then
3528   enableval="$enable_pc_files"
3529   enable_pc_files=$enableval
3530 else
3531   enable_pc_files=no
3532 fi;
3533                 echo "$as_me:3533: result: $enable_pc_files" >&5
3534 echo "${ECHO_T}$enable_pc_files" >&6
3535         else
3536                 echo "$as_me:3536: result: no" >&5
3537 echo "${ECHO_T}no" >&6
3538                 { echo "$as_me:3538: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3539 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3540                 enable_pc_files=no
3541         fi
3542 fi
3543
3544 echo "$as_me:3544: checking if we should assume mixed-case filenames" >&5
3545 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3546
3547 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3548 if test "${enable_mixed_case+set}" = set; then
3549   enableval="$enable_mixed_case"
3550   enable_mixedcase=$enableval
3551 else
3552   enable_mixedcase=auto
3553 fi;
3554 echo "$as_me:3554: result: $enable_mixedcase" >&5
3555 echo "${ECHO_T}$enable_mixedcase" >&6
3556 if test "$enable_mixedcase" = "auto" ; then
3557
3558 echo "$as_me:3558: checking if filesystem supports mixed-case filenames" >&5
3559 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3560 if test "${cf_cv_mixedcase+set}" = set; then
3561   echo $ECHO_N "(cached) $ECHO_C" >&6
3562 else
3563
3564 if test "$cross_compiling" = yes ; then
3565         case $target_alias in #(vi
3566         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3567                 cf_cv_mixedcase=no
3568                 ;;
3569         *)
3570                 cf_cv_mixedcase=yes
3571                 ;;
3572         esac
3573 else
3574         rm -f conftest CONFTEST
3575         echo test >conftest
3576         if test -f CONFTEST ; then
3577                 cf_cv_mixedcase=no
3578         else
3579                 cf_cv_mixedcase=yes
3580         fi
3581         rm -f conftest CONFTEST
3582 fi
3583
3584 fi
3585 echo "$as_me:3585: result: $cf_cv_mixedcase" >&5
3586 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3587 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3588 #define MIXEDCASE_FILENAMES 1
3589 EOF
3590
3591 else
3592     cf_cv_mixedcase=$enable_mixedcase
3593     if test "$enable_mixedcase" = "yes" ; then
3594         cat >>confdefs.h <<\EOF
3595 #define MIXEDCASE_FILENAMES 1
3596 EOF
3597
3598     fi
3599 fi
3600
3601 # do this after mixed-case option (tags/TAGS is not as important as tic).
3602 echo "$as_me:3602: checking whether ${MAKE-make} sets \${MAKE}" >&5
3603 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3604 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3605 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3606   echo $ECHO_N "(cached) $ECHO_C" >&6
3607 else
3608   cat >conftest.make <<\EOF
3609 all:
3610         @echo 'ac_maketemp="${MAKE}"'
3611 EOF
3612 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3613 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3614 if test -n "$ac_maketemp"; then
3615   eval ac_cv_prog_make_${ac_make}_set=yes
3616 else
3617   eval ac_cv_prog_make_${ac_make}_set=no
3618 fi
3619 rm -f conftest.make
3620 fi
3621 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3622   echo "$as_me:3622: result: yes" >&5
3623 echo "${ECHO_T}yes" >&6
3624   SET_MAKE=
3625 else
3626   echo "$as_me:3626: result: no" >&5
3627 echo "${ECHO_T}no" >&6
3628   SET_MAKE="MAKE=${MAKE-make}"
3629 fi
3630
3631 # Extract the first word of "ctags", so it can be a program name with args.
3632 set dummy ctags; ac_word=$2
3633 echo "$as_me:3633: checking for $ac_word" >&5
3634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3635 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3636   echo $ECHO_N "(cached) $ECHO_C" >&6
3637 else
3638   if test -n "$MAKE_LOWER_TAGS"; then
3639   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3640 else
3641   ac_save_IFS=$IFS; IFS=$ac_path_separator
3642 ac_dummy="$PATH"
3643 for ac_dir in $ac_dummy; do
3644   IFS=$ac_save_IFS
3645   test -z "$ac_dir" && ac_dir=.
3646   $as_executable_p "$ac_dir/$ac_word" || continue
3647 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3648 echo "$as_me:3648: found $ac_dir/$ac_word" >&5
3649 break
3650 done
3651
3652   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3653 fi
3654 fi
3655 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3656 if test -n "$MAKE_LOWER_TAGS"; then
3657   echo "$as_me:3657: result: $MAKE_LOWER_TAGS" >&5
3658 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3659 else
3660   echo "$as_me:3660: result: no" >&5
3661 echo "${ECHO_T}no" >&6
3662 fi
3663
3664 if test "$cf_cv_mixedcase" = yes ; then
3665         # Extract the first word of "etags", so it can be a program name with args.
3666 set dummy etags; ac_word=$2
3667 echo "$as_me:3667: checking for $ac_word" >&5
3668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3669 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3670   echo $ECHO_N "(cached) $ECHO_C" >&6
3671 else
3672   if test -n "$MAKE_UPPER_TAGS"; then
3673   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3674 else
3675   ac_save_IFS=$IFS; IFS=$ac_path_separator
3676 ac_dummy="$PATH"
3677 for ac_dir in $ac_dummy; do
3678   IFS=$ac_save_IFS
3679   test -z "$ac_dir" && ac_dir=.
3680   $as_executable_p "$ac_dir/$ac_word" || continue
3681 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3682 echo "$as_me:3682: found $ac_dir/$ac_word" >&5
3683 break
3684 done
3685
3686   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3687 fi
3688 fi
3689 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3690 if test -n "$MAKE_UPPER_TAGS"; then
3691   echo "$as_me:3691: result: $MAKE_UPPER_TAGS" >&5
3692 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3693 else
3694   echo "$as_me:3694: result: no" >&5
3695 echo "${ECHO_T}no" >&6
3696 fi
3697
3698 else
3699         MAKE_UPPER_TAGS=no
3700 fi
3701
3702 if test "$MAKE_UPPER_TAGS" = yes ; then
3703         MAKE_UPPER_TAGS=
3704 else
3705         MAKE_UPPER_TAGS="#"
3706 fi
3707
3708 if test "$MAKE_LOWER_TAGS" = yes ; then
3709         MAKE_LOWER_TAGS=
3710 else
3711         MAKE_LOWER_TAGS="#"
3712 fi
3713
3714 echo "$as_me:3714: checking for makeflags variable" >&5
3715 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3716 if test "${cf_cv_makeflags+set}" = set; then
3717   echo $ECHO_N "(cached) $ECHO_C" >&6
3718 else
3719
3720         cf_cv_makeflags=''
3721         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3722         do
3723                 cat >cf_makeflags.tmp <<CF_EOF
3724 SHELL = /bin/sh
3725 all :
3726         @ echo '.$cf_option'
3727 CF_EOF
3728                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3729                 case "$cf_result" in
3730                 .*k)
3731                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3732                         case "$cf_result" in
3733                         .*CC=*) cf_cv_makeflags=
3734                                 ;;
3735                         *)      cf_cv_makeflags=$cf_option
3736                                 ;;
3737                         esac
3738                         break
3739                         ;;
3740                 .-)     ;;
3741                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3742                         ;;
3743                 esac
3744         done
3745         rm -f cf_makeflags.tmp
3746
3747 fi
3748 echo "$as_me:3748: result: $cf_cv_makeflags" >&5
3749 echo "${ECHO_T}$cf_cv_makeflags" >&6
3750
3751 if test -n "$ac_tool_prefix"; then
3752   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3753 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3754 echo "$as_me:3754: checking for $ac_word" >&5
3755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3756 if test "${ac_cv_prog_RANLIB+set}" = set; then
3757   echo $ECHO_N "(cached) $ECHO_C" >&6
3758 else
3759   if test -n "$RANLIB"; then
3760   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3761 else
3762   ac_save_IFS=$IFS; IFS=$ac_path_separator
3763 ac_dummy="$PATH"
3764 for ac_dir in $ac_dummy; do
3765   IFS=$ac_save_IFS
3766   test -z "$ac_dir" && ac_dir=.
3767   $as_executable_p "$ac_dir/$ac_word" || continue
3768 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3769 echo "$as_me:3769: found $ac_dir/$ac_word" >&5
3770 break
3771 done
3772
3773 fi
3774 fi
3775 RANLIB=$ac_cv_prog_RANLIB
3776 if test -n "$RANLIB"; then
3777   echo "$as_me:3777: result: $RANLIB" >&5
3778 echo "${ECHO_T}$RANLIB" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784 fi
3785 if test -z "$ac_cv_prog_RANLIB"; then
3786   ac_ct_RANLIB=$RANLIB
3787   # Extract the first word of "ranlib", so it can be a program name with args.
3788 set dummy ranlib; ac_word=$2
3789 echo "$as_me:3789: checking for $ac_word" >&5
3790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3791 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3792   echo $ECHO_N "(cached) $ECHO_C" >&6
3793 else
3794   if test -n "$ac_ct_RANLIB"; then
3795   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3796 else
3797   ac_save_IFS=$IFS; IFS=$ac_path_separator
3798 ac_dummy="$PATH"
3799 for ac_dir in $ac_dummy; do
3800   IFS=$ac_save_IFS
3801   test -z "$ac_dir" && ac_dir=.
3802   $as_executable_p "$ac_dir/$ac_word" || continue
3803 ac_cv_prog_ac_ct_RANLIB="ranlib"
3804 echo "$as_me:3804: found $ac_dir/$ac_word" >&5
3805 break
3806 done
3807
3808   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3809 fi
3810 fi
3811 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3812 if test -n "$ac_ct_RANLIB"; then
3813   echo "$as_me:3813: result: $ac_ct_RANLIB" >&5
3814 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3815 else
3816   echo "$as_me:3816: result: no" >&5
3817 echo "${ECHO_T}no" >&6
3818 fi
3819
3820   RANLIB=$ac_ct_RANLIB
3821 else
3822   RANLIB="$ac_cv_prog_RANLIB"
3823 fi
3824
3825 if test -n "$ac_tool_prefix"; then
3826   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3827 set dummy ${ac_tool_prefix}ld; ac_word=$2
3828 echo "$as_me:3828: checking for $ac_word" >&5
3829 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3830 if test "${ac_cv_prog_LD+set}" = set; then
3831   echo $ECHO_N "(cached) $ECHO_C" >&6
3832 else
3833   if test -n "$LD"; then
3834   ac_cv_prog_LD="$LD" # Let the user override the test.
3835 else
3836   ac_save_IFS=$IFS; IFS=$ac_path_separator
3837 ac_dummy="$PATH"
3838 for ac_dir in $ac_dummy; do
3839   IFS=$ac_save_IFS
3840   test -z "$ac_dir" && ac_dir=.
3841   $as_executable_p "$ac_dir/$ac_word" || continue
3842 ac_cv_prog_LD="${ac_tool_prefix}ld"
3843 echo "$as_me:3843: found $ac_dir/$ac_word" >&5
3844 break
3845 done
3846
3847 fi
3848 fi
3849 LD=$ac_cv_prog_LD
3850 if test -n "$LD"; then
3851   echo "$as_me:3851: result: $LD" >&5
3852 echo "${ECHO_T}$LD" >&6
3853 else
3854   echo "$as_me:3854: result: no" >&5
3855 echo "${ECHO_T}no" >&6
3856 fi
3857
3858 fi
3859 if test -z "$ac_cv_prog_LD"; then
3860   ac_ct_LD=$LD
3861   # Extract the first word of "ld", so it can be a program name with args.
3862 set dummy ld; ac_word=$2
3863 echo "$as_me:3863: checking for $ac_word" >&5
3864 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3865 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3866   echo $ECHO_N "(cached) $ECHO_C" >&6
3867 else
3868   if test -n "$ac_ct_LD"; then
3869   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3870 else
3871   ac_save_IFS=$IFS; IFS=$ac_path_separator
3872 ac_dummy="$PATH"
3873 for ac_dir in $ac_dummy; do
3874   IFS=$ac_save_IFS
3875   test -z "$ac_dir" && ac_dir=.
3876   $as_executable_p "$ac_dir/$ac_word" || continue
3877 ac_cv_prog_ac_ct_LD="ld"
3878 echo "$as_me:3878: found $ac_dir/$ac_word" >&5
3879 break
3880 done
3881
3882   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3883 fi
3884 fi
3885 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3886 if test -n "$ac_ct_LD"; then
3887   echo "$as_me:3887: result: $ac_ct_LD" >&5
3888 echo "${ECHO_T}$ac_ct_LD" >&6
3889 else
3890   echo "$as_me:3890: result: no" >&5
3891 echo "${ECHO_T}no" >&6
3892 fi
3893
3894   LD=$ac_ct_LD
3895 else
3896   LD="$ac_cv_prog_LD"
3897 fi
3898
3899 if test -n "$ac_tool_prefix"; then
3900   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3901 set dummy ${ac_tool_prefix}ar; ac_word=$2
3902 echo "$as_me:3902: checking for $ac_word" >&5
3903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3904 if test "${ac_cv_prog_AR+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907   if test -n "$AR"; then
3908   ac_cv_prog_AR="$AR" # Let the user override the test.
3909 else
3910   ac_save_IFS=$IFS; IFS=$ac_path_separator
3911 ac_dummy="$PATH"
3912 for ac_dir in $ac_dummy; do
3913   IFS=$ac_save_IFS
3914   test -z "$ac_dir" && ac_dir=.
3915   $as_executable_p "$ac_dir/$ac_word" || continue
3916 ac_cv_prog_AR="${ac_tool_prefix}ar"
3917 echo "$as_me:3917: found $ac_dir/$ac_word" >&5
3918 break
3919 done
3920
3921 fi
3922 fi
3923 AR=$ac_cv_prog_AR
3924 if test -n "$AR"; then
3925   echo "$as_me:3925: result: $AR" >&5
3926 echo "${ECHO_T}$AR" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932 fi
3933 if test -z "$ac_cv_prog_AR"; then
3934   ac_ct_AR=$AR
3935   # Extract the first word of "ar", so it can be a program name with args.
3936 set dummy ar; ac_word=$2
3937 echo "$as_me:3937: checking for $ac_word" >&5
3938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3939 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3940   echo $ECHO_N "(cached) $ECHO_C" >&6
3941 else
3942   if test -n "$ac_ct_AR"; then
3943   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3944 else
3945   ac_save_IFS=$IFS; IFS=$ac_path_separator
3946 ac_dummy="$PATH"
3947 for ac_dir in $ac_dummy; do
3948   IFS=$ac_save_IFS
3949   test -z "$ac_dir" && ac_dir=.
3950   $as_executable_p "$ac_dir/$ac_word" || continue
3951 ac_cv_prog_ac_ct_AR="ar"
3952 echo "$as_me:3952: found $ac_dir/$ac_word" >&5
3953 break
3954 done
3955
3956   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3957 fi
3958 fi
3959 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3960 if test -n "$ac_ct_AR"; then
3961   echo "$as_me:3961: result: $ac_ct_AR" >&5
3962 echo "${ECHO_T}$ac_ct_AR" >&6
3963 else
3964   echo "$as_me:3964: result: no" >&5
3965 echo "${ECHO_T}no" >&6
3966 fi
3967
3968   AR=$ac_ct_AR
3969 else
3970   AR="$ac_cv_prog_AR"
3971 fi
3972
3973 if test -n "$ac_tool_prefix"; then
3974   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3975 set dummy ${ac_tool_prefix}ar; ac_word=$2
3976 echo "$as_me:3976: checking for $ac_word" >&5
3977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3978 if test "${ac_cv_prog_AR+set}" = set; then
3979   echo $ECHO_N "(cached) $ECHO_C" >&6
3980 else
3981   if test -n "$AR"; then
3982   ac_cv_prog_AR="$AR" # Let the user override the test.
3983 else
3984   ac_save_IFS=$IFS; IFS=$ac_path_separator
3985 ac_dummy="$PATH"
3986 for ac_dir in $ac_dummy; do
3987   IFS=$ac_save_IFS
3988   test -z "$ac_dir" && ac_dir=.
3989   $as_executable_p "$ac_dir/$ac_word" || continue
3990 ac_cv_prog_AR="${ac_tool_prefix}ar"
3991 echo "$as_me:3991: found $ac_dir/$ac_word" >&5
3992 break
3993 done
3994
3995 fi
3996 fi
3997 AR=$ac_cv_prog_AR
3998 if test -n "$AR"; then
3999   echo "$as_me:3999: result: $AR" >&5
4000 echo "${ECHO_T}$AR" >&6
4001 else
4002   echo "$as_me:4002: result: no" >&5
4003 echo "${ECHO_T}no" >&6
4004 fi
4005
4006 fi
4007 if test -z "$ac_cv_prog_AR"; then
4008   ac_ct_AR=$AR
4009   # Extract the first word of "ar", so it can be a program name with args.
4010 set dummy ar; ac_word=$2
4011 echo "$as_me:4011: checking for $ac_word" >&5
4012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4013 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4014   echo $ECHO_N "(cached) $ECHO_C" >&6
4015 else
4016   if test -n "$ac_ct_AR"; then
4017   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4018 else
4019   ac_save_IFS=$IFS; IFS=$ac_path_separator
4020 ac_dummy="$PATH"
4021 for ac_dir in $ac_dummy; do
4022   IFS=$ac_save_IFS
4023   test -z "$ac_dir" && ac_dir=.
4024   $as_executable_p "$ac_dir/$ac_word" || continue
4025 ac_cv_prog_ac_ct_AR="ar"
4026 echo "$as_me:4026: found $ac_dir/$ac_word" >&5
4027 break
4028 done
4029
4030   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4031 fi
4032 fi
4033 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4034 if test -n "$ac_ct_AR"; then
4035   echo "$as_me:4035: result: $ac_ct_AR" >&5
4036 echo "${ECHO_T}$ac_ct_AR" >&6
4037 else
4038   echo "$as_me:4038: result: no" >&5
4039 echo "${ECHO_T}no" >&6
4040 fi
4041
4042   AR=$ac_ct_AR
4043 else
4044   AR="$ac_cv_prog_AR"
4045 fi
4046
4047 echo "$as_me:4047: checking for options to update archives" >&5
4048 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4049 if test "${cf_cv_ar_flags+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052
4053         cf_cv_ar_flags=unknown
4054         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4055         do
4056                 rm -f conftest.$ac_cv_objext
4057                 rm -f conftest.a
4058
4059                 cat >conftest.$ac_ext <<EOF
4060 #line 4060 "configure"
4061 int     testdata[3] = { 123, 456, 789 };
4062 EOF
4063                 if { (eval echo "$as_me:4063: \"$ac_compile\"") >&5
4064   (eval $ac_compile) 2>&5
4065   ac_status=$?
4066   echo "$as_me:4066: \$? = $ac_status" >&5
4067   (exit $ac_status); } ; then
4068                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4069                         if test -f conftest.a ; then
4070                                 cf_cv_ar_flags=$cf_ar_flags
4071                                 break
4072                         fi
4073                 else
4074                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4075
4076 echo "${as_me-configure}:4076: testing cannot compile test-program ..." 1>&5
4077
4078                         break
4079                 fi
4080         done
4081         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4082
4083 fi
4084 echo "$as_me:4084: result: $cf_cv_ar_flags" >&5
4085 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4086 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4087 ARFLAGS=$cf_cv_ar_flags
4088
4089 echo "$as_me:4089: checking if you have specified an install-prefix" >&5
4090 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4091
4092 # Check whether --with-install-prefix or --without-install-prefix was given.
4093 if test "${with_install_prefix+set}" = set; then
4094   withval="$with_install_prefix"
4095   case "$withval" in #(vi
4096         yes|no) #(vi
4097                 ;;
4098         *)      DESTDIR="$withval"
4099                 ;;
4100         esac
4101 fi;
4102 echo "$as_me:4102: result: $DESTDIR" >&5
4103 echo "${ECHO_T}$DESTDIR" >&6
4104
4105 ###############################################################################
4106
4107 # If we're cross-compiling, allow the user to override the tools and their
4108 # options.  The configure script is oriented toward identifying the host
4109 # compiler, etc., but we need a build compiler to generate parts of the source.
4110
4111 if test "$cross_compiling" = yes ; then
4112
4113         # defaults that we might want to override
4114         : ${BUILD_CFLAGS:=''}
4115         : ${BUILD_CPPFLAGS:=''}
4116         : ${BUILD_LDFLAGS:=''}
4117         : ${BUILD_LIBS:=''}
4118         : ${BUILD_EXEEXT:='$x'}
4119         : ${BUILD_OBJEXT:='o'}
4120
4121 # Check whether --with-build-cc or --without-build-cc was given.
4122 if test "${with_build_cc+set}" = set; then
4123   withval="$with_build_cc"
4124   BUILD_CC="$withval"
4125 else
4126   for ac_prog in gcc cc cl
4127 do
4128   # Extract the first word of "$ac_prog", so it can be a program name with args.
4129 set dummy $ac_prog; ac_word=$2
4130 echo "$as_me:4130: checking for $ac_word" >&5
4131 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4132 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4133   echo $ECHO_N "(cached) $ECHO_C" >&6
4134 else
4135   if test -n "$BUILD_CC"; then
4136   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4137 else
4138   ac_save_IFS=$IFS; IFS=$ac_path_separator
4139 ac_dummy="$PATH"
4140 for ac_dir in $ac_dummy; do
4141   IFS=$ac_save_IFS
4142   test -z "$ac_dir" && ac_dir=.
4143   $as_executable_p "$ac_dir/$ac_word" || continue
4144 ac_cv_prog_BUILD_CC="$ac_prog"
4145 echo "$as_me:4145: found $ac_dir/$ac_word" >&5
4146 break
4147 done
4148
4149 fi
4150 fi
4151 BUILD_CC=$ac_cv_prog_BUILD_CC
4152 if test -n "$BUILD_CC"; then
4153   echo "$as_me:4153: result: $BUILD_CC" >&5
4154 echo "${ECHO_T}$BUILD_CC" >&6
4155 else
4156   echo "$as_me:4156: result: no" >&5
4157 echo "${ECHO_T}no" >&6
4158 fi
4159
4160   test -n "$BUILD_CC" && break
4161 done
4162
4163 fi;
4164         echo "$as_me:4164: checking for native build C compiler" >&5
4165 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4166         echo "$as_me:4166: result: $BUILD_CC" >&5
4167 echo "${ECHO_T}$BUILD_CC" >&6
4168
4169         echo "$as_me:4169: checking for native build C preprocessor" >&5
4170 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4171
4172 # Check whether --with-build-cpp or --without-build-cpp was given.
4173 if test "${with_build_cpp+set}" = set; then
4174   withval="$with_build_cpp"
4175   BUILD_CPP="$withval"
4176 else
4177   BUILD_CPP='${BUILD_CC} -E'
4178 fi;
4179         echo "$as_me:4179: result: $BUILD_CPP" >&5
4180 echo "${ECHO_T}$BUILD_CPP" >&6
4181
4182         echo "$as_me:4182: checking for native build C flags" >&5
4183 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4184
4185 # Check whether --with-build-cflags or --without-build-cflags was given.
4186 if test "${with_build_cflags+set}" = set; then
4187   withval="$with_build_cflags"
4188   BUILD_CFLAGS="$withval"
4189 fi;
4190         echo "$as_me:4190: result: $BUILD_CFLAGS" >&5
4191 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4192
4193         echo "$as_me:4193: checking for native build C preprocessor-flags" >&5
4194 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4195
4196 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4197 if test "${with_build_cppflags+set}" = set; then
4198   withval="$with_build_cppflags"
4199   BUILD_CPPFLAGS="$withval"
4200 fi;
4201         echo "$as_me:4201: result: $BUILD_CPPFLAGS" >&5
4202 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4203
4204         echo "$as_me:4204: checking for native build linker-flags" >&5
4205 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4206
4207 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4208 if test "${with_build_ldflags+set}" = set; then
4209   withval="$with_build_ldflags"
4210   BUILD_LDFLAGS="$withval"
4211 fi;
4212         echo "$as_me:4212: result: $BUILD_LDFLAGS" >&5
4213 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4214
4215         echo "$as_me:4215: checking for native build linker-libraries" >&5
4216 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4217
4218 # Check whether --with-build-libs or --without-build-libs was given.
4219 if test "${with_build_libs+set}" = set; then
4220   withval="$with_build_libs"
4221   BUILD_LIBS="$withval"
4222 fi;
4223         echo "$as_me:4223: result: $BUILD_LIBS" >&5
4224 echo "${ECHO_T}$BUILD_LIBS" >&6
4225
4226         # this assumes we're on Unix.
4227         BUILD_EXEEXT=
4228         BUILD_OBJEXT=o
4229
4230         : ${BUILD_CC:='${CC}'}
4231
4232         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4233                 { { echo "$as_me:4233: error: Cross-build requires two compilers.
4234 Use --with-build-cc to specify the native compiler." >&5
4235 echo "$as_me: error: Cross-build requires two compilers.
4236 Use --with-build-cc to specify the native compiler." >&2;}
4237    { (exit 1); exit 1; }; }
4238         fi
4239
4240 else
4241         : ${BUILD_CC:='${CC}'}
4242         : ${BUILD_CPP:='${CPP}'}
4243         : ${BUILD_CFLAGS:='${CFLAGS}'}
4244         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4245         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4246         : ${BUILD_LIBS:='${LIBS}'}
4247         : ${BUILD_EXEEXT:='$x'}
4248         : ${BUILD_OBJEXT:='o'}
4249 fi
4250
4251 ###############################################################################
4252
4253 ### Options to allow the user to specify the set of libraries which are used.
4254 ### Use "--without-normal --with-shared" to allow the default model to be
4255 ### shared, for example.
4256 cf_list_models=""
4257
4258 LIBTOOL=
4259
4260 # common library maintenance symbols that are convenient for libtool scripts:
4261 LIB_CREATE='${AR} -cr'
4262 LIB_OBJECT='${OBJECTS}'
4263 LIB_SUFFIX=.a
4264 LIB_PREP="$RANLIB"
4265
4266 # symbols used to prop libtool up to enable it to determine what it should be
4267 # doing:
4268 LIB_CLEAN=
4269 LIB_COMPILE=
4270 LIB_LINK='${CC}'
4271 LIB_INSTALL=
4272 LIB_UNINSTALL=
4273
4274 echo "$as_me:4274: checking if you want to build libraries with libtool" >&5
4275 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4276
4277 # Check whether --with-libtool or --without-libtool was given.
4278 if test "${with_libtool+set}" = set; then
4279   withval="$with_libtool"
4280   with_libtool=$withval
4281 else
4282   with_libtool=no
4283 fi;
4284 echo "$as_me:4284: result: $with_libtool" >&5
4285 echo "${ECHO_T}$with_libtool" >&6
4286 if test "$with_libtool" != "no"; then
4287
4288         if test "$with_libtool" != "yes" ; then
4289
4290 if test "x$prefix" != xNONE; then
4291   cf_path_syntax="$prefix"
4292 else
4293   cf_path_syntax="$ac_default_prefix"
4294 fi
4295
4296 case ".$with_libtool" in #(vi
4297 .\$\(*\)*|.\'*\'*) #(vi
4298   ;;
4299 ..|./*|.\\*) #(vi
4300   ;;
4301 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4302   ;;
4303 .\${*prefix}*) #(vi
4304   eval with_libtool="$with_libtool"
4305   case ".$with_libtool" in #(vi
4306   .NONE/*)
4307     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4308     ;;
4309   esac
4310   ;; #(vi
4311 .no|.NONE/*)
4312   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4313   ;;
4314 *)
4315   { { echo "$as_me:4315: error: expected a pathname, not \"$with_libtool\"" >&5
4316 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4317    { (exit 1); exit 1; }; }
4318   ;;
4319 esac
4320
4321                 LIBTOOL=$with_libtool
4322         else
4323                 # Extract the first word of "libtool", so it can be a program name with args.
4324 set dummy libtool; ac_word=$2
4325 echo "$as_me:4325: checking for $ac_word" >&5
4326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4327 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4328   echo $ECHO_N "(cached) $ECHO_C" >&6
4329 else
4330   case $LIBTOOL in
4331   [\\/]* | ?:[\\/]*)
4332   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4333   ;;
4334   *)
4335   ac_save_IFS=$IFS; IFS=$ac_path_separator
4336 ac_dummy="$PATH"
4337 for ac_dir in $ac_dummy; do
4338   IFS=$ac_save_IFS
4339   test -z "$ac_dir" && ac_dir=.
4340   if $as_executable_p "$ac_dir/$ac_word"; then
4341    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4342    echo "$as_me:4342: found $ac_dir/$ac_word" >&5
4343    break
4344 fi
4345 done
4346
4347   ;;
4348 esac
4349 fi
4350 LIBTOOL=$ac_cv_path_LIBTOOL
4351
4352 if test -n "$LIBTOOL"; then
4353   echo "$as_me:4353: result: $LIBTOOL" >&5
4354 echo "${ECHO_T}$LIBTOOL" >&6
4355 else
4356   echo "$as_me:4356: result: no" >&5
4357 echo "${ECHO_T}no" >&6
4358 fi
4359
4360         fi
4361         if test -z "$LIBTOOL" ; then
4362                 { { echo "$as_me:4362: error: Cannot find libtool" >&5
4363 echo "$as_me: error: Cannot find libtool" >&2;}
4364    { (exit 1); exit 1; }; }
4365         fi
4366         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4367         LIB_OBJECT='${OBJECTS:.o=.lo}'
4368         LIB_SUFFIX=.la
4369         LIB_CLEAN='${LIBTOOL} --mode=clean'
4370         LIB_COMPILE='${LIBTOOL} --mode=compile'
4371         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4372         LIB_INSTALL='${LIBTOOL} --mode=install'
4373         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4374         LIB_PREP=:
4375
4376         # Show the version of libtool
4377         echo "$as_me:4377: checking version of libtool" >&5
4378 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4379
4380         # Save the version in a cache variable - this is not entirely a good
4381         # thing, but the version string from libtool is very ugly, and for
4382         # bug reports it might be useful to have the original string.
4383         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.].*//'`
4384         echo "$as_me:4384: result: $cf_cv_libtool_version" >&5
4385 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4386         if test -z "$cf_cv_libtool_version" ; then
4387                 { { echo "$as_me:4387: error: This is not GNU libtool" >&5
4388 echo "$as_me: error: This is not GNU libtool" >&2;}
4389    { (exit 1); exit 1; }; }
4390         fi
4391
4392         # special hack to add --tag option for C++ compiler
4393         case $cf_cv_libtool_version in
4394         1.[5-9]*|[2-9]*)
4395                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4396                 LIBTOOL="$LIBTOOL --tag=CC"
4397                 ;;
4398         *)
4399                 LIBTOOL_CXX="$LIBTOOL"
4400                 ;;
4401         esac
4402 else
4403         LIBTOOL=""
4404         LIBTOOL_CXX=""
4405 fi
4406
4407 test -z "$LIBTOOL" && ECHO_LT=
4408
4409 if test "$with_libtool" != "no" ; then
4410
4411 cf_list_models="$cf_list_models libtool"
4412
4413 else
4414
4415 echo "$as_me:4415: checking if you want to build shared libraries" >&5
4416 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4417
4418 # Check whether --with-shared or --without-shared was given.
4419 if test "${with_shared+set}" = set; then
4420   withval="$with_shared"
4421   with_shared=$withval
4422 else
4423   with_shared=no
4424 fi;
4425 echo "$as_me:4425: result: $with_shared" >&5
4426 echo "${ECHO_T}$with_shared" >&6
4427 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4428
4429 echo "$as_me:4429: checking if you want to build static libraries" >&5
4430 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4431
4432 # Check whether --with-normal or --without-normal was given.
4433 if test "${with_normal+set}" = set; then
4434   withval="$with_normal"
4435   with_normal=$withval
4436 else
4437   with_normal=yes
4438 fi;
4439 echo "$as_me:4439: result: $with_normal" >&5
4440 echo "${ECHO_T}$with_normal" >&6
4441 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4442
4443 echo "$as_me:4443: checking if you want to build debug libraries" >&5
4444 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4445
4446 # Check whether --with-debug or --without-debug was given.
4447 if test "${with_debug+set}" = set; then
4448   withval="$with_debug"
4449   with_debug=$withval
4450 else
4451   with_debug=yes
4452 fi;
4453 echo "$as_me:4453: result: $with_debug" >&5
4454 echo "${ECHO_T}$with_debug" >&6
4455 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4456
4457 echo "$as_me:4457: checking if you want to build profiling libraries" >&5
4458 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4459
4460 # Check whether --with-profile or --without-profile was given.
4461 if test "${with_profile+set}" = set; then
4462   withval="$with_profile"
4463   with_profile=$withval
4464 else
4465   with_profile=no
4466 fi;
4467 echo "$as_me:4467: result: $with_profile" >&5
4468 echo "${ECHO_T}$with_profile" >&6
4469 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4470
4471 fi
4472
4473 ###############################################################################
4474
4475 echo "$as_me:4475: checking for specified models" >&5
4476 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4477 test -z "$cf_list_models" && cf_list_models=normal
4478 test "$with_libtool" != "no" && cf_list_models=libtool
4479 echo "$as_me:4479: result: $cf_list_models" >&5
4480 echo "${ECHO_T}$cf_list_models" >&6
4481
4482 ### Use the first model as the default, and save its suffix for use in building
4483 ### up test-applications.
4484 echo "$as_me:4484: checking for default model" >&5
4485 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4486 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4487 echo "$as_me:4487: result: $DFT_LWR_MODEL" >&5
4488 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4489
4490 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4491
4492 TICS_NAME=tic
4493
4494 TINFO_NAME=tinfo
4495
4496 LIB_NAME=ncurses
4497
4498 LIB_DIR=../lib
4499 LIB_2ND=../../lib
4500
4501         case $cf_cv_system_name in #(vi
4502         OS/2*|os2*) #(vi
4503         LIB_PREFIX=''
4504         ;;
4505         *)      LIB_PREFIX='lib'
4506         ;;
4507         esac
4508 cf_prefix=$LIB_PREFIX
4509
4510 LIB_PREFIX=$cf_prefix
4511
4512 LIB_SUFFIX=
4513
4514 ###############################################################################
4515
4516 echo "$as_me:4516: checking if you want to build a separate terminfo library" >&5
4517 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4518
4519 # Check whether --with-termlib or --without-termlib was given.
4520 if test "${with_termlib+set}" = set; then
4521   withval="$with_termlib"
4522   with_termlib=$withval
4523 else
4524   with_termlib=no
4525 fi;
4526 echo "$as_me:4526: result: $with_termlib" >&5
4527 echo "${ECHO_T}$with_termlib" >&6
4528
4529 echo "$as_me:4529: checking if you want to build a separate tic library" >&5
4530 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4531
4532 # Check whether --with-ticlib or --without-ticlib was given.
4533 if test "${with_ticlib+set}" = set; then
4534   withval="$with_ticlib"
4535   with_ticlib=$withval
4536 else
4537   with_ticlib=no
4538 fi;
4539 echo "$as_me:4539: result: $with_ticlib" >&5
4540 echo "${ECHO_T}$with_ticlib" >&6
4541
4542 ### Checks for special libraries, must be done up-front.
4543 SHLIB_LIST=""
4544
4545 echo "$as_me:4545: checking if you want to link with the GPM mouse library" >&5
4546 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4547
4548 # Check whether --with-gpm or --without-gpm was given.
4549 if test "${with_gpm+set}" = set; then
4550   withval="$with_gpm"
4551   with_gpm=$withval
4552 else
4553   with_gpm=maybe
4554 fi;
4555 echo "$as_me:4555: result: $with_gpm" >&5
4556 echo "${ECHO_T}$with_gpm" >&6
4557
4558 if test "$with_gpm" != no ; then
4559         echo "$as_me:4559: checking for gpm.h" >&5
4560 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4561 if test "${ac_cv_header_gpm_h+set}" = set; then
4562   echo $ECHO_N "(cached) $ECHO_C" >&6
4563 else
4564   cat >conftest.$ac_ext <<_ACEOF
4565 #line 4565 "configure"
4566 #include "confdefs.h"
4567 #include <gpm.h>
4568 _ACEOF
4569 if { (eval echo "$as_me:4569: \"$ac_cpp conftest.$ac_ext\"") >&5
4570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4571   ac_status=$?
4572   egrep -v '^ *\+' conftest.er1 >conftest.err
4573   rm -f conftest.er1
4574   cat conftest.err >&5
4575   echo "$as_me:4575: \$? = $ac_status" >&5
4576   (exit $ac_status); } >/dev/null; then
4577   if test -s conftest.err; then
4578     ac_cpp_err=$ac_c_preproc_warn_flag
4579   else
4580     ac_cpp_err=
4581   fi
4582 else
4583   ac_cpp_err=yes
4584 fi
4585 if test -z "$ac_cpp_err"; then
4586   ac_cv_header_gpm_h=yes
4587 else
4588   echo "$as_me: failed program was:" >&5
4589   cat conftest.$ac_ext >&5
4590   ac_cv_header_gpm_h=no
4591 fi
4592 rm -f conftest.err conftest.$ac_ext
4593 fi
4594 echo "$as_me:4594: result: $ac_cv_header_gpm_h" >&5
4595 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4596 if test $ac_cv_header_gpm_h = yes; then
4597
4598                 cat >>confdefs.h <<\EOF
4599 #define HAVE_GPM_H 1
4600 EOF
4601
4602                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4603                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4604
4605 echo "${as_me-configure}:4605: testing assuming we really have GPM library ..." 1>&5
4606
4607                         cat >>confdefs.h <<\EOF
4608 #define HAVE_LIBGPM 1
4609 EOF
4610
4611                 else
4612                         echo "$as_me:4612: checking for Gpm_Open in -lgpm" >&5
4613 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4614 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4615   echo $ECHO_N "(cached) $ECHO_C" >&6
4616 else
4617   ac_check_lib_save_LIBS=$LIBS
4618 LIBS="-lgpm  $LIBS"
4619 cat >conftest.$ac_ext <<_ACEOF
4620 #line 4620 "configure"
4621 #include "confdefs.h"
4622
4623 /* Override any gcc2 internal prototype to avoid an error.  */
4624 #ifdef __cplusplus
4625 extern "C"
4626 #endif
4627 /* We use char because int might match the return type of a gcc2
4628    builtin and then its argument prototype would still apply.  */
4629 char Gpm_Open ();
4630 int
4631 main ()
4632 {
4633 Gpm_Open ();
4634   ;
4635   return 0;
4636 }
4637 _ACEOF
4638 rm -f conftest.$ac_objext conftest$ac_exeext
4639 if { (eval echo "$as_me:4639: \"$ac_link\"") >&5
4640   (eval $ac_link) 2>&5
4641   ac_status=$?
4642   echo "$as_me:4642: \$? = $ac_status" >&5
4643   (exit $ac_status); } &&
4644          { ac_try='test -s conftest$ac_exeext'
4645   { (eval echo "$as_me:4645: \"$ac_try\"") >&5
4646   (eval $ac_try) 2>&5
4647   ac_status=$?
4648   echo "$as_me:4648: \$? = $ac_status" >&5
4649   (exit $ac_status); }; }; then
4650   ac_cv_lib_gpm_Gpm_Open=yes
4651 else
4652   echo "$as_me: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4654 ac_cv_lib_gpm_Gpm_Open=no
4655 fi
4656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4657 LIBS=$ac_check_lib_save_LIBS
4658 fi
4659 echo "$as_me:4659: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4660 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4661 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4662   :
4663 else
4664
4665                                 { { echo "$as_me:4665: error: Cannot link with GPM library" >&5
4666 echo "$as_me: error: Cannot link with GPM library" >&2;}
4667    { (exit 1); exit 1; }; }
4668                 fi
4669                 with_gpm=yes
4670
4671 fi
4672
4673 else
4674
4675                 test "$with_gpm" != maybe && { echo "$as_me:4675: WARNING: Cannot find GPM header" >&5
4676 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4677                 with_gpm=no
4678
4679 fi
4680
4681 fi
4682
4683 if test "$with_gpm" != no ; then
4684         echo "$as_me:4684: checking if you want to load GPM dynamically" >&5
4685 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4686
4687 # Check whether --with-dlsym or --without-dlsym was given.
4688 if test "${with_dlsym+set}" = set; then
4689   withval="$with_dlsym"
4690   with_dlsym=$withval
4691 else
4692   with_dlsym=yes
4693 fi;
4694         echo "$as_me:4694: result: $with_dlsym" >&5
4695 echo "${ECHO_T}$with_dlsym" >&6
4696         if test "$with_dlsym" = yes ; then
4697
4698 cf_have_dlsym=no
4699 echo "$as_me:4699: checking for dlsym" >&5
4700 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4701 if test "${ac_cv_func_dlsym+set}" = set; then
4702   echo $ECHO_N "(cached) $ECHO_C" >&6
4703 else
4704   cat >conftest.$ac_ext <<_ACEOF
4705 #line 4705 "configure"
4706 #include "confdefs.h"
4707 /* System header to define __stub macros and hopefully few prototypes,
4708     which can conflict with char dlsym (); below.  */
4709 #include <assert.h>
4710 /* Override any gcc2 internal prototype to avoid an error.  */
4711 #ifdef __cplusplus
4712 extern "C"
4713 #endif
4714 /* We use char because int might match the return type of a gcc2
4715    builtin and then its argument prototype would still apply.  */
4716 char dlsym ();
4717 char (*f) ();
4718
4719 int
4720 main ()
4721 {
4722 /* The GNU C library defines this for functions which it implements
4723     to always fail with ENOSYS.  Some functions are actually named
4724     something starting with __ and the normal name is an alias.  */
4725 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4726 choke me
4727 #else
4728 f = dlsym;
4729 #endif
4730
4731   ;
4732   return 0;
4733 }
4734 _ACEOF
4735 rm -f conftest.$ac_objext conftest$ac_exeext
4736 if { (eval echo "$as_me:4736: \"$ac_link\"") >&5
4737   (eval $ac_link) 2>&5
4738   ac_status=$?
4739   echo "$as_me:4739: \$? = $ac_status" >&5
4740   (exit $ac_status); } &&
4741          { ac_try='test -s conftest$ac_exeext'
4742   { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4743   (eval $ac_try) 2>&5
4744   ac_status=$?
4745   echo "$as_me:4745: \$? = $ac_status" >&5
4746   (exit $ac_status); }; }; then
4747   ac_cv_func_dlsym=yes
4748 else
4749   echo "$as_me: failed program was:" >&5
4750 cat conftest.$ac_ext >&5
4751 ac_cv_func_dlsym=no
4752 fi
4753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4754 fi
4755 echo "$as_me:4755: result: $ac_cv_func_dlsym" >&5
4756 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4757 if test $ac_cv_func_dlsym = yes; then
4758   cf_have_dlsym=yes
4759 else
4760
4761 cf_have_libdl=no
4762 echo "$as_me:4762: checking for dlsym in -ldl" >&5
4763 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4764 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4765   echo $ECHO_N "(cached) $ECHO_C" >&6
4766 else
4767   ac_check_lib_save_LIBS=$LIBS
4768 LIBS="-ldl  $LIBS"
4769 cat >conftest.$ac_ext <<_ACEOF
4770 #line 4770 "configure"
4771 #include "confdefs.h"
4772
4773 /* Override any gcc2 internal prototype to avoid an error.  */
4774 #ifdef __cplusplus
4775 extern "C"
4776 #endif
4777 /* We use char because int might match the return type of a gcc2
4778    builtin and then its argument prototype would still apply.  */
4779 char dlsym ();
4780 int
4781 main ()
4782 {
4783 dlsym ();
4784   ;
4785   return 0;
4786 }
4787 _ACEOF
4788 rm -f conftest.$ac_objext conftest$ac_exeext
4789 if { (eval echo "$as_me:4789: \"$ac_link\"") >&5
4790   (eval $ac_link) 2>&5
4791   ac_status=$?
4792   echo "$as_me:4792: \$? = $ac_status" >&5
4793   (exit $ac_status); } &&
4794          { ac_try='test -s conftest$ac_exeext'
4795   { (eval echo "$as_me:4795: \"$ac_try\"") >&5
4796   (eval $ac_try) 2>&5
4797   ac_status=$?
4798   echo "$as_me:4798: \$? = $ac_status" >&5
4799   (exit $ac_status); }; }; then
4800   ac_cv_lib_dl_dlsym=yes
4801 else
4802   echo "$as_me: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4804 ac_cv_lib_dl_dlsym=no
4805 fi
4806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4807 LIBS=$ac_check_lib_save_LIBS
4808 fi
4809 echo "$as_me:4809: result: $ac_cv_lib_dl_dlsym" >&5
4810 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4811 if test $ac_cv_lib_dl_dlsym = yes; then
4812
4813         cf_have_dlsym=yes
4814         cf_have_libdl=yes
4815 fi
4816
4817 fi
4818
4819 if test "$cf_have_dlsym" = yes ; then
4820         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4821
4822         echo "$as_me:4822: checking whether able to link to dl*() functions" >&5
4823 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4824         cat >conftest.$ac_ext <<_ACEOF
4825 #line 4825 "configure"
4826 #include "confdefs.h"
4827 #include <dlfcn.h>
4828 int
4829 main ()
4830 {
4831
4832                 void *obj;
4833                 if ((obj = dlopen("filename", 0)) != 0) {
4834                         if (dlsym(obj, "symbolname") == 0) {
4835                         dlclose(obj);
4836                         }
4837                 }
4838   ;
4839   return 0;
4840 }
4841 _ACEOF
4842 rm -f conftest.$ac_objext conftest$ac_exeext
4843 if { (eval echo "$as_me:4843: \"$ac_link\"") >&5
4844   (eval $ac_link) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); } &&
4848          { ac_try='test -s conftest$ac_exeext'
4849   { (eval echo "$as_me:4849: \"$ac_try\"") >&5
4850   (eval $ac_try) 2>&5
4851   ac_status=$?
4852   echo "$as_me:4852: \$? = $ac_status" >&5
4853   (exit $ac_status); }; }; then
4854
4855                 cat >>confdefs.h <<\EOF
4856 #define HAVE_LIBDL 1
4857 EOF
4858
4859 else
4860   echo "$as_me: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4862
4863                 { { echo "$as_me:4863: error: Cannot link test program for libdl" >&5
4864 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4865    { (exit 1); exit 1; }; }
4866 fi
4867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4868         echo "$as_me:4868: result: ok" >&5
4869 echo "${ECHO_T}ok" >&6
4870 else
4871         { { echo "$as_me:4871: error: Cannot find dlsym function" >&5
4872 echo "$as_me: error: Cannot find dlsym function" >&2;}
4873    { (exit 1); exit 1; }; }
4874 fi
4875
4876                 if test "$with_gpm" != yes ; then
4877                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4878
4879 echo "${as_me-configure}:4879: testing assuming soname for gpm is $with_gpm ..." 1>&5
4880
4881                         cf_cv_gpm_soname="$with_gpm"
4882                 else
4883
4884 echo "$as_me:4884: checking for soname of gpm library" >&5
4885 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4886 if test "${cf_cv_gpm_soname+set}" = set; then
4887   echo $ECHO_N "(cached) $ECHO_C" >&6
4888 else
4889
4890 cf_cv_gpm_soname=unknown
4891 if test "$cross_compiling" != yes ; then
4892 cat >conftest.$ac_ext <<CF_EOF
4893 #include <gpm.h>
4894 int main()
4895 {
4896 if (Gpm_Open(0,0)) Gpm_Close();
4897         ${cf_cv_main_return:-return}(0);
4898 }
4899 CF_EOF
4900 cf_save_LIBS="$LIBS"
4901         LIBS="-lgpm $LIBS"
4902         if { (eval echo "$as_me:4902: \"$ac_compile\"") >&5
4903   (eval $ac_compile) 2>&5
4904   ac_status=$?
4905   echo "$as_me:4905: \$? = $ac_status" >&5
4906   (exit $ac_status); } ; then
4907                 if { (eval echo "$as_me:4907: \"$ac_link\"") >&5
4908   (eval $ac_link) 2>&5
4909   ac_status=$?
4910   echo "$as_me:4910: \$? = $ac_status" >&5
4911   (exit $ac_status); } ; then
4912                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4913                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4914                 fi
4915         fi
4916 rm -f conftest*
4917 LIBS="$cf_save_LIBS"
4918 fi
4919
4920 fi
4921 echo "$as_me:4921: result: $cf_cv_gpm_soname" >&5
4922 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4923
4924                 fi
4925                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4926 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4927 EOF
4928
4929                 SHLIB_LIST="-ldl $SHLIB_LIST"
4930         else
4931                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4932         fi
4933         cat >>confdefs.h <<\EOF
4934 #define HAVE_LIBGPM 1
4935 EOF
4936
4937 echo "$as_me:4937: checking for Gpm_Wgetch in -lgpm" >&5
4938 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4939 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4940   echo $ECHO_N "(cached) $ECHO_C" >&6
4941 else
4942   ac_check_lib_save_LIBS=$LIBS
4943 LIBS="-lgpm  $LIBS"
4944 cat >conftest.$ac_ext <<_ACEOF
4945 #line 4945 "configure"
4946 #include "confdefs.h"
4947
4948 /* Override any gcc2 internal prototype to avoid an error.  */
4949 #ifdef __cplusplus
4950 extern "C"
4951 #endif
4952 /* We use char because int might match the return type of a gcc2
4953    builtin and then its argument prototype would still apply.  */
4954 char Gpm_Wgetch ();
4955 int
4956 main ()
4957 {
4958 Gpm_Wgetch ();
4959   ;
4960   return 0;
4961 }
4962 _ACEOF
4963 rm -f conftest.$ac_objext conftest$ac_exeext
4964 if { (eval echo "$as_me:4964: \"$ac_link\"") >&5
4965   (eval $ac_link) 2>&5
4966   ac_status=$?
4967   echo "$as_me:4967: \$? = $ac_status" >&5
4968   (exit $ac_status); } &&
4969          { ac_try='test -s conftest$ac_exeext'
4970   { (eval echo "$as_me:4970: \"$ac_try\"") >&5
4971   (eval $ac_try) 2>&5
4972   ac_status=$?
4973   echo "$as_me:4973: \$? = $ac_status" >&5
4974   (exit $ac_status); }; }; then
4975   ac_cv_lib_gpm_Gpm_Wgetch=yes
4976 else
4977   echo "$as_me: failed program was:" >&5
4978 cat conftest.$ac_ext >&5
4979 ac_cv_lib_gpm_Gpm_Wgetch=no
4980 fi
4981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4982 LIBS=$ac_check_lib_save_LIBS
4983 fi
4984 echo "$as_me:4984: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4985 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4986 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4987
4988 echo "$as_me:4988: checking if GPM is weakly bound to curses library" >&5
4989 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4990 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4991   echo $ECHO_N "(cached) $ECHO_C" >&6
4992 else
4993
4994 cf_cv_check_gpm_wgetch=unknown
4995 if test "$cross_compiling" != yes ; then
4996
4997 cat >conftest.$ac_ext <<CF_EOF
4998 #include <gpm.h>
4999 int main()
5000 {
5001         Gpm_Wgetch();
5002         ${cf_cv_main_return:-return}(0);
5003 }
5004 CF_EOF
5005
5006         cf_save_LIBS="$LIBS"
5007         # This only works if we can look at the symbol table.  If a shared
5008         # library is stripped for install, we cannot use that.  So we're forced
5009         # to rely on the static library, noting that some packagers may not
5010         # include it.
5011         LIBS="-static -lgpm -dynamic $LIBS"
5012         if { (eval echo "$as_me:5012: \"$ac_compile\"") >&5
5013   (eval $ac_compile) 2>&5
5014   ac_status=$?
5015   echo "$as_me:5015: \$? = $ac_status" >&5
5016   (exit $ac_status); } ; then
5017                 if { (eval echo "$as_me:5017: \"$ac_link\"") >&5
5018   (eval $ac_link) 2>&5
5019   ac_status=$?
5020   echo "$as_me:5020: \$? = $ac_status" >&5
5021   (exit $ac_status); } ; then
5022                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5023                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5024                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5025                 fi
5026         fi
5027         rm -f conftest*
5028         LIBS="$cf_save_LIBS"
5029 fi
5030
5031 fi
5032 echo "$as_me:5032: result: $cf_cv_check_gpm_wgetch" >&5
5033 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5034
5035 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5036         { echo "$as_me:5036: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5037 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5038 fi
5039
5040 fi
5041
5042 fi
5043
5044 # not everyone has "test -c"
5045 if test -c /dev/sysmouse 2>/dev/null ; then
5046 echo "$as_me:5046: checking if you want to use sysmouse" >&5
5047 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5048
5049 # Check whether --with-sysmouse or --without-sysmouse was given.
5050 if test "${with_sysmouse+set}" = set; then
5051   withval="$with_sysmouse"
5052   cf_with_sysmouse=$withval
5053 else
5054   cf_with_sysmouse=maybe
5055 fi;
5056         if test "$cf_with_sysmouse" != no ; then
5057         cat >conftest.$ac_ext <<_ACEOF
5058 #line 5058 "configure"
5059 #include "confdefs.h"
5060
5061 #include <osreldate.h>
5062 #if (__FreeBSD_version >= 400017)
5063 #include <sys/consio.h>
5064 #include <sys/fbio.h>
5065 #else
5066 #include <machine/console.h>
5067 #endif
5068
5069 int
5070 main ()
5071 {
5072
5073         struct mouse_info the_mouse;
5074         ioctl(0, CONS_MOUSECTL, &the_mouse);
5075
5076   ;
5077   return 0;
5078 }
5079 _ACEOF
5080 rm -f conftest.$ac_objext
5081 if { (eval echo "$as_me:5081: \"$ac_compile\"") >&5
5082   (eval $ac_compile) 2>&5
5083   ac_status=$?
5084   echo "$as_me:5084: \$? = $ac_status" >&5
5085   (exit $ac_status); } &&
5086          { ac_try='test -s conftest.$ac_objext'
5087   { (eval echo "$as_me:5087: \"$ac_try\"") >&5
5088   (eval $ac_try) 2>&5
5089   ac_status=$?
5090   echo "$as_me:5090: \$? = $ac_status" >&5
5091   (exit $ac_status); }; }; then
5092   cf_with_sysmouse=yes
5093 else
5094   echo "$as_me: failed program was:" >&5
5095 cat conftest.$ac_ext >&5
5096 cf_with_sysmouse=no
5097 fi
5098 rm -f conftest.$ac_objext conftest.$ac_ext
5099         fi
5100 echo "$as_me:5100: result: $cf_with_sysmouse" >&5
5101 echo "${ECHO_T}$cf_with_sysmouse" >&6
5102 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5103 #define USE_SYSMOUSE 1
5104 EOF
5105
5106 fi
5107
5108 if test X"$CC_G_OPT" = X"" ; then
5109         CC_G_OPT='-g'
5110         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5111 fi
5112
5113 if test X"$CXX_G_OPT" = X"" ; then
5114         CXX_G_OPT='-g'
5115         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5116 fi
5117
5118 echo "$as_me:5118: checking for default loader flags" >&5
5119 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5120 case $DFT_LWR_MODEL in
5121 libtool) LD_MODEL=''   ;;
5122 normal)  LD_MODEL=''   ;;
5123 debug)   LD_MODEL=$CC_G_OPT ;;
5124 profile) LD_MODEL='-pg';;
5125 shared)  LD_MODEL=''   ;;
5126 esac
5127 echo "$as_me:5127: result: $LD_MODEL" >&5
5128 echo "${ECHO_T}$LD_MODEL" >&6
5129
5130 case $DFT_LWR_MODEL in
5131 shared)
5132
5133 echo "$as_me:5133: checking if rpath option should be used" >&5
5134 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5135
5136 # Check whether --enable-rpath or --disable-rpath was given.
5137 if test "${enable_rpath+set}" = set; then
5138   enableval="$enable_rpath"
5139   cf_cv_ld_rpath=$enableval
5140 else
5141   cf_cv_ld_rpath=no
5142 fi;
5143 echo "$as_me:5143: result: $cf_cv_ld_rpath" >&5
5144 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5145
5146 echo "$as_me:5146: checking if shared libraries should be relinked during install" >&5
5147 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5148
5149 # Check whether --enable-relink or --disable-relink was given.
5150 if test "${enable_relink+set}" = set; then
5151   enableval="$enable_relink"
5152   cf_cv_do_relink=$enableval
5153 else
5154   cf_cv_do_relink=yes
5155 fi;
5156 echo "$as_me:5156: result: $cf_cv_do_relink" >&5
5157 echo "${ECHO_T}$cf_cv_do_relink" >&6
5158         ;;
5159 esac
5160
5161         LOCAL_LDFLAGS=
5162         LOCAL_LDFLAGS2=
5163         LD_RPATH_OPT=
5164         LD_SHARED_OPTS=
5165         INSTALL_LIB="-m 644"
5166
5167         cf_cv_do_symlinks=no
5168
5169         echo "$as_me:5169: checking if release/abi version should be used for shared libs" >&5
5170 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5171
5172 # Check whether --with-shlib-version or --without-shlib-version was given.
5173 if test "${with_shlib_version+set}" = set; then
5174   withval="$with_shlib_version"
5175   test -z "$withval" && withval=auto
5176         case $withval in #(vi
5177         yes) #(vi
5178                 cf_cv_shlib_version=auto
5179                 ;;
5180         rel|abi|auto|no) #(vi
5181                 cf_cv_shlib_version=$withval
5182                 ;;
5183         *)
5184                 { { echo "$as_me:5184: error: option value must be one of: rel, abi, auto or no" >&5
5185 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5186    { (exit 1); exit 1; }; }
5187                 ;;
5188         esac
5189
5190 else
5191   cf_cv_shlib_version=auto
5192 fi;
5193         echo "$as_me:5193: result: $cf_cv_shlib_version" >&5
5194 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5195
5196         cf_cv_rm_so_locs=no
5197
5198         # Some less-capable ports of gcc support only -fpic
5199         CC_SHARED_OPTS=
5200         if test "$GCC" = yes
5201         then
5202                 echo "$as_me:5202: checking which $CC option to use" >&5
5203 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5204                 cf_save_CFLAGS="$CFLAGS"
5205                 for CC_SHARED_OPTS in -fPIC -fpic ''
5206                 do
5207                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5208                         cat >conftest.$ac_ext <<_ACEOF
5209 #line 5209 "configure"
5210 #include "confdefs.h"
5211 #include <stdio.h>
5212 int
5213 main ()
5214 {
5215 int x = 1
5216   ;
5217   return 0;
5218 }
5219 _ACEOF
5220 rm -f conftest.$ac_objext
5221 if { (eval echo "$as_me:5221: \"$ac_compile\"") >&5
5222   (eval $ac_compile) 2>&5
5223   ac_status=$?
5224   echo "$as_me:5224: \$? = $ac_status" >&5
5225   (exit $ac_status); } &&
5226          { ac_try='test -s conftest.$ac_objext'
5227   { (eval echo "$as_me:5227: \"$ac_try\"") >&5
5228   (eval $ac_try) 2>&5
5229   ac_status=$?
5230   echo "$as_me:5230: \$? = $ac_status" >&5
5231   (exit $ac_status); }; }; then
5232   break
5233 else
5234   echo "$as_me: failed program was:" >&5
5235 cat conftest.$ac_ext >&5
5236 fi
5237 rm -f conftest.$ac_objext conftest.$ac_ext
5238                 done
5239                 echo "$as_me:5239: result: $CC_SHARED_OPTS" >&5
5240 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5241                 CFLAGS="$cf_save_CFLAGS"
5242         fi
5243
5244         cf_cv_shlib_version_infix=no
5245
5246         case $cf_cv_system_name in
5247         aix[56]*)
5248                 if test "$GCC" = yes; then
5249                         CC_SHARED_OPTS=
5250                         MK_SHARED_LIB="$(CC) -shared"
5251                 fi
5252                 ;;
5253         beos*)
5254                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5255                 ;;
5256         cygwin*)
5257                 CC_SHARED_OPTS=
5258                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5259                 cf_cv_shlib_version=cygdll
5260                 cf_cv_shlib_version_infix=cygdll
5261                 cat >mk_shared_lib.sh <<-CF_EOF
5262                 #!/bin/sh
5263                 SHARED_LIB=\$1
5264                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5265                 shift
5266                 cat <<-EOF
5267                 Linking shared library
5268                 ** SHARED_LIB \$SHARED_LIB
5269                 ** IMPORT_LIB \$IMPORT_LIB
5270 EOF
5271                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5272 CF_EOF
5273                 chmod +x mk_shared_lib.sh
5274                 ;;
5275         darwin*)
5276                 EXTRA_CFLAGS="-no-cpp-precomp"
5277                 CC_SHARED_OPTS="-dynamic"
5278                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5279                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5280                 cf_cv_shlib_version_infix=yes
5281                 echo "$as_me:5281: checking if ld -search_paths_first works" >&5
5282 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5283 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5284   echo $ECHO_N "(cached) $ECHO_C" >&6
5285 else
5286
5287                         cf_save_LDFLAGS=$LDFLAGS
5288                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5289                         cat >conftest.$ac_ext <<_ACEOF
5290 #line 5290 "configure"
5291 #include "confdefs.h"
5292
5293 int
5294 main ()
5295 {
5296 int i;
5297   ;
5298   return 0;
5299 }
5300 _ACEOF
5301 rm -f conftest.$ac_objext conftest$ac_exeext
5302 if { (eval echo "$as_me:5302: \"$ac_link\"") >&5
5303   (eval $ac_link) 2>&5
5304   ac_status=$?
5305   echo "$as_me:5305: \$? = $ac_status" >&5
5306   (exit $ac_status); } &&
5307          { ac_try='test -s conftest$ac_exeext'
5308   { (eval echo "$as_me:5308: \"$ac_try\"") >&5
5309   (eval $ac_try) 2>&5
5310   ac_status=$?
5311   echo "$as_me:5311: \$? = $ac_status" >&5
5312   (exit $ac_status); }; }; then
5313   cf_cv_ldflags_search_paths_first=yes
5314 else
5315   echo "$as_me: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 cf_cv_ldflags_search_paths_first=no
5318 fi
5319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5320                                 LDFLAGS=$cf_save_LDFLAGS
5321 fi
5322 echo "$as_me:5322: result: $cf_cv_ldflags_search_paths_first" >&5
5323 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5324                 if test $cf_cv_ldflags_search_paths_first = yes; then
5325                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5326                 fi
5327                 ;;
5328         hpux*)
5329                 # (tested with gcc 2.7.2 -- I don't have c89)
5330                 if test "$GCC" = yes; then
5331                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5332                 else
5333                         CC_SHARED_OPTS='+Z'
5334                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5335                 fi
5336                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5337                 # HP-UX shared libraries must be executable, and should be
5338                 # readonly to exploit a quirk in the memory manager.
5339                 INSTALL_LIB="-m 555"
5340                 ;;
5341         irix*)
5342                 if test "$cf_cv_ld_rpath" = yes ; then
5343                         if test "$GCC" = yes; then
5344                                 LD_RPATH_OPT="-Wl,-rpath,"
5345                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5346                         else
5347                                 LD_RPATH_OPT="-rpath "
5348                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5349                         fi
5350                 fi
5351                 # tested with IRIX 5.2 and 'cc'.
5352                 if test "$GCC" != yes; then
5353                         CC_SHARED_OPTS='-KPIC'
5354                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5355                 else
5356                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5357                 fi
5358                 cf_cv_rm_so_locs=yes
5359                 ;;
5360         linux*|gnu*|k*bsd*-gnu)
5361                 if test "$DFT_LWR_MODEL" = "shared" ; then
5362                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5363                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5364                 fi
5365                 if test "$cf_cv_ld_rpath" = yes ; then
5366                         LD_RPATH_OPT="-Wl,-rpath,"
5367                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5368                 fi
5369
5370         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5371         if test "$cf_cv_shlib_version" = rel; then
5372                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5373         else
5374                 cf_cv_shared_soname='`basename $@`'
5375         fi
5376
5377                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5378                 ;;
5379         openbsd[2-9].*)
5380                 if test "$DFT_LWR_MODEL" = "shared" ; then
5381                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5382                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5383                 fi
5384                 if test "$cf_cv_ld_rpath" = yes ; then
5385                         LD_RPATH_OPT="-Wl,-rpath,"
5386                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5387                 fi
5388                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5389
5390         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5391         if test "$cf_cv_shlib_version" = rel; then
5392                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5393         else
5394                 cf_cv_shared_soname='`basename $@`'
5395         fi
5396
5397                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5398                 ;;
5399         nto-qnx*|openbsd*|freebsd[12].*)
5400                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5401                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5402                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5403                 ;;
5404         freebsd*)
5405                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5406                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5407                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5408                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5409                         LD_RPATH_OPT="-rpath "
5410                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5411                 fi
5412
5413         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5414         if test "$cf_cv_shlib_version" = rel; then
5415                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5416         else
5417                 cf_cv_shared_soname='`basename $@`'
5418         fi
5419
5420                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5421                 ;;
5422         netbsd*)
5423                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5424                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5425                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5426                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5427                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5428                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5429                         if test "$cf_cv_shlib_version" = auto; then
5430                         if test -f /usr/libexec/ld.elf_so; then
5431                                 cf_cv_shlib_version=abi
5432                         else
5433                                 cf_cv_shlib_version=rel
5434                         fi
5435                         fi
5436
5437         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5438         if test "$cf_cv_shlib_version" = rel; then
5439                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5440         else
5441                 cf_cv_shared_soname='`basename $@`'
5442         fi
5443
5444                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5445                 else
5446                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5447                 fi
5448                 ;;
5449         osf*|mls+*)
5450                 # tested with OSF/1 V3.2 and 'cc'
5451                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5452                 # link with shared libs).
5453                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5454                 case $host_os in
5455                 osf4*)
5456                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5457                         ;;
5458                 esac
5459                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5460                 if test "$DFT_LWR_MODEL" = "shared" ; then
5461                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5462                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5463                 fi
5464                 if test "$cf_cv_ld_rpath" = yes ; then
5465                         LD_RPATH_OPT="-rpath"
5466                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5467                 fi
5468                 cf_cv_rm_so_locs=yes
5469                 ;;
5470         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5471                 # tested with osr5.0.5
5472                 if test "$GCC" != yes; then
5473                         CC_SHARED_OPTS='-belf -KPIC'
5474                 fi
5475                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5476                 if test "$cf_cv_ld_rpath" = yes ; then
5477                         # only way is to set LD_RUN_PATH but no switch for it
5478                         RUN_PATH=$libdir
5479                 fi
5480                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5481                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5482                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5483                 ;;
5484         sunos4*)
5485                 # tested with SunOS 4.1.1 and gcc 2.7.0
5486                 if test "$GCC" != yes; then
5487                         CC_SHARED_OPTS='-KPIC'
5488                 fi
5489                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5490                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5491                 ;;
5492         solaris2*)
5493                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5494                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5495                 if test "$DFT_LWR_MODEL" = "shared" ; then
5496                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5497                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5498                 fi
5499                 if test "$cf_cv_ld_rpath" = yes ; then
5500                         LD_RPATH_OPT="-R"
5501                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5502                 fi
5503
5504         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5505         if test "$cf_cv_shlib_version" = rel; then
5506                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5507         else
5508                 cf_cv_shared_soname='`basename $@`'
5509         fi
5510
5511                 if test "$GCC" != yes; then
5512                         cf_save_CFLAGS="$CFLAGS"
5513                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5514                         do
5515                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5516                                 cat >conftest.$ac_ext <<_ACEOF
5517 #line 5517 "configure"
5518 #include "confdefs.h"
5519 #include <stdio.h>
5520 int
5521 main ()
5522 {
5523 printf("Hello\n");
5524   ;
5525   return 0;
5526 }
5527 _ACEOF
5528 rm -f conftest.$ac_objext
5529 if { (eval echo "$as_me:5529: \"$ac_compile\"") >&5
5530   (eval $ac_compile) 2>&5
5531   ac_status=$?
5532   echo "$as_me:5532: \$? = $ac_status" >&5
5533   (exit $ac_status); } &&
5534          { ac_try='test -s conftest.$ac_objext'
5535   { (eval echo "$as_me:5535: \"$ac_try\"") >&5
5536   (eval $ac_try) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); }; }; then
5540   break
5541 else
5542   echo "$as_me: failed program was:" >&5
5543 cat conftest.$ac_ext >&5
5544 fi
5545 rm -f conftest.$ac_objext conftest.$ac_ext
5546                         done
5547                         CFLAGS="$cf_save_CFLAGS"
5548                         CC_SHARED_OPTS=$cf_shared_opts
5549                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5550                 else
5551                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5552                 fi
5553                 ;;
5554         sysv5uw7*|unix_sv*)
5555                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5556                 if test "$GCC" != yes; then
5557                         CC_SHARED_OPTS='-KPIC'
5558                 fi
5559                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5560                 ;;
5561         *)
5562                 CC_SHARED_OPTS='unknown'
5563                 MK_SHARED_LIB='echo unknown'
5564                 ;;
5565         esac
5566
5567         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5568         case "$cf_cv_shlib_version" in #(vi
5569         rel|abi)
5570                 case "$MK_SHARED_LIB" in #(vi
5571                 *'-o $@')
5572                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5573                         ;;
5574                 *)
5575                         { echo "$as_me:5575: WARNING: ignored --with-shlib-version" >&5
5576 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5577                         ;;
5578                 esac
5579                 ;;
5580         esac
5581
5582         if test -n "$LD_RPATH_OPT" ; then
5583                 echo "$as_me:5583: checking if we need a space after rpath option" >&5
5584 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5585                 cf_save_LIBS="$LIBS"
5586                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5587                 cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590
5591 int
5592 main ()
5593 {
5594
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 rm -f conftest.$ac_objext conftest$ac_exeext
5600 if { (eval echo "$as_me:5600: \"$ac_link\"") >&5
5601   (eval $ac_link) 2>&5
5602   ac_status=$?
5603   echo "$as_me:5603: \$? = $ac_status" >&5
5604   (exit $ac_status); } &&
5605          { ac_try='test -s conftest$ac_exeext'
5606   { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607   (eval $ac_try) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); }; }; then
5611   cf_rpath_space=no
5612 else
5613   echo "$as_me: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 cf_rpath_space=yes
5616 fi
5617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618                 LIBS="$cf_save_LIBS"
5619                 echo "$as_me:5619: result: $cf_rpath_space" >&5
5620 echo "${ECHO_T}$cf_rpath_space" >&6
5621                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5622                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5623         fi
5624
5625 if test "$CC_SHARED_OPTS" = "unknown"; then
5626         for model in $cf_list_models; do
5627                 if test "$model" = "shared"; then
5628                         { { echo "$as_me:5628: error: Shared libraries are not supported in this version" >&5
5629 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5630    { (exit 1); exit 1; }; }
5631                 fi
5632         done
5633 fi
5634
5635 ###############################################################################
5636
5637 ###     use option --disable-overwrite to leave out the link to -lcurses
5638 echo "$as_me:5638: checking if you wish to install ncurses overwriting curses" >&5
5639 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5640
5641 # Check whether --enable-overwrite or --disable-overwrite was given.
5642 if test "${enable_overwrite+set}" = set; then
5643   enableval="$enable_overwrite"
5644   with_overwrite=$enableval
5645 else
5646   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5647 fi;
5648 echo "$as_me:5648: result: $with_overwrite" >&5
5649 echo "${ECHO_T}$with_overwrite" >&6
5650
5651 echo "$as_me:5651: checking if external terminfo-database is used" >&5
5652 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5653
5654 # Check whether --enable-database or --disable-database was given.
5655 if test "${enable_database+set}" = set; then
5656   enableval="$enable_database"
5657   use_database=$enableval
5658 else
5659   use_database=yes
5660 fi;
5661 echo "$as_me:5661: result: $use_database" >&5
5662 echo "${ECHO_T}$use_database" >&6
5663
5664 case $host_os in #(vi
5665 os2*) #(vi
5666         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5667         ;;
5668 *) #(vi
5669         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5670         ;;
5671 esac
5672
5673         case $cf_cv_system_name in
5674         os2*)   PATH_SEPARATOR=';'  ;;
5675         *)      PATH_SEPARATOR=':'  ;;
5676         esac
5677
5678 if test "$use_database" != no ; then
5679         cat >>confdefs.h <<\EOF
5680 #define USE_DATABASE 1
5681 EOF
5682
5683         echo "$as_me:5683: checking which terminfo source-file will be installed" >&5
5684 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5685
5686 # Check whether --enable-database or --disable-database was given.
5687 if test "${enable_database+set}" = set; then
5688   enableval="$enable_database"
5689   TERMINFO_SRC=$withval
5690 fi;
5691         echo "$as_me:5691: result: $TERMINFO_SRC" >&5
5692 echo "${ECHO_T}$TERMINFO_SRC" >&6
5693
5694         echo "$as_me:5694: checking whether to use hashed database instead of directory/tree" >&5
5695 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5696
5697 # Check whether --with-hashed-db or --without-hashed-db was given.
5698 if test "${with_hashed_db+set}" = set; then
5699   withval="$with_hashed_db"
5700
5701 else
5702   with_hashed_db=no
5703 fi;
5704         echo "$as_me:5704: result: $with_hashed_db" >&5
5705 echo "${ECHO_T}$with_hashed_db" >&6
5706 else
5707         with_hashed_db=no
5708 fi
5709
5710 echo "$as_me:5710: checking for list of fallback descriptions" >&5
5711 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5712
5713 # Check whether --with-fallbacks or --without-fallbacks was given.
5714 if test "${with_fallbacks+set}" = set; then
5715   withval="$with_fallbacks"
5716   with_fallback=$withval
5717 else
5718   with_fallback=
5719 fi;
5720 echo "$as_me:5720: result: $with_fallback" >&5
5721 echo "${ECHO_T}$with_fallback" >&6
5722 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5723
5724 echo "$as_me:5724: checking if you want modern xterm or antique" >&5
5725 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5726
5727 # Check whether --with-xterm-new or --without-xterm-new was given.
5728 if test "${with_xterm_new+set}" = set; then
5729   withval="$with_xterm_new"
5730   with_xterm_new=$withval
5731 else
5732   with_xterm_new=yes
5733 fi;
5734 case $with_xterm_new in
5735 no)     with_xterm_new=xterm-old;;
5736 *)      with_xterm_new=xterm-new;;
5737 esac
5738 echo "$as_me:5738: result: $with_xterm_new" >&5
5739 echo "${ECHO_T}$with_xterm_new" >&6
5740 WHICH_XTERM=$with_xterm_new
5741
5742 MAKE_TERMINFO=
5743 if test "$use_database" = no ; then
5744         TERMINFO="${datadir}/terminfo"
5745         MAKE_TERMINFO="#"
5746 else
5747
5748 echo "$as_me:5748: checking for list of terminfo directories" >&5
5749 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5750
5751 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5752 if test "${with_terminfo_dirs+set}" = set; then
5753   withval="$with_terminfo_dirs"
5754
5755 else
5756   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5757 fi;
5758 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5759 cf_dst_path=
5760 for cf_src_path in $withval
5761 do
5762
5763 if test "x$prefix" != xNONE; then
5764   cf_path_syntax="$prefix"
5765 else
5766   cf_path_syntax="$ac_default_prefix"
5767 fi
5768
5769 case ".$cf_src_path" in #(vi
5770 .\$\(*\)*|.\'*\'*) #(vi
5771   ;;
5772 ..|./*|.\\*) #(vi
5773   ;;
5774 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5775   ;;
5776 .\${*prefix}*) #(vi
5777   eval cf_src_path="$cf_src_path"
5778   case ".$cf_src_path" in #(vi
5779   .NONE/*)
5780     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5781     ;;
5782   esac
5783   ;; #(vi
5784 .no|.NONE/*)
5785   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5786   ;;
5787 *)
5788   { { echo "$as_me:5788: error: expected a pathname, not \"$cf_src_path\"" >&5
5789 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5790    { (exit 1); exit 1; }; }
5791   ;;
5792 esac
5793
5794   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5795   cf_dst_path="${cf_dst_path}${cf_src_path}"
5796 done
5797 IFS="$ac_save_ifs"
5798
5799 eval 'TERMINFO_DIRS="$cf_dst_path"'
5800
5801 echo "$as_me:5801: result: $TERMINFO_DIRS" >&5
5802 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5803 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5804 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5805 EOF
5806
5807 echo "$as_me:5807: checking for default terminfo directory" >&5
5808 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5809
5810 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5811 if test "${with_default_terminfo_dir+set}" = set; then
5812   withval="$with_default_terminfo_dir"
5813
5814 else
5815   withval="${TERMINFO-${datadir}/terminfo}"
5816 fi; if test -n "${datadir}/terminfo" ; then
5817
5818 if test "x$prefix" != xNONE; then
5819   cf_path_syntax="$prefix"
5820 else
5821   cf_path_syntax="$ac_default_prefix"
5822 fi
5823
5824 case ".$withval" in #(vi
5825 .\$\(*\)*|.\'*\'*) #(vi
5826   ;;
5827 ..|./*|.\\*) #(vi
5828   ;;
5829 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5830   ;;
5831 .\${*prefix}*) #(vi
5832   eval withval="$withval"
5833   case ".$withval" in #(vi
5834   .NONE/*)
5835     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5836     ;;
5837   esac
5838   ;; #(vi
5839 .no|.NONE/*)
5840   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5841   ;;
5842 *)
5843   { { echo "$as_me:5843: error: expected a pathname, not \"$withval\"" >&5
5844 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5845    { (exit 1); exit 1; }; }
5846   ;;
5847 esac
5848
5849 fi
5850 TERMINFO="$withval"
5851
5852 echo "$as_me:5852: result: $TERMINFO" >&5
5853 echo "${ECHO_T}$TERMINFO" >&6
5854 cat >>confdefs.h <<EOF
5855 #define TERMINFO "$TERMINFO"
5856 EOF
5857
5858 fi
5859
5860 ###     use option --disable-big-core to make tic run on small machines
5861 ###     We need 4Mb, check if we can allocate 50% more than that.
5862 echo "$as_me:5862: checking if big-core option selected" >&5
5863 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5864
5865 # Check whether --enable-big-core or --disable-big-core was given.
5866 if test "${enable_big_core+set}" = set; then
5867   enableval="$enable_big_core"
5868   with_big_core=$enableval
5869 else
5870   if test "$cross_compiling" = yes; then
5871   with_big_core=no
5872 else
5873   cat >conftest.$ac_ext <<_ACEOF
5874 #line 5874 "configure"
5875 #include "confdefs.h"
5876
5877 #include <stdlib.h>
5878 #include <string.h>
5879 int main() {
5880         unsigned long n = 6000000L;
5881         char *s = malloc(n);
5882         if (s != 0)
5883                 s[0] = s[n-1] = 0;
5884         ${cf_cv_main_return:-return}(s == 0);
5885 }
5886 _ACEOF
5887 rm -f conftest$ac_exeext
5888 if { (eval echo "$as_me:5888: \"$ac_link\"") >&5
5889   (eval $ac_link) 2>&5
5890   ac_status=$?
5891   echo "$as_me:5891: \$? = $ac_status" >&5
5892   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5893   { (eval echo "$as_me:5893: \"$ac_try\"") >&5
5894   (eval $ac_try) 2>&5
5895   ac_status=$?
5896   echo "$as_me:5896: \$? = $ac_status" >&5
5897   (exit $ac_status); }; }; then
5898   with_big_core=yes
5899 else
5900   echo "$as_me: program exited with status $ac_status" >&5
5901 echo "$as_me: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 with_big_core=no
5904 fi
5905 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5906 fi
5907 fi;
5908 echo "$as_me:5908: result: $with_big_core" >&5
5909 echo "${ECHO_T}$with_big_core" >&6
5910 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5911 #define HAVE_BIG_CORE 1
5912 EOF
5913
5914 ### ISO C only guarantees 512-char strings, we have tables which load faster
5915 ### when constructed using "big" strings.  More than the C compiler, the awk
5916 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5917 echo "$as_me:5917: checking if big-strings option selected" >&5
5918 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5919
5920 # Check whether --enable-big-strings or --disable-big-strings was given.
5921 if test "${enable_big_strings+set}" = set; then
5922   enableval="$enable_big_strings"
5923   with_big_strings=$enableval
5924 else
5925
5926         case x$AWK in #(vi
5927         x)
5928                 eval with_big_strings=no
5929                 ;;
5930         *) #(vi
5931                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5932                         | $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
5933                         eval with_big_strings=yes
5934                 else
5935                         eval with_big_strings=no
5936                 fi
5937                 ;;
5938         esac
5939
5940 fi;
5941 echo "$as_me:5941: result: $with_big_strings" >&5
5942 echo "${ECHO_T}$with_big_strings" >&6
5943
5944 USE_BIG_STRINGS=0
5945 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5946
5947 ###     use option --enable-termcap to compile in the termcap fallback support
5948 echo "$as_me:5948: checking if you want termcap-fallback support" >&5
5949 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5950
5951 # Check whether --enable-termcap or --disable-termcap was given.
5952 if test "${enable_termcap+set}" = set; then
5953   enableval="$enable_termcap"
5954   with_termcap=$enableval
5955 else
5956   with_termcap=no
5957 fi;
5958 echo "$as_me:5958: result: $with_termcap" >&5
5959 echo "${ECHO_T}$with_termcap" >&6
5960
5961 if test "$with_termcap" != "yes" ; then
5962         if test "$use_database" = no ; then
5963                 if test -z "$with_fallback" ; then
5964                         { { echo "$as_me:5964: error: You have disabled the database w/o specifying fallbacks" >&5
5965 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5966    { (exit 1); exit 1; }; }
5967                 fi
5968         fi
5969         cat >>confdefs.h <<\EOF
5970 #define PURE_TERMINFO 1
5971 EOF
5972
5973 else
5974
5975 if test "$with_ticlib" != no ; then
5976         { { echo "$as_me:5976: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5977 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5978    { (exit 1); exit 1; }; }
5979 fi
5980
5981 cat >>confdefs.h <<\EOF
5982 #define USE_TERMCAP 1
5983 EOF
5984
5985 echo "$as_me:5985: checking for list of termcap files" >&5
5986 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5987
5988 # Check whether --with-termpath or --without-termpath was given.
5989 if test "${with_termpath+set}" = set; then
5990   withval="$with_termpath"
5991
5992 else
5993   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5994 fi;
5995 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5996 cf_dst_path=
5997 for cf_src_path in $withval
5998 do
5999
6000 if test "x$prefix" != xNONE; then
6001   cf_path_syntax="$prefix"
6002 else
6003   cf_path_syntax="$ac_default_prefix"
6004 fi
6005
6006 case ".$cf_src_path" in #(vi
6007 .\$\(*\)*|.\'*\'*) #(vi
6008   ;;
6009 ..|./*|.\\*) #(vi
6010   ;;
6011 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6012   ;;
6013 .\${*prefix}*) #(vi
6014   eval cf_src_path="$cf_src_path"
6015   case ".$cf_src_path" in #(vi
6016   .NONE/*)
6017     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6018     ;;
6019   esac
6020   ;; #(vi
6021 .no|.NONE/*)
6022   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6023   ;;
6024 *)
6025   { { echo "$as_me:6025: error: expected a pathname, not \"$cf_src_path\"" >&5
6026 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6027    { (exit 1); exit 1; }; }
6028   ;;
6029 esac
6030
6031   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6032   cf_dst_path="${cf_dst_path}${cf_src_path}"
6033 done
6034 IFS="$ac_save_ifs"
6035
6036 eval 'TERMPATH="$cf_dst_path"'
6037
6038 echo "$as_me:6038: result: $TERMPATH" >&5
6039 echo "${ECHO_T}$TERMPATH" >&6
6040 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6041 #define TERMPATH "$TERMPATH"
6042 EOF
6043
6044 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6045 echo "$as_me:6045: checking if fast termcap-loader is needed" >&5
6046 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6047
6048 # Check whether --enable-getcap or --disable-getcap was given.
6049 if test "${enable_getcap+set}" = set; then
6050   enableval="$enable_getcap"
6051   with_getcap=$enableval
6052 else
6053   with_getcap=no
6054 fi;
6055 echo "$as_me:6055: result: $with_getcap" >&5
6056 echo "${ECHO_T}$with_getcap" >&6
6057 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6058 #define USE_GETCAP 1
6059 EOF
6060
6061 echo "$as_me:6061: checking if translated termcaps will be cached in ~/.terminfo" >&5
6062 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6063
6064 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6065 if test "${enable_getcap_cache+set}" = set; then
6066   enableval="$enable_getcap_cache"
6067   with_getcap_cache=$enableval
6068 else
6069   with_getcap_cache=no
6070 fi;
6071 echo "$as_me:6071: result: $with_getcap_cache" >&5
6072 echo "${ECHO_T}$with_getcap_cache" >&6
6073 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6074 #define USE_GETCAP_CACHE 1
6075 EOF
6076
6077 fi
6078
6079 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6080 echo "$as_me:6080: checking if ~/.terminfo is wanted" >&5
6081 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6082
6083 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6084 if test "${enable_home_terminfo+set}" = set; then
6085   enableval="$enable_home_terminfo"
6086   with_home_terminfo=$enableval
6087 else
6088   with_home_terminfo=yes
6089 fi;
6090 echo "$as_me:6090: result: $with_home_terminfo" >&5
6091 echo "${ECHO_T}$with_home_terminfo" >&6
6092 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6093 #define USE_HOME_TERMINFO 1
6094 EOF
6095
6096 echo "$as_me:6096: checking if you want to use restricted environment when running as root" >&5
6097 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6098
6099 # Check whether --enable-root-environ or --disable-root-environ was given.
6100 if test "${enable_root_environ+set}" = set; then
6101   enableval="$enable_root_environ"
6102   with_root_environ=$enableval
6103 else
6104   with_root_environ=yes
6105 fi;
6106 echo "$as_me:6106: result: $with_root_environ" >&5
6107 echo "${ECHO_T}$with_root_environ" >&6
6108 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6109 #define USE_ROOT_ENVIRON 1
6110 EOF
6111
6112 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6113 ###   to reduce storage requirements for the terminfo database.
6114
6115 for ac_func in \
6116         remove \
6117         unlink
6118 do
6119 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6120 echo "$as_me:6120: checking for $ac_func" >&5
6121 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6122 if eval "test \"\${$as_ac_var+set}\" = set"; then
6123   echo $ECHO_N "(cached) $ECHO_C" >&6
6124 else
6125   cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6128 /* System header to define __stub macros and hopefully few prototypes,
6129     which can conflict with char $ac_func (); below.  */
6130 #include <assert.h>
6131 /* Override any gcc2 internal prototype to avoid an error.  */
6132 #ifdef __cplusplus
6133 extern "C"
6134 #endif
6135 /* We use char because int might match the return type of a gcc2
6136    builtin and then its argument prototype would still apply.  */
6137 char $ac_func ();
6138 char (*f) ();
6139
6140 int
6141 main ()
6142 {
6143 /* The GNU C library defines this for functions which it implements
6144     to always fail with ENOSYS.  Some functions are actually named
6145     something starting with __ and the normal name is an alias.  */
6146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6147 choke me
6148 #else
6149 f = $ac_func;
6150 #endif
6151
6152   ;
6153   return 0;
6154 }
6155 _ACEOF
6156 rm -f conftest.$ac_objext conftest$ac_exeext
6157 if { (eval echo "$as_me:6157: \"$ac_link\"") >&5
6158   (eval $ac_link) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); } &&
6162          { ac_try='test -s conftest$ac_exeext'
6163   { (eval echo "$as_me:6163: \"$ac_try\"") >&5
6164   (eval $ac_try) 2>&5
6165   ac_status=$?
6166   echo "$as_me:6166: \$? = $ac_status" >&5
6167   (exit $ac_status); }; }; then
6168   eval "$as_ac_var=yes"
6169 else
6170   echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 eval "$as_ac_var=no"
6173 fi
6174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6175 fi
6176 echo "$as_me:6176: result: `eval echo '${'$as_ac_var'}'`" >&5
6177 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6178 if test `eval echo '${'$as_ac_var'}'` = yes; then
6179   cat >>confdefs.h <<EOF
6180 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6181 EOF
6182
6183 fi
6184 done
6185
6186 if test "$cross_compiling" = yes ; then
6187
6188 for ac_func in \
6189                 link \
6190                 symlink
6191 do
6192 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6193 echo "$as_me:6193: checking for $ac_func" >&5
6194 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6195 if eval "test \"\${$as_ac_var+set}\" = set"; then
6196   echo $ECHO_N "(cached) $ECHO_C" >&6
6197 else
6198   cat >conftest.$ac_ext <<_ACEOF
6199 #line 6199 "configure"
6200 #include "confdefs.h"
6201 /* System header to define __stub macros and hopefully few prototypes,
6202     which can conflict with char $ac_func (); below.  */
6203 #include <assert.h>
6204 /* Override any gcc2 internal prototype to avoid an error.  */
6205 #ifdef __cplusplus
6206 extern "C"
6207 #endif
6208 /* We use char because int might match the return type of a gcc2
6209    builtin and then its argument prototype would still apply.  */
6210 char $ac_func ();
6211 char (*f) ();
6212
6213 int
6214 main ()
6215 {
6216 /* The GNU C library defines this for functions which it implements
6217     to always fail with ENOSYS.  Some functions are actually named
6218     something starting with __ and the normal name is an alias.  */
6219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6220 choke me
6221 #else
6222 f = $ac_func;
6223 #endif
6224
6225   ;
6226   return 0;
6227 }
6228 _ACEOF
6229 rm -f conftest.$ac_objext conftest$ac_exeext
6230 if { (eval echo "$as_me:6230: \"$ac_link\"") >&5
6231   (eval $ac_link) 2>&5
6232   ac_status=$?
6233   echo "$as_me:6233: \$? = $ac_status" >&5
6234   (exit $ac_status); } &&
6235          { ac_try='test -s conftest$ac_exeext'
6236   { (eval echo "$as_me:6236: \"$ac_try\"") >&5
6237   (eval $ac_try) 2>&5
6238   ac_status=$?
6239   echo "$as_me:6239: \$? = $ac_status" >&5
6240   (exit $ac_status); }; }; then
6241   eval "$as_ac_var=yes"
6242 else
6243   echo "$as_me: failed program was:" >&5
6244 cat conftest.$ac_ext >&5
6245 eval "$as_ac_var=no"
6246 fi
6247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6248 fi
6249 echo "$as_me:6249: result: `eval echo '${'$as_ac_var'}'`" >&5
6250 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6251 if test `eval echo '${'$as_ac_var'}'` = yes; then
6252   cat >>confdefs.h <<EOF
6253 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6254 EOF
6255
6256 fi
6257 done
6258
6259 else
6260         echo "$as_me:6260: checking if link/symlink functions work" >&5
6261 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6262 if test "${cf_cv_link_funcs+set}" = set; then
6263   echo $ECHO_N "(cached) $ECHO_C" >&6
6264 else
6265
6266                 cf_cv_link_funcs=
6267                 for cf_func in link symlink ; do
6268                         if test "$cross_compiling" = yes; then
6269
6270                         eval 'ac_cv_func_'$cf_func'=error'
6271 else
6272   cat >conftest.$ac_ext <<_ACEOF
6273 #line 6273 "configure"
6274 #include "confdefs.h"
6275
6276 #include <sys/types.h>
6277 #include <sys/stat.h>
6278 #ifdef HAVE_UNISTD_H
6279 #include <unistd.h>
6280 #endif
6281 int main()
6282 {
6283         int fail = 0;
6284         char *src = "config.log";
6285         char *dst = "conftest.chk";
6286         struct stat src_sb;
6287         struct stat dst_sb;
6288
6289         stat(src, &src_sb);
6290         fail = ($cf_func("config.log", "conftest.chk") < 0)
6291             || (stat(dst, &dst_sb) < 0)
6292             || (dst_sb.st_mtime != src_sb.st_mtime);
6293 #ifdef HAVE_UNLINK
6294         unlink(dst);
6295 #else
6296         remove(dst);
6297 #endif
6298         ${cf_cv_main_return:-return} (fail);
6299 }
6300
6301 _ACEOF
6302 rm -f conftest$ac_exeext
6303 if { (eval echo "$as_me:6303: \"$ac_link\"") >&5
6304   (eval $ac_link) 2>&5
6305   ac_status=$?
6306   echo "$as_me:6306: \$? = $ac_status" >&5
6307   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6308   { (eval echo "$as_me:6308: \"$ac_try\"") >&5
6309   (eval $ac_try) 2>&5
6310   ac_status=$?
6311   echo "$as_me:6311: \$? = $ac_status" >&5
6312   (exit $ac_status); }; }; then
6313
6314                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6315                         eval 'ac_cv_func_'$cf_func'=yes'
6316 else
6317   echo "$as_me: program exited with status $ac_status" >&5
6318 echo "$as_me: failed program was:" >&5
6319 cat conftest.$ac_ext >&5
6320
6321                         eval 'ac_cv_func_'$cf_func'=no'
6322 fi
6323 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6324 fi
6325                 done
6326                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6327
6328 fi
6329 echo "$as_me:6329: result: $cf_cv_link_funcs" >&5
6330 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6331         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6332 #define HAVE_LINK 1
6333 EOF
6334
6335         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6336 #define HAVE_SYMLINK 1
6337 EOF
6338
6339 fi
6340
6341 with_links=no
6342 with_symlinks=no
6343
6344 # soft links (symbolic links) are useful for some systems where hard links do
6345 # not work, or to make it simpler to copy terminfo trees around.
6346 if test "$ac_cv_func_symlink" = yes ; then
6347     echo "$as_me:6347: checking if tic should use symbolic links" >&5
6348 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6349
6350 # Check whether --enable-symlinks or --disable-symlinks was given.
6351 if test "${enable_symlinks+set}" = set; then
6352   enableval="$enable_symlinks"
6353   with_symlinks=$enableval
6354 else
6355   with_symlinks=no
6356 fi;
6357     echo "$as_me:6357: result: $with_symlinks" >&5
6358 echo "${ECHO_T}$with_symlinks" >&6
6359 fi
6360
6361 # If we have hard links and did not choose to use soft links instead, there is
6362 # no reason to make this choice optional - use the hard links.
6363 if test "$with_symlinks" = no ; then
6364     echo "$as_me:6364: checking if tic should use hard links" >&5
6365 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6366     if test "$ac_cv_func_link" = yes ; then
6367         with_links=yes
6368     else
6369         with_links=no
6370     fi
6371     echo "$as_me:6371: result: $with_links" >&5
6372 echo "${ECHO_T}$with_links" >&6
6373 fi
6374
6375 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6376 #define USE_LINKS 1
6377 EOF
6378
6379 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6380 #define USE_SYMLINKS 1
6381 EOF
6382
6383 ###   use option --enable-broken-linker to force on use of broken-linker support
6384 echo "$as_me:6384: checking if you want broken-linker support code" >&5
6385 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6386
6387 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6388 if test "${enable_broken_linker+set}" = set; then
6389   enableval="$enable_broken_linker"
6390   with_broken_linker=$enableval
6391 else
6392   with_broken_linker=${BROKEN_LINKER-no}
6393 fi;
6394 echo "$as_me:6394: result: $with_broken_linker" >&5
6395 echo "${ECHO_T}$with_broken_linker" >&6
6396
6397 BROKEN_LINKER=0
6398 if test "$with_broken_linker" = yes ; then
6399         cat >>confdefs.h <<\EOF
6400 #define BROKEN_LINKER 1
6401 EOF
6402
6403         BROKEN_LINKER=1
6404 elif test "$DFT_LWR_MODEL" = shared ; then
6405         case $cf_cv_system_name in #(vi
6406         cygwin*)
6407                 cat >>confdefs.h <<\EOF
6408 #define BROKEN_LINKER 1
6409 EOF
6410
6411                 BROKEN_LINKER=1
6412                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6413
6414 echo "${as_me-configure}:6414: testing cygwin linker is broken anyway ..." 1>&5
6415
6416                 ;;
6417         esac
6418 fi
6419
6420 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6421 echo "$as_me:6421: checking if tputs should process BSD-style prefix padding" >&5
6422 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6423
6424 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6425 if test "${enable_bsdpad+set}" = set; then
6426   enableval="$enable_bsdpad"
6427   with_bsdpad=$enableval
6428 else
6429   with_bsdpad=no
6430 fi;
6431 echo "$as_me:6431: result: $with_bsdpad" >&5
6432 echo "${ECHO_T}$with_bsdpad" >&6
6433 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6434 #define BSD_TPUTS 1
6435 EOF
6436
6437 ###   use option --enable-widec to turn on use of wide-character support
6438 NCURSES_CH_T=chtype
6439 NCURSES_LIBUTF8=0
6440
6441 NEED_WCHAR_H=0
6442 NCURSES_MBSTATE_T=0
6443 NCURSES_WCHAR_T=0
6444 NCURSES_WINT_T=0
6445
6446 # Check to define _XOPEN_SOURCE "automatically"
6447
6448 echo "$as_me:6448: checking if $CC -U and -D options work together" >&5
6449 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6450 if test "${cf_cv_cc_u_d_options+set}" = set; then
6451   echo $ECHO_N "(cached) $ECHO_C" >&6
6452 else
6453
6454         cf_save_CPPFLAGS="$CPPFLAGS"
6455         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6456         cat >conftest.$ac_ext <<_ACEOF
6457 #line 6457 "configure"
6458 #include "confdefs.h"
6459
6460 int
6461 main ()
6462 {
6463
6464 #ifndef U_D_OPTIONS
6465 make an undefined-error
6466 #endif
6467 #ifdef  D_U_OPTIONS
6468 make a defined-error
6469 #endif
6470
6471   ;
6472   return 0;
6473 }
6474 _ACEOF
6475 rm -f conftest.$ac_objext
6476 if { (eval echo "$as_me:6476: \"$ac_compile\"") >&5
6477   (eval $ac_compile) 2>&5
6478   ac_status=$?
6479   echo "$as_me:6479: \$? = $ac_status" >&5
6480   (exit $ac_status); } &&
6481          { ac_try='test -s conftest.$ac_objext'
6482   { (eval echo "$as_me:6482: \"$ac_try\"") >&5
6483   (eval $ac_try) 2>&5
6484   ac_status=$?
6485   echo "$as_me:6485: \$? = $ac_status" >&5
6486   (exit $ac_status); }; }; then
6487
6488         cf_cv_cc_u_d_options=yes
6489 else
6490   echo "$as_me: failed program was:" >&5
6491 cat conftest.$ac_ext >&5
6492
6493         cf_cv_cc_u_d_options=no
6494 fi
6495 rm -f conftest.$ac_objext conftest.$ac_ext
6496         CPPFLAGS="$cf_save_CPPFLAGS"
6497
6498 fi
6499 echo "$as_me:6499: result: $cf_cv_cc_u_d_options" >&5
6500 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6501
6502 cf_XOPEN_SOURCE=500
6503 cf_POSIX_C_SOURCE=199506L
6504
6505 case $host_os in #(vi
6506 aix[456]*) #(vi
6507         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6508         ;;
6509 freebsd*|dragonfly*) #(vi
6510         # 5.x headers associate
6511         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6512         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6513         cf_POSIX_C_SOURCE=200112L
6514         cf_XOPEN_SOURCE=600
6515         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6516         ;;
6517 hpux*) #(vi
6518         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6519         ;;
6520 irix[56].*) #(vi
6521         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6522         ;;
6523 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6524
6525 echo "$as_me:6525: checking if we must define _GNU_SOURCE" >&5
6526 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6527 if test "${cf_cv_gnu_source+set}" = set; then
6528   echo $ECHO_N "(cached) $ECHO_C" >&6
6529 else
6530
6531 cat >conftest.$ac_ext <<_ACEOF
6532 #line 6532 "configure"
6533 #include "confdefs.h"
6534 #include <sys/types.h>
6535 int
6536 main ()
6537 {
6538
6539 #ifndef _XOPEN_SOURCE
6540 make an error
6541 #endif
6542   ;
6543   return 0;
6544 }
6545 _ACEOF
6546 rm -f conftest.$ac_objext
6547 if { (eval echo "$as_me:6547: \"$ac_compile\"") >&5
6548   (eval $ac_compile) 2>&5
6549   ac_status=$?
6550   echo "$as_me:6550: \$? = $ac_status" >&5
6551   (exit $ac_status); } &&
6552          { ac_try='test -s conftest.$ac_objext'
6553   { (eval echo "$as_me:6553: \"$ac_try\"") >&5
6554   (eval $ac_try) 2>&5
6555   ac_status=$?
6556   echo "$as_me:6556: \$? = $ac_status" >&5
6557   (exit $ac_status); }; }; then
6558   cf_cv_gnu_source=no
6559 else
6560   echo "$as_me: failed program was:" >&5
6561 cat conftest.$ac_ext >&5
6562 cf_save="$CPPFLAGS"
6563          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6564          cat >conftest.$ac_ext <<_ACEOF
6565 #line 6565 "configure"
6566 #include "confdefs.h"
6567 #include <sys/types.h>
6568 int
6569 main ()
6570 {
6571
6572 #ifdef _XOPEN_SOURCE
6573 make an error
6574 #endif
6575   ;
6576   return 0;
6577 }
6578 _ACEOF
6579 rm -f conftest.$ac_objext
6580 if { (eval echo "$as_me:6580: \"$ac_compile\"") >&5
6581   (eval $ac_compile) 2>&5
6582   ac_status=$?
6583   echo "$as_me:6583: \$? = $ac_status" >&5
6584   (exit $ac_status); } &&
6585          { ac_try='test -s conftest.$ac_objext'
6586   { (eval echo "$as_me:6586: \"$ac_try\"") >&5
6587   (eval $ac_try) 2>&5
6588   ac_status=$?
6589   echo "$as_me:6589: \$? = $ac_status" >&5
6590   (exit $ac_status); }; }; then
6591   cf_cv_gnu_source=no
6592 else
6593   echo "$as_me: failed program was:" >&5
6594 cat conftest.$ac_ext >&5
6595 cf_cv_gnu_source=yes
6596 fi
6597 rm -f conftest.$ac_objext conftest.$ac_ext
6598         CPPFLAGS="$cf_save"
6599
6600 fi
6601 rm -f conftest.$ac_objext conftest.$ac_ext
6602
6603 fi
6604 echo "$as_me:6604: result: $cf_cv_gnu_source" >&5
6605 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6606 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6607
6608         ;;
6609 mirbsd*) #(vi
6610         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6611         ;;
6612 netbsd*) #(vi
6613         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6614         ;;
6615 openbsd*) #(vi
6616         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6617         ;;
6618 osf[45]*) #(vi
6619         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6620         ;;
6621 nto-qnx*) #(vi
6622         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6623         ;;
6624 sco*) #(vi
6625         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6626         ;;
6627 solaris*) #(vi
6628         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6629         ;;
6630 *)
6631         echo "$as_me:6631: checking if we should define _XOPEN_SOURCE" >&5
6632 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6633 if test "${cf_cv_xopen_source+set}" = set; then
6634   echo $ECHO_N "(cached) $ECHO_C" >&6
6635 else
6636
6637         cat >conftest.$ac_ext <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6640 #include <sys/types.h>
6641 int
6642 main ()
6643 {
6644
6645 #ifndef _XOPEN_SOURCE
6646 make an error
6647 #endif
6648   ;
6649   return 0;
6650 }
6651 _ACEOF
6652 rm -f conftest.$ac_objext
6653 if { (eval echo "$as_me:6653: \"$ac_compile\"") >&5
6654   (eval $ac_compile) 2>&5
6655   ac_status=$?
6656   echo "$as_me:6656: \$? = $ac_status" >&5
6657   (exit $ac_status); } &&
6658          { ac_try='test -s conftest.$ac_objext'
6659   { (eval echo "$as_me:6659: \"$ac_try\"") >&5
6660   (eval $ac_try) 2>&5
6661   ac_status=$?
6662   echo "$as_me:6662: \$? = $ac_status" >&5
6663   (exit $ac_status); }; }; then
6664   cf_cv_xopen_source=no
6665 else
6666   echo "$as_me: failed program was:" >&5
6667 cat conftest.$ac_ext >&5
6668 cf_save="$CPPFLAGS"
6669          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6670          cat >conftest.$ac_ext <<_ACEOF
6671 #line 6671 "configure"
6672 #include "confdefs.h"
6673 #include <sys/types.h>
6674 int
6675 main ()
6676 {
6677
6678 #ifdef _XOPEN_SOURCE
6679 make an error
6680 #endif
6681   ;
6682   return 0;
6683 }
6684 _ACEOF
6685 rm -f conftest.$ac_objext
6686 if { (eval echo "$as_me:6686: \"$ac_compile\"") >&5
6687   (eval $ac_compile) 2>&5
6688   ac_status=$?
6689   echo "$as_me:6689: \$? = $ac_status" >&5
6690   (exit $ac_status); } &&
6691          { ac_try='test -s conftest.$ac_objext'
6692   { (eval echo "$as_me:6692: \"$ac_try\"") >&5
6693   (eval $ac_try) 2>&5
6694   ac_status=$?
6695   echo "$as_me:6695: \$? = $ac_status" >&5
6696   (exit $ac_status); }; }; then
6697   cf_cv_xopen_source=no
6698 else
6699   echo "$as_me: failed program was:" >&5
6700 cat conftest.$ac_ext >&5
6701 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6702 fi
6703 rm -f conftest.$ac_objext conftest.$ac_ext
6704         CPPFLAGS="$cf_save"
6705
6706 fi
6707 rm -f conftest.$ac_objext conftest.$ac_ext
6708
6709 fi
6710 echo "$as_me:6710: result: $cf_cv_xopen_source" >&5
6711 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6712         if test "$cf_cv_xopen_source" != no ; then
6713
6714 # remove _XOPEN_SOURCE symbol from $CFLAGS
6715 CFLAGS=`echo "$CFLAGS" | \
6716         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6717                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6718
6719 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6720 CPPFLAGS=`echo "$CPPFLAGS" | \
6721         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6722                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6723
6724                 test "$cf_cv_cc_u_d_options" = yes && \
6725                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6726                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6727         fi
6728
6729 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6730
6731 cf_save_CFLAGS="$CFLAGS"
6732 cf_save_CPPFLAGS="$CPPFLAGS"
6733
6734 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6735 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6736         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6737                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6738
6739 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6740 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6741         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6742                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6743
6744 echo "$as_me:6744: checking if we should define _POSIX_C_SOURCE" >&5
6745 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6746 if test "${cf_cv_posix_c_source+set}" = set; then
6747   echo $ECHO_N "(cached) $ECHO_C" >&6
6748 else
6749
6750 echo "${as_me-configure}:6750: testing if the symbol is already defined go no further ..." 1>&5
6751
6752         cat >conftest.$ac_ext <<_ACEOF
6753 #line 6753 "configure"
6754 #include "confdefs.h"
6755 #include <sys/types.h>
6756 int
6757 main ()
6758 {
6759
6760 #ifndef _POSIX_C_SOURCE
6761 make an error
6762 #endif
6763   ;
6764   return 0;
6765 }
6766 _ACEOF
6767 rm -f conftest.$ac_objext
6768 if { (eval echo "$as_me:6768: \"$ac_compile\"") >&5
6769   (eval $ac_compile) 2>&5
6770   ac_status=$?
6771   echo "$as_me:6771: \$? = $ac_status" >&5
6772   (exit $ac_status); } &&
6773          { ac_try='test -s conftest.$ac_objext'
6774   { (eval echo "$as_me:6774: \"$ac_try\"") >&5
6775   (eval $ac_try) 2>&5
6776   ac_status=$?
6777   echo "$as_me:6777: \$? = $ac_status" >&5
6778   (exit $ac_status); }; }; then
6779   cf_cv_posix_c_source=no
6780 else
6781   echo "$as_me: failed program was:" >&5
6782 cat conftest.$ac_ext >&5
6783 cf_want_posix_source=no
6784          case .$cf_POSIX_C_SOURCE in #(vi
6785          .[12]??*) #(vi
6786                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6787                 ;;
6788          .2) #(vi
6789                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6790                 cf_want_posix_source=yes
6791                 ;;
6792          .*)
6793                 cf_want_posix_source=yes
6794                 ;;
6795          esac
6796          if test "$cf_want_posix_source" = yes ; then
6797                 cat >conftest.$ac_ext <<_ACEOF
6798 #line 6798 "configure"
6799 #include "confdefs.h"
6800 #include <sys/types.h>
6801 int
6802 main ()
6803 {
6804
6805 #ifdef _POSIX_SOURCE
6806 make an error
6807 #endif
6808   ;
6809   return 0;
6810 }
6811 _ACEOF
6812 rm -f conftest.$ac_objext
6813 if { (eval echo "$as_me:6813: \"$ac_compile\"") >&5
6814   (eval $ac_compile) 2>&5
6815   ac_status=$?
6816   echo "$as_me:6816: \$? = $ac_status" >&5
6817   (exit $ac_status); } &&
6818          { ac_try='test -s conftest.$ac_objext'
6819   { (eval echo "$as_me:6819: \"$ac_try\"") >&5
6820   (eval $ac_try) 2>&5
6821   ac_status=$?
6822   echo "$as_me:6822: \$? = $ac_status" >&5
6823   (exit $ac_status); }; }; then
6824   :
6825 else
6826   echo "$as_me: failed program was:" >&5
6827 cat conftest.$ac_ext >&5
6828 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6829 fi
6830 rm -f conftest.$ac_objext conftest.$ac_ext
6831          fi
6832
6833 echo "${as_me-configure}:6833: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6834
6835          CFLAGS="$cf_trim_CFLAGS"
6836          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6837
6838 echo "${as_me-configure}:6838: testing if the second compile does not leave our definition intact error ..." 1>&5
6839
6840          cat >conftest.$ac_ext <<_ACEOF
6841 #line 6841 "configure"
6842 #include "confdefs.h"
6843 #include <sys/types.h>
6844 int
6845 main ()
6846 {
6847
6848 #ifndef _POSIX_C_SOURCE
6849 make an error
6850 #endif
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 rm -f conftest.$ac_objext
6856 if { (eval echo "$as_me:6856: \"$ac_compile\"") >&5
6857   (eval $ac_compile) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); } &&
6861          { ac_try='test -s conftest.$ac_objext'
6862   { (eval echo "$as_me:6862: \"$ac_try\"") >&5
6863   (eval $ac_try) 2>&5
6864   ac_status=$?
6865   echo "$as_me:6865: \$? = $ac_status" >&5
6866   (exit $ac_status); }; }; then
6867   :
6868 else
6869   echo "$as_me: failed program was:" >&5
6870 cat conftest.$ac_ext >&5
6871 cf_cv_posix_c_source=no
6872 fi
6873 rm -f conftest.$ac_objext conftest.$ac_ext
6874          CFLAGS="$cf_save_CFLAGS"
6875          CPPFLAGS="$cf_save_CPPFLAGS"
6876
6877 fi
6878 rm -f conftest.$ac_objext conftest.$ac_ext
6879
6880 fi
6881 echo "$as_me:6881: result: $cf_cv_posix_c_source" >&5
6882 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6883
6884 if test "$cf_cv_posix_c_source" != no ; then
6885         CFLAGS="$cf_trim_CFLAGS"
6886         CPPFLAGS="$cf_trim_CPPFLAGS"
6887         if test "$cf_cv_cc_u_d_options" = yes ; then
6888                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6889                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6890                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6891         fi
6892         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6893 fi
6894
6895         ;;
6896 esac
6897
6898 # Work around breakage on OS X
6899
6900 echo "$as_me:6900: checking if SIGWINCH is defined" >&5
6901 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6902 if test "${cf_cv_define_sigwinch+set}" = set; then
6903   echo $ECHO_N "(cached) $ECHO_C" >&6
6904 else
6905
6906         cat >conftest.$ac_ext <<_ACEOF
6907 #line 6907 "configure"
6908 #include "confdefs.h"
6909
6910 #include <sys/types.h>
6911 #include <sys/signal.h>
6912
6913 int
6914 main ()
6915 {
6916 int x = SIGWINCH
6917   ;
6918   return 0;
6919 }
6920 _ACEOF
6921 rm -f conftest.$ac_objext
6922 if { (eval echo "$as_me:6922: \"$ac_compile\"") >&5
6923   (eval $ac_compile) 2>&5
6924   ac_status=$?
6925   echo "$as_me:6925: \$? = $ac_status" >&5
6926   (exit $ac_status); } &&
6927          { ac_try='test -s conftest.$ac_objext'
6928   { (eval echo "$as_me:6928: \"$ac_try\"") >&5
6929   (eval $ac_try) 2>&5
6930   ac_status=$?
6931   echo "$as_me:6931: \$? = $ac_status" >&5
6932   (exit $ac_status); }; }; then
6933   cf_cv_define_sigwinch=yes
6934 else
6935   echo "$as_me: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 cat >conftest.$ac_ext <<_ACEOF
6938 #line 6938 "configure"
6939 #include "confdefs.h"
6940
6941 #undef _XOPEN_SOURCE
6942 #undef _POSIX_SOURCE
6943 #undef _POSIX_C_SOURCE
6944 #include <sys/types.h>
6945 #include <sys/signal.h>
6946
6947 int
6948 main ()
6949 {
6950 int x = SIGWINCH
6951   ;
6952   return 0;
6953 }
6954 _ACEOF
6955 rm -f conftest.$ac_objext
6956 if { (eval echo "$as_me:6956: \"$ac_compile\"") >&5
6957   (eval $ac_compile) 2>&5
6958   ac_status=$?
6959   echo "$as_me:6959: \$? = $ac_status" >&5
6960   (exit $ac_status); } &&
6961          { ac_try='test -s conftest.$ac_objext'
6962   { (eval echo "$as_me:6962: \"$ac_try\"") >&5
6963   (eval $ac_try) 2>&5
6964   ac_status=$?
6965   echo "$as_me:6965: \$? = $ac_status" >&5
6966   (exit $ac_status); }; }; then
6967   cf_cv_define_sigwinch=maybe
6968 else
6969   echo "$as_me: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 cf_cv_define_sigwinch=no
6972 fi
6973 rm -f conftest.$ac_objext conftest.$ac_ext
6974
6975 fi
6976 rm -f conftest.$ac_objext conftest.$ac_ext
6977
6978 fi
6979 echo "$as_me:6979: result: $cf_cv_define_sigwinch" >&5
6980 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6981
6982 if test "$cf_cv_define_sigwinch" = maybe ; then
6983 echo "$as_me:6983: checking for actual SIGWINCH definition" >&5
6984 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6985 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6986   echo $ECHO_N "(cached) $ECHO_C" >&6
6987 else
6988
6989 cf_cv_fixup_sigwinch=unknown
6990 cf_sigwinch=32
6991 while test $cf_sigwinch != 1
6992 do
6993         cat >conftest.$ac_ext <<_ACEOF
6994 #line 6994 "configure"
6995 #include "confdefs.h"
6996
6997 #undef _XOPEN_SOURCE
6998 #undef _POSIX_SOURCE
6999 #undef _POSIX_C_SOURCE
7000 #include <sys/types.h>
7001 #include <sys/signal.h>
7002
7003 int
7004 main ()
7005 {
7006
7007 #if SIGWINCH != $cf_sigwinch
7008 make an error
7009 #endif
7010 int x = SIGWINCH
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext
7016 if { (eval echo "$as_me:7016: \"$ac_compile\"") >&5
7017   (eval $ac_compile) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest.$ac_objext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   cf_cv_fixup_sigwinch=$cf_sigwinch
7028          break
7029 else
7030   echo "$as_me: failed program was:" >&5
7031 cat conftest.$ac_ext >&5
7032 fi
7033 rm -f conftest.$ac_objext conftest.$ac_ext
7034
7035 cf_sigwinch=`expr $cf_sigwinch - 1`
7036 done
7037
7038 fi
7039 echo "$as_me:7039: result: $cf_cv_fixup_sigwinch" >&5
7040 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7041
7042         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7043                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7044         fi
7045 fi
7046
7047 # Checks for CODESET support.
7048
7049   echo "$as_me:7049: checking for nl_langinfo and CODESET" >&5
7050 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7051 if test "${am_cv_langinfo_codeset+set}" = set; then
7052   echo $ECHO_N "(cached) $ECHO_C" >&6
7053 else
7054   cat >conftest.$ac_ext <<_ACEOF
7055 #line 7055 "configure"
7056 #include "confdefs.h"
7057 #include <langinfo.h>
7058 int
7059 main ()
7060 {
7061 char* cs = nl_langinfo(CODESET);
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext conftest$ac_exeext
7067 if { (eval echo "$as_me:7067: \"$ac_link\"") >&5
7068   (eval $ac_link) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } &&
7072          { ac_try='test -s conftest$ac_exeext'
7073   { (eval echo "$as_me:7073: \"$ac_try\"") >&5
7074   (eval $ac_try) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); }; }; then
7078   am_cv_langinfo_codeset=yes
7079 else
7080   echo "$as_me: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7082 am_cv_langinfo_codeset=no
7083 fi
7084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7085
7086 fi
7087 echo "$as_me:7087: result: $am_cv_langinfo_codeset" >&5
7088 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7089   if test $am_cv_langinfo_codeset = yes; then
7090
7091 cat >>confdefs.h <<\EOF
7092 #define HAVE_LANGINFO_CODESET 1
7093 EOF
7094
7095   fi
7096
7097 # use these variables to work around a defect in gcc's fixincludes.
7098 NCURSES_OK_WCHAR_T=
7099 NCURSES_OK_WINT_T=
7100
7101 echo "$as_me:7101: checking if you want wide-character code" >&5
7102 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7103
7104 # Check whether --enable-widec or --disable-widec was given.
7105 if test "${enable_widec+set}" = set; then
7106   enableval="$enable_widec"
7107   with_widec=$enableval
7108 else
7109   with_widec=no
7110 fi;
7111 echo "$as_me:7111: result: $with_widec" >&5
7112 echo "${ECHO_T}$with_widec" >&6
7113 if test "$with_widec" = yes ; then
7114         LIB_SUFFIX="w${LIB_SUFFIX}"
7115         cat >>confdefs.h <<\EOF
7116 #define USE_WIDEC_SUPPORT 1
7117 EOF
7118
7119 echo "$as_me:7119: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7120 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7121 cat >conftest.$ac_ext <<_ACEOF
7122 #line 7122 "configure"
7123 #include "confdefs.h"
7124 #include <sys/types.h>
7125
7126 int
7127 main ()
7128 {
7129
7130 #ifndef _XOPEN_SOURCE_EXTENDED
7131 make an error
7132 #endif
7133   ;
7134   return 0;
7135 }
7136 _ACEOF
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139   (eval $ac_compile) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); } &&
7143          { ac_try='test -s conftest.$ac_objext'
7144   { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7145   (eval $ac_try) 2>&5
7146   ac_status=$?
7147   echo "$as_me:7147: \$? = $ac_status" >&5
7148   (exit $ac_status); }; }; then
7149   cf_result=no
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7153 cf_result=yes
7154 fi
7155 rm -f conftest.$ac_objext conftest.$ac_ext
7156 echo "$as_me:7156: result: $cf_result" >&5
7157 echo "${ECHO_T}$cf_result" >&6
7158
7159 if test "$cf_result" = yes ; then
7160         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7161 elif test "x" != "x" ; then
7162         echo "$as_me:7162: checking checking for compatible value versus " >&5
7163 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7164         cat >conftest.$ac_ext <<_ACEOF
7165 #line 7165 "configure"
7166 #include "confdefs.h"
7167 #include <sys/types.h>
7168
7169 int
7170 main ()
7171 {
7172
7173 #if _XOPEN_SOURCE_EXTENDED- < 0
7174 make an error
7175 #endif
7176   ;
7177   return 0;
7178 }
7179 _ACEOF
7180 rm -f conftest.$ac_objext
7181 if { (eval echo "$as_me:7181: \"$ac_compile\"") >&5
7182   (eval $ac_compile) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit $ac_status); } &&
7186          { ac_try='test -s conftest.$ac_objext'
7187   { (eval echo "$as_me:7187: \"$ac_try\"") >&5
7188   (eval $ac_try) 2>&5
7189   ac_status=$?
7190   echo "$as_me:7190: \$? = $ac_status" >&5
7191   (exit $ac_status); }; }; then
7192   cf_result=yes
7193 else
7194   echo "$as_me: failed program was:" >&5
7195 cat conftest.$ac_ext >&5
7196 cf_result=no
7197 fi
7198 rm -f conftest.$ac_objext conftest.$ac_ext
7199         echo "$as_me:7199: result: $cf_result" >&5
7200 echo "${ECHO_T}$cf_result" >&6
7201         if test "$cf_result" = no ; then
7202                 # perhaps we can override it - try...
7203                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7204         fi
7205 fi
7206
7207         # with_overwrite=no
7208         NCURSES_CH_T=cchar_t
7209
7210 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7211 do
7212 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7213 echo "$as_me:7213: checking for $ac_func" >&5
7214 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7215 if eval "test \"\${$as_ac_var+set}\" = set"; then
7216   echo $ECHO_N "(cached) $ECHO_C" >&6
7217 else
7218   cat >conftest.$ac_ext <<_ACEOF
7219 #line 7219 "configure"
7220 #include "confdefs.h"
7221 /* System header to define __stub macros and hopefully few prototypes,
7222     which can conflict with char $ac_func (); below.  */
7223 #include <assert.h>
7224 /* Override any gcc2 internal prototype to avoid an error.  */
7225 #ifdef __cplusplus
7226 extern "C"
7227 #endif
7228 /* We use char because int might match the return type of a gcc2
7229    builtin and then its argument prototype would still apply.  */
7230 char $ac_func ();
7231 char (*f) ();
7232
7233 int
7234 main ()
7235 {
7236 /* The GNU C library defines this for functions which it implements
7237     to always fail with ENOSYS.  Some functions are actually named
7238     something starting with __ and the normal name is an alias.  */
7239 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7240 choke me
7241 #else
7242 f = $ac_func;
7243 #endif
7244
7245   ;
7246   return 0;
7247 }
7248 _ACEOF
7249 rm -f conftest.$ac_objext conftest$ac_exeext
7250 if { (eval echo "$as_me:7250: \"$ac_link\"") >&5
7251   (eval $ac_link) 2>&5
7252   ac_status=$?
7253   echo "$as_me:7253: \$? = $ac_status" >&5
7254   (exit $ac_status); } &&
7255          { ac_try='test -s conftest$ac_exeext'
7256   { (eval echo "$as_me:7256: \"$ac_try\"") >&5
7257   (eval $ac_try) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit $ac_status); }; }; then
7261   eval "$as_ac_var=yes"
7262 else
7263   echo "$as_me: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 eval "$as_ac_var=no"
7266 fi
7267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7268 fi
7269 echo "$as_me:7269: result: `eval echo '${'$as_ac_var'}'`" >&5
7270 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7271 if test `eval echo '${'$as_ac_var'}'` = yes; then
7272   cat >>confdefs.h <<EOF
7273 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7274 EOF
7275
7276 fi
7277 done
7278
7279         if test "$ac_cv_func_putwc" != yes ; then
7280
7281 echo "$as_me:7281: checking for multibyte character support" >&5
7282 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7283 if test "${cf_cv_utf8_lib+set}" = set; then
7284   echo $ECHO_N "(cached) $ECHO_C" >&6
7285 else
7286
7287         cf_save_LIBS="$LIBS"
7288         cat >conftest.$ac_ext <<_ACEOF
7289 #line 7289 "configure"
7290 #include "confdefs.h"
7291
7292 #include <stdlib.h>
7293 int
7294 main ()
7295 {
7296 putwc(0,0);
7297   ;
7298   return 0;
7299 }
7300 _ACEOF
7301 rm -f conftest.$ac_objext conftest$ac_exeext
7302 if { (eval echo "$as_me:7302: \"$ac_link\"") >&5
7303   (eval $ac_link) 2>&5
7304   ac_status=$?
7305   echo "$as_me:7305: \$? = $ac_status" >&5
7306   (exit $ac_status); } &&
7307          { ac_try='test -s conftest$ac_exeext'
7308   { (eval echo "$as_me:7308: \"$ac_try\"") >&5
7309   (eval $ac_try) 2>&5
7310   ac_status=$?
7311   echo "$as_me:7311: \$? = $ac_status" >&5
7312   (exit $ac_status); }; }; then
7313   cf_cv_utf8_lib=yes
7314 else
7315   echo "$as_me: failed program was:" >&5
7316 cat conftest.$ac_ext >&5
7317
7318 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7319 # will be set on completion of the AC_TRY_LINK below.
7320 cf_cv_header_path_utf8=
7321 cf_cv_library_path_utf8=
7322
7323 echo "${as_me-configure}:7323: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7324
7325 cat >conftest.$ac_ext <<_ACEOF
7326 #line 7326 "configure"
7327 #include "confdefs.h"
7328
7329 #include <libutf8.h>
7330 int
7331 main ()
7332 {
7333 putwc(0,0);
7334   ;
7335   return 0;
7336 }
7337 _ACEOF
7338 rm -f conftest.$ac_objext conftest$ac_exeext
7339 if { (eval echo "$as_me:7339: \"$ac_link\"") >&5
7340   (eval $ac_link) 2>&5
7341   ac_status=$?
7342   echo "$as_me:7342: \$? = $ac_status" >&5
7343   (exit $ac_status); } &&
7344          { ac_try='test -s conftest$ac_exeext'
7345   { (eval echo "$as_me:7345: \"$ac_try\"") >&5
7346   (eval $ac_try) 2>&5
7347   ac_status=$?
7348   echo "$as_me:7348: \$? = $ac_status" >&5
7349   (exit $ac_status); }; }; then
7350   cf_cv_find_linkage_utf8=yes
7351 else
7352   echo "$as_me: failed program was:" >&5
7353 cat conftest.$ac_ext >&5
7354
7355     cf_cv_find_linkage_utf8=no
7356
7357     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7358
7359 echo "${as_me-configure}:7359: testing find linkage for utf8 library ..." 1>&5
7360
7361 echo "${as_me-configure}:7361: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7362
7363     cf_save_CPPFLAGS="$CPPFLAGS"
7364     cf_test_CPPFLAGS="$CPPFLAGS"
7365
7366 cf_header_path_list=""
7367 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7368         for cf_header_path in $CPPFLAGS $CFLAGS
7369         do
7370                 case $cf_header_path in #(vi
7371                 -I*)
7372                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7373
7374 test "$cf_header_path" != "NONE" && \
7375 test -d "$cf_header_path" && \
7376  {
7377         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7378         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7379         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7380         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7381         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7382         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7383 }
7384
7385                         cf_header_path_list="$cf_header_path_list $cf_search"
7386                         ;;
7387                 esac
7388         done
7389 fi
7390
7391 cf_search=""
7392
7393 test "/usr" != "$prefix" && \
7394 test -d "/usr" && \
7395 (test $prefix = NONE || test -d $prefix) && {
7396         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7397         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7398         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7399         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7400         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7401         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7402 }
7403
7404 test "$prefix" != "NONE" && \
7405 test -d "$prefix" && \
7406  {
7407         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7408         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7409         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7410         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7411         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7412         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7413 }
7414
7415 test "/usr/local" != "$prefix" && \
7416 test -d "/usr/local" && \
7417 (test $prefix = NONE || test -d $prefix) && {
7418         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7419         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7420         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7421         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7422         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7423         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7424 }
7425
7426 test "/opt" != "$prefix" && \
7427 test -d "/opt" && \
7428 (test $prefix = NONE || test -d $prefix) && {
7429         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7430         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7431         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7432         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7433         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7434         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7435 }
7436
7437 test "$HOME" != "$prefix" && \
7438 test -d "$HOME" && \
7439 (test $prefix = NONE || test -d $prefix) && {
7440         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7441         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7442         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7443         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7444         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7445         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7446 }
7447
7448 test "$includedir" != NONE && \
7449 test "$includedir" != "/usr/include" && \
7450 test -d "$includedir" && {
7451         test -d $includedir &&    cf_search="$cf_search $includedir"
7452         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7453 }
7454
7455 test "$oldincludedir" != NONE && \
7456 test "$oldincludedir" != "/usr/include" && \
7457 test -d "$oldincludedir" && {
7458         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7459         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7460 }
7461
7462 cf_search="$cf_header_path_list $cf_search"
7463
7464     for cf_cv_header_path_utf8 in $cf_search
7465     do
7466       if test -d $cf_cv_header_path_utf8 ; then
7467         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7468
7469 echo "${as_me-configure}:7469: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7470
7471         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7472         cat >conftest.$ac_ext <<_ACEOF
7473 #line 7473 "configure"
7474 #include "confdefs.h"
7475
7476 #include <libutf8.h>
7477 int
7478 main ()
7479 {
7480 putwc(0,0);
7481   ;
7482   return 0;
7483 }
7484 _ACEOF
7485 rm -f conftest.$ac_objext
7486 if { (eval echo "$as_me:7486: \"$ac_compile\"") >&5
7487   (eval $ac_compile) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit $ac_status); } &&
7491          { ac_try='test -s conftest.$ac_objext'
7492   { (eval echo "$as_me:7492: \"$ac_try\"") >&5
7493   (eval $ac_try) 2>&5
7494   ac_status=$?
7495   echo "$as_me:7495: \$? = $ac_status" >&5
7496   (exit $ac_status); }; }; then
7497
7498             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7499
7500 echo "${as_me-configure}:7500: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7501
7502             cf_cv_find_linkage_utf8=maybe
7503             cf_test_CPPFLAGS="$CPPFLAGS"
7504             break
7505 else
7506   echo "$as_me: failed program was:" >&5
7507 cat conftest.$ac_ext >&5
7508
7509             CPPFLAGS="$cf_save_CPPFLAGS"
7510
7511 fi
7512 rm -f conftest.$ac_objext conftest.$ac_ext
7513       fi
7514     done
7515
7516     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7517
7518 echo "${as_me-configure}:7518: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7519
7520       cf_save_LIBS="$LIBS"
7521       cf_save_LDFLAGS="$LDFLAGS"
7522
7523       if test "$cf_cv_find_linkage_utf8" != yes ; then
7524
7525 cf_library_path_list=""
7526 if test -n "${LDFLAGS}${LIBS}" ; then
7527         for cf_library_path in $LDFLAGS $LIBS
7528         do
7529                 case $cf_library_path in #(vi
7530                 -L*)
7531                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7532
7533 test "$cf_library_path" != "NONE" && \
7534 test -d "$cf_library_path" && \
7535  {
7536         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7537         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7538         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7539         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7540         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7541         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7542 }
7543
7544                         cf_library_path_list="$cf_library_path_list $cf_search"
7545                         ;;
7546                 esac
7547         done
7548 fi
7549
7550 cf_search=""
7551
7552 test "/usr" != "$prefix" && \
7553 test -d "/usr" && \
7554 (test $prefix = NONE || test -d $prefix) && {
7555         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7556         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7557         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7558         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7559         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7560         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7561 }
7562
7563 test "$prefix" != "NONE" && \
7564 test -d "$prefix" && \
7565  {
7566         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7567         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7568         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7569         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7570         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7571         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7572 }
7573
7574 test "/usr/local" != "$prefix" && \
7575 test -d "/usr/local" && \
7576 (test $prefix = NONE || test -d $prefix) && {
7577         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7578         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7579         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7580         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7581         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7582         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7583 }
7584
7585 test "/opt" != "$prefix" && \
7586 test -d "/opt" && \
7587 (test $prefix = NONE || test -d $prefix) && {
7588         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7589         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7590         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7591         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7592         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7593         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7594 }
7595
7596 test "$HOME" != "$prefix" && \
7597 test -d "$HOME" && \
7598 (test $prefix = NONE || test -d $prefix) && {
7599         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7600         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7601         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7602         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7603         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7604         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7605 }
7606
7607 cf_search="$cf_library_path_list $cf_search"
7608
7609         for cf_cv_library_path_utf8 in $cf_search
7610         do
7611           if test -d $cf_cv_library_path_utf8 ; then
7612             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7613
7614 echo "${as_me-configure}:7614: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7615
7616             CPPFLAGS="$cf_test_CPPFLAGS"
7617             LIBS="-lutf8  $cf_save_LIBS"
7618             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7619             cat >conftest.$ac_ext <<_ACEOF
7620 #line 7620 "configure"
7621 #include "confdefs.h"
7622
7623 #include <libutf8.h>
7624 int
7625 main ()
7626 {
7627 putwc(0,0);
7628   ;
7629   return 0;
7630 }
7631 _ACEOF
7632 rm -f conftest.$ac_objext conftest$ac_exeext
7633 if { (eval echo "$as_me:7633: \"$ac_link\"") >&5
7634   (eval $ac_link) 2>&5
7635   ac_status=$?
7636   echo "$as_me:7636: \$? = $ac_status" >&5
7637   (exit $ac_status); } &&
7638          { ac_try='test -s conftest$ac_exeext'
7639   { (eval echo "$as_me:7639: \"$ac_try\"") >&5
7640   (eval $ac_try) 2>&5
7641   ac_status=$?
7642   echo "$as_me:7642: \$? = $ac_status" >&5
7643   (exit $ac_status); }; }; then
7644
7645                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7646
7647 echo "${as_me-configure}:7647: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7648
7649                 cf_cv_find_linkage_utf8=yes
7650                 cf_cv_library_file_utf8="-lutf8"
7651                 break
7652 else
7653   echo "$as_me: failed program was:" >&5
7654 cat conftest.$ac_ext >&5
7655
7656                 CPPFLAGS="$cf_save_CPPFLAGS"
7657                 LIBS="$cf_save_LIBS"
7658                 LDFLAGS="$cf_save_LDFLAGS"
7659
7660 fi
7661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7662           fi
7663         done
7664         LIBS="$cf_save_LIBS"
7665         CPPFLAGS="$cf_save_CPPFLAGS"
7666         LDFLAGS="$cf_save_LDFLAGS"
7667       fi
7668
7669     else
7670       cf_cv_find_linkage_utf8=no
7671     fi
7672
7673 fi
7674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7675
7676 if test "$cf_cv_find_linkage_utf8" = yes ; then
7677 cf_cv_utf8_lib=add-on
7678 else
7679 cf_cv_utf8_lib=no
7680 fi
7681
7682 fi
7683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7684 fi
7685 echo "$as_me:7685: result: $cf_cv_utf8_lib" >&5
7686 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7687
7688 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7689 # ncurses/ncursesw:
7690 if test "$cf_cv_utf8_lib" = "add-on" ; then
7691         cat >>confdefs.h <<\EOF
7692 #define HAVE_LIBUTF8_H 1
7693 EOF
7694
7695 if test -n "$cf_cv_header_path_utf8" ; then
7696   for cf_add_incdir in $cf_cv_header_path_utf8
7697   do
7698         while test $cf_add_incdir != /usr/include
7699         do
7700           if test -d $cf_add_incdir
7701           then
7702                 cf_have_incdir=no
7703                 if test -n "$CFLAGS$CPPFLAGS" ; then
7704                   # a loop is needed to ensure we can add subdirs of existing dirs
7705                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7706                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7707                           cf_have_incdir=yes; break
7708                         fi
7709                   done
7710                 fi
7711
7712                 if test "$cf_have_incdir" = no ; then
7713                   if test "$cf_add_incdir" = /usr/local/include ; then
7714                         if test "$GCC" = yes
7715                         then
7716                           cf_save_CPPFLAGS=$CPPFLAGS
7717                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7718                           cat >conftest.$ac_ext <<_ACEOF
7719 #line 7719 "configure"
7720 #include "confdefs.h"
7721 #include <stdio.h>
7722 int
7723 main ()
7724 {
7725 printf("Hello")
7726   ;
7727   return 0;
7728 }
7729 _ACEOF
7730 rm -f conftest.$ac_objext
7731 if { (eval echo "$as_me:7731: \"$ac_compile\"") >&5
7732   (eval $ac_compile) 2>&5
7733   ac_status=$?
7734   echo "$as_me:7734: \$? = $ac_status" >&5
7735   (exit $ac_status); } &&
7736          { ac_try='test -s conftest.$ac_objext'
7737   { (eval echo "$as_me:7737: \"$ac_try\"") >&5
7738   (eval $ac_try) 2>&5
7739   ac_status=$?
7740   echo "$as_me:7740: \$? = $ac_status" >&5
7741   (exit $ac_status); }; }; then
7742   :
7743 else
7744   echo "$as_me: failed program was:" >&5
7745 cat conftest.$ac_ext >&5
7746 cf_have_incdir=yes
7747 fi
7748 rm -f conftest.$ac_objext conftest.$ac_ext
7749                           CPPFLAGS=$cf_save_CPPFLAGS
7750                         fi
7751                   fi
7752                 fi
7753
7754                 if test "$cf_have_incdir" = no ; then
7755                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7756
7757 echo "${as_me-configure}:7757: testing adding $cf_add_incdir to include-path ..." 1>&5
7758
7759                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7760
7761                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7762                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7763                   cf_add_incdir="$cf_top_incdir"
7764                 else
7765                   break
7766                 fi
7767           fi
7768         done
7769   done
7770 fi
7771
7772 if test -n "$cf_cv_library_path_utf8" ; then
7773   for cf_add_libdir in $cf_cv_library_path_utf8
7774   do
7775     if test $cf_add_libdir = /usr/lib ; then
7776       :
7777     elif test -d $cf_add_libdir
7778     then
7779       cf_have_libdir=no
7780       if test -n "$LDFLAGS$LIBS" ; then
7781         # a loop is needed to ensure we can add subdirs of existing dirs
7782         for cf_test_libdir in $LDFLAGS $LIBS ; do
7783           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7784             cf_have_libdir=yes; break
7785           fi
7786         done
7787       fi
7788       if test "$cf_have_libdir" = no ; then
7789         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7790
7791 echo "${as_me-configure}:7791: testing adding $cf_add_libdir to library-path ..." 1>&5
7792
7793         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7794       fi
7795     fi
7796   done
7797 fi
7798
7799         LIBS="-lutf8 $LIBS"
7800 fi
7801
7802                 if test "$cf_cv_utf8_lib" != no ; then
7803                         NCURSES_LIBUTF8=1
7804                 fi
7805         fi
7806
7807 # This is needed on Tru64 5.0 to declare mbstate_t
7808 echo "$as_me:7808: checking if we must include wchar.h to declare mbstate_t" >&5
7809 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7810 if test "${cf_cv_mbstate_t+set}" = set; then
7811   echo $ECHO_N "(cached) $ECHO_C" >&6
7812 else
7813
7814 cat >conftest.$ac_ext <<_ACEOF
7815 #line 7815 "configure"
7816 #include "confdefs.h"
7817
7818 #include <stdlib.h>
7819 #include <stdarg.h>
7820 #include <stdio.h>
7821 #ifdef HAVE_LIBUTF8_H
7822 #include <libutf8.h>
7823 #endif
7824 int
7825 main ()
7826 {
7827 mbstate_t state
7828   ;
7829   return 0;
7830 }
7831 _ACEOF
7832 rm -f conftest.$ac_objext
7833 if { (eval echo "$as_me:7833: \"$ac_compile\"") >&5
7834   (eval $ac_compile) 2>&5
7835   ac_status=$?
7836   echo "$as_me:7836: \$? = $ac_status" >&5
7837   (exit $ac_status); } &&
7838          { ac_try='test -s conftest.$ac_objext'
7839   { (eval echo "$as_me:7839: \"$ac_try\"") >&5
7840   (eval $ac_try) 2>&5
7841   ac_status=$?
7842   echo "$as_me:7842: \$? = $ac_status" >&5
7843   (exit $ac_status); }; }; then
7844   cf_cv_mbstate_t=no
7845 else
7846   echo "$as_me: failed program was:" >&5
7847 cat conftest.$ac_ext >&5
7848 cat >conftest.$ac_ext <<_ACEOF
7849 #line 7849 "configure"
7850 #include "confdefs.h"
7851
7852 #include <stdlib.h>
7853 #include <stdarg.h>
7854 #include <stdio.h>
7855 #include <wchar.h>
7856 #ifdef HAVE_LIBUTF8_H
7857 #include <libutf8.h>
7858 #endif
7859 int
7860 main ()
7861 {
7862 mbstate_t value
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 rm -f conftest.$ac_objext
7868 if { (eval echo "$as_me:7868: \"$ac_compile\"") >&5
7869   (eval $ac_compile) 2>&5
7870   ac_status=$?
7871   echo "$as_me:7871: \$? = $ac_status" >&5
7872   (exit $ac_status); } &&
7873          { ac_try='test -s conftest.$ac_objext'
7874   { (eval echo "$as_me:7874: \"$ac_try\"") >&5
7875   (eval $ac_try) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); }; }; then
7879   cf_cv_mbstate_t=yes
7880 else
7881   echo "$as_me: failed program was:" >&5
7882 cat conftest.$ac_ext >&5
7883 cf_cv_mbstate_t=unknown
7884 fi
7885 rm -f conftest.$ac_objext conftest.$ac_ext
7886 fi
7887 rm -f conftest.$ac_objext conftest.$ac_ext
7888 fi
7889 echo "$as_me:7889: result: $cf_cv_mbstate_t" >&5
7890 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7891
7892 if test "$cf_cv_mbstate_t" = yes ; then
7893         cat >>confdefs.h <<\EOF
7894 #define NEED_WCHAR_H 1
7895 EOF
7896
7897         NEED_WCHAR_H=1
7898 fi
7899
7900 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7901 if test "$cf_cv_mbstate_t" = unknown ; then
7902         NCURSES_MBSTATE_T=1
7903 fi
7904
7905 # This is needed on Tru64 5.0 to declare wchar_t
7906 echo "$as_me:7906: checking if we must include wchar.h to declare wchar_t" >&5
7907 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7908 if test "${cf_cv_wchar_t+set}" = set; then
7909   echo $ECHO_N "(cached) $ECHO_C" >&6
7910 else
7911
7912 cat >conftest.$ac_ext <<_ACEOF
7913 #line 7913 "configure"
7914 #include "confdefs.h"
7915
7916 #include <stdlib.h>
7917 #include <stdarg.h>
7918 #include <stdio.h>
7919 #ifdef HAVE_LIBUTF8_H
7920 #include <libutf8.h>
7921 #endif
7922 int
7923 main ()
7924 {
7925 wchar_t state
7926   ;
7927   return 0;
7928 }
7929 _ACEOF
7930 rm -f conftest.$ac_objext
7931 if { (eval echo "$as_me:7931: \"$ac_compile\"") >&5
7932   (eval $ac_compile) 2>&5
7933   ac_status=$?
7934   echo "$as_me:7934: \$? = $ac_status" >&5
7935   (exit $ac_status); } &&
7936          { ac_try='test -s conftest.$ac_objext'
7937   { (eval echo "$as_me:7937: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:7940: \$? = $ac_status" >&5
7941   (exit $ac_status); }; }; then
7942   cf_cv_wchar_t=no
7943 else
7944   echo "$as_me: failed program was:" >&5
7945 cat conftest.$ac_ext >&5
7946 cat >conftest.$ac_ext <<_ACEOF
7947 #line 7947 "configure"
7948 #include "confdefs.h"
7949
7950 #include <stdlib.h>
7951 #include <stdarg.h>
7952 #include <stdio.h>
7953 #include <wchar.h>
7954 #ifdef HAVE_LIBUTF8_H
7955 #include <libutf8.h>
7956 #endif
7957 int
7958 main ()
7959 {
7960 wchar_t value
7961   ;
7962   return 0;
7963 }
7964 _ACEOF
7965 rm -f conftest.$ac_objext
7966 if { (eval echo "$as_me:7966: \"$ac_compile\"") >&5
7967   (eval $ac_compile) 2>&5
7968   ac_status=$?
7969   echo "$as_me:7969: \$? = $ac_status" >&5
7970   (exit $ac_status); } &&
7971          { ac_try='test -s conftest.$ac_objext'
7972   { (eval echo "$as_me:7972: \"$ac_try\"") >&5
7973   (eval $ac_try) 2>&5
7974   ac_status=$?
7975   echo "$as_me:7975: \$? = $ac_status" >&5
7976   (exit $ac_status); }; }; then
7977   cf_cv_wchar_t=yes
7978 else
7979   echo "$as_me: failed program was:" >&5
7980 cat conftest.$ac_ext >&5
7981 cf_cv_wchar_t=unknown
7982 fi
7983 rm -f conftest.$ac_objext conftest.$ac_ext
7984 fi
7985 rm -f conftest.$ac_objext conftest.$ac_ext
7986 fi
7987 echo "$as_me:7987: result: $cf_cv_wchar_t" >&5
7988 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7989
7990 if test "$cf_cv_wchar_t" = yes ; then
7991         cat >>confdefs.h <<\EOF
7992 #define NEED_WCHAR_H 1
7993 EOF
7994
7995         NEED_WCHAR_H=1
7996 fi
7997
7998 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7999 if test "$cf_cv_wchar_t" = unknown ; then
8000         NCURSES_WCHAR_T=1
8001 fi
8002
8003 # if we find wchar_t in either place, use substitution to provide a fallback.
8004 if test "$cf_cv_wchar_t" != unknown ; then
8005         NCURSES_OK_WCHAR_T=1
8006 fi
8007
8008 # This is needed on Tru64 5.0 to declare wint_t
8009 echo "$as_me:8009: checking if we must include wchar.h to declare wint_t" >&5
8010 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8011 if test "${cf_cv_wint_t+set}" = set; then
8012   echo $ECHO_N "(cached) $ECHO_C" >&6
8013 else
8014
8015 cat >conftest.$ac_ext <<_ACEOF
8016 #line 8016 "configure"
8017 #include "confdefs.h"
8018
8019 #include <stdlib.h>
8020 #include <stdarg.h>
8021 #include <stdio.h>
8022 #ifdef HAVE_LIBUTF8_H
8023 #include <libutf8.h>
8024 #endif
8025 int
8026 main ()
8027 {
8028 wint_t state
8029   ;
8030   return 0;
8031 }
8032 _ACEOF
8033 rm -f conftest.$ac_objext
8034 if { (eval echo "$as_me:8034: \"$ac_compile\"") >&5
8035   (eval $ac_compile) 2>&5
8036   ac_status=$?
8037   echo "$as_me:8037: \$? = $ac_status" >&5
8038   (exit $ac_status); } &&
8039          { ac_try='test -s conftest.$ac_objext'
8040   { (eval echo "$as_me:8040: \"$ac_try\"") >&5
8041   (eval $ac_try) 2>&5
8042   ac_status=$?
8043   echo "$as_me:8043: \$? = $ac_status" >&5
8044   (exit $ac_status); }; }; then
8045   cf_cv_wint_t=no
8046 else
8047   echo "$as_me: failed program was:" >&5
8048 cat conftest.$ac_ext >&5
8049 cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052
8053 #include <stdlib.h>
8054 #include <stdarg.h>
8055 #include <stdio.h>
8056 #include <wchar.h>
8057 #ifdef HAVE_LIBUTF8_H
8058 #include <libutf8.h>
8059 #endif
8060 int
8061 main ()
8062 {
8063 wint_t value
8064   ;
8065   return 0;
8066 }
8067 _ACEOF
8068 rm -f conftest.$ac_objext
8069 if { (eval echo "$as_me:8069: \"$ac_compile\"") >&5
8070   (eval $ac_compile) 2>&5
8071   ac_status=$?
8072   echo "$as_me:8072: \$? = $ac_status" >&5
8073   (exit $ac_status); } &&
8074          { ac_try='test -s conftest.$ac_objext'
8075   { (eval echo "$as_me:8075: \"$ac_try\"") >&5
8076   (eval $ac_try) 2>&5
8077   ac_status=$?
8078   echo "$as_me:8078: \$? = $ac_status" >&5
8079   (exit $ac_status); }; }; then
8080   cf_cv_wint_t=yes
8081 else
8082   echo "$as_me: failed program was:" >&5
8083 cat conftest.$ac_ext >&5
8084 cf_cv_wint_t=unknown
8085 fi
8086 rm -f conftest.$ac_objext conftest.$ac_ext
8087 fi
8088 rm -f conftest.$ac_objext conftest.$ac_ext
8089 fi
8090 echo "$as_me:8090: result: $cf_cv_wint_t" >&5
8091 echo "${ECHO_T}$cf_cv_wint_t" >&6
8092
8093 if test "$cf_cv_wint_t" = yes ; then
8094         cat >>confdefs.h <<\EOF
8095 #define NEED_WCHAR_H 1
8096 EOF
8097
8098         NEED_WCHAR_H=1
8099 fi
8100
8101 # if we do not find wint_t in either place, use substitution to provide a fallback.
8102 if test "$cf_cv_wint_t" = unknown ; then
8103         NCURSES_WINT_T=1
8104 fi
8105
8106 # if we find wint_t in either place, use substitution to provide a fallback.
8107 if test "$cf_cv_wint_t" != unknown ; then
8108         NCURSES_OK_WINT_T=1
8109 fi
8110
8111         if test "$NCURSES_MBSTATE_T" != 0; then
8112                 cat >>confdefs.h <<\EOF
8113 #define NEED_MBSTATE_T_DEF 1
8114 EOF
8115
8116         fi
8117 fi
8118
8119 ###   use option --disable-lp64 to allow long chtype
8120 case $cf_cv_abi_version in
8121 [345]*)
8122         default_with_lp64=no
8123         ;;
8124 *)
8125         default_with_lp64=yes
8126         ;;
8127 esac
8128
8129 echo "$as_me:8129: checking whether to enable _LP64 definition in curses.h" >&5
8130 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8131
8132 # Check whether --enable-lp64 or --disable-lp64 was given.
8133 if test "${enable_lp64+set}" = set; then
8134   enableval="$enable_lp64"
8135   with_lp64=$enableval
8136 else
8137   with_lp64=$default_with_lp64
8138 fi;
8139 echo "$as_me:8139: result: $with_lp64" >&5
8140 echo "${ECHO_T}$with_lp64" >&6
8141
8142 if test "$with_lp64" = yes ; then
8143         cf_cv_enable_lp64=1
8144 else
8145         cf_cv_enable_lp64=0
8146 fi
8147
8148 # Check whether --enable-largefile or --disable-largefile was given.
8149 if test "${enable_largefile+set}" = set; then
8150   enableval="$enable_largefile"
8151
8152 fi;
8153 if test "$enable_largefile" != no; then
8154
8155   echo "$as_me:8155: checking for special C compiler options needed for large files" >&5
8156 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8157 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8158   echo $ECHO_N "(cached) $ECHO_C" >&6
8159 else
8160   ac_cv_sys_largefile_CC=no
8161      if test "$GCC" != yes; then
8162        ac_save_CC=$CC
8163        while :; do
8164          # IRIX 6.2 and later do not support large files by default,
8165          # so use the C compiler's -n32 option if that helps.
8166          cat >conftest.$ac_ext <<_ACEOF
8167 #line 8167 "configure"
8168 #include "confdefs.h"
8169 #include <sys/types.h>
8170  /* Check that off_t can represent 2**63 - 1 correctly.
8171     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8172     since some C++ compilers masquerading as C compilers
8173     incorrectly reject 9223372036854775807.  */
8174 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8175   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8176                        && LARGE_OFF_T % 2147483647 == 1)
8177                       ? 1 : -1];
8178 int
8179 main ()
8180 {
8181
8182   ;
8183   return 0;
8184 }
8185 _ACEOF
8186          rm -f conftest.$ac_objext
8187 if { (eval echo "$as_me:8187: \"$ac_compile\"") >&5
8188   (eval $ac_compile) 2>&5
8189   ac_status=$?
8190   echo "$as_me:8190: \$? = $ac_status" >&5
8191   (exit $ac_status); } &&
8192          { ac_try='test -s conftest.$ac_objext'
8193   { (eval echo "$as_me:8193: \"$ac_try\"") >&5
8194   (eval $ac_try) 2>&5
8195   ac_status=$?
8196   echo "$as_me:8196: \$? = $ac_status" >&5
8197   (exit $ac_status); }; }; then
8198   break
8199 else
8200   echo "$as_me: failed program was:" >&5
8201 cat conftest.$ac_ext >&5
8202 fi
8203 rm -f conftest.$ac_objext
8204          CC="$CC -n32"
8205          rm -f conftest.$ac_objext
8206 if { (eval echo "$as_me:8206: \"$ac_compile\"") >&5
8207   (eval $ac_compile) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); } &&
8211          { ac_try='test -s conftest.$ac_objext'
8212   { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8213   (eval $ac_try) 2>&5
8214   ac_status=$?
8215   echo "$as_me:8215: \$? = $ac_status" >&5
8216   (exit $ac_status); }; }; then
8217   ac_cv_sys_largefile_CC=' -n32'; break
8218 else
8219   echo "$as_me: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8221 fi
8222 rm -f conftest.$ac_objext
8223          break
8224        done
8225        CC=$ac_save_CC
8226        rm -f conftest.$ac_ext
8227     fi
8228 fi
8229 echo "$as_me:8229: result: $ac_cv_sys_largefile_CC" >&5
8230 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8231   if test "$ac_cv_sys_largefile_CC" != no; then
8232     CC=$CC$ac_cv_sys_largefile_CC
8233   fi
8234
8235   echo "$as_me:8235: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8236 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8237 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8238   echo $ECHO_N "(cached) $ECHO_C" >&6
8239 else
8240   while :; do
8241   ac_cv_sys_file_offset_bits=no
8242   cat >conftest.$ac_ext <<_ACEOF
8243 #line 8243 "configure"
8244 #include "confdefs.h"
8245 #include <sys/types.h>
8246  /* Check that off_t can represent 2**63 - 1 correctly.
8247     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8248     since some C++ compilers masquerading as C compilers
8249     incorrectly reject 9223372036854775807.  */
8250 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8251   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8252                        && LARGE_OFF_T % 2147483647 == 1)
8253                       ? 1 : -1];
8254 int
8255 main ()
8256 {
8257
8258   ;
8259   return 0;
8260 }
8261 _ACEOF
8262 rm -f conftest.$ac_objext
8263 if { (eval echo "$as_me:8263: \"$ac_compile\"") >&5
8264   (eval $ac_compile) 2>&5
8265   ac_status=$?
8266   echo "$as_me:8266: \$? = $ac_status" >&5
8267   (exit $ac_status); } &&
8268          { ac_try='test -s conftest.$ac_objext'
8269   { (eval echo "$as_me:8269: \"$ac_try\"") >&5
8270   (eval $ac_try) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); }; }; then
8274   break
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278 fi
8279 rm -f conftest.$ac_objext conftest.$ac_ext
8280   cat >conftest.$ac_ext <<_ACEOF
8281 #line 8281 "configure"
8282 #include "confdefs.h"
8283 #define _FILE_OFFSET_BITS 64
8284 #include <sys/types.h>
8285  /* Check that off_t can represent 2**63 - 1 correctly.
8286     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8287     since some C++ compilers masquerading as C compilers
8288     incorrectly reject 9223372036854775807.  */
8289 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8290   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8291                        && LARGE_OFF_T % 2147483647 == 1)
8292                       ? 1 : -1];
8293 int
8294 main ()
8295 {
8296
8297   ;
8298   return 0;
8299 }
8300 _ACEOF
8301 rm -f conftest.$ac_objext
8302 if { (eval echo "$as_me:8302: \"$ac_compile\"") >&5
8303   (eval $ac_compile) 2>&5
8304   ac_status=$?
8305   echo "$as_me:8305: \$? = $ac_status" >&5
8306   (exit $ac_status); } &&
8307          { ac_try='test -s conftest.$ac_objext'
8308   { (eval echo "$as_me:8308: \"$ac_try\"") >&5
8309   (eval $ac_try) 2>&5
8310   ac_status=$?
8311   echo "$as_me:8311: \$? = $ac_status" >&5
8312   (exit $ac_status); }; }; then
8313   ac_cv_sys_file_offset_bits=64; break
8314 else
8315   echo "$as_me: failed program was:" >&5
8316 cat conftest.$ac_ext >&5
8317 fi
8318 rm -f conftest.$ac_objext conftest.$ac_ext
8319   break
8320 done
8321 fi
8322 echo "$as_me:8322: result: $ac_cv_sys_file_offset_bits" >&5
8323 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8324 if test "$ac_cv_sys_file_offset_bits" != no; then
8325
8326 cat >>confdefs.h <<EOF
8327 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8328 EOF
8329
8330 fi
8331 rm -f conftest*
8332   echo "$as_me:8332: checking for _LARGE_FILES value needed for large files" >&5
8333 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8334 if test "${ac_cv_sys_large_files+set}" = set; then
8335   echo $ECHO_N "(cached) $ECHO_C" >&6
8336 else
8337   while :; do
8338   ac_cv_sys_large_files=no
8339   cat >conftest.$ac_ext <<_ACEOF
8340 #line 8340 "configure"
8341 #include "confdefs.h"
8342 #include <sys/types.h>
8343  /* Check that off_t can represent 2**63 - 1 correctly.
8344     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8345     since some C++ compilers masquerading as C compilers
8346     incorrectly reject 9223372036854775807.  */
8347 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8348   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8349                        && LARGE_OFF_T % 2147483647 == 1)
8350                       ? 1 : -1];
8351 int
8352 main ()
8353 {
8354
8355   ;
8356   return 0;
8357 }
8358 _ACEOF
8359 rm -f conftest.$ac_objext
8360 if { (eval echo "$as_me:8360: \"$ac_compile\"") >&5
8361   (eval $ac_compile) 2>&5
8362   ac_status=$?
8363   echo "$as_me:8363: \$? = $ac_status" >&5
8364   (exit $ac_status); } &&
8365          { ac_try='test -s conftest.$ac_objext'
8366   { (eval echo "$as_me:8366: \"$ac_try\"") >&5
8367   (eval $ac_try) 2>&5
8368   ac_status=$?
8369   echo "$as_me:8369: \$? = $ac_status" >&5
8370   (exit $ac_status); }; }; then
8371   break
8372 else
8373   echo "$as_me: failed program was:" >&5
8374 cat conftest.$ac_ext >&5
8375 fi
8376 rm -f conftest.$ac_objext conftest.$ac_ext
8377   cat >conftest.$ac_ext <<_ACEOF
8378 #line 8378 "configure"
8379 #include "confdefs.h"
8380 #define _LARGE_FILES 1
8381 #include <sys/types.h>
8382  /* Check that off_t can represent 2**63 - 1 correctly.
8383     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8384     since some C++ compilers masquerading as C compilers
8385     incorrectly reject 9223372036854775807.  */
8386 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8387   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8388                        && LARGE_OFF_T % 2147483647 == 1)
8389                       ? 1 : -1];
8390 int
8391 main ()
8392 {
8393
8394   ;
8395   return 0;
8396 }
8397 _ACEOF
8398 rm -f conftest.$ac_objext
8399 if { (eval echo "$as_me:8399: \"$ac_compile\"") >&5
8400   (eval $ac_compile) 2>&5
8401   ac_status=$?
8402   echo "$as_me:8402: \$? = $ac_status" >&5
8403   (exit $ac_status); } &&
8404          { ac_try='test -s conftest.$ac_objext'
8405   { (eval echo "$as_me:8405: \"$ac_try\"") >&5
8406   (eval $ac_try) 2>&5
8407   ac_status=$?
8408   echo "$as_me:8408: \$? = $ac_status" >&5
8409   (exit $ac_status); }; }; then
8410   ac_cv_sys_large_files=1; break
8411 else
8412   echo "$as_me: failed program was:" >&5
8413 cat conftest.$ac_ext >&5
8414 fi
8415 rm -f conftest.$ac_objext conftest.$ac_ext
8416   break
8417 done
8418 fi
8419 echo "$as_me:8419: result: $ac_cv_sys_large_files" >&5
8420 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8421 if test "$ac_cv_sys_large_files" != no; then
8422
8423 cat >>confdefs.h <<EOF
8424 #define _LARGE_FILES $ac_cv_sys_large_files
8425 EOF
8426
8427 fi
8428 rm -f conftest*
8429 fi
8430
8431     if test "$enable_largefile" != no ; then
8432         echo "$as_me:8432: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8433 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8434 if test "${ac_cv_sys_largefile_source+set}" = set; then
8435   echo $ECHO_N "(cached) $ECHO_C" >&6
8436 else
8437   while :; do
8438   ac_cv_sys_largefile_source=no
8439   cat >conftest.$ac_ext <<_ACEOF
8440 #line 8440 "configure"
8441 #include "confdefs.h"
8442 #include <stdio.h>
8443 int
8444 main ()
8445 {
8446 return !fseeko;
8447   ;
8448   return 0;
8449 }
8450 _ACEOF
8451 rm -f conftest.$ac_objext
8452 if { (eval echo "$as_me:8452: \"$ac_compile\"") >&5
8453   (eval $ac_compile) 2>&5
8454   ac_status=$?
8455   echo "$as_me:8455: \$? = $ac_status" >&5
8456   (exit $ac_status); } &&
8457          { ac_try='test -s conftest.$ac_objext'
8458   { (eval echo "$as_me:8458: \"$ac_try\"") >&5
8459   (eval $ac_try) 2>&5
8460   ac_status=$?
8461   echo "$as_me:8461: \$? = $ac_status" >&5
8462   (exit $ac_status); }; }; then
8463   break
8464 else
8465   echo "$as_me: failed program was:" >&5
8466 cat conftest.$ac_ext >&5
8467 fi
8468 rm -f conftest.$ac_objext conftest.$ac_ext
8469   cat >conftest.$ac_ext <<_ACEOF
8470 #line 8470 "configure"
8471 #include "confdefs.h"
8472 #define _LARGEFILE_SOURCE 1
8473 #include <stdio.h>
8474 int
8475 main ()
8476 {
8477 return !fseeko;
8478   ;
8479   return 0;
8480 }
8481 _ACEOF
8482 rm -f conftest.$ac_objext
8483 if { (eval echo "$as_me:8483: \"$ac_compile\"") >&5
8484   (eval $ac_compile) 2>&5
8485   ac_status=$?
8486   echo "$as_me:8486: \$? = $ac_status" >&5
8487   (exit $ac_status); } &&
8488          { ac_try='test -s conftest.$ac_objext'
8489   { (eval echo "$as_me:8489: \"$ac_try\"") >&5
8490   (eval $ac_try) 2>&5
8491   ac_status=$?
8492   echo "$as_me:8492: \$? = $ac_status" >&5
8493   (exit $ac_status); }; }; then
8494   ac_cv_sys_largefile_source=1; break
8495 else
8496   echo "$as_me: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
8498 fi
8499 rm -f conftest.$ac_objext conftest.$ac_ext
8500   break
8501 done
8502 fi
8503 echo "$as_me:8503: result: $ac_cv_sys_largefile_source" >&5
8504 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8505 if test "$ac_cv_sys_largefile_source" != no; then
8506
8507 cat >>confdefs.h <<EOF
8508 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8509 EOF
8510
8511 fi
8512 rm -f conftest*
8513
8514 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8515 # in glibc 2.1.3, but that breaks too many other things.
8516 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8517 echo "$as_me:8517: checking for fseeko" >&5
8518 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8519 if test "${ac_cv_func_fseeko+set}" = set; then
8520   echo $ECHO_N "(cached) $ECHO_C" >&6
8521 else
8522   cat >conftest.$ac_ext <<_ACEOF
8523 #line 8523 "configure"
8524 #include "confdefs.h"
8525 #include <stdio.h>
8526 int
8527 main ()
8528 {
8529 return fseeko && fseeko (stdin, 0, 0);
8530   ;
8531   return 0;
8532 }
8533 _ACEOF
8534 rm -f conftest.$ac_objext conftest$ac_exeext
8535 if { (eval echo "$as_me:8535: \"$ac_link\"") >&5
8536   (eval $ac_link) 2>&5
8537   ac_status=$?
8538   echo "$as_me:8538: \$? = $ac_status" >&5
8539   (exit $ac_status); } &&
8540          { ac_try='test -s conftest$ac_exeext'
8541   { (eval echo "$as_me:8541: \"$ac_try\"") >&5
8542   (eval $ac_try) 2>&5
8543   ac_status=$?
8544   echo "$as_me:8544: \$? = $ac_status" >&5
8545   (exit $ac_status); }; }; then
8546   ac_cv_func_fseeko=yes
8547 else
8548   echo "$as_me: failed program was:" >&5
8549 cat conftest.$ac_ext >&5
8550 ac_cv_func_fseeko=no
8551 fi
8552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8553 fi
8554 echo "$as_me:8554: result: $ac_cv_func_fseeko" >&5
8555 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8556 if test $ac_cv_func_fseeko = yes; then
8557
8558 cat >>confdefs.h <<\EOF
8559 #define HAVE_FSEEKO 1
8560 EOF
8561
8562 fi
8563
8564         # Normally we would collect these definitions in the config.h,
8565         # but (like _XOPEN_SOURCE), some environments rely on having these
8566         # defined before any of the system headers are included.  Another
8567         # case comes up with C++, e.g., on AIX the compiler compiles the
8568         # header files by themselves before looking at the body files it is
8569         # told to compile.  For ncurses, those header files do not include
8570         # the config.h
8571         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8572         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8573         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8574
8575         echo "$as_me:8575: checking whether to use struct dirent64" >&5
8576 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8577 if test "${cf_cv_struct_dirent64+set}" = set; then
8578   echo $ECHO_N "(cached) $ECHO_C" >&6
8579 else
8580
8581                 cat >conftest.$ac_ext <<_ACEOF
8582 #line 8582 "configure"
8583 #include "confdefs.h"
8584
8585 #include <sys/types.h>
8586 #include <dirent.h>
8587
8588 int
8589 main ()
8590 {
8591
8592                 /* if transitional largefile support is setup, this is true */
8593                 extern struct dirent64 * readdir(DIR *);
8594                 struct dirent64 *x = readdir((DIR *)0);
8595                 struct dirent *y = readdir((DIR *)0);
8596                 int z = x - y;
8597
8598   ;
8599   return 0;
8600 }
8601 _ACEOF
8602 rm -f conftest.$ac_objext
8603 if { (eval echo "$as_me:8603: \"$ac_compile\"") >&5
8604   (eval $ac_compile) 2>&5
8605   ac_status=$?
8606   echo "$as_me:8606: \$? = $ac_status" >&5
8607   (exit $ac_status); } &&
8608          { ac_try='test -s conftest.$ac_objext'
8609   { (eval echo "$as_me:8609: \"$ac_try\"") >&5
8610   (eval $ac_try) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); }; }; then
8614   cf_cv_struct_dirent64=yes
8615 else
8616   echo "$as_me: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 cf_cv_struct_dirent64=no
8619 fi
8620 rm -f conftest.$ac_objext conftest.$ac_ext
8621
8622 fi
8623 echo "$as_me:8623: result: $cf_cv_struct_dirent64" >&5
8624 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8625         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8626 #define HAVE_STRUCT_DIRENT64 1
8627 EOF
8628
8629     fi
8630
8631 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8632 echo "$as_me:8632: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8633 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8634
8635 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8636 if test "${enable_tparm_varargs+set}" = set; then
8637   enableval="$enable_tparm_varargs"
8638   with_tparm_varargs=$enableval
8639 else
8640   with_tparm_varargs=yes
8641 fi;
8642 echo "$as_me:8642: result: $with_tparm_varargs" >&5
8643 echo "${ECHO_T}$with_tparm_varargs" >&6
8644 NCURSES_TPARM_VARARGS=0
8645 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8646
8647 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8648 if test "$with_ticlib" != no ; then
8649 echo "$as_me:8649: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8650 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8651
8652 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8653 if test "${enable_tic_depends+set}" = set; then
8654   enableval="$enable_tic_depends"
8655   with_tic_depends=$enableval
8656 else
8657   with_tic_depends=yes
8658 fi;
8659 echo "$as_me:8659: result: $with_tic_depends" >&5
8660 echo "${ECHO_T}$with_tic_depends" >&6
8661 else
8662         with_tic_depends=no
8663 fi
8664
8665 ###   use option --with-bool to override bool's type
8666 echo "$as_me:8666: checking for type of bool" >&5
8667 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8668
8669 # Check whether --with-bool or --without-bool was given.
8670 if test "${with_bool+set}" = set; then
8671   withval="$with_bool"
8672   NCURSES_BOOL="$withval"
8673 else
8674   NCURSES_BOOL=auto
8675 fi;
8676 echo "$as_me:8676: result: $NCURSES_BOOL" >&5
8677 echo "${ECHO_T}$NCURSES_BOOL" >&6
8678
8679 echo "$as_me:8679: checking for alternate terminal capabilities file" >&5
8680 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8681
8682 # Check whether --with-caps or --without-caps was given.
8683 if test "${with_caps+set}" = set; then
8684   withval="$with_caps"
8685   TERMINFO_CAPS=Caps.$withval
8686 else
8687   TERMINFO_CAPS=Caps
8688 fi;
8689 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8690 echo "$as_me:8690: result: $TERMINFO_CAPS" >&5
8691 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8692
8693 ###   use option --with-chtype to override chtype's type
8694 echo "$as_me:8694: checking for type of chtype" >&5
8695 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8696
8697 # Check whether --with-chtype or --without-chtype was given.
8698 if test "${with_chtype+set}" = set; then
8699   withval="$with_chtype"
8700   NCURSES_CHTYPE="$withval"
8701 else
8702   NCURSES_CHTYPE=auto
8703 fi;
8704 echo "$as_me:8704: result: $NCURSES_CHTYPE" >&5
8705 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8706
8707 ###   use option --with-ospeed to override ospeed's type
8708 echo "$as_me:8708: checking for type of ospeed" >&5
8709 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8710
8711 # Check whether --with-ospeed or --without-ospeed was given.
8712 if test "${with_ospeed+set}" = set; then
8713   withval="$with_ospeed"
8714   NCURSES_OSPEED="$withval"
8715 else
8716   NCURSES_OSPEED=short
8717 fi;
8718 echo "$as_me:8718: result: $NCURSES_OSPEED" >&5
8719 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8720
8721 ###   use option --with-mmask-t to override mmask_t's type
8722 echo "$as_me:8722: checking for type of mmask_t" >&5
8723 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8724
8725 # Check whether --with-mmask-t or --without-mmask-t was given.
8726 if test "${with_mmask_t+set}" = set; then
8727   withval="$with_mmask_t"
8728   NCURSES_MMASK_T="$withval"
8729 else
8730   NCURSES_MMASK_T=auto
8731 fi;
8732 echo "$as_me:8732: result: $NCURSES_MMASK_T" >&5
8733 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8734
8735 ### Enable compiling-in rcs id's
8736 echo "$as_me:8736: checking if RCS identifiers should be compiled-in" >&5
8737 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8738
8739 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8740 if test "${with_rcs_ids+set}" = set; then
8741   withval="$with_rcs_ids"
8742   with_rcs_ids=$withval
8743 else
8744   with_rcs_ids=no
8745 fi;
8746 echo "$as_me:8746: result: $with_rcs_ids" >&5
8747 echo "${ECHO_T}$with_rcs_ids" >&6
8748 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8749 #define USE_RCS_IDS 1
8750 EOF
8751
8752 ###############################################################################
8753
8754 echo "$as_me:8754: checking format of man-pages" >&5
8755 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8756
8757 # Check whether --with-manpage-format or --without-manpage-format was given.
8758 if test "${with_manpage_format+set}" = set; then
8759   withval="$with_manpage_format"
8760   MANPAGE_FORMAT=$withval
8761 else
8762   MANPAGE_FORMAT=unknown
8763 fi;
8764
8765 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8766 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8767
8768 cf_unknown=
8769
8770 case $MANPAGE_FORMAT in
8771 unknown)
8772   if test -z "$MANPATH" ; then
8773     MANPATH="/usr/man:/usr/share/man"
8774   fi
8775
8776   # look for the 'date' man-page (it's most likely to be installed!)
8777   MANPAGE_FORMAT=
8778   cf_preform=no
8779   cf_catonly=yes
8780   cf_example=date
8781
8782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8783   for cf_dir in $MANPATH; do
8784     test -z "$cf_dir" && cf_dir=/usr/man
8785     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
8786     do
8787       cf_test=`echo $cf_name | sed -e 's/*//'`
8788       if test "x$cf_test" = "x$cf_name" ; then
8789
8790         case "$cf_name" in
8791         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8792         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8793         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8794         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8795         esac
8796
8797         case "$cf_name" in
8798         $cf_dir/man*)
8799           cf_catonly=no
8800           ;;
8801         $cf_dir/cat*)
8802           cf_preform=yes
8803           ;;
8804         esac
8805         break
8806       fi
8807
8808       # if we found a match in either man* or cat*, stop looking
8809       if test -n "$MANPAGE_FORMAT" ; then
8810         cf_found=no
8811         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8812         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8813         case "$cf_name" in
8814         $cf_dir/cat*)
8815           cf_found=yes
8816           ;;
8817         esac
8818         test $cf_found=yes && break
8819       fi
8820     done
8821     # only check the first directory in $MANPATH where we find manpages
8822     if test -n "$MANPAGE_FORMAT" ; then
8823        break
8824     fi
8825   done
8826   # if we did not find the example, just assume it is normal
8827   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8828   IFS="$ac_save_ifs"
8829   ;;
8830 *)
8831   for cf_option in $MANPAGE_FORMAT; do
8832      case $cf_option in #(vi
8833      gzip|compress|BSDI|normal|formatted|catonly)
8834        ;;
8835      *)
8836        cf_unknown="$cf_unknown $cf_option"
8837        ;;
8838      esac
8839   done
8840   ;;
8841 esac
8842
8843 echo "$as_me:8843: result: $MANPAGE_FORMAT" >&5
8844 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8845 if test -n "$cf_unknown" ; then
8846   { echo "$as_me:8846: WARNING: Unexpected manpage-format $cf_unknown" >&5
8847 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8848 fi
8849
8850 echo "$as_me:8850: checking for manpage renaming" >&5
8851 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8852
8853 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8854 if test "${with_manpage_renames+set}" = set; then
8855   withval="$with_manpage_renames"
8856   MANPAGE_RENAMES=$withval
8857 else
8858   MANPAGE_RENAMES=yes
8859 fi;
8860
8861 case ".$MANPAGE_RENAMES" in #(vi
8862 .no) #(vi
8863   ;;
8864 .|.yes)
8865   # Debian 'man' program?
8866   if test -f /etc/debian_version ; then
8867     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8868   else
8869     MANPAGE_RENAMES=no
8870   fi
8871   ;;
8872 esac
8873
8874 if test "$MANPAGE_RENAMES" != no ; then
8875   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8876     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8877   elif test ! -f $MANPAGE_RENAMES ; then
8878     { { echo "$as_me:8878: error: not a filename: $MANPAGE_RENAMES" >&5
8879 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8880    { (exit 1); exit 1; }; }
8881   fi
8882
8883   test ! -d man && mkdir man
8884
8885   # Construct a sed-script to perform renaming within man-pages
8886   if test -n "$MANPAGE_RENAMES" ; then
8887     test ! -d man && mkdir man
8888     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8889   fi
8890 fi
8891
8892 echo "$as_me:8892: result: $MANPAGE_RENAMES" >&5
8893 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8894
8895 echo "$as_me:8895: checking if manpage aliases will be installed" >&5
8896 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8897
8898 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8899 if test "${with_manpage_aliases+set}" = set; then
8900   withval="$with_manpage_aliases"
8901   MANPAGE_ALIASES=$withval
8902 else
8903   MANPAGE_ALIASES=yes
8904 fi;
8905
8906 echo "$as_me:8906: result: $MANPAGE_ALIASES" >&5
8907 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8908
8909 if test "$LN_S" = "ln -s"; then
8910         cf_use_symlinks=yes
8911 else
8912         cf_use_symlinks=no
8913 fi
8914
8915 MANPAGE_SYMLINKS=no
8916 if test "$MANPAGE_ALIASES" = yes ; then
8917 echo "$as_me:8917: checking if manpage symlinks should be used" >&5
8918 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8919
8920 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8921 if test "${with_manpage_symlinks+set}" = set; then
8922   withval="$with_manpage_symlinks"
8923   MANPAGE_SYMLINKS=$withval
8924 else
8925   MANPAGE_SYMLINKS=$cf_use_symlinks
8926 fi;
8927
8928 if test "$$cf_use_symlinks" = no; then
8929 if test "$MANPAGE_SYMLINKS" = yes ; then
8930         { echo "$as_me:8930: WARNING: cannot make symlinks" >&5
8931 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8932         MANPAGE_SYMLINKS=no
8933 fi
8934 fi
8935
8936 echo "$as_me:8936: result: $MANPAGE_SYMLINKS" >&5
8937 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8938 fi
8939
8940 echo "$as_me:8940: checking for manpage tbl" >&5
8941 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8942
8943 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8944 if test "${with_manpage_tbl+set}" = set; then
8945   withval="$with_manpage_tbl"
8946   MANPAGE_TBL=$withval
8947 else
8948   MANPAGE_TBL=no
8949 fi;
8950
8951 echo "$as_me:8951: result: $MANPAGE_TBL" >&5
8952 echo "${ECHO_T}$MANPAGE_TBL" >&6
8953
8954   if test "$prefix" = "NONE" ; then
8955      cf_prefix="$ac_default_prefix"
8956   else
8957      cf_prefix="$prefix"
8958   fi
8959
8960   case "$MANPAGE_FORMAT" in # (vi
8961   *catonly*) # (vi
8962     cf_format=yes
8963     cf_inboth=no
8964     ;;
8965   *formatted*) # (vi
8966     cf_format=yes
8967     cf_inboth=yes
8968     ;;
8969   *)
8970     cf_format=no
8971     cf_inboth=no
8972     ;;
8973   esac
8974
8975 test ! -d man && mkdir man
8976
8977 cf_so_strip=
8978 cf_compress=
8979 case "$MANPAGE_FORMAT" in #(vi
8980 *compress*) #(vi
8981         cf_so_strip="Z"
8982         cf_compress=compress
8983   ;;
8984 *gzip*) #(vi
8985         cf_so_strip="gz"
8986         cf_compress=gzip
8987   ;;
8988 esac
8989
8990 cf_edit_man=./edit_man.sh
8991 cf_man_alias=`pwd`/man_alias.sed
8992
8993 cat >$cf_edit_man <<CF_EOF
8994 #! /bin/sh
8995 # this script is generated by the configure-script CF_MAN_PAGES macro.
8996
8997 prefix="$cf_prefix"
8998 datadir="$datadir"
8999
9000 NCURSES_MAJOR="$NCURSES_MAJOR"
9001 NCURSES_MINOR="$NCURSES_MINOR"
9002 NCURSES_PATCH="$NCURSES_PATCH"
9003
9004 NCURSES_OSPEED="$NCURSES_OSPEED"
9005 TERMINFO="$TERMINFO"
9006
9007 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9008
9009 INSTALL="$INSTALL"
9010 INSTALL_DATA="$INSTALL_DATA"
9011
9012 transform="$program_transform_name"
9013
9014 TMP=\${TMPDIR-/tmp}/man\$\$
9015 trap "rm -f \$TMP" 0 1 2 5 15
9016
9017 form=\$1
9018 shift || exit 1
9019
9020 verb=\$1
9021 shift || exit 1
9022
9023 mandir=\$1
9024 shift || exit 1
9025
9026 srcdir=\$1
9027 top_srcdir=\$srcdir/..
9028 shift || exit 1
9029
9030 if test "\$form" = normal ; then
9031         if test "$cf_format" = yes ; then
9032         if test "$cf_inboth" = no ; then
9033                 sh \$0 format \$verb \$mandir \$srcdir \$*
9034                 exit $?
9035         fi
9036         fi
9037         cf_subdir=\$mandir/man
9038         cf_tables=$MANPAGE_TBL
9039 else
9040         cf_subdir=\$mandir/cat
9041         cf_tables=yes
9042 fi
9043
9044 # process the list of source-files
9045 for i in \$* ; do
9046 case \$i in #(vi
9047 *.orig|*.rej) ;; #(vi
9048 *.[0-9]*)
9049         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9050         if test \$verb = installing ; then
9051         if test ! -d \$cf_subdir\${section} ; then
9052                 \$MKDIRS \$cf_subdir\$section
9053         fi
9054         fi
9055
9056         # replace variables in man page
9057         if test ! -f $cf_man_alias ; then
9058 cat >>$cf_man_alias <<-CF_EOF2
9059                 s,@DATADIR@,\$datadir,g
9060                 s,@TERMINFO@,\$TERMINFO,g
9061                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9062                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9063                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9064                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9065 CF_EOF
9066
9067         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9068         do
9069                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9070                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9071 cat >>$cf_edit_man <<-CF_EOF
9072                 s,@$cf_NAME@,$cf_name,
9073 CF_EOF
9074         done
9075
9076 cat >>$cf_edit_man <<CF_EOF
9077 CF_EOF2
9078                 echo "...made $cf_man_alias"
9079         fi
9080
9081         aliases=
9082         cf_source=\`basename \$i\`
9083         inalias=\$cf_source
9084         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9085         if test ! -f \$inalias ; then
9086                 echo .. skipped \$cf_source
9087                 continue
9088         fi
9089 CF_EOF
9090
9091 if test "$MANPAGE_ALIASES" != no ; then
9092 cat >>$cf_edit_man <<CF_EOF
9093         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9094 CF_EOF
9095 fi
9096
9097 if test "$MANPAGE_RENAMES" = no ; then
9098 cat >>$cf_edit_man <<CF_EOF
9099         # perform program transformations for section 1 man pages
9100         if test \$section = 1 ; then
9101                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9102         else
9103                 cf_target=\$cf_subdir\${section}/\$cf_source
9104         fi
9105 CF_EOF
9106 else
9107 cat >>$cf_edit_man <<CF_EOF
9108         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9109         if test -z "\$cf_target" ; then
9110                 echo '? missing rename for '\$cf_source
9111                 cf_target="\$cf_source"
9112         fi
9113         cf_target="\$cf_subdir\${section}/\${cf_target}"
9114
9115 CF_EOF
9116 fi
9117
9118 cat >>$cf_edit_man <<CF_EOF
9119         sed     -f $cf_man_alias \\
9120 CF_EOF
9121
9122 if test -f $MANPAGE_RENAMES ; then
9123 cat >>$cf_edit_man <<CF_EOF
9124                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9125 CF_EOF
9126 else
9127 cat >>$cf_edit_man <<CF_EOF
9128                 < \$i >\$TMP
9129 CF_EOF
9130 fi
9131
9132 cat >>$cf_edit_man <<CF_EOF
9133 if test \$cf_tables = yes ; then
9134         tbl \$TMP >\$TMP.out
9135         mv \$TMP.out \$TMP
9136 fi
9137 CF_EOF
9138
9139 if test $with_curses_h != yes ; then
9140 cat >>$cf_edit_man <<CF_EOF
9141         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9142         mv \$TMP.out \$TMP
9143 CF_EOF
9144 fi
9145
9146 cat >>$cf_edit_man <<CF_EOF
9147         if test \$form = format ; then
9148                 nroff -man \$TMP >\$TMP.out
9149                 mv \$TMP.out \$TMP
9150         fi
9151 CF_EOF
9152
9153 if test -n "$cf_compress" ; then
9154 cat >>$cf_edit_man <<CF_EOF
9155         if test \$verb = installing ; then
9156         if ( $cf_compress -f \$TMP )
9157         then
9158                 mv \$TMP.$cf_so_strip \$TMP
9159         fi
9160         fi
9161         cf_target="\$cf_target.$cf_so_strip"
9162 CF_EOF
9163 fi
9164
9165 case "$MANPAGE_FORMAT" in #(vi
9166 *BSDI*)
9167 cat >>$cf_edit_man <<CF_EOF
9168         if test \$form = format ; then
9169                 # BSDI installs only .0 suffixes in the cat directories
9170                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9171         fi
9172 CF_EOF
9173   ;;
9174 esac
9175
9176 cat >>$cf_edit_man <<CF_EOF
9177         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9178         if test \$verb = installing ; then
9179                 echo \$verb \$cf_target
9180                 \$INSTALL_DATA \$TMP \$cf_target
9181                 test -d \$cf_subdir\${section} &&
9182                 test -n "\$aliases" && (
9183                         cd \$cf_subdir\${section} && (
9184                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9185                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9186                                 cf_target=\`basename \$cf_target\`
9187                                 for cf_alias in \$aliases
9188                                 do
9189                                         if test \$section = 1 ; then
9190                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9191                                         fi
9192
9193                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9194                                                 if test -f \$cf_alias\${suffix} ; then
9195                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9196                                                         then
9197                                                                 continue
9198                                                         fi
9199                                                 fi
9200                                                 echo .. \$verb alias \$cf_alias\${suffix}
9201                                                 rm -f \$cf_alias\${suffix}
9202                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9203                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9204                                                 echo ".so \$cf_source" >\$TMP
9205 CF_EOF
9206 if test -n "$cf_compress" ; then
9207 cat >>$cf_edit_man <<CF_EOF
9208                                                 if test -n "$cf_so_strip" ; then
9209                                                         $cf_compress -f \$TMP
9210                                                         mv \$TMP.$cf_so_strip \$TMP
9211                                                 fi
9212 CF_EOF
9213 fi
9214 cat >>$cf_edit_man <<CF_EOF
9215                                                 echo .. \$verb alias \$cf_alias\${suffix}
9216                                                 rm -f \$cf_alias\${suffix}
9217                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9218                                         fi
9219                                 done
9220                         )
9221                 )
9222         elif test \$verb = removing ; then
9223                 test -f \$cf_target && (
9224                         echo \$verb \$cf_target
9225                         rm -f \$cf_target
9226                 )
9227                 test -d \$cf_subdir\${section} &&
9228                 test -n "\$aliases" && (
9229                         cd \$cf_subdir\${section} && (
9230                                 for cf_alias in \$aliases
9231                                 do
9232                                         if test \$section = 1 ; then
9233                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9234                                         fi
9235
9236                                         echo .. \$verb alias \$cf_alias\${suffix}
9237                                         rm -f \$cf_alias\${suffix}
9238                                 done
9239                         )
9240                 )
9241         else
9242 #               echo ".hy 0"
9243                 cat \$TMP
9244         fi
9245         ;;
9246 esac
9247 done
9248
9249 if test $cf_inboth = yes ; then
9250 if test \$form != format ; then
9251         sh \$0 format \$verb \$mandir \$srcdir \$*
9252 fi
9253 fi
9254
9255 exit 0
9256 CF_EOF
9257 chmod 755 $cf_edit_man
9258
9259 ###############################################################################
9260
9261 ### Note that some functions (such as const) are normally disabled anyway.
9262 echo "$as_me:9262: checking if you want to build with function extensions" >&5
9263 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9264
9265 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9266 if test "${enable_ext_funcs+set}" = set; then
9267   enableval="$enable_ext_funcs"
9268   with_ext_funcs=$enableval
9269 else
9270   with_ext_funcs=yes
9271 fi;
9272 echo "$as_me:9272: result: $with_ext_funcs" >&5
9273 echo "${ECHO_T}$with_ext_funcs" >&6
9274 if test "$with_ext_funcs" = yes ; then
9275         NCURSES_EXT_FUNCS=1
9276         cat >>confdefs.h <<\EOF
9277 #define HAVE_CURSES_VERSION 1
9278 EOF
9279
9280         cat >>confdefs.h <<\EOF
9281 #define HAVE_HAS_KEY 1
9282 EOF
9283
9284         cat >>confdefs.h <<\EOF
9285 #define HAVE_RESIZETERM 1
9286 EOF
9287
9288         cat >>confdefs.h <<\EOF
9289 #define HAVE_RESIZE_TERM 1
9290 EOF
9291
9292         cat >>confdefs.h <<\EOF
9293 #define HAVE_USE_DEFAULT_COLORS 1
9294 EOF
9295
9296         cat >>confdefs.h <<\EOF
9297 #define HAVE_WRESIZE 1
9298 EOF
9299
9300         cat >>confdefs.h <<\EOF
9301 #define NCURSES_EXT_FUNCS 1
9302 EOF
9303
9304         GENERATED_EXT_FUNCS=generated
9305 else
9306         NCURSES_EXT_FUNCS=0
9307         GENERATED_EXT_FUNCS=
9308 fi
9309
9310 echo "$as_me:9310: checking if you want to build with experimental SCREEN extensions" >&5
9311 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9312
9313 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9314 if test "${enable_sp_funcs+set}" = set; then
9315   enableval="$enable_sp_funcs"
9316   with_sp_funcs=$enableval
9317 else
9318   with_sp_funcs=no
9319 fi;
9320 echo "$as_me:9320: result: $with_sp_funcs" >&5
9321 echo "${ECHO_T}$with_sp_funcs" >&6
9322 if test "$with_sp_funcs" = yes ; then
9323         NCURSES_SP_FUNCS=1
9324         cat >>confdefs.h <<\EOF
9325 #define NCURSES_SP_FUNCS 1
9326 EOF
9327
9328         GENERATED_SP_FUNCS=generated
9329 else
9330         NCURSES_SP_FUNCS=0
9331         GENERATED_SP_FUNCS=
9332 fi
9333
9334 ###   use option --enable-const to turn on use of const beyond that in XSI.
9335 echo "$as_me:9335: checking for extended use of const keyword" >&5
9336 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9337
9338 # Check whether --enable-const or --disable-const was given.
9339 if test "${enable_const+set}" = set; then
9340   enableval="$enable_const"
9341   with_ext_const=$enableval
9342 else
9343   with_ext_const=no
9344 fi;
9345 echo "$as_me:9345: result: $with_ext_const" >&5
9346 echo "${ECHO_T}$with_ext_const" >&6
9347 NCURSES_CONST='/*nothing*/'
9348 if test "$with_ext_const" = yes ; then
9349         NCURSES_CONST=const
9350 fi
9351
9352 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9353 echo "$as_me:9353: checking if you want to use extended colors" >&5
9354 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9355
9356 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9357 if test "${enable_ext_colors+set}" = set; then
9358   enableval="$enable_ext_colors"
9359   with_ext_colors=$enableval
9360 else
9361   with_ext_colors=no
9362 fi;
9363 echo "$as_me:9363: result: $with_ext_colors" >&5
9364 echo "${ECHO_T}$with_ext_colors" >&6
9365 NCURSES_EXT_COLORS=0
9366 if test "$with_ext_colors" = yes ; then
9367         if test "$with_widec" != yes ; then
9368                 { { echo "$as_me:9368: error: This option applies only to wide-character library" >&5
9369 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9370    { (exit 1); exit 1; }; }
9371         else
9372                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9373
9374 if test "${with_abi_version+set}" != set; then
9375         case $cf_cv_rel_version in
9376         5.*)
9377                 cf_cv_rel_version=6.0
9378                 cf_cv_abi_version=6
9379                 { echo "$as_me:9379: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9380 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9381                 ;;
9382         esac
9383 fi
9384
9385         fi
9386         NCURSES_EXT_COLORS=1
9387         cat >>confdefs.h <<\EOF
9388 #define NCURSES_EXT_COLORS 1
9389 EOF
9390
9391 fi
9392
9393 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9394 echo "$as_me:9394: checking if you want to use extended mouse encoding" >&5
9395 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9396
9397 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9398 if test "${enable_ext_mouse+set}" = set; then
9399   enableval="$enable_ext_mouse"
9400   with_ext_mouse=$enableval
9401 else
9402   with_ext_mouse=no
9403 fi;
9404 echo "$as_me:9404: result: $with_ext_mouse" >&5
9405 echo "${ECHO_T}$with_ext_mouse" >&6
9406 NCURSES_MOUSE_VERSION=1
9407 if test "$with_ext_mouse" = yes ; then
9408         NCURSES_MOUSE_VERSION=2
9409
9410 if test "${with_abi_version+set}" != set; then
9411         case $cf_cv_rel_version in
9412         5.*)
9413                 cf_cv_rel_version=6.0
9414                 cf_cv_abi_version=6
9415                 { echo "$as_me:9415: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9416 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9417                 ;;
9418         esac
9419 fi
9420
9421 fi
9422
9423 echo "$as_me:9423: checking if you want \$NCURSES_NO_PADDING code" >&5
9424 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9425
9426 # Check whether --enable-no-padding or --disable-no-padding was given.
9427 if test "${enable_no_padding+set}" = set; then
9428   enableval="$enable_no_padding"
9429   with_no_padding=$enableval
9430 else
9431   with_no_padding=$with_ext_funcs
9432 fi;
9433 echo "$as_me:9433: result: $with_no_padding" >&5
9434 echo "${ECHO_T}$with_no_padding" >&6
9435 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9436 #define NCURSES_NO_PADDING 1
9437 EOF
9438
9439 echo "$as_me:9439: checking for ANSI C header files" >&5
9440 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9441 if test "${ac_cv_header_stdc+set}" = set; then
9442   echo $ECHO_N "(cached) $ECHO_C" >&6
9443 else
9444   cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447 #include <stdlib.h>
9448 #include <stdarg.h>
9449 #include <string.h>
9450 #include <float.h>
9451
9452 _ACEOF
9453 if { (eval echo "$as_me:9453: \"$ac_cpp conftest.$ac_ext\"") >&5
9454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9455   ac_status=$?
9456   egrep -v '^ *\+' conftest.er1 >conftest.err
9457   rm -f conftest.er1
9458   cat conftest.err >&5
9459   echo "$as_me:9459: \$? = $ac_status" >&5
9460   (exit $ac_status); } >/dev/null; then
9461   if test -s conftest.err; then
9462     ac_cpp_err=$ac_c_preproc_warn_flag
9463   else
9464     ac_cpp_err=
9465   fi
9466 else
9467   ac_cpp_err=yes
9468 fi
9469 if test -z "$ac_cpp_err"; then
9470   ac_cv_header_stdc=yes
9471 else
9472   echo "$as_me: failed program was:" >&5
9473   cat conftest.$ac_ext >&5
9474   ac_cv_header_stdc=no
9475 fi
9476 rm -f conftest.err conftest.$ac_ext
9477
9478 if test $ac_cv_header_stdc = yes; then
9479   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9480   cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483 #include <string.h>
9484
9485 _ACEOF
9486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9487   egrep "memchr" >/dev/null 2>&1; then
9488   :
9489 else
9490   ac_cv_header_stdc=no
9491 fi
9492 rm -f conftest*
9493
9494 fi
9495
9496 if test $ac_cv_header_stdc = yes; then
9497   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9498   cat >conftest.$ac_ext <<_ACEOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9501 #include <stdlib.h>
9502
9503 _ACEOF
9504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9505   egrep "free" >/dev/null 2>&1; then
9506   :
9507 else
9508   ac_cv_header_stdc=no
9509 fi
9510 rm -f conftest*
9511
9512 fi
9513
9514 if test $ac_cv_header_stdc = yes; then
9515   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9516   if test "$cross_compiling" = yes; then
9517   :
9518 else
9519   cat >conftest.$ac_ext <<_ACEOF
9520 #line 9520 "configure"
9521 #include "confdefs.h"
9522 #include <ctype.h>
9523 #if ((' ' & 0x0FF) == 0x020)
9524 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9525 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9526 #else
9527 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9528                      || ('j' <= (c) && (c) <= 'r') \
9529                      || ('s' <= (c) && (c) <= 'z'))
9530 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9531 #endif
9532
9533 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9534 int
9535 main ()
9536 {
9537   int i;
9538   for (i = 0; i < 256; i++)
9539     if (XOR (islower (i), ISLOWER (i))
9540         || toupper (i) != TOUPPER (i))
9541       $ac_main_return(2);
9542   $ac_main_return (0);
9543 }
9544 _ACEOF
9545 rm -f conftest$ac_exeext
9546 if { (eval echo "$as_me:9546: \"$ac_link\"") >&5
9547   (eval $ac_link) 2>&5
9548   ac_status=$?
9549   echo "$as_me:9549: \$? = $ac_status" >&5
9550   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9551   { (eval echo "$as_me:9551: \"$ac_try\"") >&5
9552   (eval $ac_try) 2>&5
9553   ac_status=$?
9554   echo "$as_me:9554: \$? = $ac_status" >&5
9555   (exit $ac_status); }; }; then
9556   :
9557 else
9558   echo "$as_me: program exited with status $ac_status" >&5
9559 echo "$as_me: failed program was:" >&5
9560 cat conftest.$ac_ext >&5
9561 ac_cv_header_stdc=no
9562 fi
9563 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9564 fi
9565 fi
9566 fi
9567 echo "$as_me:9567: result: $ac_cv_header_stdc" >&5
9568 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9569 if test $ac_cv_header_stdc = yes; then
9570
9571 cat >>confdefs.h <<\EOF
9572 #define STDC_HEADERS 1
9573 EOF
9574
9575 fi
9576
9577 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9578
9579 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9580                   inttypes.h stdint.h unistd.h
9581 do
9582 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9583 echo "$as_me:9583: checking for $ac_header" >&5
9584 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9585 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9586   echo $ECHO_N "(cached) $ECHO_C" >&6
9587 else
9588   cat >conftest.$ac_ext <<_ACEOF
9589 #line 9589 "configure"
9590 #include "confdefs.h"
9591 $ac_includes_default
9592 #include <$ac_header>
9593 _ACEOF
9594 rm -f conftest.$ac_objext
9595 if { (eval echo "$as_me:9595: \"$ac_compile\"") >&5
9596   (eval $ac_compile) 2>&5
9597   ac_status=$?
9598   echo "$as_me:9598: \$? = $ac_status" >&5
9599   (exit $ac_status); } &&
9600          { ac_try='test -s conftest.$ac_objext'
9601   { (eval echo "$as_me:9601: \"$ac_try\"") >&5
9602   (eval $ac_try) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit $ac_status); }; }; then
9606   eval "$as_ac_Header=yes"
9607 else
9608   echo "$as_me: failed program was:" >&5
9609 cat conftest.$ac_ext >&5
9610 eval "$as_ac_Header=no"
9611 fi
9612 rm -f conftest.$ac_objext conftest.$ac_ext
9613 fi
9614 echo "$as_me:9614: result: `eval echo '${'$as_ac_Header'}'`" >&5
9615 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9616 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9617   cat >>confdefs.h <<EOF
9618 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9619 EOF
9620
9621 fi
9622 done
9623
9624 echo "$as_me:9624: checking for signed char" >&5
9625 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9626 if test "${ac_cv_type_signed_char+set}" = set; then
9627   echo $ECHO_N "(cached) $ECHO_C" >&6
9628 else
9629   cat >conftest.$ac_ext <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632 $ac_includes_default
9633 int
9634 main ()
9635 {
9636 if ((signed char *) 0)
9637   return 0;
9638 if (sizeof (signed char))
9639   return 0;
9640   ;
9641   return 0;
9642 }
9643 _ACEOF
9644 rm -f conftest.$ac_objext
9645 if { (eval echo "$as_me:9645: \"$ac_compile\"") >&5
9646   (eval $ac_compile) 2>&5
9647   ac_status=$?
9648   echo "$as_me:9648: \$? = $ac_status" >&5
9649   (exit $ac_status); } &&
9650          { ac_try='test -s conftest.$ac_objext'
9651   { (eval echo "$as_me:9651: \"$ac_try\"") >&5
9652   (eval $ac_try) 2>&5
9653   ac_status=$?
9654   echo "$as_me:9654: \$? = $ac_status" >&5
9655   (exit $ac_status); }; }; then
9656   ac_cv_type_signed_char=yes
9657 else
9658   echo "$as_me: failed program was:" >&5
9659 cat conftest.$ac_ext >&5
9660 ac_cv_type_signed_char=no
9661 fi
9662 rm -f conftest.$ac_objext conftest.$ac_ext
9663 fi
9664 echo "$as_me:9664: result: $ac_cv_type_signed_char" >&5
9665 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9666
9667 echo "$as_me:9667: checking size of signed char" >&5
9668 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9669 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9670   echo $ECHO_N "(cached) $ECHO_C" >&6
9671 else
9672   if test "$ac_cv_type_signed_char" = yes; then
9673   if test "$cross_compiling" = yes; then
9674   # Depending upon the size, compute the lo and hi bounds.
9675 cat >conftest.$ac_ext <<_ACEOF
9676 #line 9676 "configure"
9677 #include "confdefs.h"
9678 $ac_includes_default
9679 int
9680 main ()
9681 {
9682 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9683   ;
9684   return 0;
9685 }
9686 _ACEOF
9687 rm -f conftest.$ac_objext
9688 if { (eval echo "$as_me:9688: \"$ac_compile\"") >&5
9689   (eval $ac_compile) 2>&5
9690   ac_status=$?
9691   echo "$as_me:9691: \$? = $ac_status" >&5
9692   (exit $ac_status); } &&
9693          { ac_try='test -s conftest.$ac_objext'
9694   { (eval echo "$as_me:9694: \"$ac_try\"") >&5
9695   (eval $ac_try) 2>&5
9696   ac_status=$?
9697   echo "$as_me:9697: \$? = $ac_status" >&5
9698   (exit $ac_status); }; }; then
9699   ac_lo=0 ac_mid=0
9700   while :; do
9701     cat >conftest.$ac_ext <<_ACEOF
9702 #line 9702 "configure"
9703 #include "confdefs.h"
9704 $ac_includes_default
9705 int
9706 main ()
9707 {
9708 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9709   ;
9710   return 0;
9711 }
9712 _ACEOF
9713 rm -f conftest.$ac_objext
9714 if { (eval echo "$as_me:9714: \"$ac_compile\"") >&5
9715   (eval $ac_compile) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); } &&
9719          { ac_try='test -s conftest.$ac_objext'
9720   { (eval echo "$as_me:9720: \"$ac_try\"") >&5
9721   (eval $ac_try) 2>&5
9722   ac_status=$?
9723   echo "$as_me:9723: \$? = $ac_status" >&5
9724   (exit $ac_status); }; }; then
9725   ac_hi=$ac_mid; break
9726 else
9727   echo "$as_me: failed program was:" >&5
9728 cat conftest.$ac_ext >&5
9729 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9730 fi
9731 rm -f conftest.$ac_objext conftest.$ac_ext
9732   done
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 ac_hi=-1 ac_mid=-1
9737   while :; do
9738     cat >conftest.$ac_ext <<_ACEOF
9739 #line 9739 "configure"
9740 #include "confdefs.h"
9741 $ac_includes_default
9742 int
9743 main ()
9744 {
9745 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9746   ;
9747   return 0;
9748 }
9749 _ACEOF
9750 rm -f conftest.$ac_objext
9751 if { (eval echo "$as_me:9751: \"$ac_compile\"") >&5
9752   (eval $ac_compile) 2>&5
9753   ac_status=$?
9754   echo "$as_me:9754: \$? = $ac_status" >&5
9755   (exit $ac_status); } &&
9756          { ac_try='test -s conftest.$ac_objext'
9757   { (eval echo "$as_me:9757: \"$ac_try\"") >&5
9758   (eval $ac_try) 2>&5
9759   ac_status=$?
9760   echo "$as_me:9760: \$? = $ac_status" >&5
9761   (exit $ac_status); }; }; then
9762   ac_lo=$ac_mid; break
9763 else
9764   echo "$as_me: failed program was:" >&5
9765 cat conftest.$ac_ext >&5
9766 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9767 fi
9768 rm -f conftest.$ac_objext conftest.$ac_ext
9769   done
9770 fi
9771 rm -f conftest.$ac_objext conftest.$ac_ext
9772 # Binary search between lo and hi bounds.
9773 while test "x$ac_lo" != "x$ac_hi"; do
9774   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9775   cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778 $ac_includes_default
9779 int
9780 main ()
9781 {
9782 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9783   ;
9784   return 0;
9785 }
9786 _ACEOF
9787 rm -f conftest.$ac_objext
9788 if { (eval echo "$as_me:9788: \"$ac_compile\"") >&5
9789   (eval $ac_compile) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); } &&
9793          { ac_try='test -s conftest.$ac_objext'
9794   { (eval echo "$as_me:9794: \"$ac_try\"") >&5
9795   (eval $ac_try) 2>&5
9796   ac_status=$?
9797   echo "$as_me:9797: \$? = $ac_status" >&5
9798   (exit $ac_status); }; }; then
9799   ac_hi=$ac_mid
9800 else
9801   echo "$as_me: failed program was:" >&5
9802 cat conftest.$ac_ext >&5
9803 ac_lo=`expr $ac_mid + 1`
9804 fi
9805 rm -f conftest.$ac_objext conftest.$ac_ext
9806 done
9807 ac_cv_sizeof_signed_char=$ac_lo
9808 else
9809   if test "$cross_compiling" = yes; then
9810   { { echo "$as_me:9810: error: cannot run test program while cross compiling" >&5
9811 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9812    { (exit 1); exit 1; }; }
9813 else
9814   cat >conftest.$ac_ext <<_ACEOF
9815 #line 9815 "configure"
9816 #include "confdefs.h"
9817 $ac_includes_default
9818 int
9819 main ()
9820 {
9821 FILE *f = fopen ("conftest.val", "w");
9822 if (!f)
9823   $ac_main_return (1);
9824 fprintf (f, "%d", (sizeof (signed char)));
9825 fclose (f);
9826   ;
9827   return 0;
9828 }
9829 _ACEOF
9830 rm -f conftest$ac_exeext
9831 if { (eval echo "$as_me:9831: \"$ac_link\"") >&5
9832   (eval $ac_link) 2>&5
9833   ac_status=$?
9834   echo "$as_me:9834: \$? = $ac_status" >&5
9835   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); }; }; then
9841   ac_cv_sizeof_signed_char=`cat conftest.val`
9842 else
9843   echo "$as_me: program exited with status $ac_status" >&5
9844 echo "$as_me: failed program was:" >&5
9845 cat conftest.$ac_ext >&5
9846 fi
9847 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9848 fi
9849 fi
9850 rm -f conftest.val
9851 else
9852   ac_cv_sizeof_signed_char=0
9853 fi
9854 fi
9855 echo "$as_me:9855: result: $ac_cv_sizeof_signed_char" >&5
9856 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9857 cat >>confdefs.h <<EOF
9858 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9859 EOF
9860
9861 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9862         NCURSES_SBOOL="signed char"
9863 else
9864         NCURSES_SBOOL="char"
9865 fi
9866 echo "$as_me:9866: checking if you want to use signed Boolean array in term.h" >&5
9867 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9868
9869 # Check whether --enable-signed-char or --disable-signed-char was given.
9870 if test "${enable_signed_char+set}" = set; then
9871   enableval="$enable_signed_char"
9872   with_signed_char=$enableval
9873 else
9874   with_signed_char=no
9875 fi;
9876 echo "$as_me:9876: result: $with_signed_char" >&5
9877 echo "${ECHO_T}$with_signed_char" >&6
9878 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9879
9880 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9881 echo "$as_me:9881: checking if you want SIGWINCH handler" >&5
9882 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9883
9884 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9885 if test "${enable_sigwinch+set}" = set; then
9886   enableval="$enable_sigwinch"
9887   with_sigwinch=$enableval
9888 else
9889   with_sigwinch=$with_ext_funcs
9890 fi;
9891 echo "$as_me:9891: result: $with_sigwinch" >&5
9892 echo "${ECHO_T}$with_sigwinch" >&6
9893 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9894 #define USE_SIGWINCH 1
9895 EOF
9896
9897 ###   use option --enable-tcap-names to allow user to define new capabilities
9898 echo "$as_me:9898: checking if you want user-definable terminal capabilities like termcap" >&5
9899 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9900
9901 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9902 if test "${enable_tcap_names+set}" = set; then
9903   enableval="$enable_tcap_names"
9904   with_tcap_names=$enableval
9905 else
9906   with_tcap_names=$with_ext_funcs
9907 fi;
9908 echo "$as_me:9908: result: $with_tcap_names" >&5
9909 echo "${ECHO_T}$with_tcap_names" >&6
9910 NCURSES_XNAMES=0
9911 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9912
9913 ###############################################################################
9914 # These options are relatively safe to experiment with.
9915
9916 echo "$as_me:9916: checking if you want all development code" >&5
9917 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9918
9919 # Check whether --with-develop or --without-develop was given.
9920 if test "${with_develop+set}" = set; then
9921   withval="$with_develop"
9922   with_develop=$withval
9923 else
9924   with_develop=no
9925 fi;
9926 echo "$as_me:9926: result: $with_develop" >&5
9927 echo "${ECHO_T}$with_develop" >&6
9928
9929 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9930 echo "$as_me:9930: checking if you want hard-tabs code" >&5
9931 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9932
9933 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9934 if test "${enable_hard_tabs+set}" = set; then
9935   enableval="$enable_hard_tabs"
9936
9937 else
9938   enable_hard_tabs=$with_develop
9939 fi;
9940 echo "$as_me:9940: result: $enable_hard_tabs" >&5
9941 echo "${ECHO_T}$enable_hard_tabs" >&6
9942 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9943 #define USE_HARD_TABS 1
9944 EOF
9945
9946 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9947 echo "$as_me:9947: checking if you want limited support for xmc" >&5
9948 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9949
9950 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9951 if test "${enable_xmc_glitch+set}" = set; then
9952   enableval="$enable_xmc_glitch"
9953
9954 else
9955   enable_xmc_glitch=$with_develop
9956 fi;
9957 echo "$as_me:9957: result: $enable_xmc_glitch" >&5
9958 echo "${ECHO_T}$enable_xmc_glitch" >&6
9959 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9960 #define USE_XMC_SUPPORT 1
9961 EOF
9962
9963 ###############################################################################
9964 # These are just experimental, probably should not be in a package:
9965
9966 echo "$as_me:9966: checking if you do not want to assume colors are white-on-black" >&5
9967 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9968
9969 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9970 if test "${enable_assumed_color+set}" = set; then
9971   enableval="$enable_assumed_color"
9972   with_assumed_color=$enableval
9973 else
9974   with_assumed_color=yes
9975 fi;
9976 echo "$as_me:9976: result: $with_assumed_color" >&5
9977 echo "${ECHO_T}$with_assumed_color" >&6
9978 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9979 #define USE_ASSUMED_COLOR 1
9980 EOF
9981
9982 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9983 echo "$as_me:9983: checking if you want hashmap scrolling-optimization code" >&5
9984 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9985
9986 # Check whether --enable-hashmap or --disable-hashmap was given.
9987 if test "${enable_hashmap+set}" = set; then
9988   enableval="$enable_hashmap"
9989   with_hashmap=$enableval
9990 else
9991   with_hashmap=yes
9992 fi;
9993 echo "$as_me:9993: result: $with_hashmap" >&5
9994 echo "${ECHO_T}$with_hashmap" >&6
9995 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9996 #define USE_HASHMAP 1
9997 EOF
9998
9999 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10000 echo "$as_me:10000: checking if you want colorfgbg code" >&5
10001 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10002
10003 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10004 if test "${enable_colorfgbg+set}" = set; then
10005   enableval="$enable_colorfgbg"
10006   with_colorfgbg=$enableval
10007 else
10008   with_colorfgbg=no
10009 fi;
10010 echo "$as_me:10010: result: $with_colorfgbg" >&5
10011 echo "${ECHO_T}$with_colorfgbg" >&6
10012 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10013 #define USE_COLORFGBG 1
10014 EOF
10015
10016 # This is still experimental (20080329), but should ultimately be moved to
10017 # the script-block --with-normal, etc.
10018
10019 echo "$as_me:10019: checking if you want to link with the pthread library" >&5
10020 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10021
10022 # Check whether --with-pthread or --without-pthread was given.
10023 if test "${with_pthread+set}" = set; then
10024   withval="$with_pthread"
10025   with_pthread=$withval
10026 else
10027   with_pthread=no
10028 fi;
10029 echo "$as_me:10029: result: $with_pthread" >&5
10030 echo "${ECHO_T}$with_pthread" >&6
10031
10032 if test "$with_pthread" != no ; then
10033     echo "$as_me:10033: checking for pthread.h" >&5
10034 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10035 if test "${ac_cv_header_pthread_h+set}" = set; then
10036   echo $ECHO_N "(cached) $ECHO_C" >&6
10037 else
10038   cat >conftest.$ac_ext <<_ACEOF
10039 #line 10039 "configure"
10040 #include "confdefs.h"
10041 #include <pthread.h>
10042 _ACEOF
10043 if { (eval echo "$as_me:10043: \"$ac_cpp conftest.$ac_ext\"") >&5
10044   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10045   ac_status=$?
10046   egrep -v '^ *\+' conftest.er1 >conftest.err
10047   rm -f conftest.er1
10048   cat conftest.err >&5
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit $ac_status); } >/dev/null; then
10051   if test -s conftest.err; then
10052     ac_cpp_err=$ac_c_preproc_warn_flag
10053   else
10054     ac_cpp_err=
10055   fi
10056 else
10057   ac_cpp_err=yes
10058 fi
10059 if test -z "$ac_cpp_err"; then
10060   ac_cv_header_pthread_h=yes
10061 else
10062   echo "$as_me: failed program was:" >&5
10063   cat conftest.$ac_ext >&5
10064   ac_cv_header_pthread_h=no
10065 fi
10066 rm -f conftest.err conftest.$ac_ext
10067 fi
10068 echo "$as_me:10068: result: $ac_cv_header_pthread_h" >&5
10069 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10070 if test $ac_cv_header_pthread_h = yes; then
10071
10072         cat >>confdefs.h <<\EOF
10073 #define HAVE_PTHREADS_H 1
10074 EOF
10075
10076         echo "$as_me:10076: checking if we can link with the pthread library" >&5
10077 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10078         cf_save_LIBS="$LIBS"
10079         LIBS="-lpthread $LIBS"
10080         cat >conftest.$ac_ext <<_ACEOF
10081 #line 10081 "configure"
10082 #include "confdefs.h"
10083
10084 #include <pthread.h>
10085
10086 int
10087 main ()
10088 {
10089
10090         int rc = pthread_create(0,0,0,0);
10091
10092   ;
10093   return 0;
10094 }
10095 _ACEOF
10096 rm -f conftest.$ac_objext conftest$ac_exeext
10097 if { (eval echo "$as_me:10097: \"$ac_link\"") >&5
10098   (eval $ac_link) 2>&5
10099   ac_status=$?
10100   echo "$as_me:10100: \$? = $ac_status" >&5
10101   (exit $ac_status); } &&
10102          { ac_try='test -s conftest$ac_exeext'
10103   { (eval echo "$as_me:10103: \"$ac_try\"") >&5
10104   (eval $ac_try) 2>&5
10105   ac_status=$?
10106   echo "$as_me:10106: \$? = $ac_status" >&5
10107   (exit $ac_status); }; }; then
10108   with_pthread=yes
10109 else
10110   echo "$as_me: failed program was:" >&5
10111 cat conftest.$ac_ext >&5
10112 with_pthread=no
10113 fi
10114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10115         LIBS="$cf_save_LIBS"
10116         echo "$as_me:10116: result: $with_pthread" >&5
10117 echo "${ECHO_T}$with_pthread" >&6
10118
10119         if test "$with_pthread" = yes ; then
10120             LIBS="-lpthread $LIBS"
10121             cat >>confdefs.h <<\EOF
10122 #define HAVE_LIBPTHREADS 1
10123 EOF
10124
10125         else
10126             { { echo "$as_me:10126: error: Cannot link with pthread library" >&5
10127 echo "$as_me: error: Cannot link with pthread library" >&2;}
10128    { (exit 1); exit 1; }; }
10129         fi
10130
10131 fi
10132
10133 fi
10134
10135 echo "$as_me:10135: checking if you want to use weak-symbols for pthreads" >&5
10136 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10137
10138 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10139 if test "${enable_weak_symbols+set}" = set; then
10140   enableval="$enable_weak_symbols"
10141   use_weak_symbols=$withval
10142 else
10143   use_weak_symbols=no
10144 fi;
10145 echo "$as_me:10145: result: $use_weak_symbols" >&5
10146 echo "${ECHO_T}$use_weak_symbols" >&6
10147 if test "$use_weak_symbols" = yes ; then
10148
10149 echo "$as_me:10149: checking if $CC supports weak symbols" >&5
10150 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10151 if test "${cf_cv_weak_symbols+set}" = set; then
10152   echo $ECHO_N "(cached) $ECHO_C" >&6
10153 else
10154
10155 cat >conftest.$ac_ext <<_ACEOF
10156 #line 10156 "configure"
10157 #include "confdefs.h"
10158
10159 #include <stdio.h>
10160 int
10161 main ()
10162 {
10163
10164 #if defined(__GNUC__)
10165 #  if defined __USE_ISOC99
10166 #    define _cat_pragma(exp)    _Pragma(#exp)
10167 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10168 #  else
10169 #    define _weak_pragma(exp)
10170 #  endif
10171 #  define _declare(name)        __extension__ extern __typeof__(name) name
10172 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10173 #endif
10174
10175 weak_symbol(fopen);
10176
10177   ;
10178   return 0;
10179 }
10180 _ACEOF
10181 rm -f conftest.$ac_objext
10182 if { (eval echo "$as_me:10182: \"$ac_compile\"") >&5
10183   (eval $ac_compile) 2>&5
10184   ac_status=$?
10185   echo "$as_me:10185: \$? = $ac_status" >&5
10186   (exit $ac_status); } &&
10187          { ac_try='test -s conftest.$ac_objext'
10188   { (eval echo "$as_me:10188: \"$ac_try\"") >&5
10189   (eval $ac_try) 2>&5
10190   ac_status=$?
10191   echo "$as_me:10191: \$? = $ac_status" >&5
10192   (exit $ac_status); }; }; then
10193   cf_cv_weak_symbols=yes
10194 else
10195   echo "$as_me: failed program was:" >&5
10196 cat conftest.$ac_ext >&5
10197 cf_cv_weak_symbols=no
10198 fi
10199 rm -f conftest.$ac_objext conftest.$ac_ext
10200
10201 fi
10202 echo "$as_me:10202: result: $cf_cv_weak_symbols" >&5
10203 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10204
10205 else
10206     cf_cv_weak_symbols=no
10207 fi
10208
10209 if test $cf_cv_weak_symbols = yes ; then
10210     cat >>confdefs.h <<\EOF
10211 #define USE_WEAK_SYMBOLS 1
10212 EOF
10213
10214 fi
10215
10216 PTHREAD=
10217 if test "$with_pthread" = "yes" ; then
10218     cat >>confdefs.h <<\EOF
10219 #define USE_PTHREADS 1
10220 EOF
10221
10222     enable_reentrant=yes
10223     if test $cf_cv_weak_symbols = yes ; then
10224         PTHREAD=-lpthread
10225     fi
10226 fi
10227
10228 # Reentrant code has to be opaque; there's little advantage to making ncurses
10229 # opaque outside of that, so there is no --enable-opaque option.  We can use
10230 # this option without --with-pthreads, but this will be always set for
10231 # pthreads.
10232 echo "$as_me:10232: checking if you want experimental reentrant code" >&5
10233 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10234
10235 # Check whether --enable-reentrant or --disable-reentrant was given.
10236 if test "${enable_reentrant+set}" = set; then
10237   enableval="$enable_reentrant"
10238   with_reentrant=$enableval
10239 else
10240   with_reentrant=no
10241 fi;
10242 echo "$as_me:10242: result: $with_reentrant" >&5
10243 echo "${ECHO_T}$with_reentrant" >&6
10244 if test "$with_reentrant" = yes ; then
10245         cf_cv_enable_reentrant=1
10246         cf_cv_enable_opaque="NCURSES_INTERNALS"
10247         NCURSES_OPAQUE=1
10248         NCURSES_SIZE_T=int
10249     if test $cf_cv_weak_symbols = yes ; then
10250
10251 # remove pthread library from $LIBS
10252 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10253
10254     else
10255         LIB_SUFFIX="t${LIB_SUFFIX}"
10256     fi
10257         cat >>confdefs.h <<\EOF
10258 #define USE_REENTRANT 1
10259 EOF
10260
10261 if test "${with_abi_version+set}" != set; then
10262         case $cf_cv_rel_version in
10263         5.*)
10264                 cf_cv_rel_version=6.0
10265                 cf_cv_abi_version=6
10266                 { echo "$as_me:10266: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10267 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10268                 ;;
10269         esac
10270 fi
10271
10272 else
10273         cf_cv_enable_reentrant=0
10274         cf_cv_enable_opaque="NCURSES_OPAQUE"
10275         NCURSES_OPAQUE=0
10276         NCURSES_SIZE_T=short
10277 fi
10278
10279 echo "$as_me:10279: checking if you want experimental safe-sprintf code" >&5
10280 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10281
10282 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10283 if test "${enable_safe_sprintf+set}" = set; then
10284   enableval="$enable_safe_sprintf"
10285   with_safe_sprintf=$enableval
10286 else
10287   with_safe_sprintf=no
10288 fi;
10289 echo "$as_me:10289: result: $with_safe_sprintf" >&5
10290 echo "${ECHO_T}$with_safe_sprintf" >&6
10291 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10292 #define USE_SAFE_SPRINTF 1
10293 EOF
10294
10295 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10296 # when hashmap is used scroll hints are useless
10297 if test "$with_hashmap" = no ; then
10298 echo "$as_me:10298: checking if you want to experiment without scrolling-hints code" >&5
10299 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10300
10301 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10302 if test "${enable_scroll_hints+set}" = set; then
10303   enableval="$enable_scroll_hints"
10304   with_scroll_hints=$enableval
10305 else
10306   with_scroll_hints=yes
10307 fi;
10308 echo "$as_me:10308: result: $with_scroll_hints" >&5
10309 echo "${ECHO_T}$with_scroll_hints" >&6
10310 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10311 #define USE_SCROLL_HINTS 1
10312 EOF
10313
10314 fi
10315
10316 echo "$as_me:10316: checking if you want experimental wgetch-events code" >&5
10317 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10318
10319 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10320 if test "${enable_wgetch_events+set}" = set; then
10321   enableval="$enable_wgetch_events"
10322   with_wgetch_events=$enableval
10323 else
10324   with_wgetch_events=no
10325 fi;
10326 echo "$as_me:10326: result: $with_wgetch_events" >&5
10327 echo "${ECHO_T}$with_wgetch_events" >&6
10328 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10329 #define NCURSES_WGETCH_EVENTS 1
10330 EOF
10331
10332 ###############################################################################
10333
10334 ###     use option --disable-echo to suppress full display compiling commands
10335 echo "$as_me:10335: checking if you want to display full commands during build" >&5
10336 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10337
10338 # Check whether --enable-echo or --disable-echo was given.
10339 if test "${enable_echo+set}" = set; then
10340   enableval="$enable_echo"
10341   with_echo=$enableval
10342 else
10343   with_echo=yes
10344 fi;
10345 if test "$with_echo" = yes; then
10346         ECHO_LINK=
10347 else
10348         ECHO_LINK='@ echo linking $@ ... ;'
10349         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10350         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10351 fi
10352 echo "$as_me:10352: result: $with_echo" >&5
10353 echo "${ECHO_T}$with_echo" >&6
10354
10355 ###     use option --enable-warnings to turn on all gcc warnings
10356 echo "$as_me:10356: checking if you want to see compiler warnings" >&5
10357 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10358
10359 # Check whether --enable-warnings or --disable-warnings was given.
10360 if test "${enable_warnings+set}" = set; then
10361   enableval="$enable_warnings"
10362   with_warnings=$enableval
10363 fi;
10364 echo "$as_me:10364: result: $with_warnings" >&5
10365 echo "${ECHO_T}$with_warnings" >&6
10366
10367 if test "x$with_warnings" = "xyes"; then
10368         ADAFLAGS="$ADAFLAGS -gnatg"
10369
10370 INTEL_COMPILER=no
10371
10372 if test "$GCC" = yes ; then
10373         case $host_os in
10374         linux*|gnu*)
10375                 echo "$as_me:10375: checking if this is really Intel C compiler" >&5
10376 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10377                 cf_save_CFLAGS="$CFLAGS"
10378                 CFLAGS="$CFLAGS -no-gcc"
10379                 cat >conftest.$ac_ext <<_ACEOF
10380 #line 10380 "configure"
10381 #include "confdefs.h"
10382
10383 int
10384 main ()
10385 {
10386
10387 #ifdef __INTEL_COMPILER
10388 #else
10389 make an error
10390 #endif
10391
10392   ;
10393   return 0;
10394 }
10395 _ACEOF
10396 rm -f conftest.$ac_objext
10397 if { (eval echo "$as_me:10397: \"$ac_compile\"") >&5
10398   (eval $ac_compile) 2>&5
10399   ac_status=$?
10400   echo "$as_me:10400: \$? = $ac_status" >&5
10401   (exit $ac_status); } &&
10402          { ac_try='test -s conftest.$ac_objext'
10403   { (eval echo "$as_me:10403: \"$ac_try\"") >&5
10404   (eval $ac_try) 2>&5
10405   ac_status=$?
10406   echo "$as_me:10406: \$? = $ac_status" >&5
10407   (exit $ac_status); }; }; then
10408   INTEL_COMPILER=yes
10409 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10410
10411 else
10412   echo "$as_me: failed program was:" >&5
10413 cat conftest.$ac_ext >&5
10414 fi
10415 rm -f conftest.$ac_objext conftest.$ac_ext
10416                 CFLAGS="$cf_save_CFLAGS"
10417                 echo "$as_me:10417: result: $INTEL_COMPILER" >&5
10418 echo "${ECHO_T}$INTEL_COMPILER" >&6
10419                 ;;
10420         esac
10421 fi
10422
10423 cat > conftest.$ac_ext <<EOF
10424 #line 10424 "${as_me-configure}"
10425 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10426 EOF
10427
10428 if test "$INTEL_COMPILER" = yes
10429 then
10430 # The "-wdXXX" options suppress warnings:
10431 # remark #1419: external declaration in primary source file
10432 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10433 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10434 # remark #193: zero used for undefined preprocessing identifier
10435 # remark #593: variable "curs_sb_left_arrow" was set but never used
10436 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10437 # remark #869: parameter "tw" was never referenced
10438 # remark #981: operands are evaluated in unspecified order
10439 # warning #279: controlling expression is constant
10440
10441         { echo "$as_me:10441: checking for $CC warning options..." >&5
10442 echo "$as_me: checking for $CC warning options..." >&6;}
10443         cf_save_CFLAGS="$CFLAGS"
10444         EXTRA_CFLAGS="-Wall"
10445         for cf_opt in \
10446                 wd1419 \
10447                 wd1683 \
10448                 wd1684 \
10449                 wd193 \
10450                 wd593 \
10451                 wd279 \
10452                 wd810 \
10453                 wd869 \
10454                 wd981
10455         do
10456                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10457                 if { (eval echo "$as_me:10457: \"$ac_compile\"") >&5
10458   (eval $ac_compile) 2>&5
10459   ac_status=$?
10460   echo "$as_me:10460: \$? = $ac_status" >&5
10461   (exit $ac_status); }; then
10462                         test -n "$verbose" && echo "$as_me:10462: result: ... -$cf_opt" >&5
10463 echo "${ECHO_T}... -$cf_opt" >&6
10464                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10465                 fi
10466         done
10467         CFLAGS="$cf_save_CFLAGS"
10468
10469 elif test "$GCC" = yes
10470 then
10471         { echo "$as_me:10471: checking for $CC warning options..." >&5
10472 echo "$as_me: checking for $CC warning options..." >&6;}
10473         cf_save_CFLAGS="$CFLAGS"
10474         EXTRA_CFLAGS="-W -Wall"
10475         cf_warn_CONST=""
10476         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10477         for cf_opt in \
10478                 Wbad-function-cast \
10479                 Wcast-align \
10480                 Wcast-qual \
10481                 Winline \
10482                 Wmissing-declarations \
10483                 Wmissing-prototypes \
10484                 Wnested-externs \
10485                 Wpointer-arith \
10486                 Wshadow \
10487                 Wstrict-prototypes \
10488                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10489         do
10490                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10491                 if { (eval echo "$as_me:10491: \"$ac_compile\"") >&5
10492   (eval $ac_compile) 2>&5
10493   ac_status=$?
10494   echo "$as_me:10494: \$? = $ac_status" >&5
10495   (exit $ac_status); }; then
10496                         test -n "$verbose" && echo "$as_me:10496: result: ... -$cf_opt" >&5
10497 echo "${ECHO_T}... -$cf_opt" >&6
10498                         case $cf_opt in #(vi
10499                         Wcast-qual) #(vi
10500                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10501                                 ;;
10502                         Winline) #(vi
10503                                 case $GCC_VERSION in
10504                                 [34].*)
10505                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10506
10507 echo "${as_me-configure}:10507: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10508
10509                                         continue;;
10510                                 esac
10511                                 ;;
10512                         esac
10513                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10514                 fi
10515         done
10516         CFLAGS="$cf_save_CFLAGS"
10517 fi
10518 rm -f conftest*
10519
10520         if test "$cf_with_cxx" = yes ; then
10521
10522 INTEL_CPLUSPLUS=no
10523
10524 if test "$GCC" = yes ; then
10525         case $host_os in
10526         linux*|gnu*)
10527                 echo "$as_me:10527: checking if this is really Intel C++ compiler" >&5
10528 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10529                 cf_save_CFLAGS="$CXXFLAGS"
10530                 CXXFLAGS="$CXXFLAGS -no-gcc"
10531                 cat >conftest.$ac_ext <<_ACEOF
10532 #line 10532 "configure"
10533 #include "confdefs.h"
10534
10535 int
10536 main ()
10537 {
10538
10539 #ifdef __INTEL_COMPILER
10540 #else
10541 make an error
10542 #endif
10543
10544   ;
10545   return 0;
10546 }
10547 _ACEOF
10548 rm -f conftest.$ac_objext
10549 if { (eval echo "$as_me:10549: \"$ac_compile\"") >&5
10550   (eval $ac_compile) 2>&5
10551   ac_status=$?
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit $ac_status); } &&
10554          { ac_try='test -s conftest.$ac_objext'
10555   { (eval echo "$as_me:10555: \"$ac_try\"") >&5
10556   (eval $ac_try) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); }; }; then
10560   INTEL_CPLUSPLUS=yes
10561 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10562
10563 else
10564   echo "$as_me: failed program was:" >&5
10565 cat conftest.$ac_ext >&5
10566 fi
10567 rm -f conftest.$ac_objext conftest.$ac_ext
10568                 CXXFLAGS="$cf_save_CFLAGS"
10569                 echo "$as_me:10569: result: $INTEL_CPLUSPLUS" >&5
10570 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10571                 ;;
10572         esac
10573 fi
10574
10575 ac_ext=cc
10576 ac_cpp='$CXXCPP $CPPFLAGS'
10577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10578 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10580 ac_main_return=return
10581
10582 cat > conftest.$ac_ext <<EOF
10583 #line 10583 "configure"
10584 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10585 EOF
10586
10587 if test "$INTEL_CPLUSPLUS" = yes
10588 then
10589 # The "-wdXXX" options suppress warnings:
10590 # remark #1419: external declaration in primary source file
10591 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10592 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10593 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10594 # remark #193: zero used for undefined preprocessing identifier
10595 # remark #593: variable "curs_sb_left_arrow" was set but never used
10596 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10597 # remark #869: parameter "tw" was never referenced
10598 # remark #981: operands are evaluated in unspecified order
10599 # warning #269: invalid format string conversion
10600
10601         { echo "$as_me:10601: checking for $CC warning options..." >&5
10602 echo "$as_me: checking for $CC warning options..." >&6;}
10603         cf_save_CXXFLAGS="$CXXFLAGS"
10604         EXTRA_CXXFLAGS="-Wall"
10605         for cf_opt in \
10606                 wd1419 \
10607                 wd1682 \
10608                 wd1683 \
10609                 wd1684 \
10610                 wd193 \
10611                 wd279 \
10612                 wd593 \
10613                 wd810 \
10614                 wd869 \
10615                 wd981
10616         do
10617                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10618                 if { (eval echo "$as_me:10618: \"$ac_compile\"") >&5
10619   (eval $ac_compile) 2>&5
10620   ac_status=$?
10621   echo "$as_me:10621: \$? = $ac_status" >&5
10622   (exit $ac_status); }; then
10623                         test -n "$verbose" && echo "$as_me:10623: result: ... -$cf_opt" >&5
10624 echo "${ECHO_T}... -$cf_opt" >&6
10625                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10626                 fi
10627         done
10628         CXXFLAGS="$cf_save_CXXFLAGS"
10629
10630 elif test "$GXX" = yes
10631 then
10632         { echo "$as_me:10632: checking for $CXX warning options..." >&5
10633 echo "$as_me: checking for $CXX warning options..." >&6;}
10634         cf_save_CXXFLAGS="$CXXFLAGS"
10635         EXTRA_CXXFLAGS="-W -Wall"
10636         cf_gxx_extra_warnings=""
10637         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10638         case "$GCC_VERSION" in
10639         [1-2].*)
10640                 ;;
10641         *)
10642                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10643                 ;;
10644         esac
10645         for cf_opt in \
10646                 Wabi \
10647                 fabi-version=0 \
10648                 Woverloaded-virtual \
10649                 Wsign-promo \
10650                 Wsynth \
10651                 Wold-style-cast \
10652                 Wcast-align \
10653                 Wcast-qual \
10654                 Wmissing-prototypes \
10655                 Wpointer-arith \
10656                 Wshadow \
10657                 Wstrict-prototypes \
10658                 Wundef $cf_gxx_extra_warnings Wno-unused
10659         do
10660                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10661                 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit $ac_status); }; then
10666                         test -n "$verbose" && echo "$as_me:10666: result: ... -$cf_opt" >&5
10667 echo "${ECHO_T}... -$cf_opt" >&6
10668                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10669                 else
10670                         test -n "$verbose" && echo "$as_me:10670: result: ... no -$cf_opt" >&5
10671 echo "${ECHO_T}... no -$cf_opt" >&6
10672                 fi
10673         done
10674         CXXFLAGS="$cf_save_CXXFLAGS"
10675 fi
10676
10677 rm -f conftest*
10678 ac_ext=c
10679 ac_cpp='$CPP $CPPFLAGS'
10680 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10681 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10682 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10683 ac_main_return=return
10684
10685         fi
10686 fi
10687
10688 if test "$GCC" = yes
10689 then
10690 cat > conftest.i <<EOF
10691 #ifndef GCC_PRINTF
10692 #define GCC_PRINTF 0
10693 #endif
10694 #ifndef GCC_SCANF
10695 #define GCC_SCANF 0
10696 #endif
10697 #ifndef GCC_NORETURN
10698 #define GCC_NORETURN /* nothing */
10699 #endif
10700 #ifndef GCC_UNUSED
10701 #define GCC_UNUSED /* nothing */
10702 #endif
10703 EOF
10704 if test "$GCC" = yes
10705 then
10706         { echo "$as_me:10706: checking for $CC __attribute__ directives..." >&5
10707 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10708 cat > conftest.$ac_ext <<EOF
10709 #line 10709 "${as_me-configure}"
10710 #include "confdefs.h"
10711 #include "conftest.h"
10712 #include "conftest.i"
10713 #if     GCC_PRINTF
10714 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10715 #else
10716 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10717 #endif
10718 #if     GCC_SCANF
10719 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10720 #else
10721 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10722 #endif
10723 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10724 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10725 extern void foo(void) GCC_NORETURN;
10726 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10727 EOF
10728         for cf_attribute in scanf printf unused noreturn
10729         do
10730
10731 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10732
10733                 cf_directive="__attribute__(($cf_attribute))"
10734                 echo "checking for $CC $cf_directive" 1>&5
10735                 case $cf_attribute in
10736                 scanf|printf)
10737                 cat >conftest.h <<EOF
10738 #define GCC_$cf_ATTRIBUTE 1
10739 EOF
10740                         ;;
10741                 *)
10742                 cat >conftest.h <<EOF
10743 #define GCC_$cf_ATTRIBUTE $cf_directive
10744 EOF
10745                         ;;
10746                 esac
10747                 if { (eval echo "$as_me:10747: \"$ac_compile\"") >&5
10748   (eval $ac_compile) 2>&5
10749   ac_status=$?
10750   echo "$as_me:10750: \$? = $ac_status" >&5
10751   (exit $ac_status); }; then
10752                         test -n "$verbose" && echo "$as_me:10752: result: ... $cf_attribute" >&5
10753 echo "${ECHO_T}... $cf_attribute" >&6
10754                         cat conftest.h >>confdefs.h
10755                 fi
10756         done
10757 else
10758         fgrep define conftest.i >>confdefs.h
10759 fi
10760 rm -rf conftest*
10761 fi
10762
10763 ###     use option --enable-assertions to turn on generation of assertion code
10764 echo "$as_me:10764: checking if you want to enable runtime assertions" >&5
10765 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10766
10767 # Check whether --enable-assertions or --disable-assertions was given.
10768 if test "${enable_assertions+set}" = set; then
10769   enableval="$enable_assertions"
10770   with_assertions=$enableval
10771 else
10772   with_assertions=no
10773 fi;
10774 echo "$as_me:10774: result: $with_assertions" >&5
10775 echo "${ECHO_T}$with_assertions" >&6
10776 if test -n "$GCC"
10777 then
10778         if test "$with_assertions" = no
10779         then
10780                 cat >>confdefs.h <<\EOF
10781 #define NDEBUG 1
10782 EOF
10783
10784                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10785         else
10786                 ADAFLAGS="$ADAFLAGS -gnata"
10787         fi
10788 fi
10789
10790 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10791
10792 echo "$as_me:10792: checking if you want to use dmalloc for testing" >&5
10793 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10794
10795 # Check whether --with-dmalloc or --without-dmalloc was given.
10796 if test "${with_dmalloc+set}" = set; then
10797   withval="$with_dmalloc"
10798   cat >>confdefs.h <<\EOF
10799 #define USE_DMALLOC 1
10800 EOF
10801
10802         : ${with_cflags:=-g}
10803         : ${with_no_leaks:=yes}
10804          with_dmalloc=yes
10805 else
10806   with_dmalloc=
10807 fi;
10808 echo "$as_me:10808: result: ${with_dmalloc:-no}" >&5
10809 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10810
10811 case .$with_cflags in #(vi
10812 .*-g*)
10813         case .$CFLAGS in #(vi
10814         .*-g*) #(vi
10815                 ;;
10816         *)
10817
10818 cf_fix_cppflags=no
10819 cf_new_cflags=
10820 cf_new_cppflags=
10821 cf_new_extra_cppflags=
10822
10823 for cf_add_cflags in -g
10824 do
10825 case $cf_fix_cppflags in
10826 no)
10827         case $cf_add_cflags in #(vi
10828         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10829                 case $cf_add_cflags in
10830                 -D*)
10831                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10832
10833                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10834                         && test -z "${cf_tst_cflags}" \
10835                         && cf_fix_cppflags=yes
10836
10837                         if test $cf_fix_cppflags = yes ; then
10838                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10839                                 continue
10840                         elif test "${cf_tst_cflags}" = "\"'" ; then
10841                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10842                                 continue
10843                         fi
10844                         ;;
10845                 esac
10846                 case "$CPPFLAGS" in
10847                 *$cf_add_cflags) #(vi
10848                         ;;
10849                 *) #(vi
10850                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10851                         ;;
10852                 esac
10853                 ;;
10854         *)
10855                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10856                 ;;
10857         esac
10858         ;;
10859 yes)
10860         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10861
10862         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10863
10864         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10865         && test -z "${cf_tst_cflags}" \
10866         && cf_fix_cppflags=no
10867         ;;
10868 esac
10869 done
10870
10871 if test -n "$cf_new_cflags" ; then
10872
10873         CFLAGS="$CFLAGS $cf_new_cflags"
10874 fi
10875
10876 if test -n "$cf_new_cppflags" ; then
10877
10878         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10879 fi
10880
10881 if test -n "$cf_new_extra_cppflags" ; then
10882
10883         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10884 fi
10885
10886                 ;;
10887         esac
10888         ;;
10889 esac
10890
10891 if test "$with_dmalloc" = yes ; then
10892         echo "$as_me:10892: checking for dmalloc.h" >&5
10893 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10894 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10895   echo $ECHO_N "(cached) $ECHO_C" >&6
10896 else
10897   cat >conftest.$ac_ext <<_ACEOF
10898 #line 10898 "configure"
10899 #include "confdefs.h"
10900 #include <dmalloc.h>
10901 _ACEOF
10902 if { (eval echo "$as_me:10902: \"$ac_cpp conftest.$ac_ext\"") >&5
10903   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10904   ac_status=$?
10905   egrep -v '^ *\+' conftest.er1 >conftest.err
10906   rm -f conftest.er1
10907   cat conftest.err >&5
10908   echo "$as_me:10908: \$? = $ac_status" >&5
10909   (exit $ac_status); } >/dev/null; then
10910   if test -s conftest.err; then
10911     ac_cpp_err=$ac_c_preproc_warn_flag
10912   else
10913     ac_cpp_err=
10914   fi
10915 else
10916   ac_cpp_err=yes
10917 fi
10918 if test -z "$ac_cpp_err"; then
10919   ac_cv_header_dmalloc_h=yes
10920 else
10921   echo "$as_me: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   ac_cv_header_dmalloc_h=no
10924 fi
10925 rm -f conftest.err conftest.$ac_ext
10926 fi
10927 echo "$as_me:10927: result: $ac_cv_header_dmalloc_h" >&5
10928 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10929 if test $ac_cv_header_dmalloc_h = yes; then
10930
10931 echo "$as_me:10931: checking for dmalloc_debug in -ldmalloc" >&5
10932 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10933 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10934   echo $ECHO_N "(cached) $ECHO_C" >&6
10935 else
10936   ac_check_lib_save_LIBS=$LIBS
10937 LIBS="-ldmalloc  $LIBS"
10938 cat >conftest.$ac_ext <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941
10942 /* Override any gcc2 internal prototype to avoid an error.  */
10943 #ifdef __cplusplus
10944 extern "C"
10945 #endif
10946 /* We use char because int might match the return type of a gcc2
10947    builtin and then its argument prototype would still apply.  */
10948 char dmalloc_debug ();
10949 int
10950 main ()
10951 {
10952 dmalloc_debug ();
10953   ;
10954   return 0;
10955 }
10956 _ACEOF
10957 rm -f conftest.$ac_objext conftest$ac_exeext
10958 if { (eval echo "$as_me:10958: \"$ac_link\"") >&5
10959   (eval $ac_link) 2>&5
10960   ac_status=$?
10961   echo "$as_me:10961: \$? = $ac_status" >&5
10962   (exit $ac_status); } &&
10963          { ac_try='test -s conftest$ac_exeext'
10964   { (eval echo "$as_me:10964: \"$ac_try\"") >&5
10965   (eval $ac_try) 2>&5
10966   ac_status=$?
10967   echo "$as_me:10967: \$? = $ac_status" >&5
10968   (exit $ac_status); }; }; then
10969   ac_cv_lib_dmalloc_dmalloc_debug=yes
10970 else
10971   echo "$as_me: failed program was:" >&5
10972 cat conftest.$ac_ext >&5
10973 ac_cv_lib_dmalloc_dmalloc_debug=no
10974 fi
10975 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10976 LIBS=$ac_check_lib_save_LIBS
10977 fi
10978 echo "$as_me:10978: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10979 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10980 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10981   cat >>confdefs.h <<EOF
10982 #define HAVE_LIBDMALLOC 1
10983 EOF
10984
10985   LIBS="-ldmalloc $LIBS"
10986
10987 fi
10988
10989 fi
10990
10991 fi
10992
10993 echo "$as_me:10993: checking if you want to use dbmalloc for testing" >&5
10994 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10995
10996 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10997 if test "${with_dbmalloc+set}" = set; then
10998   withval="$with_dbmalloc"
10999   cat >>confdefs.h <<\EOF
11000 #define USE_DBMALLOC 1
11001 EOF
11002
11003         : ${with_cflags:=-g}
11004         : ${with_no_leaks:=yes}
11005          with_dbmalloc=yes
11006 else
11007   with_dbmalloc=
11008 fi;
11009 echo "$as_me:11009: result: ${with_dbmalloc:-no}" >&5
11010 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11011
11012 case .$with_cflags in #(vi
11013 .*-g*)
11014         case .$CFLAGS in #(vi
11015         .*-g*) #(vi
11016                 ;;
11017         *)
11018
11019 cf_fix_cppflags=no
11020 cf_new_cflags=
11021 cf_new_cppflags=
11022 cf_new_extra_cppflags=
11023
11024 for cf_add_cflags in -g
11025 do
11026 case $cf_fix_cppflags in
11027 no)
11028         case $cf_add_cflags in #(vi
11029         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11030                 case $cf_add_cflags in
11031                 -D*)
11032                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11033
11034                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11035                         && test -z "${cf_tst_cflags}" \
11036                         && cf_fix_cppflags=yes
11037
11038                         if test $cf_fix_cppflags = yes ; then
11039                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11040                                 continue
11041                         elif test "${cf_tst_cflags}" = "\"'" ; then
11042                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11043                                 continue
11044                         fi
11045                         ;;
11046                 esac
11047                 case "$CPPFLAGS" in
11048                 *$cf_add_cflags) #(vi
11049                         ;;
11050                 *) #(vi
11051                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11052                         ;;
11053                 esac
11054                 ;;
11055         *)
11056                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11057                 ;;
11058         esac
11059         ;;
11060 yes)
11061         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11062
11063         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11064
11065         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11066         && test -z "${cf_tst_cflags}" \
11067         && cf_fix_cppflags=no
11068         ;;
11069 esac
11070 done
11071
11072 if test -n "$cf_new_cflags" ; then
11073
11074         CFLAGS="$CFLAGS $cf_new_cflags"
11075 fi
11076
11077 if test -n "$cf_new_cppflags" ; then
11078
11079         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11080 fi
11081
11082 if test -n "$cf_new_extra_cppflags" ; then
11083
11084         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11085 fi
11086
11087                 ;;
11088         esac
11089         ;;
11090 esac
11091
11092 if test "$with_dbmalloc" = yes ; then
11093         echo "$as_me:11093: checking for dbmalloc.h" >&5
11094 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11095 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11096   echo $ECHO_N "(cached) $ECHO_C" >&6
11097 else
11098   cat >conftest.$ac_ext <<_ACEOF
11099 #line 11099 "configure"
11100 #include "confdefs.h"
11101 #include <dbmalloc.h>
11102 _ACEOF
11103 if { (eval echo "$as_me:11103: \"$ac_cpp conftest.$ac_ext\"") >&5
11104   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11105   ac_status=$?
11106   egrep -v '^ *\+' conftest.er1 >conftest.err
11107   rm -f conftest.er1
11108   cat conftest.err >&5
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } >/dev/null; then
11111   if test -s conftest.err; then
11112     ac_cpp_err=$ac_c_preproc_warn_flag
11113   else
11114     ac_cpp_err=
11115   fi
11116 else
11117   ac_cpp_err=yes
11118 fi
11119 if test -z "$ac_cpp_err"; then
11120   ac_cv_header_dbmalloc_h=yes
11121 else
11122   echo "$as_me: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   ac_cv_header_dbmalloc_h=no
11125 fi
11126 rm -f conftest.err conftest.$ac_ext
11127 fi
11128 echo "$as_me:11128: result: $ac_cv_header_dbmalloc_h" >&5
11129 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11130 if test $ac_cv_header_dbmalloc_h = yes; then
11131
11132 echo "$as_me:11132: checking for debug_malloc in -ldbmalloc" >&5
11133 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11134 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11135   echo $ECHO_N "(cached) $ECHO_C" >&6
11136 else
11137   ac_check_lib_save_LIBS=$LIBS
11138 LIBS="-ldbmalloc  $LIBS"
11139 cat >conftest.$ac_ext <<_ACEOF
11140 #line 11140 "configure"
11141 #include "confdefs.h"
11142
11143 /* Override any gcc2 internal prototype to avoid an error.  */
11144 #ifdef __cplusplus
11145 extern "C"
11146 #endif
11147 /* We use char because int might match the return type of a gcc2
11148    builtin and then its argument prototype would still apply.  */
11149 char debug_malloc ();
11150 int
11151 main ()
11152 {
11153 debug_malloc ();
11154   ;
11155   return 0;
11156 }
11157 _ACEOF
11158 rm -f conftest.$ac_objext conftest$ac_exeext
11159 if { (eval echo "$as_me:11159: \"$ac_link\"") >&5
11160   (eval $ac_link) 2>&5
11161   ac_status=$?
11162   echo "$as_me:11162: \$? = $ac_status" >&5
11163   (exit $ac_status); } &&
11164          { ac_try='test -s conftest$ac_exeext'
11165   { (eval echo "$as_me:11165: \"$ac_try\"") >&5
11166   (eval $ac_try) 2>&5
11167   ac_status=$?
11168   echo "$as_me:11168: \$? = $ac_status" >&5
11169   (exit $ac_status); }; }; then
11170   ac_cv_lib_dbmalloc_debug_malloc=yes
11171 else
11172   echo "$as_me: failed program was:" >&5
11173 cat conftest.$ac_ext >&5
11174 ac_cv_lib_dbmalloc_debug_malloc=no
11175 fi
11176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11177 LIBS=$ac_check_lib_save_LIBS
11178 fi
11179 echo "$as_me:11179: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11180 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11181 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11182   cat >>confdefs.h <<EOF
11183 #define HAVE_LIBDBMALLOC 1
11184 EOF
11185
11186   LIBS="-ldbmalloc $LIBS"
11187
11188 fi
11189
11190 fi
11191
11192 fi
11193
11194 echo "$as_me:11194: checking if you want to use valgrind for testing" >&5
11195 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11196
11197 # Check whether --with-valgrind or --without-valgrind was given.
11198 if test "${with_valgrind+set}" = set; then
11199   withval="$with_valgrind"
11200   cat >>confdefs.h <<\EOF
11201 #define USE_VALGRIND 1
11202 EOF
11203
11204         : ${with_cflags:=-g}
11205         : ${with_no_leaks:=yes}
11206          with_valgrind=yes
11207 else
11208   with_valgrind=
11209 fi;
11210 echo "$as_me:11210: result: ${with_valgrind:-no}" >&5
11211 echo "${ECHO_T}${with_valgrind:-no}" >&6
11212
11213 case .$with_cflags in #(vi
11214 .*-g*)
11215         case .$CFLAGS in #(vi
11216         .*-g*) #(vi
11217                 ;;
11218         *)
11219
11220 cf_fix_cppflags=no
11221 cf_new_cflags=
11222 cf_new_cppflags=
11223 cf_new_extra_cppflags=
11224
11225 for cf_add_cflags in -g
11226 do
11227 case $cf_fix_cppflags in
11228 no)
11229         case $cf_add_cflags in #(vi
11230         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11231                 case $cf_add_cflags in
11232                 -D*)
11233                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11234
11235                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11236                         && test -z "${cf_tst_cflags}" \
11237                         && cf_fix_cppflags=yes
11238
11239                         if test $cf_fix_cppflags = yes ; then
11240                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11241                                 continue
11242                         elif test "${cf_tst_cflags}" = "\"'" ; then
11243                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11244                                 continue
11245                         fi
11246                         ;;
11247                 esac
11248                 case "$CPPFLAGS" in
11249                 *$cf_add_cflags) #(vi
11250                         ;;
11251                 *) #(vi
11252                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11253                         ;;
11254                 esac
11255                 ;;
11256         *)
11257                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11258                 ;;
11259         esac
11260         ;;
11261 yes)
11262         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11263
11264         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11265
11266         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11267         && test -z "${cf_tst_cflags}" \
11268         && cf_fix_cppflags=no
11269         ;;
11270 esac
11271 done
11272
11273 if test -n "$cf_new_cflags" ; then
11274
11275         CFLAGS="$CFLAGS $cf_new_cflags"
11276 fi
11277
11278 if test -n "$cf_new_cppflags" ; then
11279
11280         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11281 fi
11282
11283 if test -n "$cf_new_extra_cppflags" ; then
11284
11285         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11286 fi
11287
11288                 ;;
11289         esac
11290         ;;
11291 esac
11292
11293 echo "$as_me:11293: checking if you want to perform memory-leak testing" >&5
11294 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11295
11296 # Check whether --enable-leaks or --disable-leaks was given.
11297 if test "${enable_leaks+set}" = set; then
11298   enableval="$enable_leaks"
11299   with_no_leaks=yes
11300 else
11301   : ${with_no_leaks:=no}
11302 fi;
11303 echo "$as_me:11303: result: $with_no_leaks" >&5
11304 echo "${ECHO_T}$with_no_leaks" >&6
11305
11306 if test "$with_no_leaks" = yes ; then
11307         cat >>confdefs.h <<\EOF
11308 #define NO_LEAKS 1
11309 EOF
11310
11311 fi
11312
11313 cat >>confdefs.h <<\EOF
11314 #define HAVE_NC_ALLOC_H 1
11315 EOF
11316
11317 ###     use option --enable-expanded to generate certain macros as functions
11318
11319 # Check whether --enable-expanded or --disable-expanded was given.
11320 if test "${enable_expanded+set}" = set; then
11321   enableval="$enable_expanded"
11322   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11323 #define NCURSES_EXPANDED 1
11324 EOF
11325
11326 fi;
11327
11328 ###     use option --disable-macros to suppress macros in favor of functions
11329
11330 # Check whether --enable-macros or --disable-macros was given.
11331 if test "${enable_macros+set}" = set; then
11332   enableval="$enable_macros"
11333   test "$enableval" = no && cat >>confdefs.h <<\EOF
11334 #define NCURSES_NOMACROS 1
11335 EOF
11336
11337 fi;
11338
11339 # Normally we only add trace() to the debug-library.  Allow this to be
11340 # extended to all models of the ncurses library:
11341 cf_all_traces=no
11342 case "$CFLAGS $CPPFLAGS" in
11343 *-DTRACE*)
11344         cf_all_traces=yes
11345         ;;
11346 esac
11347
11348 echo "$as_me:11348: checking whether to add trace feature to all models" >&5
11349 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11350
11351 # Check whether --with-trace or --without-trace was given.
11352 if test "${with_trace+set}" = set; then
11353   withval="$with_trace"
11354   cf_with_trace=$withval
11355 else
11356   cf_with_trace=$cf_all_traces
11357 fi;
11358 echo "$as_me:11358: result: $cf_with_trace" >&5
11359 echo "${ECHO_T}$cf_with_trace" >&6
11360
11361 if test "$cf_with_trace" = yes ; then
11362         LIB_TRACING=all
11363         ADA_TRACE=TRUE
11364
11365 cf_fix_cppflags=no
11366 cf_new_cflags=
11367 cf_new_cppflags=
11368 cf_new_extra_cppflags=
11369
11370 for cf_add_cflags in -DTRACE
11371 do
11372 case $cf_fix_cppflags in
11373 no)
11374         case $cf_add_cflags in #(vi
11375         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11376                 case $cf_add_cflags in
11377                 -D*)
11378                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11379
11380                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11381                         && test -z "${cf_tst_cflags}" \
11382                         && cf_fix_cppflags=yes
11383
11384                         if test $cf_fix_cppflags = yes ; then
11385                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11386                                 continue
11387                         elif test "${cf_tst_cflags}" = "\"'" ; then
11388                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11389                                 continue
11390                         fi
11391                         ;;
11392                 esac
11393                 case "$CPPFLAGS" in
11394                 *$cf_add_cflags) #(vi
11395                         ;;
11396                 *) #(vi
11397                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11398                         ;;
11399                 esac
11400                 ;;
11401         *)
11402                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11403                 ;;
11404         esac
11405         ;;
11406 yes)
11407         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11408
11409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11410
11411         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11412         && test -z "${cf_tst_cflags}" \
11413         && cf_fix_cppflags=no
11414         ;;
11415 esac
11416 done
11417
11418 if test -n "$cf_new_cflags" ; then
11419
11420         CFLAGS="$CFLAGS $cf_new_cflags"
11421 fi
11422
11423 if test -n "$cf_new_cppflags" ; then
11424
11425         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11426 fi
11427
11428 if test -n "$cf_new_extra_cppflags" ; then
11429
11430         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11431 fi
11432
11433 else
11434         LIB_TRACING=DEBUG
11435         ADA_TRACE=FALSE
11436 fi
11437
11438 ###     Checks for libraries.
11439 case $cf_cv_system_name in #(vi
11440 *mingw32*) #(vi
11441         ;;
11442 *)
11443 echo "$as_me:11443: checking for gettimeofday" >&5
11444 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11445 if test "${ac_cv_func_gettimeofday+set}" = set; then
11446   echo $ECHO_N "(cached) $ECHO_C" >&6
11447 else
11448   cat >conftest.$ac_ext <<_ACEOF
11449 #line 11449 "configure"
11450 #include "confdefs.h"
11451 /* System header to define __stub macros and hopefully few prototypes,
11452     which can conflict with char gettimeofday (); below.  */
11453 #include <assert.h>
11454 /* Override any gcc2 internal prototype to avoid an error.  */
11455 #ifdef __cplusplus
11456 extern "C"
11457 #endif
11458 /* We use char because int might match the return type of a gcc2
11459    builtin and then its argument prototype would still apply.  */
11460 char gettimeofday ();
11461 char (*f) ();
11462
11463 int
11464 main ()
11465 {
11466 /* The GNU C library defines this for functions which it implements
11467     to always fail with ENOSYS.  Some functions are actually named
11468     something starting with __ and the normal name is an alias.  */
11469 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11470 choke me
11471 #else
11472 f = gettimeofday;
11473 #endif
11474
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 rm -f conftest.$ac_objext conftest$ac_exeext
11480 if { (eval echo "$as_me:11480: \"$ac_link\"") >&5
11481   (eval $ac_link) 2>&5
11482   ac_status=$?
11483   echo "$as_me:11483: \$? = $ac_status" >&5
11484   (exit $ac_status); } &&
11485          { ac_try='test -s conftest$ac_exeext'
11486   { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487   (eval $ac_try) 2>&5
11488   ac_status=$?
11489   echo "$as_me:11489: \$? = $ac_status" >&5
11490   (exit $ac_status); }; }; then
11491   ac_cv_func_gettimeofday=yes
11492 else
11493   echo "$as_me: failed program was:" >&5
11494 cat conftest.$ac_ext >&5
11495 ac_cv_func_gettimeofday=no
11496 fi
11497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11498 fi
11499 echo "$as_me:11499: result: $ac_cv_func_gettimeofday" >&5
11500 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11501 if test $ac_cv_func_gettimeofday = yes; then
11502   cat >>confdefs.h <<\EOF
11503 #define HAVE_GETTIMEOFDAY 1
11504 EOF
11505
11506 else
11507
11508 echo "$as_me:11508: checking for gettimeofday in -lbsd" >&5
11509 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11510 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11511   echo $ECHO_N "(cached) $ECHO_C" >&6
11512 else
11513   ac_check_lib_save_LIBS=$LIBS
11514 LIBS="-lbsd  $LIBS"
11515 cat >conftest.$ac_ext <<_ACEOF
11516 #line 11516 "configure"
11517 #include "confdefs.h"
11518
11519 /* Override any gcc2 internal prototype to avoid an error.  */
11520 #ifdef __cplusplus
11521 extern "C"
11522 #endif
11523 /* We use char because int might match the return type of a gcc2
11524    builtin and then its argument prototype would still apply.  */
11525 char gettimeofday ();
11526 int
11527 main ()
11528 {
11529 gettimeofday ();
11530   ;
11531   return 0;
11532 }
11533 _ACEOF
11534 rm -f conftest.$ac_objext conftest$ac_exeext
11535 if { (eval echo "$as_me:11535: \"$ac_link\"") >&5
11536   (eval $ac_link) 2>&5
11537   ac_status=$?
11538   echo "$as_me:11538: \$? = $ac_status" >&5
11539   (exit $ac_status); } &&
11540          { ac_try='test -s conftest$ac_exeext'
11541   { (eval echo "$as_me:11541: \"$ac_try\"") >&5
11542   (eval $ac_try) 2>&5
11543   ac_status=$?
11544   echo "$as_me:11544: \$? = $ac_status" >&5
11545   (exit $ac_status); }; }; then
11546   ac_cv_lib_bsd_gettimeofday=yes
11547 else
11548   echo "$as_me: failed program was:" >&5
11549 cat conftest.$ac_ext >&5
11550 ac_cv_lib_bsd_gettimeofday=no
11551 fi
11552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11553 LIBS=$ac_check_lib_save_LIBS
11554 fi
11555 echo "$as_me:11555: result: $ac_cv_lib_bsd_gettimeofday" >&5
11556 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11557 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11558   cat >>confdefs.h <<\EOF
11559 #define HAVE_GETTIMEOFDAY 1
11560 EOF
11561
11562         LIBS="$LIBS -lbsd"
11563 fi
11564
11565 fi
11566         ;;
11567 esac
11568
11569 echo "$as_me:11569: checking if -lm needed for math functions" >&5
11570 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11571 if test "${cf_cv_need_libm+set}" = set; then
11572   echo $ECHO_N "(cached) $ECHO_C" >&6
11573 else
11574
11575         cat >conftest.$ac_ext <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578
11579         #include <stdio.h>
11580         #include <math.h>
11581
11582 int
11583 main ()
11584 {
11585 double x = rand(); printf("result = %g\n", sin(x))
11586   ;
11587   return 0;
11588 }
11589 _ACEOF
11590 rm -f conftest.$ac_objext conftest$ac_exeext
11591 if { (eval echo "$as_me:11591: \"$ac_link\"") >&5
11592   (eval $ac_link) 2>&5
11593   ac_status=$?
11594   echo "$as_me:11594: \$? = $ac_status" >&5
11595   (exit $ac_status); } &&
11596          { ac_try='test -s conftest$ac_exeext'
11597   { (eval echo "$as_me:11597: \"$ac_try\"") >&5
11598   (eval $ac_try) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; }; then
11602   cf_cv_need_libm=no
11603 else
11604   echo "$as_me: failed program was:" >&5
11605 cat conftest.$ac_ext >&5
11606 cf_cv_need_libm=yes
11607 fi
11608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11609 fi
11610 echo "$as_me:11610: result: $cf_cv_need_libm" >&5
11611 echo "${ECHO_T}$cf_cv_need_libm" >&6
11612 if test "$cf_cv_need_libm" = yes
11613 then
11614 MATH_LIB=-lm
11615 fi
11616
11617 ###     Checks for header files.
11618 echo "$as_me:11618: checking for ANSI C header files" >&5
11619 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11620 if test "${ac_cv_header_stdc+set}" = set; then
11621   echo $ECHO_N "(cached) $ECHO_C" >&6
11622 else
11623   cat >conftest.$ac_ext <<_ACEOF
11624 #line 11624 "configure"
11625 #include "confdefs.h"
11626 #include <stdlib.h>
11627 #include <stdarg.h>
11628 #include <string.h>
11629 #include <float.h>
11630
11631 _ACEOF
11632 if { (eval echo "$as_me:11632: \"$ac_cpp conftest.$ac_ext\"") >&5
11633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11634   ac_status=$?
11635   egrep -v '^ *\+' conftest.er1 >conftest.err
11636   rm -f conftest.er1
11637   cat conftest.err >&5
11638   echo "$as_me:11638: \$? = $ac_status" >&5
11639   (exit $ac_status); } >/dev/null; then
11640   if test -s conftest.err; then
11641     ac_cpp_err=$ac_c_preproc_warn_flag
11642   else
11643     ac_cpp_err=
11644   fi
11645 else
11646   ac_cpp_err=yes
11647 fi
11648 if test -z "$ac_cpp_err"; then
11649   ac_cv_header_stdc=yes
11650 else
11651   echo "$as_me: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   ac_cv_header_stdc=no
11654 fi
11655 rm -f conftest.err conftest.$ac_ext
11656
11657 if test $ac_cv_header_stdc = yes; then
11658   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11659   cat >conftest.$ac_ext <<_ACEOF
11660 #line 11660 "configure"
11661 #include "confdefs.h"
11662 #include <string.h>
11663
11664 _ACEOF
11665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11666   egrep "memchr" >/dev/null 2>&1; then
11667   :
11668 else
11669   ac_cv_header_stdc=no
11670 fi
11671 rm -f conftest*
11672
11673 fi
11674
11675 if test $ac_cv_header_stdc = yes; then
11676   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11677   cat >conftest.$ac_ext <<_ACEOF
11678 #line 11678 "configure"
11679 #include "confdefs.h"
11680 #include <stdlib.h>
11681
11682 _ACEOF
11683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11684   egrep "free" >/dev/null 2>&1; then
11685   :
11686 else
11687   ac_cv_header_stdc=no
11688 fi
11689 rm -f conftest*
11690
11691 fi
11692
11693 if test $ac_cv_header_stdc = yes; then
11694   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11695   if test "$cross_compiling" = yes; then
11696   :
11697 else
11698   cat >conftest.$ac_ext <<_ACEOF
11699 #line 11699 "configure"
11700 #include "confdefs.h"
11701 #include <ctype.h>
11702 #if ((' ' & 0x0FF) == 0x020)
11703 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11704 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11705 #else
11706 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11707                      || ('j' <= (c) && (c) <= 'r') \
11708                      || ('s' <= (c) && (c) <= 'z'))
11709 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11710 #endif
11711
11712 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11713 int
11714 main ()
11715 {
11716   int i;
11717   for (i = 0; i < 256; i++)
11718     if (XOR (islower (i), ISLOWER (i))
11719         || toupper (i) != TOUPPER (i))
11720       $ac_main_return(2);
11721   $ac_main_return (0);
11722 }
11723 _ACEOF
11724 rm -f conftest$ac_exeext
11725 if { (eval echo "$as_me:11725: \"$ac_link\"") >&5
11726   (eval $ac_link) 2>&5
11727   ac_status=$?
11728   echo "$as_me:11728: \$? = $ac_status" >&5
11729   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11730   { (eval echo "$as_me:11730: \"$ac_try\"") >&5
11731   (eval $ac_try) 2>&5
11732   ac_status=$?
11733   echo "$as_me:11733: \$? = $ac_status" >&5
11734   (exit $ac_status); }; }; then
11735   :
11736 else
11737   echo "$as_me: program exited with status $ac_status" >&5
11738 echo "$as_me: failed program was:" >&5
11739 cat conftest.$ac_ext >&5
11740 ac_cv_header_stdc=no
11741 fi
11742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11743 fi
11744 fi
11745 fi
11746 echo "$as_me:11746: result: $ac_cv_header_stdc" >&5
11747 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11748 if test $ac_cv_header_stdc = yes; then
11749
11750 cat >>confdefs.h <<\EOF
11751 #define STDC_HEADERS 1
11752 EOF
11753
11754 fi
11755
11756 ac_header_dirent=no
11757 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11758   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11759 echo "$as_me:11759: checking for $ac_hdr that defines DIR" >&5
11760 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11762   echo $ECHO_N "(cached) $ECHO_C" >&6
11763 else
11764   cat >conftest.$ac_ext <<_ACEOF
11765 #line 11765 "configure"
11766 #include "confdefs.h"
11767 #include <sys/types.h>
11768 #include <$ac_hdr>
11769
11770 int
11771 main ()
11772 {
11773 if ((DIR *) 0)
11774 return 0;
11775   ;
11776   return 0;
11777 }
11778 _ACEOF
11779 rm -f conftest.$ac_objext
11780 if { (eval echo "$as_me:11780: \"$ac_compile\"") >&5
11781   (eval $ac_compile) 2>&5
11782   ac_status=$?
11783   echo "$as_me:11783: \$? = $ac_status" >&5
11784   (exit $ac_status); } &&
11785          { ac_try='test -s conftest.$ac_objext'
11786   { (eval echo "$as_me:11786: \"$ac_try\"") >&5
11787   (eval $ac_try) 2>&5
11788   ac_status=$?
11789   echo "$as_me:11789: \$? = $ac_status" >&5
11790   (exit $ac_status); }; }; then
11791   eval "$as_ac_Header=yes"
11792 else
11793   echo "$as_me: failed program was:" >&5
11794 cat conftest.$ac_ext >&5
11795 eval "$as_ac_Header=no"
11796 fi
11797 rm -f conftest.$ac_objext conftest.$ac_ext
11798 fi
11799 echo "$as_me:11799: result: `eval echo '${'$as_ac_Header'}'`" >&5
11800 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11801 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11802   cat >>confdefs.h <<EOF
11803 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11804 EOF
11805
11806 ac_header_dirent=$ac_hdr; break
11807 fi
11808
11809 done
11810 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11811 if test $ac_header_dirent = dirent.h; then
11812   echo "$as_me:11812: checking for opendir in -ldir" >&5
11813 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11814 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11815   echo $ECHO_N "(cached) $ECHO_C" >&6
11816 else
11817   ac_check_lib_save_LIBS=$LIBS
11818 LIBS="-ldir  $LIBS"
11819 cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822
11823 /* Override any gcc2 internal prototype to avoid an error.  */
11824 #ifdef __cplusplus
11825 extern "C"
11826 #endif
11827 /* We use char because int might match the return type of a gcc2
11828    builtin and then its argument prototype would still apply.  */
11829 char opendir ();
11830 int
11831 main ()
11832 {
11833 opendir ();
11834   ;
11835   return 0;
11836 }
11837 _ACEOF
11838 rm -f conftest.$ac_objext conftest$ac_exeext
11839 if { (eval echo "$as_me:11839: \"$ac_link\"") >&5
11840   (eval $ac_link) 2>&5
11841   ac_status=$?
11842   echo "$as_me:11842: \$? = $ac_status" >&5
11843   (exit $ac_status); } &&
11844          { ac_try='test -s conftest$ac_exeext'
11845   { (eval echo "$as_me:11845: \"$ac_try\"") >&5
11846   (eval $ac_try) 2>&5
11847   ac_status=$?
11848   echo "$as_me:11848: \$? = $ac_status" >&5
11849   (exit $ac_status); }; }; then
11850   ac_cv_lib_dir_opendir=yes
11851 else
11852   echo "$as_me: failed program was:" >&5
11853 cat conftest.$ac_ext >&5
11854 ac_cv_lib_dir_opendir=no
11855 fi
11856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11857 LIBS=$ac_check_lib_save_LIBS
11858 fi
11859 echo "$as_me:11859: result: $ac_cv_lib_dir_opendir" >&5
11860 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11861 if test $ac_cv_lib_dir_opendir = yes; then
11862   LIBS="$LIBS -ldir"
11863 fi
11864
11865 else
11866   echo "$as_me:11866: checking for opendir in -lx" >&5
11867 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11868 if test "${ac_cv_lib_x_opendir+set}" = set; then
11869   echo $ECHO_N "(cached) $ECHO_C" >&6
11870 else
11871   ac_check_lib_save_LIBS=$LIBS
11872 LIBS="-lx  $LIBS"
11873 cat >conftest.$ac_ext <<_ACEOF
11874 #line 11874 "configure"
11875 #include "confdefs.h"
11876
11877 /* Override any gcc2 internal prototype to avoid an error.  */
11878 #ifdef __cplusplus
11879 extern "C"
11880 #endif
11881 /* We use char because int might match the return type of a gcc2
11882    builtin and then its argument prototype would still apply.  */
11883 char opendir ();
11884 int
11885 main ()
11886 {
11887 opendir ();
11888   ;
11889   return 0;
11890 }
11891 _ACEOF
11892 rm -f conftest.$ac_objext conftest$ac_exeext
11893 if { (eval echo "$as_me:11893: \"$ac_link\"") >&5
11894   (eval $ac_link) 2>&5
11895   ac_status=$?
11896   echo "$as_me:11896: \$? = $ac_status" >&5
11897   (exit $ac_status); } &&
11898          { ac_try='test -s conftest$ac_exeext'
11899   { (eval echo "$as_me:11899: \"$ac_try\"") >&5
11900   (eval $ac_try) 2>&5
11901   ac_status=$?
11902   echo "$as_me:11902: \$? = $ac_status" >&5
11903   (exit $ac_status); }; }; then
11904   ac_cv_lib_x_opendir=yes
11905 else
11906   echo "$as_me: failed program was:" >&5
11907 cat conftest.$ac_ext >&5
11908 ac_cv_lib_x_opendir=no
11909 fi
11910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11911 LIBS=$ac_check_lib_save_LIBS
11912 fi
11913 echo "$as_me:11913: result: $ac_cv_lib_x_opendir" >&5
11914 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11915 if test $ac_cv_lib_x_opendir = yes; then
11916   LIBS="$LIBS -lx"
11917 fi
11918
11919 fi
11920
11921 echo "$as_me:11921: checking whether time.h and sys/time.h may both be included" >&5
11922 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11923 if test "${ac_cv_header_time+set}" = set; then
11924   echo $ECHO_N "(cached) $ECHO_C" >&6
11925 else
11926   cat >conftest.$ac_ext <<_ACEOF
11927 #line 11927 "configure"
11928 #include "confdefs.h"
11929 #include <sys/types.h>
11930 #include <sys/time.h>
11931 #include <time.h>
11932
11933 int
11934 main ()
11935 {
11936 if ((struct tm *) 0)
11937 return 0;
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>&5
11945   ac_status=$?
11946   echo "$as_me:11946: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -s conftest.$ac_objext'
11949   { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950   (eval $ac_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }; }; then
11954   ac_cv_header_time=yes
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 ac_cv_header_time=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961 fi
11962 echo "$as_me:11962: result: $ac_cv_header_time" >&5
11963 echo "${ECHO_T}$ac_cv_header_time" >&6
11964 if test $ac_cv_header_time = yes; then
11965
11966 cat >>confdefs.h <<\EOF
11967 #define TIME_WITH_SYS_TIME 1
11968 EOF
11969
11970 fi
11971
11972 echo "$as_me:11972: checking for regular-expression headers" >&5
11973 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11974 if test "${cf_cv_regex+set}" = set; then
11975   echo $ECHO_N "(cached) $ECHO_C" >&6
11976 else
11977
11978 cat >conftest.$ac_ext <<_ACEOF
11979 #line 11979 "configure"
11980 #include "confdefs.h"
11981 #include <sys/types.h>
11982 #include <regex.h>
11983 int
11984 main ()
11985 {
11986
11987         regex_t *p;
11988         int x = regcomp(p, "", 0);
11989         int y = regexec(p, "", 0, 0, 0);
11990         regfree(p);
11991
11992   ;
11993   return 0;
11994 }
11995 _ACEOF
11996 rm -f conftest.$ac_objext conftest$ac_exeext
11997 if { (eval echo "$as_me:11997: \"$ac_link\"") >&5
11998   (eval $ac_link) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit $ac_status); } &&
12002          { ac_try='test -s conftest$ac_exeext'
12003   { (eval echo "$as_me:12003: \"$ac_try\"") >&5
12004   (eval $ac_try) 2>&5
12005   ac_status=$?
12006   echo "$as_me:12006: \$? = $ac_status" >&5
12007   (exit $ac_status); }; }; then
12008   cf_cv_regex="regex.h"
12009 else
12010   echo "$as_me: failed program was:" >&5
12011 cat conftest.$ac_ext >&5
12012
12013         cat >conftest.$ac_ext <<_ACEOF
12014 #line 12014 "configure"
12015 #include "confdefs.h"
12016 #include <regexp.h>
12017 int
12018 main ()
12019 {
12020
12021                 char *p = compile("", "", "", 0);
12022                 int x = step("", "");
12023
12024   ;
12025   return 0;
12026 }
12027 _ACEOF
12028 rm -f conftest.$ac_objext conftest$ac_exeext
12029 if { (eval echo "$as_me:12029: \"$ac_link\"") >&5
12030   (eval $ac_link) 2>&5
12031   ac_status=$?
12032   echo "$as_me:12032: \$? = $ac_status" >&5
12033   (exit $ac_status); } &&
12034          { ac_try='test -s conftest$ac_exeext'
12035   { (eval echo "$as_me:12035: \"$ac_try\"") >&5
12036   (eval $ac_try) 2>&5
12037   ac_status=$?
12038   echo "$as_me:12038: \$? = $ac_status" >&5
12039   (exit $ac_status); }; }; then
12040   cf_cv_regex="regexp.h"
12041 else
12042   echo "$as_me: failed program was:" >&5
12043 cat conftest.$ac_ext >&5
12044
12045                 cf_save_LIBS="$LIBS"
12046                 LIBS="-lgen $LIBS"
12047                 cat >conftest.$ac_ext <<_ACEOF
12048 #line 12048 "configure"
12049 #include "confdefs.h"
12050 #include <regexpr.h>
12051 int
12052 main ()
12053 {
12054
12055                         char *p = compile("", "", "");
12056                         int x = step("", "");
12057
12058   ;
12059   return 0;
12060 }
12061 _ACEOF
12062 rm -f conftest.$ac_objext conftest$ac_exeext
12063 if { (eval echo "$as_me:12063: \"$ac_link\"") >&5
12064   (eval $ac_link) 2>&5
12065   ac_status=$?
12066   echo "$as_me:12066: \$? = $ac_status" >&5
12067   (exit $ac_status); } &&
12068          { ac_try='test -s conftest$ac_exeext'
12069   { (eval echo "$as_me:12069: \"$ac_try\"") >&5
12070   (eval $ac_try) 2>&5
12071   ac_status=$?
12072   echo "$as_me:12072: \$? = $ac_status" >&5
12073   (exit $ac_status); }; }; then
12074   cf_cv_regex="regexpr.h"
12075 else
12076   echo "$as_me: failed program was:" >&5
12077 cat conftest.$ac_ext >&5
12078 LIBS="$cf_save_LIBS"
12079 fi
12080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12081 fi
12082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12083 fi
12084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12085
12086 fi
12087
12088 echo "$as_me:12088: result: $cf_cv_regex" >&5
12089 echo "${ECHO_T}$cf_cv_regex" >&6
12090 case $cf_cv_regex in
12091         regex.h)   cat >>confdefs.h <<\EOF
12092 #define HAVE_REGEX_H_FUNCS 1
12093 EOF
12094  ;;
12095         regexp.h)  cat >>confdefs.h <<\EOF
12096 #define HAVE_REGEXP_H_FUNCS 1
12097 EOF
12098  ;;
12099         regexpr.h) cat >>confdefs.h <<\EOF
12100 #define HAVE_REGEXPR_H_FUNCS 1
12101 EOF
12102  ;;
12103 esac
12104
12105 for ac_header in \
12106 fcntl.h \
12107 getopt.h \
12108 limits.h \
12109 locale.h \
12110 poll.h \
12111 sys/bsdtypes.h \
12112 sys/ioctl.h \
12113 sys/param.h \
12114 sys/poll.h \
12115 sys/select.h \
12116 sys/time.h \
12117 sys/times.h \
12118 ttyent.h \
12119 unistd.h \
12120 wctype.h \
12121
12122 do
12123 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12124 echo "$as_me:12124: checking for $ac_header" >&5
12125 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12126 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12127   echo $ECHO_N "(cached) $ECHO_C" >&6
12128 else
12129   cat >conftest.$ac_ext <<_ACEOF
12130 #line 12130 "configure"
12131 #include "confdefs.h"
12132 #include <$ac_header>
12133 _ACEOF
12134 if { (eval echo "$as_me:12134: \"$ac_cpp conftest.$ac_ext\"") >&5
12135   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12136   ac_status=$?
12137   egrep -v '^ *\+' conftest.er1 >conftest.err
12138   rm -f conftest.er1
12139   cat conftest.err >&5
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit $ac_status); } >/dev/null; then
12142   if test -s conftest.err; then
12143     ac_cpp_err=$ac_c_preproc_warn_flag
12144   else
12145     ac_cpp_err=
12146   fi
12147 else
12148   ac_cpp_err=yes
12149 fi
12150 if test -z "$ac_cpp_err"; then
12151   eval "$as_ac_Header=yes"
12152 else
12153   echo "$as_me: failed program was:" >&5
12154   cat conftest.$ac_ext >&5
12155   eval "$as_ac_Header=no"
12156 fi
12157 rm -f conftest.err conftest.$ac_ext
12158 fi
12159 echo "$as_me:12159: result: `eval echo '${'$as_ac_Header'}'`" >&5
12160 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12161 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12162   cat >>confdefs.h <<EOF
12163 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12164 EOF
12165
12166 fi
12167 done
12168
12169 # check for ISC (this may also define _POSIX_SOURCE)
12170 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12171 if test "$ISC" = yes ; then
12172
12173 echo "$as_me:12173: checking for main in -lcposix" >&5
12174 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12175 if test "${ac_cv_lib_cposix_main+set}" = set; then
12176   echo $ECHO_N "(cached) $ECHO_C" >&6
12177 else
12178   ac_check_lib_save_LIBS=$LIBS
12179 LIBS="-lcposix  $LIBS"
12180 cat >conftest.$ac_ext <<_ACEOF
12181 #line 12181 "configure"
12182 #include "confdefs.h"
12183
12184 int
12185 main ()
12186 {
12187 main ();
12188   ;
12189   return 0;
12190 }
12191 _ACEOF
12192 rm -f conftest.$ac_objext conftest$ac_exeext
12193 if { (eval echo "$as_me:12193: \"$ac_link\"") >&5
12194   (eval $ac_link) 2>&5
12195   ac_status=$?
12196   echo "$as_me:12196: \$? = $ac_status" >&5
12197   (exit $ac_status); } &&
12198          { ac_try='test -s conftest$ac_exeext'
12199   { (eval echo "$as_me:12199: \"$ac_try\"") >&5
12200   (eval $ac_try) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); }; }; then
12204   ac_cv_lib_cposix_main=yes
12205 else
12206   echo "$as_me: failed program was:" >&5
12207 cat conftest.$ac_ext >&5
12208 ac_cv_lib_cposix_main=no
12209 fi
12210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12211 LIBS=$ac_check_lib_save_LIBS
12212 fi
12213 echo "$as_me:12213: result: $ac_cv_lib_cposix_main" >&5
12214 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12215 if test $ac_cv_lib_cposix_main = yes; then
12216   cat >>confdefs.h <<EOF
12217 #define HAVE_LIBCPOSIX 1
12218 EOF
12219
12220   LIBS="-lcposix $LIBS"
12221
12222 fi
12223
12224         echo "$as_me:12224: checking for bzero in -linet" >&5
12225 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12226 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12227   echo $ECHO_N "(cached) $ECHO_C" >&6
12228 else
12229   ac_check_lib_save_LIBS=$LIBS
12230 LIBS="-linet  $LIBS"
12231 cat >conftest.$ac_ext <<_ACEOF
12232 #line 12232 "configure"
12233 #include "confdefs.h"
12234
12235 /* Override any gcc2 internal prototype to avoid an error.  */
12236 #ifdef __cplusplus
12237 extern "C"
12238 #endif
12239 /* We use char because int might match the return type of a gcc2
12240    builtin and then its argument prototype would still apply.  */
12241 char bzero ();
12242 int
12243 main ()
12244 {
12245 bzero ();
12246   ;
12247   return 0;
12248 }
12249 _ACEOF
12250 rm -f conftest.$ac_objext conftest$ac_exeext
12251 if { (eval echo "$as_me:12251: \"$ac_link\"") >&5
12252   (eval $ac_link) 2>&5
12253   ac_status=$?
12254   echo "$as_me:12254: \$? = $ac_status" >&5
12255   (exit $ac_status); } &&
12256          { ac_try='test -s conftest$ac_exeext'
12257   { (eval echo "$as_me:12257: \"$ac_try\"") >&5
12258   (eval $ac_try) 2>&5
12259   ac_status=$?
12260   echo "$as_me:12260: \$? = $ac_status" >&5
12261   (exit $ac_status); }; }; then
12262   ac_cv_lib_inet_bzero=yes
12263 else
12264   echo "$as_me: failed program was:" >&5
12265 cat conftest.$ac_ext >&5
12266 ac_cv_lib_inet_bzero=no
12267 fi
12268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12269 LIBS=$ac_check_lib_save_LIBS
12270 fi
12271 echo "$as_me:12271: result: $ac_cv_lib_inet_bzero" >&5
12272 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12273 if test $ac_cv_lib_inet_bzero = yes; then
12274   LIBS="$LIBS -linet"
12275 fi
12276 fi
12277
12278 echo "$as_me:12278: checking if sys/time.h works with sys/select.h" >&5
12279 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12280 if test "${cf_cv_sys_time_select+set}" = set; then
12281   echo $ECHO_N "(cached) $ECHO_C" >&6
12282 else
12283
12284 cat >conftest.$ac_ext <<_ACEOF
12285 #line 12285 "configure"
12286 #include "confdefs.h"
12287
12288 #include <sys/types.h>
12289 #ifdef HAVE_SYS_TIME_H
12290 #include <sys/time.h>
12291 #endif
12292 #ifdef HAVE_SYS_SELECT_H
12293 #include <sys/select.h>
12294 #endif
12295
12296 int
12297 main ()
12298 {
12299
12300   ;
12301   return 0;
12302 }
12303 _ACEOF
12304 rm -f conftest.$ac_objext
12305 if { (eval echo "$as_me:12305: \"$ac_compile\"") >&5
12306   (eval $ac_compile) 2>&5
12307   ac_status=$?
12308   echo "$as_me:12308: \$? = $ac_status" >&5
12309   (exit $ac_status); } &&
12310          { ac_try='test -s conftest.$ac_objext'
12311   { (eval echo "$as_me:12311: \"$ac_try\"") >&5
12312   (eval $ac_try) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit $ac_status); }; }; then
12316   cf_cv_sys_time_select=yes
12317 else
12318   echo "$as_me: failed program was:" >&5
12319 cat conftest.$ac_ext >&5
12320 cf_cv_sys_time_select=no
12321 fi
12322 rm -f conftest.$ac_objext conftest.$ac_ext
12323
12324 fi
12325
12326 echo "$as_me:12326: result: $cf_cv_sys_time_select" >&5
12327 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12328 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12329 #define HAVE_SYS_TIME_SELECT 1
12330 EOF
12331
12332 ###     checks for compiler characteristics
12333 ac_ext=c
12334 ac_cpp='$CPP $CPPFLAGS'
12335 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12336 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12337 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12338 ac_main_return=return
12339
12340 echo "$as_me:12340: checking for $CC option to accept ANSI C" >&5
12341 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12342 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12343   echo $ECHO_N "(cached) $ECHO_C" >&6
12344 else
12345   ac_cv_prog_cc_stdc=no
12346 ac_save_CC=$CC
12347 cat >conftest.$ac_ext <<_ACEOF
12348 #line 12348 "configure"
12349 #include "confdefs.h"
12350 #include <stdarg.h>
12351 #include <stdio.h>
12352 #include <sys/types.h>
12353 #include <sys/stat.h>
12354 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12355 struct buf { int x; };
12356 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12357 static char *e (p, i)
12358      char **p;
12359      int i;
12360 {
12361   return p[i];
12362 }
12363 static char *f (char * (*g) (char **, int), char **p, ...)
12364 {
12365   char *s;
12366   va_list v;
12367   va_start (v,p);
12368   s = g (p, va_arg (v,int));
12369   va_end (v);
12370   return s;
12371 }
12372 int test (int i, double x);
12373 struct s1 {int (*f) (int a);};
12374 struct s2 {int (*f) (double a);};
12375 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12376 int argc;
12377 char **argv;
12378 int
12379 main ()
12380 {
12381 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12382   ;
12383   return 0;
12384 }
12385 _ACEOF
12386 # Don't try gcc -ansi; that turns off useful extensions and
12387 # breaks some systems' header files.
12388 # AIX                   -qlanglvl=ansi
12389 # Ultrix and OSF/1      -std1
12390 # HP-UX 10.20 and later -Ae
12391 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12392 # SVR4                  -Xc -D__EXTENSIONS__
12393 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12394 do
12395   CC="$ac_save_CC $ac_arg"
12396   rm -f conftest.$ac_objext
12397 if { (eval echo "$as_me:12397: \"$ac_compile\"") >&5
12398   (eval $ac_compile) 2>&5
12399   ac_status=$?
12400   echo "$as_me:12400: \$? = $ac_status" >&5
12401   (exit $ac_status); } &&
12402          { ac_try='test -s conftest.$ac_objext'
12403   { (eval echo "$as_me:12403: \"$ac_try\"") >&5
12404   (eval $ac_try) 2>&5
12405   ac_status=$?
12406   echo "$as_me:12406: \$? = $ac_status" >&5
12407   (exit $ac_status); }; }; then
12408   ac_cv_prog_cc_stdc=$ac_arg
12409 break
12410 else
12411   echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413 fi
12414 rm -f conftest.$ac_objext
12415 done
12416 rm -f conftest.$ac_ext conftest.$ac_objext
12417 CC=$ac_save_CC
12418
12419 fi
12420
12421 case "x$ac_cv_prog_cc_stdc" in
12422   x|xno)
12423     echo "$as_me:12423: result: none needed" >&5
12424 echo "${ECHO_T}none needed" >&6 ;;
12425   *)
12426     echo "$as_me:12426: result: $ac_cv_prog_cc_stdc" >&5
12427 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12428     CC="$CC $ac_cv_prog_cc_stdc" ;;
12429 esac
12430
12431 echo "$as_me:12431: checking for an ANSI C-conforming const" >&5
12432 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12433 if test "${ac_cv_c_const+set}" = set; then
12434   echo $ECHO_N "(cached) $ECHO_C" >&6
12435 else
12436   cat >conftest.$ac_ext <<_ACEOF
12437 #line 12437 "configure"
12438 #include "confdefs.h"
12439
12440 int
12441 main ()
12442 {
12443 /* FIXME: Include the comments suggested by Paul. */
12444 #ifndef __cplusplus
12445   /* Ultrix mips cc rejects this.  */
12446   typedef int charset[2];
12447   const charset x;
12448   /* SunOS 4.1.1 cc rejects this.  */
12449   char const *const *ccp;
12450   char **p;
12451   /* NEC SVR4.0.2 mips cc rejects this.  */
12452   struct point {int x, y;};
12453   static struct point const zero = {0,0};
12454   /* AIX XL C 1.02.0.0 rejects this.
12455      It does not let you subtract one const X* pointer from another in
12456      an arm of an if-expression whose if-part is not a constant
12457      expression */
12458   const char *g = "string";
12459   ccp = &g + (g ? g-g : 0);
12460   /* HPUX 7.0 cc rejects these. */
12461   ++ccp;
12462   p = (char**) ccp;
12463   ccp = (char const *const *) p;
12464   { /* SCO 3.2v4 cc rejects this.  */
12465     char *t;
12466     char const *s = 0 ? (char *) 0 : (char const *) 0;
12467
12468     *t++ = 0;
12469   }
12470   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12471     int x[] = {25, 17};
12472     const int *foo = &x[0];
12473     ++foo;
12474   }
12475   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12476     typedef const int *iptr;
12477     iptr p = 0;
12478     ++p;
12479   }
12480   { /* AIX XL C 1.02.0.0 rejects this saying
12481        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12482     struct s { int j; const int *ap[3]; };
12483     struct s *b; b->j = 5;
12484   }
12485   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12486     const int foo = 10;
12487   }
12488 #endif
12489
12490   ;
12491   return 0;
12492 }
12493 _ACEOF
12494 rm -f conftest.$ac_objext
12495 if { (eval echo "$as_me:12495: \"$ac_compile\"") >&5
12496   (eval $ac_compile) 2>&5
12497   ac_status=$?
12498   echo "$as_me:12498: \$? = $ac_status" >&5
12499   (exit $ac_status); } &&
12500          { ac_try='test -s conftest.$ac_objext'
12501   { (eval echo "$as_me:12501: \"$ac_try\"") >&5
12502   (eval $ac_try) 2>&5
12503   ac_status=$?
12504   echo "$as_me:12504: \$? = $ac_status" >&5
12505   (exit $ac_status); }; }; then
12506   ac_cv_c_const=yes
12507 else
12508   echo "$as_me: failed program was:" >&5
12509 cat conftest.$ac_ext >&5
12510 ac_cv_c_const=no
12511 fi
12512 rm -f conftest.$ac_objext conftest.$ac_ext
12513 fi
12514 echo "$as_me:12514: result: $ac_cv_c_const" >&5
12515 echo "${ECHO_T}$ac_cv_c_const" >&6
12516 if test $ac_cv_c_const = no; then
12517
12518 cat >>confdefs.h <<\EOF
12519 #define const
12520 EOF
12521
12522 fi
12523
12524 echo "$as_me:12524: checking for inline" >&5
12525 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12526 if test "${ac_cv_c_inline+set}" = set; then
12527   echo $ECHO_N "(cached) $ECHO_C" >&6
12528 else
12529   ac_cv_c_inline=no
12530 for ac_kw in inline __inline__ __inline; do
12531   cat >conftest.$ac_ext <<_ACEOF
12532 #line 12532 "configure"
12533 #include "confdefs.h"
12534 #ifndef __cplusplus
12535 static $ac_kw int static_foo () {return 0; }
12536 $ac_kw int foo () {return 0; }
12537 #endif
12538
12539 _ACEOF
12540 rm -f conftest.$ac_objext
12541 if { (eval echo "$as_me:12541: \"$ac_compile\"") >&5
12542   (eval $ac_compile) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:12547: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:12550: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   ac_cv_c_inline=$ac_kw; break
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 cat conftest.$ac_ext >&5
12556 fi
12557 rm -f conftest.$ac_objext conftest.$ac_ext
12558 done
12559
12560 fi
12561 echo "$as_me:12561: result: $ac_cv_c_inline" >&5
12562 echo "${ECHO_T}$ac_cv_c_inline" >&6
12563 case $ac_cv_c_inline in
12564   inline | yes) ;;
12565   no)
12566 cat >>confdefs.h <<\EOF
12567 #define inline
12568 EOF
12569  ;;
12570   *)  cat >>confdefs.h <<EOF
12571 #define inline $ac_cv_c_inline
12572 EOF
12573  ;;
12574 esac
12575
12576 NCURSES_INLINE=
12577 if test "$ac_cv_c_inline" != no ; then
12578   NCURSES_INLINE=inline
12579   if test "$INTEL_COMPILER" = yes
12580   then
12581     :
12582   elif test "$GCC" = yes
12583   then
12584     echo "$as_me:12584: checking if gcc supports options to tune inlining" >&5
12585 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12586 if test "${cf_cv_gcc_inline+set}" = set; then
12587   echo $ECHO_N "(cached) $ECHO_C" >&6
12588 else
12589
12590       cf_save_CFLAGS=$CFLAGS
12591       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12592       cat >conftest.$ac_ext <<_ACEOF
12593 #line 12593 "configure"
12594 #include "confdefs.h"
12595 inline int foo(void) { return 1; }
12596 int
12597 main ()
12598 {
12599 ${cf_cv_main_return:-return} foo()
12600   ;
12601   return 0;
12602 }
12603 _ACEOF
12604 rm -f conftest.$ac_objext
12605 if { (eval echo "$as_me:12605: \"$ac_compile\"") >&5
12606   (eval $ac_compile) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); } &&
12610          { ac_try='test -s conftest.$ac_objext'
12611   { (eval echo "$as_me:12611: \"$ac_try\"") >&5
12612   (eval $ac_try) 2>&5
12613   ac_status=$?
12614   echo "$as_me:12614: \$? = $ac_status" >&5
12615   (exit $ac_status); }; }; then
12616   cf_cv_gcc_inline=yes
12617 else
12618   echo "$as_me: failed program was:" >&5
12619 cat conftest.$ac_ext >&5
12620 cf_cv_gcc_inline=no
12621 fi
12622 rm -f conftest.$ac_objext conftest.$ac_ext
12623       CFLAGS=$cf_save_CFLAGS
12624
12625 fi
12626 echo "$as_me:12626: result: $cf_cv_gcc_inline" >&5
12627 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12628     if test "$cf_cv_gcc_inline" = yes ; then
12629
12630 cf_fix_cppflags=no
12631 cf_new_cflags=
12632 cf_new_cppflags=
12633 cf_new_extra_cppflags=
12634
12635 for cf_add_cflags in --param max-inline-insns-single=1200
12636 do
12637 case $cf_fix_cppflags in
12638 no)
12639         case $cf_add_cflags in #(vi
12640         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12641                 case $cf_add_cflags in
12642                 -D*)
12643                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12644
12645                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12646                         && test -z "${cf_tst_cflags}" \
12647                         && cf_fix_cppflags=yes
12648
12649                         if test $cf_fix_cppflags = yes ; then
12650                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12651                                 continue
12652                         elif test "${cf_tst_cflags}" = "\"'" ; then
12653                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12654                                 continue
12655                         fi
12656                         ;;
12657                 esac
12658                 case "$CPPFLAGS" in
12659                 *$cf_add_cflags) #(vi
12660                         ;;
12661                 *) #(vi
12662                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12663                         ;;
12664                 esac
12665                 ;;
12666         *)
12667                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12668                 ;;
12669         esac
12670         ;;
12671 yes)
12672         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12673
12674         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12675
12676         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12677         && test -z "${cf_tst_cflags}" \
12678         && cf_fix_cppflags=no
12679         ;;
12680 esac
12681 done
12682
12683 if test -n "$cf_new_cflags" ; then
12684
12685         CFLAGS="$CFLAGS $cf_new_cflags"
12686 fi
12687
12688 if test -n "$cf_new_cppflags" ; then
12689
12690         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12691 fi
12692
12693 if test -n "$cf_new_extra_cppflags" ; then
12694
12695         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12696 fi
12697
12698     fi
12699   fi
12700 fi
12701
12702 echo "$as_me:12702: checking for signal global datatype" >&5
12703 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12704 if test "${cf_cv_sig_atomic_t+set}" = set; then
12705   echo $ECHO_N "(cached) $ECHO_C" >&6
12706 else
12707
12708         for cf_type in \
12709                 "volatile sig_atomic_t" \
12710                 "sig_atomic_t" \
12711                 "int"
12712         do
12713         cat >conftest.$ac_ext <<_ACEOF
12714 #line 12714 "configure"
12715 #include "confdefs.h"
12716
12717 #include <sys/types.h>
12718 #include <signal.h>
12719 #include <stdio.h>
12720
12721 extern $cf_type x;
12722 $cf_type x;
12723 static void handler(int sig)
12724 {
12725         x = 5;
12726 }
12727 int
12728 main ()
12729 {
12730 signal(SIGINT, handler);
12731                  x = 1
12732   ;
12733   return 0;
12734 }
12735 _ACEOF
12736 rm -f conftest.$ac_objext
12737 if { (eval echo "$as_me:12737: \"$ac_compile\"") >&5
12738   (eval $ac_compile) 2>&5
12739   ac_status=$?
12740   echo "$as_me:12740: \$? = $ac_status" >&5
12741   (exit $ac_status); } &&
12742          { ac_try='test -s conftest.$ac_objext'
12743   { (eval echo "$as_me:12743: \"$ac_try\"") >&5
12744   (eval $ac_try) 2>&5
12745   ac_status=$?
12746   echo "$as_me:12746: \$? = $ac_status" >&5
12747   (exit $ac_status); }; }; then
12748   cf_cv_sig_atomic_t=$cf_type
12749 else
12750   echo "$as_me: failed program was:" >&5
12751 cat conftest.$ac_ext >&5
12752 cf_cv_sig_atomic_t=no
12753 fi
12754 rm -f conftest.$ac_objext conftest.$ac_ext
12755                 test "$cf_cv_sig_atomic_t" != no && break
12756         done
12757
12758 fi
12759
12760 echo "$as_me:12760: result: $cf_cv_sig_atomic_t" >&5
12761 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12762 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12763 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12764 EOF
12765
12766 if test $NCURSES_CHTYPE = auto ; then
12767
12768 echo "$as_me:12768: checking for type of chtype" >&5
12769 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12770 if test "${cf_cv_typeof_chtype+set}" = set; then
12771   echo $ECHO_N "(cached) $ECHO_C" >&6
12772 else
12773
12774                 if test "$cross_compiling" = yes; then
12775   cf_cv_typeof_chtype=long
12776 else
12777   cat >conftest.$ac_ext <<_ACEOF
12778 #line 12778 "configure"
12779 #include "confdefs.h"
12780
12781 #define WANT_BITS 31
12782 #include <stdio.h>
12783 int main()
12784 {
12785         FILE *fp = fopen("cf_test.out", "w");
12786         if (fp != 0) {
12787                 char *result = "long";
12788                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12789                         int n;
12790                         unsigned int x, y;
12791                         for (n = 0; n < WANT_BITS; n++) {
12792                                 x = (1 << n);
12793                                 y = (x >> n);
12794                                 if (y != 1 || x == 0) {
12795                                         x = 0;
12796                                         break;
12797                                 }
12798                         }
12799                         /*
12800                          * If x is nonzero, an int is big enough for the bits
12801                          * that we want.
12802                          */
12803                         result = (x != 0) ? "int" : "long";
12804                 }
12805                 fputs(result, fp);
12806                 fclose(fp);
12807         }
12808         ${cf_cv_main_return:-return}(0);
12809 }
12810
12811 _ACEOF
12812 rm -f conftest$ac_exeext
12813 if { (eval echo "$as_me:12813: \"$ac_link\"") >&5
12814   (eval $ac_link) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12818   { (eval echo "$as_me:12818: \"$ac_try\"") >&5
12819   (eval $ac_try) 2>&5
12820   ac_status=$?
12821   echo "$as_me:12821: \$? = $ac_status" >&5
12822   (exit $ac_status); }; }; then
12823   cf_cv_typeof_chtype=`cat cf_test.out`
12824 else
12825   echo "$as_me: program exited with status $ac_status" >&5
12826 echo "$as_me: failed program was:" >&5
12827 cat conftest.$ac_ext >&5
12828 cf_cv_typeof_chtype=long
12829 fi
12830 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12831 fi
12832                 rm -f cf_test.out
12833
12834 fi
12835
12836 echo "$as_me:12836: result: $cf_cv_typeof_chtype" >&5
12837 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12838
12839 cat >>confdefs.h <<EOF
12840 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12841 EOF
12842
12843 else
12844         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12845 fi
12846 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12847
12848 echo "$as_me:12848: checking if unsigned literals are legal" >&5
12849 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12850 if test "${cf_cv_unsigned_literals+set}" = set; then
12851   echo $ECHO_N "(cached) $ECHO_C" >&6
12852 else
12853
12854         cat >conftest.$ac_ext <<_ACEOF
12855 #line 12855 "configure"
12856 #include "confdefs.h"
12857
12858 int
12859 main ()
12860 {
12861 long x = 1L + 1UL + 1U + 1
12862   ;
12863   return 0;
12864 }
12865 _ACEOF
12866 rm -f conftest.$ac_objext
12867 if { (eval echo "$as_me:12867: \"$ac_compile\"") >&5
12868   (eval $ac_compile) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); } &&
12872          { ac_try='test -s conftest.$ac_objext'
12873   { (eval echo "$as_me:12873: \"$ac_try\"") >&5
12874   (eval $ac_try) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); }; }; then
12878   cf_cv_unsigned_literals=yes
12879 else
12880   echo "$as_me: failed program was:" >&5
12881 cat conftest.$ac_ext >&5
12882 cf_cv_unsigned_literals=no
12883 fi
12884 rm -f conftest.$ac_objext conftest.$ac_ext
12885
12886 fi
12887
12888 echo "$as_me:12888: result: $cf_cv_unsigned_literals" >&5
12889 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12890
12891 cf_cv_1UL="1"
12892 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12893 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12894
12895 if test $NCURSES_MMASK_T = auto ; then
12896         cf_cv_typeof_mmask_t=long
12897 else
12898         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12899 fi
12900 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12901
12902 ###     Checks for external-data
12903
12904 echo "$as_me:12904: checking if external errno is declared" >&5
12905 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12906 if test "${cf_cv_dcl_errno+set}" = set; then
12907   echo $ECHO_N "(cached) $ECHO_C" >&6
12908 else
12909
12910     cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913
12914 #ifdef HAVE_STDLIB_H
12915 #include <stdlib.h>
12916 #endif
12917 #include <stdio.h>
12918 #include <sys/types.h>
12919 #include <errno.h>
12920 int
12921 main ()
12922 {
12923 int x = (int) errno
12924   ;
12925   return 0;
12926 }
12927 _ACEOF
12928 rm -f conftest.$ac_objext
12929 if { (eval echo "$as_me:12929: \"$ac_compile\"") >&5
12930   (eval $ac_compile) 2>&5
12931   ac_status=$?
12932   echo "$as_me:12932: \$? = $ac_status" >&5
12933   (exit $ac_status); } &&
12934          { ac_try='test -s conftest.$ac_objext'
12935   { (eval echo "$as_me:12935: \"$ac_try\"") >&5
12936   (eval $ac_try) 2>&5
12937   ac_status=$?
12938   echo "$as_me:12938: \$? = $ac_status" >&5
12939   (exit $ac_status); }; }; then
12940   cf_cv_dcl_errno=yes
12941 else
12942   echo "$as_me: failed program was:" >&5
12943 cat conftest.$ac_ext >&5
12944 cf_cv_dcl_errno=no
12945 fi
12946 rm -f conftest.$ac_objext conftest.$ac_ext
12947
12948 fi
12949 echo "$as_me:12949: result: $cf_cv_dcl_errno" >&5
12950 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12951
12952 if test "$cf_cv_dcl_errno" = no ; then
12953
12954 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12955
12956     cat >>confdefs.h <<EOF
12957 #define $cf_result 1
12958 EOF
12959
12960 fi
12961
12962 # It's possible (for near-UNIX clones) that the data doesn't exist
12963
12964 echo "$as_me:12964: checking if external errno exists" >&5
12965 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12966 if test "${cf_cv_have_errno+set}" = set; then
12967   echo $ECHO_N "(cached) $ECHO_C" >&6
12968 else
12969
12970     cat >conftest.$ac_ext <<_ACEOF
12971 #line 12971 "configure"
12972 #include "confdefs.h"
12973
12974 #undef errno
12975 extern int errno;
12976
12977 int
12978 main ()
12979 {
12980 errno = 2
12981   ;
12982   return 0;
12983 }
12984 _ACEOF
12985 rm -f conftest.$ac_objext conftest$ac_exeext
12986 if { (eval echo "$as_me:12986: \"$ac_link\"") >&5
12987   (eval $ac_link) 2>&5
12988   ac_status=$?
12989   echo "$as_me:12989: \$? = $ac_status" >&5
12990   (exit $ac_status); } &&
12991          { ac_try='test -s conftest$ac_exeext'
12992   { (eval echo "$as_me:12992: \"$ac_try\"") >&5
12993   (eval $ac_try) 2>&5
12994   ac_status=$?
12995   echo "$as_me:12995: \$? = $ac_status" >&5
12996   (exit $ac_status); }; }; then
12997   cf_cv_have_errno=yes
12998 else
12999   echo "$as_me: failed program was:" >&5
13000 cat conftest.$ac_ext >&5
13001 cf_cv_have_errno=no
13002 fi
13003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13004
13005 fi
13006 echo "$as_me:13006: result: $cf_cv_have_errno" >&5
13007 echo "${ECHO_T}$cf_cv_have_errno" >&6
13008
13009 if test "$cf_cv_have_errno" = yes ; then
13010
13011 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13012
13013     cat >>confdefs.h <<EOF
13014 #define $cf_result 1
13015 EOF
13016
13017 fi
13018
13019 echo "$as_me:13019: checking if data-only library module links" >&5
13020 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13021 if test "${cf_cv_link_dataonly+set}" = set; then
13022   echo $ECHO_N "(cached) $ECHO_C" >&6
13023 else
13024
13025         rm -f conftest.a
13026         cat >conftest.$ac_ext <<EOF
13027 #line 13027 "configure"
13028 int     testdata[3] = { 123, 456, 789 };
13029 EOF
13030         if { (eval echo "$as_me:13030: \"$ac_compile\"") >&5
13031   (eval $ac_compile) 2>&5
13032   ac_status=$?
13033   echo "$as_me:13033: \$? = $ac_status" >&5
13034   (exit $ac_status); } ; then
13035                 mv conftest.o data.o && \
13036                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13037         fi
13038         rm -f conftest.$ac_ext data.o
13039         cat >conftest.$ac_ext <<EOF
13040 #line 13040 "configure"
13041 int     testfunc()
13042 {
13043 #if defined(NeXT)
13044         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13045 #else
13046         extern int testdata[3];
13047         return testdata[0] == 123
13048            &&  testdata[1] == 456
13049            &&  testdata[2] == 789;
13050 #endif
13051 }
13052 EOF
13053         if { (eval echo "$as_me:13053: \"$ac_compile\"") >&5
13054   (eval $ac_compile) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); }; then
13058                 mv conftest.o func.o && \
13059                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13060         fi
13061         rm -f conftest.$ac_ext func.o
13062         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13063         cf_saveLIBS="$LIBS"
13064         LIBS="conftest.a $LIBS"
13065         if test "$cross_compiling" = yes; then
13066   cf_cv_link_dataonly=unknown
13067 else
13068   cat >conftest.$ac_ext <<_ACEOF
13069 #line 13069 "configure"
13070 #include "confdefs.h"
13071
13072         int main()
13073         {
13074                 extern int testfunc();
13075                 ${cf_cv_main_return:-return} (!testfunc());
13076         }
13077
13078 _ACEOF
13079 rm -f conftest$ac_exeext
13080 if { (eval echo "$as_me:13080: \"$ac_link\"") >&5
13081   (eval $ac_link) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13085   { (eval echo "$as_me:13085: \"$ac_try\"") >&5
13086   (eval $ac_try) 2>&5
13087   ac_status=$?
13088   echo "$as_me:13088: \$? = $ac_status" >&5
13089   (exit $ac_status); }; }; then
13090   cf_cv_link_dataonly=yes
13091 else
13092   echo "$as_me: program exited with status $ac_status" >&5
13093 echo "$as_me: failed program was:" >&5
13094 cat conftest.$ac_ext >&5
13095 cf_cv_link_dataonly=no
13096 fi
13097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13098 fi
13099         LIBS="$cf_saveLIBS"
13100
13101 fi
13102
13103 echo "$as_me:13103: result: $cf_cv_link_dataonly" >&5
13104 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13105
13106 if test "$cf_cv_link_dataonly" = no ; then
13107         cat >>confdefs.h <<\EOF
13108 #define BROKEN_LINKER 1
13109 EOF
13110
13111         BROKEN_LINKER=1
13112 fi
13113
13114 ###     Checks for library functions.
13115
13116 for ac_func in \
13117 getcwd \
13118 getegid \
13119 geteuid \
13120 getttynam \
13121 issetugid \
13122 poll \
13123 remove \
13124 select \
13125 setbuf \
13126 setbuffer \
13127 setvbuf \
13128 sigaction \
13129 sigvec \
13130 strdup \
13131 strstr \
13132 tcgetpgrp \
13133 times \
13134 vsnprintf \
13135
13136 do
13137 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13138 echo "$as_me:13138: checking for $ac_func" >&5
13139 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13140 if eval "test \"\${$as_ac_var+set}\" = set"; then
13141   echo $ECHO_N "(cached) $ECHO_C" >&6
13142 else
13143   cat >conftest.$ac_ext <<_ACEOF
13144 #line 13144 "configure"
13145 #include "confdefs.h"
13146 /* System header to define __stub macros and hopefully few prototypes,
13147     which can conflict with char $ac_func (); below.  */
13148 #include <assert.h>
13149 /* Override any gcc2 internal prototype to avoid an error.  */
13150 #ifdef __cplusplus
13151 extern "C"
13152 #endif
13153 /* We use char because int might match the return type of a gcc2
13154    builtin and then its argument prototype would still apply.  */
13155 char $ac_func ();
13156 char (*f) ();
13157
13158 int
13159 main ()
13160 {
13161 /* The GNU C library defines this for functions which it implements
13162     to always fail with ENOSYS.  Some functions are actually named
13163     something starting with __ and the normal name is an alias.  */
13164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13165 choke me
13166 #else
13167 f = $ac_func;
13168 #endif
13169
13170   ;
13171   return 0;
13172 }
13173 _ACEOF
13174 rm -f conftest.$ac_objext conftest$ac_exeext
13175 if { (eval echo "$as_me:13175: \"$ac_link\"") >&5
13176   (eval $ac_link) 2>&5
13177   ac_status=$?
13178   echo "$as_me:13178: \$? = $ac_status" >&5
13179   (exit $ac_status); } &&
13180          { ac_try='test -s conftest$ac_exeext'
13181   { (eval echo "$as_me:13181: \"$ac_try\"") >&5
13182   (eval $ac_try) 2>&5
13183   ac_status=$?
13184   echo "$as_me:13184: \$? = $ac_status" >&5
13185   (exit $ac_status); }; }; then
13186   eval "$as_ac_var=yes"
13187 else
13188   echo "$as_me: failed program was:" >&5
13189 cat conftest.$ac_ext >&5
13190 eval "$as_ac_var=no"
13191 fi
13192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13193 fi
13194 echo "$as_me:13194: result: `eval echo '${'$as_ac_var'}'`" >&5
13195 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13196 if test `eval echo '${'$as_ac_var'}'` = yes; then
13197   cat >>confdefs.h <<EOF
13198 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13199 EOF
13200
13201 fi
13202 done
13203
13204 if test "$with_getcap" = "yes" ; then
13205
13206 echo "$as_me:13206: checking for terminal-capability database functions" >&5
13207 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13208 if test "${cf_cv_cgetent+set}" = set; then
13209   echo $ECHO_N "(cached) $ECHO_C" >&6
13210 else
13211
13212 cat >conftest.$ac_ext <<_ACEOF
13213 #line 13213 "configure"
13214 #include "confdefs.h"
13215
13216 #include <stdlib.h>
13217 int
13218 main ()
13219 {
13220
13221         char temp[128];
13222         char *buf = temp;
13223         char *db_array = temp;
13224         cgetent(&buf, /* int *, */ &db_array, "vt100");
13225         cgetcap(buf, "tc", '=');
13226         cgetmatch(buf, "tc");
13227
13228   ;
13229   return 0;
13230 }
13231 _ACEOF
13232 rm -f conftest.$ac_objext conftest$ac_exeext
13233 if { (eval echo "$as_me:13233: \"$ac_link\"") >&5
13234   (eval $ac_link) 2>&5
13235   ac_status=$?
13236   echo "$as_me:13236: \$? = $ac_status" >&5
13237   (exit $ac_status); } &&
13238          { ac_try='test -s conftest$ac_exeext'
13239   { (eval echo "$as_me:13239: \"$ac_try\"") >&5
13240   (eval $ac_try) 2>&5
13241   ac_status=$?
13242   echo "$as_me:13242: \$? = $ac_status" >&5
13243   (exit $ac_status); }; }; then
13244   cf_cv_cgetent=yes
13245 else
13246   echo "$as_me: failed program was:" >&5
13247 cat conftest.$ac_ext >&5
13248 cf_cv_cgetent=no
13249 fi
13250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13251
13252 fi
13253
13254 echo "$as_me:13254: result: $cf_cv_cgetent" >&5
13255 echo "${ECHO_T}$cf_cv_cgetent" >&6
13256 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13257 #define HAVE_BSD_CGETENT 1
13258 EOF
13259
13260 fi
13261
13262 echo "$as_me:13262: checking for isascii" >&5
13263 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13264 if test "${cf_cv_have_isascii+set}" = set; then
13265   echo $ECHO_N "(cached) $ECHO_C" >&6
13266 else
13267
13268         cat >conftest.$ac_ext <<_ACEOF
13269 #line 13269 "configure"
13270 #include "confdefs.h"
13271 #include <ctype.h>
13272 int
13273 main ()
13274 {
13275 int x = isascii(' ')
13276   ;
13277   return 0;
13278 }
13279 _ACEOF
13280 rm -f conftest.$ac_objext conftest$ac_exeext
13281 if { (eval echo "$as_me:13281: \"$ac_link\"") >&5
13282   (eval $ac_link) 2>&5
13283   ac_status=$?
13284   echo "$as_me:13284: \$? = $ac_status" >&5
13285   (exit $ac_status); } &&
13286          { ac_try='test -s conftest$ac_exeext'
13287   { (eval echo "$as_me:13287: \"$ac_try\"") >&5
13288   (eval $ac_try) 2>&5
13289   ac_status=$?
13290   echo "$as_me:13290: \$? = $ac_status" >&5
13291   (exit $ac_status); }; }; then
13292   cf_cv_have_isascii=yes
13293 else
13294   echo "$as_me: failed program was:" >&5
13295 cat conftest.$ac_ext >&5
13296 cf_cv_have_isascii=no
13297 fi
13298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13299
13300 fi
13301 echo "$as_me:13301: result: $cf_cv_have_isascii" >&5
13302 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13303 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13304 #define HAVE_ISASCII 1
13305 EOF
13306
13307 if test "$ac_cv_func_sigaction" = yes; then
13308 echo "$as_me:13308: checking whether sigaction needs _POSIX_SOURCE" >&5
13309 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13310 cat >conftest.$ac_ext <<_ACEOF
13311 #line 13311 "configure"
13312 #include "confdefs.h"
13313
13314 #include <sys/types.h>
13315 #include <signal.h>
13316 int
13317 main ()
13318 {
13319 struct sigaction act
13320   ;
13321   return 0;
13322 }
13323 _ACEOF
13324 rm -f conftest.$ac_objext
13325 if { (eval echo "$as_me:13325: \"$ac_compile\"") >&5
13326   (eval $ac_compile) 2>&5
13327   ac_status=$?
13328   echo "$as_me:13328: \$? = $ac_status" >&5
13329   (exit $ac_status); } &&
13330          { ac_try='test -s conftest.$ac_objext'
13331   { (eval echo "$as_me:13331: \"$ac_try\"") >&5
13332   (eval $ac_try) 2>&5
13333   ac_status=$?
13334   echo "$as_me:13334: \$? = $ac_status" >&5
13335   (exit $ac_status); }; }; then
13336   sigact_bad=no
13337 else
13338   echo "$as_me: failed program was:" >&5
13339 cat conftest.$ac_ext >&5
13340
13341 cat >conftest.$ac_ext <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13344
13345 #define _POSIX_SOURCE
13346 #include <sys/types.h>
13347 #include <signal.h>
13348 int
13349 main ()
13350 {
13351 struct sigaction act
13352   ;
13353   return 0;
13354 }
13355 _ACEOF
13356 rm -f conftest.$ac_objext
13357 if { (eval echo "$as_me:13357: \"$ac_compile\"") >&5
13358   (eval $ac_compile) 2>&5
13359   ac_status=$?
13360   echo "$as_me:13360: \$? = $ac_status" >&5
13361   (exit $ac_status); } &&
13362          { ac_try='test -s conftest.$ac_objext'
13363   { (eval echo "$as_me:13363: \"$ac_try\"") >&5
13364   (eval $ac_try) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit $ac_status); }; }; then
13368   sigact_bad=yes
13369          cat >>confdefs.h <<\EOF
13370 #define SVR4_ACTION 1
13371 EOF
13372
13373 else
13374   echo "$as_me: failed program was:" >&5
13375 cat conftest.$ac_ext >&5
13376 sigact_bad=unknown
13377 fi
13378 rm -f conftest.$ac_objext conftest.$ac_ext
13379 fi
13380 rm -f conftest.$ac_objext conftest.$ac_ext
13381 echo "$as_me:13381: result: $sigact_bad" >&5
13382 echo "${ECHO_T}$sigact_bad" >&6
13383 fi
13384
13385 echo "$as_me:13385: checking if nanosleep really works" >&5
13386 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13387 if test "${cf_cv_func_nanosleep+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390
13391 if test "$cross_compiling" = yes; then
13392   cf_cv_func_nanosleep=unknown
13393 else
13394   cat >conftest.$ac_ext <<_ACEOF
13395 #line 13395 "configure"
13396 #include "confdefs.h"
13397
13398 #include <stdio.h>
13399 #include <errno.h>
13400 #include <time.h>
13401
13402 #ifdef HAVE_SYS_TIME_H
13403 #include <sys/time.h>
13404 #endif
13405
13406 int main() {
13407         struct timespec ts1, ts2;
13408         int code;
13409         ts1.tv_sec  = 0;
13410         ts1.tv_nsec = 750000000;
13411         ts2.tv_sec  = 0;
13412         ts2.tv_nsec = 0;
13413         errno = 0;
13414         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13415         ${cf_cv_main_return:-return}(code != 0);
13416 }
13417
13418 _ACEOF
13419 rm -f conftest$ac_exeext
13420 if { (eval echo "$as_me:13420: \"$ac_link\"") >&5
13421   (eval $ac_link) 2>&5
13422   ac_status=$?
13423   echo "$as_me:13423: \$? = $ac_status" >&5
13424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13425   { (eval echo "$as_me:13425: \"$ac_try\"") >&5
13426   (eval $ac_try) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit $ac_status); }; }; then
13430   cf_cv_func_nanosleep=yes
13431 else
13432   echo "$as_me: program exited with status $ac_status" >&5
13433 echo "$as_me: failed program was:" >&5
13434 cat conftest.$ac_ext >&5
13435 cf_cv_func_nanosleep=no
13436 fi
13437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13438 fi
13439 fi
13440 echo "$as_me:13440: result: $cf_cv_func_nanosleep" >&5
13441 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13442
13443 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13444 #define HAVE_NANOSLEEP 1
13445 EOF
13446
13447 for ac_header in \
13448 termio.h \
13449 termios.h \
13450 unistd.h \
13451
13452 do
13453 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13454 echo "$as_me:13454: checking for $ac_header" >&5
13455 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13456 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   cat >conftest.$ac_ext <<_ACEOF
13460 #line 13460 "configure"
13461 #include "confdefs.h"
13462 #include <$ac_header>
13463 _ACEOF
13464 if { (eval echo "$as_me:13464: \"$ac_cpp conftest.$ac_ext\"") >&5
13465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13466   ac_status=$?
13467   egrep -v '^ *\+' conftest.er1 >conftest.err
13468   rm -f conftest.er1
13469   cat conftest.err >&5
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); } >/dev/null; then
13472   if test -s conftest.err; then
13473     ac_cpp_err=$ac_c_preproc_warn_flag
13474   else
13475     ac_cpp_err=
13476   fi
13477 else
13478   ac_cpp_err=yes
13479 fi
13480 if test -z "$ac_cpp_err"; then
13481   eval "$as_ac_Header=yes"
13482 else
13483   echo "$as_me: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   eval "$as_ac_Header=no"
13486 fi
13487 rm -f conftest.err conftest.$ac_ext
13488 fi
13489 echo "$as_me:13489: result: `eval echo '${'$as_ac_Header'}'`" >&5
13490 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13491 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13492   cat >>confdefs.h <<EOF
13493 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13494 EOF
13495
13496 fi
13497 done
13498
13499 if test "$ISC" = yes ; then
13500
13501 for ac_header in sys/termio.h
13502 do
13503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13504 echo "$as_me:13504: checking for $ac_header" >&5
13505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13507   echo $ECHO_N "(cached) $ECHO_C" >&6
13508 else
13509   cat >conftest.$ac_ext <<_ACEOF
13510 #line 13510 "configure"
13511 #include "confdefs.h"
13512 #include <$ac_header>
13513 _ACEOF
13514 if { (eval echo "$as_me:13514: \"$ac_cpp conftest.$ac_ext\"") >&5
13515   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13516   ac_status=$?
13517   egrep -v '^ *\+' conftest.er1 >conftest.err
13518   rm -f conftest.er1
13519   cat conftest.err >&5
13520   echo "$as_me:13520: \$? = $ac_status" >&5
13521   (exit $ac_status); } >/dev/null; then
13522   if test -s conftest.err; then
13523     ac_cpp_err=$ac_c_preproc_warn_flag
13524   else
13525     ac_cpp_err=
13526   fi
13527 else
13528   ac_cpp_err=yes
13529 fi
13530 if test -z "$ac_cpp_err"; then
13531   eval "$as_ac_Header=yes"
13532 else
13533   echo "$as_me: failed program was:" >&5
13534   cat conftest.$ac_ext >&5
13535   eval "$as_ac_Header=no"
13536 fi
13537 rm -f conftest.err conftest.$ac_ext
13538 fi
13539 echo "$as_me:13539: result: `eval echo '${'$as_ac_Header'}'`" >&5
13540 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13541 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13542   cat >>confdefs.h <<EOF
13543 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13544 EOF
13545
13546 fi
13547 done
13548
13549 fi
13550 if test "$ac_cv_header_termios_h" = yes ; then
13551         case "$CFLAGS $CPPFLAGS" in
13552         *-D_POSIX_SOURCE*)
13553                 termios_bad=dunno ;;
13554         *)      termios_bad=maybe ;;
13555         esac
13556         if test "$termios_bad" = maybe ; then
13557         echo "$as_me:13557: checking whether termios.h needs _POSIX_SOURCE" >&5
13558 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13559         cat >conftest.$ac_ext <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562 #include <termios.h>
13563 int
13564 main ()
13565 {
13566 struct termios foo; int x = foo.c_iflag
13567   ;
13568   return 0;
13569 }
13570 _ACEOF
13571 rm -f conftest.$ac_objext
13572 if { (eval echo "$as_me:13572: \"$ac_compile\"") >&5
13573   (eval $ac_compile) 2>&5
13574   ac_status=$?
13575   echo "$as_me:13575: \$? = $ac_status" >&5
13576   (exit $ac_status); } &&
13577          { ac_try='test -s conftest.$ac_objext'
13578   { (eval echo "$as_me:13578: \"$ac_try\"") >&5
13579   (eval $ac_try) 2>&5
13580   ac_status=$?
13581   echo "$as_me:13581: \$? = $ac_status" >&5
13582   (exit $ac_status); }; }; then
13583   termios_bad=no
13584 else
13585   echo "$as_me: failed program was:" >&5
13586 cat conftest.$ac_ext >&5
13587
13588                 cat >conftest.$ac_ext <<_ACEOF
13589 #line 13589 "configure"
13590 #include "confdefs.h"
13591
13592 #define _POSIX_SOURCE
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=unknown
13615 else
13616   echo "$as_me: failed program was:" >&5
13617 cat conftest.$ac_ext >&5
13618 termios_bad=yes cat >>confdefs.h <<\EOF
13619 #define SVR4_TERMIO 1
13620 EOF
13621
13622 fi
13623 rm -f conftest.$ac_objext conftest.$ac_ext
13624
13625 fi
13626 rm -f conftest.$ac_objext conftest.$ac_ext
13627         echo "$as_me:13627: result: $termios_bad" >&5
13628 echo "${ECHO_T}$termios_bad" >&6
13629         fi
13630 fi
13631
13632 echo "$as_me:13632: checking for tcgetattr" >&5
13633 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13634 if test "${cf_cv_have_tcgetattr+set}" = set; then
13635   echo $ECHO_N "(cached) $ECHO_C" >&6
13636 else
13637
13638 cat >conftest.$ac_ext <<_ACEOF
13639 #line 13639 "configure"
13640 #include "confdefs.h"
13641
13642 #include <sys/types.h>
13643 #ifdef HAVE_UNISTD_H
13644 #include <unistd.h>
13645 #endif
13646 #ifdef HAVE_TERMIOS_H
13647 #include <termios.h>
13648 #define TTY struct termios
13649 #else
13650 #ifdef HAVE_TERMIO_H
13651 #include <termio.h>
13652 #define TTY struct termio
13653 #endif
13654 #endif
13655
13656 int
13657 main ()
13658 {
13659
13660 TTY foo;
13661 tcgetattr(1, &foo);
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 rm -f conftest.$ac_objext conftest$ac_exeext
13667 if { (eval echo "$as_me:13667: \"$ac_link\"") >&5
13668   (eval $ac_link) 2>&5
13669   ac_status=$?
13670   echo "$as_me:13670: \$? = $ac_status" >&5
13671   (exit $ac_status); } &&
13672          { ac_try='test -s conftest$ac_exeext'
13673   { (eval echo "$as_me:13673: \"$ac_try\"") >&5
13674   (eval $ac_try) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); }; }; then
13678   cf_cv_have_tcgetattr=yes
13679 else
13680   echo "$as_me: failed program was:" >&5
13681 cat conftest.$ac_ext >&5
13682 cf_cv_have_tcgetattr=no
13683 fi
13684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13685 fi
13686 echo "$as_me:13686: result: $cf_cv_have_tcgetattr" >&5
13687 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13688 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13689 #define HAVE_TCGETATTR 1
13690 EOF
13691
13692 echo "$as_me:13692: checking for vsscanf function or workaround" >&5
13693 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13694 if test "${cf_cv_func_vsscanf+set}" = set; then
13695   echo $ECHO_N "(cached) $ECHO_C" >&6
13696 else
13697
13698 cat >conftest.$ac_ext <<_ACEOF
13699 #line 13699 "configure"
13700 #include "confdefs.h"
13701
13702 #include <stdarg.h>
13703 #include <stdio.h>
13704 int
13705 main ()
13706 {
13707
13708         va_list ap;
13709         vsscanf("from", "%d", ap)
13710   ;
13711   return 0;
13712 }
13713 _ACEOF
13714 rm -f conftest.$ac_objext conftest$ac_exeext
13715 if { (eval echo "$as_me:13715: \"$ac_link\"") >&5
13716   (eval $ac_link) 2>&5
13717   ac_status=$?
13718   echo "$as_me:13718: \$? = $ac_status" >&5
13719   (exit $ac_status); } &&
13720          { ac_try='test -s conftest$ac_exeext'
13721   { (eval echo "$as_me:13721: \"$ac_try\"") >&5
13722   (eval $ac_try) 2>&5
13723   ac_status=$?
13724   echo "$as_me:13724: \$? = $ac_status" >&5
13725   (exit $ac_status); }; }; then
13726   cf_cv_func_vsscanf=vsscanf
13727 else
13728   echo "$as_me: failed program was:" >&5
13729 cat conftest.$ac_ext >&5
13730
13731 cat >conftest.$ac_ext <<_ACEOF
13732 #line 13732 "configure"
13733 #include "confdefs.h"
13734
13735 #include <stdarg.h>
13736 #include <stdio.h>
13737 int
13738 main ()
13739 {
13740
13741     FILE strbuf;
13742     char *str = "from";
13743
13744     strbuf._flag = _IOREAD;
13745     strbuf._ptr = strbuf._base = (unsigned char *) str;
13746     strbuf._cnt = strlen(str);
13747     strbuf._file = _NFILE;
13748     return (vfscanf(&strbuf, "%d", ap))
13749   ;
13750   return 0;
13751 }
13752 _ACEOF
13753 rm -f conftest.$ac_objext conftest$ac_exeext
13754 if { (eval echo "$as_me:13754: \"$ac_link\"") >&5
13755   (eval $ac_link) 2>&5
13756   ac_status=$?
13757   echo "$as_me:13757: \$? = $ac_status" >&5
13758   (exit $ac_status); } &&
13759          { ac_try='test -s conftest$ac_exeext'
13760   { (eval echo "$as_me:13760: \"$ac_try\"") >&5
13761   (eval $ac_try) 2>&5
13762   ac_status=$?
13763   echo "$as_me:13763: \$? = $ac_status" >&5
13764   (exit $ac_status); }; }; then
13765   cf_cv_func_vsscanf=vfscanf
13766 else
13767   echo "$as_me: failed program was:" >&5
13768 cat conftest.$ac_ext >&5
13769
13770 cat >conftest.$ac_ext <<_ACEOF
13771 #line 13771 "configure"
13772 #include "confdefs.h"
13773
13774 #include <stdarg.h>
13775 #include <stdio.h>
13776 int
13777 main ()
13778 {
13779
13780     FILE strbuf;
13781     char *str = "from";
13782
13783     strbuf._flag = _IOREAD;
13784     strbuf._ptr = strbuf._base = (unsigned char *) str;
13785     strbuf._cnt = strlen(str);
13786     strbuf._file = _NFILE;
13787     return (_doscan(&strbuf, "%d", ap))
13788   ;
13789   return 0;
13790 }
13791 _ACEOF
13792 rm -f conftest.$ac_objext conftest$ac_exeext
13793 if { (eval echo "$as_me:13793: \"$ac_link\"") >&5
13794   (eval $ac_link) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); } &&
13798          { ac_try='test -s conftest$ac_exeext'
13799   { (eval echo "$as_me:13799: \"$ac_try\"") >&5
13800   (eval $ac_try) 2>&5
13801   ac_status=$?
13802   echo "$as_me:13802: \$? = $ac_status" >&5
13803   (exit $ac_status); }; }; then
13804   cf_cv_func_vsscanf=_doscan
13805 else
13806   echo "$as_me: failed program was:" >&5
13807 cat conftest.$ac_ext >&5
13808
13809 cf_cv_func_vsscanf=no
13810 fi
13811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13812 fi
13813 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13814 fi
13815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13816 fi
13817 echo "$as_me:13817: result: $cf_cv_func_vsscanf" >&5
13818 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13819
13820 case $cf_cv_func_vsscanf in #(vi
13821 vsscanf) cat >>confdefs.h <<\EOF
13822 #define HAVE_VSSCANF 1
13823 EOF
13824 ;; #(vi
13825 vfscanf) cat >>confdefs.h <<\EOF
13826 #define HAVE_VFSCANF 1
13827 EOF
13828 ;; #(vi
13829 _doscan) cat >>confdefs.h <<\EOF
13830 #define HAVE__DOSCAN 1
13831 EOF
13832 ;;
13833 esac
13834
13835 echo "$as_me:13835: checking for working mkstemp" >&5
13836 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13837 if test "${cf_cv_func_mkstemp+set}" = set; then
13838   echo $ECHO_N "(cached) $ECHO_C" >&6
13839 else
13840
13841 rm -f conftest*
13842 if test "$cross_compiling" = yes; then
13843   echo "$as_me:13843: checking for mkstemp" >&5
13844 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13845 if test "${ac_cv_func_mkstemp+set}" = set; then
13846   echo $ECHO_N "(cached) $ECHO_C" >&6
13847 else
13848   cat >conftest.$ac_ext <<_ACEOF
13849 #line 13849 "configure"
13850 #include "confdefs.h"
13851 /* System header to define __stub macros and hopefully few prototypes,
13852     which can conflict with char mkstemp (); below.  */
13853 #include <assert.h>
13854 /* Override any gcc2 internal prototype to avoid an error.  */
13855 #ifdef __cplusplus
13856 extern "C"
13857 #endif
13858 /* We use char because int might match the return type of a gcc2
13859    builtin and then its argument prototype would still apply.  */
13860 char mkstemp ();
13861 char (*f) ();
13862
13863 int
13864 main ()
13865 {
13866 /* The GNU C library defines this for functions which it implements
13867     to always fail with ENOSYS.  Some functions are actually named
13868     something starting with __ and the normal name is an alias.  */
13869 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13870 choke me
13871 #else
13872 f = mkstemp;
13873 #endif
13874
13875   ;
13876   return 0;
13877 }
13878 _ACEOF
13879 rm -f conftest.$ac_objext conftest$ac_exeext
13880 if { (eval echo "$as_me:13880: \"$ac_link\"") >&5
13881   (eval $ac_link) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); } &&
13885          { ac_try='test -s conftest$ac_exeext'
13886   { (eval echo "$as_me:13886: \"$ac_try\"") >&5
13887   (eval $ac_try) 2>&5
13888   ac_status=$?
13889   echo "$as_me:13889: \$? = $ac_status" >&5
13890   (exit $ac_status); }; }; then
13891   ac_cv_func_mkstemp=yes
13892 else
13893   echo "$as_me: failed program was:" >&5
13894 cat conftest.$ac_ext >&5
13895 ac_cv_func_mkstemp=no
13896 fi
13897 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13898 fi
13899 echo "$as_me:13899: result: $ac_cv_func_mkstemp" >&5
13900 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13901
13902 else
13903   cat >conftest.$ac_ext <<_ACEOF
13904 #line 13904 "configure"
13905 #include "confdefs.h"
13906
13907 #include <sys/types.h>
13908 #include <stdlib.h>
13909 #include <stdio.h>
13910 #include <string.h>
13911 #include <sys/stat.h>
13912 int main()
13913 {
13914         char *tmpl = "conftestXXXXXX";
13915         char name[2][80];
13916         int n;
13917         int result = 0;
13918         int fd;
13919         struct stat sb;
13920
13921         umask(077);
13922         for (n = 0; n < 2; ++n) {
13923                 strcpy(name[n], tmpl);
13924                 if ((fd = mkstemp(name[n])) >= 0) {
13925                         if (!strcmp(name[n], tmpl)
13926                          || stat(name[n], &sb) != 0
13927                          || (sb.st_mode & S_IFMT) != S_IFREG
13928                          || (sb.st_mode & 077) != 0) {
13929                                 result = 1;
13930                         }
13931                         close(fd);
13932                 }
13933         }
13934         if (result == 0
13935          && !strcmp(name[0], name[1]))
13936                 result = 1;
13937         ${cf_cv_main_return:-return}(result);
13938 }
13939
13940 _ACEOF
13941 rm -f conftest$ac_exeext
13942 if { (eval echo "$as_me:13942: \"$ac_link\"") >&5
13943   (eval $ac_link) 2>&5
13944   ac_status=$?
13945   echo "$as_me:13945: \$? = $ac_status" >&5
13946   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13947   { (eval echo "$as_me:13947: \"$ac_try\"") >&5
13948   (eval $ac_try) 2>&5
13949   ac_status=$?
13950   echo "$as_me:13950: \$? = $ac_status" >&5
13951   (exit $ac_status); }; }; then
13952   cf_cv_func_mkstemp=yes
13953
13954 else
13955   echo "$as_me: program exited with status $ac_status" >&5
13956 echo "$as_me: failed program was:" >&5
13957 cat conftest.$ac_ext >&5
13958 cf_cv_func_mkstemp=no
13959
13960 fi
13961 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13962 fi
13963
13964 fi
13965 echo "$as_me:13965: result: $cf_cv_func_mkstemp" >&5
13966 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13967 if test "$cf_cv_func_mkstemp" = yes ; then
13968         cat >>confdefs.h <<\EOF
13969 #define HAVE_MKSTEMP 1
13970 EOF
13971
13972 fi
13973
13974 # setup for prototype of fallback for vsscanf()
13975
13976 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13977         HAVE_VSSCANF=1
13978 else
13979         HAVE_VSSCANF=0
13980 fi
13981
13982 if test "$cross_compiling" = yes ; then
13983         { echo "$as_me:13983: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13984 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13985 else
13986         echo "$as_me:13986: checking whether setvbuf arguments are reversed" >&5
13987 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13988 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13989   echo $ECHO_N "(cached) $ECHO_C" >&6
13990 else
13991   if test "$cross_compiling" = yes; then
13992   { { echo "$as_me:13992: error: cannot run test program while cross compiling" >&5
13993 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13994    { (exit 1); exit 1; }; }
13995 else
13996   cat >conftest.$ac_ext <<_ACEOF
13997 #line 13997 "configure"
13998 #include "confdefs.h"
13999 #include <stdio.h>
14000 /* If setvbuf has the reversed format, exit 0. */
14001 int
14002 main ()
14003 {
14004   /* This call has the arguments reversed.
14005      A reversed system may check and see that the address of main
14006      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14007   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14008     $ac_main_return(1);
14009   putc('\r', stdout);
14010   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14011 }
14012 _ACEOF
14013 rm -f conftest$ac_exeext
14014 if { (eval echo "$as_me:14014: \"$ac_link\"") >&5
14015   (eval $ac_link) 2>&5
14016   ac_status=$?
14017   echo "$as_me:14017: \$? = $ac_status" >&5
14018   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14019   { (eval echo "$as_me:14019: \"$ac_try\"") >&5
14020   (eval $ac_try) 2>&5
14021   ac_status=$?
14022   echo "$as_me:14022: \$? = $ac_status" >&5
14023   (exit $ac_status); }; }; then
14024   ac_cv_func_setvbuf_reversed=yes
14025 else
14026   echo "$as_me: program exited with status $ac_status" >&5
14027 echo "$as_me: failed program was:" >&5
14028 cat conftest.$ac_ext >&5
14029 ac_cv_func_setvbuf_reversed=no
14030 fi
14031 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14032 fi
14033 rm -f core core.* *.core
14034 fi
14035 echo "$as_me:14035: result: $ac_cv_func_setvbuf_reversed" >&5
14036 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14037 if test $ac_cv_func_setvbuf_reversed = yes; then
14038
14039 cat >>confdefs.h <<\EOF
14040 #define SETVBUF_REVERSED 1
14041 EOF
14042
14043 fi
14044
14045 fi
14046 echo "$as_me:14046: checking return type of signal handlers" >&5
14047 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14048 if test "${ac_cv_type_signal+set}" = set; then
14049   echo $ECHO_N "(cached) $ECHO_C" >&6
14050 else
14051   cat >conftest.$ac_ext <<_ACEOF
14052 #line 14052 "configure"
14053 #include "confdefs.h"
14054 #include <sys/types.h>
14055 #include <signal.h>
14056 #ifdef signal
14057 # undef signal
14058 #endif
14059 #ifdef __cplusplus
14060 extern "C" void (*signal (int, void (*)(int)))(int);
14061 #else
14062 void (*signal ()) ();
14063 #endif
14064
14065 int
14066 main ()
14067 {
14068 int i;
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext
14074 if { (eval echo "$as_me:14074: \"$ac_compile\"") >&5
14075   (eval $ac_compile) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest.$ac_objext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085   ac_cv_type_signal=void
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat conftest.$ac_ext >&5
14089 ac_cv_type_signal=int
14090 fi
14091 rm -f conftest.$ac_objext conftest.$ac_ext
14092 fi
14093 echo "$as_me:14093: result: $ac_cv_type_signal" >&5
14094 echo "${ECHO_T}$ac_cv_type_signal" >&6
14095
14096 cat >>confdefs.h <<EOF
14097 #define RETSIGTYPE $ac_cv_type_signal
14098 EOF
14099
14100 echo "$as_me:14100: checking for type sigaction_t" >&5
14101 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14102 if test "${cf_cv_type_sigaction+set}" = set; then
14103   echo $ECHO_N "(cached) $ECHO_C" >&6
14104 else
14105
14106         cat >conftest.$ac_ext <<_ACEOF
14107 #line 14107 "configure"
14108 #include "confdefs.h"
14109
14110 #include <signal.h>
14111 int
14112 main ()
14113 {
14114 sigaction_t x
14115   ;
14116   return 0;
14117 }
14118 _ACEOF
14119 rm -f conftest.$ac_objext
14120 if { (eval echo "$as_me:14120: \"$ac_compile\"") >&5
14121   (eval $ac_compile) 2>&5
14122   ac_status=$?
14123   echo "$as_me:14123: \$? = $ac_status" >&5
14124   (exit $ac_status); } &&
14125          { ac_try='test -s conftest.$ac_objext'
14126   { (eval echo "$as_me:14126: \"$ac_try\"") >&5
14127   (eval $ac_try) 2>&5
14128   ac_status=$?
14129   echo "$as_me:14129: \$? = $ac_status" >&5
14130   (exit $ac_status); }; }; then
14131   cf_cv_type_sigaction=yes
14132 else
14133   echo "$as_me: failed program was:" >&5
14134 cat conftest.$ac_ext >&5
14135 cf_cv_type_sigaction=no
14136 fi
14137 rm -f conftest.$ac_objext conftest.$ac_ext
14138 fi
14139
14140 echo "$as_me:14140: result: $cf_cv_type_sigaction" >&5
14141 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14142 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14143 #define HAVE_TYPE_SIGACTION 1
14144 EOF
14145
14146 echo "$as_me:14146: checking declaration of size-change" >&5
14147 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14148 if test "${cf_cv_sizechange+set}" = set; then
14149   echo $ECHO_N "(cached) $ECHO_C" >&6
14150 else
14151
14152     cf_cv_sizechange=unknown
14153     cf_save_CPPFLAGS="$CPPFLAGS"
14154
14155 for cf_opts in "" "NEED_PTEM_H"
14156 do
14157
14158     CPPFLAGS="$cf_save_CPPFLAGS"
14159     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14160     cat >conftest.$ac_ext <<_ACEOF
14161 #line 14161 "configure"
14162 #include "confdefs.h"
14163 #include <sys/types.h>
14164 #ifdef HAVE_TERMIOS_H
14165 #include <termios.h>
14166 #else
14167 #ifdef HAVE_TERMIO_H
14168 #include <termio.h>
14169 #endif
14170 #endif
14171 #ifdef NEED_PTEM_H
14172 /* This is a workaround for SCO:  they neglected to define struct winsize in
14173  * termios.h -- it's only in termio.h and ptem.h
14174  */
14175 #include        <sys/stream.h>
14176 #include        <sys/ptem.h>
14177 #endif
14178 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14179 #include <sys/ioctl.h>
14180 #endif
14181
14182 int
14183 main ()
14184 {
14185
14186 #ifdef TIOCGSIZE
14187         struct ttysize win;     /* FIXME: what system is this? */
14188         int y = win.ts_lines;
14189         int x = win.ts_cols;
14190 #else
14191 #ifdef TIOCGWINSZ
14192         struct winsize win;
14193         int y = win.ws_row;
14194         int x = win.ws_col;
14195 #else
14196         no TIOCGSIZE or TIOCGWINSZ
14197 #endif /* TIOCGWINSZ */
14198 #endif /* TIOCGSIZE */
14199
14200   ;
14201   return 0;
14202 }
14203 _ACEOF
14204 rm -f conftest.$ac_objext
14205 if { (eval echo "$as_me:14205: \"$ac_compile\"") >&5
14206   (eval $ac_compile) 2>&5
14207   ac_status=$?
14208   echo "$as_me:14208: \$? = $ac_status" >&5
14209   (exit $ac_status); } &&
14210          { ac_try='test -s conftest.$ac_objext'
14211   { (eval echo "$as_me:14211: \"$ac_try\"") >&5
14212   (eval $ac_try) 2>&5
14213   ac_status=$?
14214   echo "$as_me:14214: \$? = $ac_status" >&5
14215   (exit $ac_status); }; }; then
14216   cf_cv_sizechange=yes
14217 else
14218   echo "$as_me: failed program was:" >&5
14219 cat conftest.$ac_ext >&5
14220 cf_cv_sizechange=no
14221 fi
14222 rm -f conftest.$ac_objext conftest.$ac_ext
14223
14224         CPPFLAGS="$cf_save_CPPFLAGS"
14225         if test "$cf_cv_sizechange" = yes ; then
14226                 echo "size-change succeeded ($cf_opts)" >&5
14227                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14228                 break
14229         fi
14230 done
14231
14232 fi
14233 echo "$as_me:14233: result: $cf_cv_sizechange" >&5
14234 echo "${ECHO_T}$cf_cv_sizechange" >&6
14235 if test "$cf_cv_sizechange" != no ; then
14236         cat >>confdefs.h <<\EOF
14237 #define HAVE_SIZECHANGE 1
14238 EOF
14239
14240         case $cf_cv_sizechange in #(vi
14241         NEED*)
14242                 cat >>confdefs.h <<EOF
14243 #define $cf_cv_sizechange  1
14244 EOF
14245
14246                 ;;
14247         esac
14248 fi
14249
14250 echo "$as_me:14250: checking for memmove" >&5
14251 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14252 if test "${ac_cv_func_memmove+set}" = set; then
14253   echo $ECHO_N "(cached) $ECHO_C" >&6
14254 else
14255   cat >conftest.$ac_ext <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14258 /* System header to define __stub macros and hopefully few prototypes,
14259     which can conflict with char memmove (); below.  */
14260 #include <assert.h>
14261 /* Override any gcc2 internal prototype to avoid an error.  */
14262 #ifdef __cplusplus
14263 extern "C"
14264 #endif
14265 /* We use char because int might match the return type of a gcc2
14266    builtin and then its argument prototype would still apply.  */
14267 char memmove ();
14268 char (*f) ();
14269
14270 int
14271 main ()
14272 {
14273 /* The GNU C library defines this for functions which it implements
14274     to always fail with ENOSYS.  Some functions are actually named
14275     something starting with __ and the normal name is an alias.  */
14276 #if defined (__stub_memmove) || defined (__stub___memmove)
14277 choke me
14278 #else
14279 f = memmove;
14280 #endif
14281
14282   ;
14283   return 0;
14284 }
14285 _ACEOF
14286 rm -f conftest.$ac_objext conftest$ac_exeext
14287 if { (eval echo "$as_me:14287: \"$ac_link\"") >&5
14288   (eval $ac_link) 2>&5
14289   ac_status=$?
14290   echo "$as_me:14290: \$? = $ac_status" >&5
14291   (exit $ac_status); } &&
14292          { ac_try='test -s conftest$ac_exeext'
14293   { (eval echo "$as_me:14293: \"$ac_try\"") >&5
14294   (eval $ac_try) 2>&5
14295   ac_status=$?
14296   echo "$as_me:14296: \$? = $ac_status" >&5
14297   (exit $ac_status); }; }; then
14298   ac_cv_func_memmove=yes
14299 else
14300   echo "$as_me: failed program was:" >&5
14301 cat conftest.$ac_ext >&5
14302 ac_cv_func_memmove=no
14303 fi
14304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14305 fi
14306 echo "$as_me:14306: result: $ac_cv_func_memmove" >&5
14307 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14308 if test $ac_cv_func_memmove = yes; then
14309   :
14310 else
14311
14312 echo "$as_me:14312: checking for bcopy" >&5
14313 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14314 if test "${ac_cv_func_bcopy+set}" = set; then
14315   echo $ECHO_N "(cached) $ECHO_C" >&6
14316 else
14317   cat >conftest.$ac_ext <<_ACEOF
14318 #line 14318 "configure"
14319 #include "confdefs.h"
14320 /* System header to define __stub macros and hopefully few prototypes,
14321     which can conflict with char bcopy (); below.  */
14322 #include <assert.h>
14323 /* Override any gcc2 internal prototype to avoid an error.  */
14324 #ifdef __cplusplus
14325 extern "C"
14326 #endif
14327 /* We use char because int might match the return type of a gcc2
14328    builtin and then its argument prototype would still apply.  */
14329 char bcopy ();
14330 char (*f) ();
14331
14332 int
14333 main ()
14334 {
14335 /* The GNU C library defines this for functions which it implements
14336     to always fail with ENOSYS.  Some functions are actually named
14337     something starting with __ and the normal name is an alias.  */
14338 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14339 choke me
14340 #else
14341 f = bcopy;
14342 #endif
14343
14344   ;
14345   return 0;
14346 }
14347 _ACEOF
14348 rm -f conftest.$ac_objext conftest$ac_exeext
14349 if { (eval echo "$as_me:14349: \"$ac_link\"") >&5
14350   (eval $ac_link) 2>&5
14351   ac_status=$?
14352   echo "$as_me:14352: \$? = $ac_status" >&5
14353   (exit $ac_status); } &&
14354          { ac_try='test -s conftest$ac_exeext'
14355   { (eval echo "$as_me:14355: \"$ac_try\"") >&5
14356   (eval $ac_try) 2>&5
14357   ac_status=$?
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit $ac_status); }; }; then
14360   ac_cv_func_bcopy=yes
14361 else
14362   echo "$as_me: failed program was:" >&5
14363 cat conftest.$ac_ext >&5
14364 ac_cv_func_bcopy=no
14365 fi
14366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14367 fi
14368 echo "$as_me:14368: result: $ac_cv_func_bcopy" >&5
14369 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14370 if test $ac_cv_func_bcopy = yes; then
14371
14372         echo "$as_me:14372: checking if bcopy does overlapping moves" >&5
14373 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14374 if test "${cf_cv_good_bcopy+set}" = set; then
14375   echo $ECHO_N "(cached) $ECHO_C" >&6
14376 else
14377
14378                 if test "$cross_compiling" = yes; then
14379   cf_cv_good_bcopy=unknown
14380 else
14381   cat >conftest.$ac_ext <<_ACEOF
14382 #line 14382 "configure"
14383 #include "confdefs.h"
14384
14385 int main() {
14386         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14387         char temp[40];
14388         bcopy(data, temp, sizeof(data));
14389         bcopy(temp+10, temp, 15);
14390         bcopy(temp+5, temp+15, 10);
14391         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14392 }
14393
14394 _ACEOF
14395 rm -f conftest$ac_exeext
14396 if { (eval echo "$as_me:14396: \"$ac_link\"") >&5
14397   (eval $ac_link) 2>&5
14398   ac_status=$?
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14401   { (eval echo "$as_me:14401: \"$ac_try\"") >&5
14402   (eval $ac_try) 2>&5
14403   ac_status=$?
14404   echo "$as_me:14404: \$? = $ac_status" >&5
14405   (exit $ac_status); }; }; then
14406   cf_cv_good_bcopy=yes
14407 else
14408   echo "$as_me: program exited with status $ac_status" >&5
14409 echo "$as_me: failed program was:" >&5
14410 cat conftest.$ac_ext >&5
14411 cf_cv_good_bcopy=no
14412 fi
14413 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14414 fi
14415
14416 fi
14417 echo "$as_me:14417: result: $cf_cv_good_bcopy" >&5
14418 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14419
14420 else
14421   cf_cv_good_bcopy=no
14422 fi
14423
14424         if test "$cf_cv_good_bcopy" = yes ; then
14425                 cat >>confdefs.h <<\EOF
14426 #define USE_OK_BCOPY 1
14427 EOF
14428
14429         else
14430                 cat >>confdefs.h <<\EOF
14431 #define USE_MY_MEMMOVE 1
14432 EOF
14433
14434         fi
14435
14436 fi
14437
14438 echo "$as_me:14438: checking if poll really works" >&5
14439 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14440 if test "${cf_cv_working_poll+set}" = set; then
14441   echo $ECHO_N "(cached) $ECHO_C" >&6
14442 else
14443
14444 if test "$cross_compiling" = yes; then
14445   cf_cv_working_poll=unknown
14446 else
14447   cat >conftest.$ac_ext <<_ACEOF
14448 #line 14448 "configure"
14449 #include "confdefs.h"
14450
14451 #include <stdio.h>
14452 #ifdef HAVE_POLL_H
14453 #include <poll.h>
14454 #else
14455 #include <sys/poll.h>
14456 #endif
14457 int main() {
14458         struct pollfd myfds;
14459         int ret;
14460
14461         myfds.fd = 0;
14462         myfds.events = POLLIN;
14463
14464         ret = poll(&myfds, 1, 100);
14465         ${cf_cv_main_return:-return}(ret != 0);
14466 }
14467 _ACEOF
14468 rm -f conftest$ac_exeext
14469 if { (eval echo "$as_me:14469: \"$ac_link\"") >&5
14470   (eval $ac_link) 2>&5
14471   ac_status=$?
14472   echo "$as_me:14472: \$? = $ac_status" >&5
14473   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14474   { (eval echo "$as_me:14474: \"$ac_try\"") >&5
14475   (eval $ac_try) 2>&5
14476   ac_status=$?
14477   echo "$as_me:14477: \$? = $ac_status" >&5
14478   (exit $ac_status); }; }; then
14479   cf_cv_working_poll=yes
14480 else
14481   echo "$as_me: program exited with status $ac_status" >&5
14482 echo "$as_me: failed program was:" >&5
14483 cat conftest.$ac_ext >&5
14484 cf_cv_working_poll=no
14485 fi
14486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14487 fi
14488 fi
14489 echo "$as_me:14489: result: $cf_cv_working_poll" >&5
14490 echo "${ECHO_T}$cf_cv_working_poll" >&6
14491 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14492 #define HAVE_WORKING_POLL 1
14493 EOF
14494
14495 # special check for test/ditto.c
14496
14497 echo "$as_me:14497: checking for openpty in -lutil" >&5
14498 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14499 if test "${ac_cv_lib_util_openpty+set}" = set; then
14500   echo $ECHO_N "(cached) $ECHO_C" >&6
14501 else
14502   ac_check_lib_save_LIBS=$LIBS
14503 LIBS="-lutil  $LIBS"
14504 cat >conftest.$ac_ext <<_ACEOF
14505 #line 14505 "configure"
14506 #include "confdefs.h"
14507
14508 /* Override any gcc2 internal prototype to avoid an error.  */
14509 #ifdef __cplusplus
14510 extern "C"
14511 #endif
14512 /* We use char because int might match the return type of a gcc2
14513    builtin and then its argument prototype would still apply.  */
14514 char openpty ();
14515 int
14516 main ()
14517 {
14518 openpty ();
14519   ;
14520   return 0;
14521 }
14522 _ACEOF
14523 rm -f conftest.$ac_objext conftest$ac_exeext
14524 if { (eval echo "$as_me:14524: \"$ac_link\"") >&5
14525   (eval $ac_link) 2>&5
14526   ac_status=$?
14527   echo "$as_me:14527: \$? = $ac_status" >&5
14528   (exit $ac_status); } &&
14529          { ac_try='test -s conftest$ac_exeext'
14530   { (eval echo "$as_me:14530: \"$ac_try\"") >&5
14531   (eval $ac_try) 2>&5
14532   ac_status=$?
14533   echo "$as_me:14533: \$? = $ac_status" >&5
14534   (exit $ac_status); }; }; then
14535   ac_cv_lib_util_openpty=yes
14536 else
14537   echo "$as_me: failed program was:" >&5
14538 cat conftest.$ac_ext >&5
14539 ac_cv_lib_util_openpty=no
14540 fi
14541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14542 LIBS=$ac_check_lib_save_LIBS
14543 fi
14544 echo "$as_me:14544: result: $ac_cv_lib_util_openpty" >&5
14545 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14546 if test $ac_cv_lib_util_openpty = yes; then
14547   cf_cv_lib_util=yes
14548 else
14549   cf_cv_lib_util=no
14550 fi
14551
14552 echo "$as_me:14552: checking for openpty header" >&5
14553 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14554 if test "${cf_cv_func_openpty+set}" = set; then
14555   echo $ECHO_N "(cached) $ECHO_C" >&6
14556 else
14557
14558     cf_save_LIBS="$LIBS"
14559     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14560     for cf_header in pty.h libutil.h util.h
14561     do
14562     cat >conftest.$ac_ext <<_ACEOF
14563 #line 14563 "configure"
14564 #include "confdefs.h"
14565
14566 #include <$cf_header>
14567
14568 int
14569 main ()
14570 {
14571
14572     int x = openpty((int *)0, (int *)0, (char *)0,
14573                    (struct termios *)0, (struct winsize *)0);
14574
14575   ;
14576   return 0;
14577 }
14578 _ACEOF
14579 rm -f conftest.$ac_objext conftest$ac_exeext
14580 if { (eval echo "$as_me:14580: \"$ac_link\"") >&5
14581   (eval $ac_link) 2>&5
14582   ac_status=$?
14583   echo "$as_me:14583: \$? = $ac_status" >&5
14584   (exit $ac_status); } &&
14585          { ac_try='test -s conftest$ac_exeext'
14586   { (eval echo "$as_me:14586: \"$ac_try\"") >&5
14587   (eval $ac_try) 2>&5
14588   ac_status=$?
14589   echo "$as_me:14589: \$? = $ac_status" >&5
14590   (exit $ac_status); }; }; then
14591
14592         cf_cv_func_openpty=$cf_header
14593         break
14594
14595 else
14596   echo "$as_me: failed program was:" >&5
14597 cat conftest.$ac_ext >&5
14598
14599         cf_cv_func_openpty=no
14600
14601 fi
14602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14603     done
14604     LIBS="$cf_save_LIBS"
14605
14606 fi
14607 echo "$as_me:14607: result: $cf_cv_func_openpty" >&5
14608 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14609
14610 if test "$cf_cv_func_openpty" != no ; then
14611     cat >>confdefs.h <<EOF
14612 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14613 EOF
14614
14615     cat >>confdefs.h <<\EOF
14616 #define USE_XTERM_PTY 1
14617 EOF
14618
14619     if test "$cf_cv_lib_util" = yes ; then
14620         TEST_LIBS="-lutil $TEST_LIBS"
14621     fi
14622 fi
14623
14624 if test "$with_hashed_db" != no ; then
14625         cat >>confdefs.h <<\EOF
14626 #define USE_HASHED_DB 1
14627 EOF
14628
14629 case $with_hashed_db in #(vi
14630 yes|*able*) #(vi
14631     ;;
14632 *)
14633     if test -d "$with_hashed_db" ; then
14634
14635 if test -n "$with_hashed_db/include" ; then
14636   for cf_add_incdir in $with_hashed_db/include
14637   do
14638         while test $cf_add_incdir != /usr/include
14639         do
14640           if test -d $cf_add_incdir
14641           then
14642                 cf_have_incdir=no
14643                 if test -n "$CFLAGS$CPPFLAGS" ; then
14644                   # a loop is needed to ensure we can add subdirs of existing dirs
14645                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14646                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14647                           cf_have_incdir=yes; break
14648                         fi
14649                   done
14650                 fi
14651
14652                 if test "$cf_have_incdir" = no ; then
14653                   if test "$cf_add_incdir" = /usr/local/include ; then
14654                         if test "$GCC" = yes
14655                         then
14656                           cf_save_CPPFLAGS=$CPPFLAGS
14657                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14658                           cat >conftest.$ac_ext <<_ACEOF
14659 #line 14659 "configure"
14660 #include "confdefs.h"
14661 #include <stdio.h>
14662 int
14663 main ()
14664 {
14665 printf("Hello")
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext
14671 if { (eval echo "$as_me:14671: \"$ac_compile\"") >&5
14672   (eval $ac_compile) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); } &&
14676          { ac_try='test -s conftest.$ac_objext'
14677   { (eval echo "$as_me:14677: \"$ac_try\"") >&5
14678   (eval $ac_try) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); }; }; then
14682   :
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 cat conftest.$ac_ext >&5
14686 cf_have_incdir=yes
14687 fi
14688 rm -f conftest.$ac_objext conftest.$ac_ext
14689                           CPPFLAGS=$cf_save_CPPFLAGS
14690                         fi
14691                   fi
14692                 fi
14693
14694                 if test "$cf_have_incdir" = no ; then
14695                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14696
14697 echo "${as_me-configure}:14697: testing adding $cf_add_incdir to include-path ..." 1>&5
14698
14699                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14700
14701                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14702                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14703                   cf_add_incdir="$cf_top_incdir"
14704                 else
14705                   break
14706                 fi
14707           fi
14708         done
14709   done
14710 fi
14711
14712 if test -n "$with_hashed_db/lib" ; then
14713   for cf_add_libdir in $with_hashed_db/lib
14714   do
14715     if test $cf_add_libdir = /usr/lib ; then
14716       :
14717     elif test -d $cf_add_libdir
14718     then
14719       cf_have_libdir=no
14720       if test -n "$LDFLAGS$LIBS" ; then
14721         # a loop is needed to ensure we can add subdirs of existing dirs
14722         for cf_test_libdir in $LDFLAGS $LIBS ; do
14723           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14724             cf_have_libdir=yes; break
14725           fi
14726         done
14727       fi
14728       if test "$cf_have_libdir" = no ; then
14729         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14730
14731 echo "${as_me-configure}:14731: testing adding $cf_add_libdir to library-path ..." 1>&5
14732
14733         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14734       fi
14735     fi
14736   done
14737 fi
14738
14739     fi
14740 esac
14741
14742 echo "$as_me:14742: checking for db.h" >&5
14743 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14744 if test "${ac_cv_header_db_h+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747   cat >conftest.$ac_ext <<_ACEOF
14748 #line 14748 "configure"
14749 #include "confdefs.h"
14750 #include <db.h>
14751 _ACEOF
14752 if { (eval echo "$as_me:14752: \"$ac_cpp conftest.$ac_ext\"") >&5
14753   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14754   ac_status=$?
14755   egrep -v '^ *\+' conftest.er1 >conftest.err
14756   rm -f conftest.er1
14757   cat conftest.err >&5
14758   echo "$as_me:14758: \$? = $ac_status" >&5
14759   (exit $ac_status); } >/dev/null; then
14760   if test -s conftest.err; then
14761     ac_cpp_err=$ac_c_preproc_warn_flag
14762   else
14763     ac_cpp_err=
14764   fi
14765 else
14766   ac_cpp_err=yes
14767 fi
14768 if test -z "$ac_cpp_err"; then
14769   ac_cv_header_db_h=yes
14770 else
14771   echo "$as_me: failed program was:" >&5
14772   cat conftest.$ac_ext >&5
14773   ac_cv_header_db_h=no
14774 fi
14775 rm -f conftest.err conftest.$ac_ext
14776 fi
14777 echo "$as_me:14777: result: $ac_cv_header_db_h" >&5
14778 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14779 if test $ac_cv_header_db_h = yes; then
14780
14781 echo "$as_me:14781: checking for version of db" >&5
14782 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14783 if test "${cf_cv_hashed_db_version+set}" = set; then
14784   echo $ECHO_N "(cached) $ECHO_C" >&6
14785 else
14786
14787 cf_cv_hashed_db_version=unknown
14788
14789 for cf_db_version in 1 2 3 4 5
14790 do
14791
14792 echo "${as_me-configure}:14792: testing checking for db version $cf_db_version ..." 1>&5
14793
14794         cat >conftest.$ac_ext <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14797
14798 $ac_includes_default
14799 #include <db.h>
14800
14801 #ifdef DB_VERSION_MAJOR
14802         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14803 #if $cf_db_version == DB_VERSION_MAJOR
14804         /* ok */
14805 #else
14806         make an error
14807 #endif
14808 #else
14809 #if $cf_db_version == 1
14810         /* ok: assuming this is DB 1.8.5 */
14811 #else
14812         make an error
14813 #endif
14814 #endif
14815
14816 int
14817 main ()
14818 {
14819 DBT *foo = 0
14820   ;
14821   return 0;
14822 }
14823 _ACEOF
14824 rm -f conftest.$ac_objext
14825 if { (eval echo "$as_me:14825: \"$ac_compile\"") >&5
14826   (eval $ac_compile) 2>&5
14827   ac_status=$?
14828   echo "$as_me:14828: \$? = $ac_status" >&5
14829   (exit $ac_status); } &&
14830          { ac_try='test -s conftest.$ac_objext'
14831   { (eval echo "$as_me:14831: \"$ac_try\"") >&5
14832   (eval $ac_try) 2>&5
14833   ac_status=$?
14834   echo "$as_me:14834: \$? = $ac_status" >&5
14835   (exit $ac_status); }; }; then
14836
14837         cf_cv_hashed_db_version=$cf_db_version
14838         break
14839
14840 else
14841   echo "$as_me: failed program was:" >&5
14842 cat conftest.$ac_ext >&5
14843 fi
14844 rm -f conftest.$ac_objext conftest.$ac_ext
14845 done
14846
14847 fi
14848 echo "$as_me:14848: result: $cf_cv_hashed_db_version" >&5
14849 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14850
14851 if test "$cf_cv_hashed_db_version" = unknown ; then
14852         { { echo "$as_me:14852: error: Cannot determine version of db" >&5
14853 echo "$as_me: error: Cannot determine version of db" >&2;}
14854    { (exit 1); exit 1; }; }
14855 else
14856
14857 echo "$as_me:14857: checking for db libraries" >&5
14858 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14859 if test "${cf_cv_hashed_db_libs+set}" = set; then
14860   echo $ECHO_N "(cached) $ECHO_C" >&6
14861 else
14862
14863 cf_cv_hashed_db_libs=unknown
14864 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14865 do
14866         cf_save_libs="$LIBS"
14867         if test -n "$cf_db_libs"; then
14868                 LIBS="-l$cf_db_libs $LIBS"
14869         fi
14870
14871 echo "${as_me-configure}:14871: testing checking for library "$cf_db_libs" ..." 1>&5
14872
14873         cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14876
14877 $ac_includes_default
14878 #include <db.h>
14879
14880 int
14881 main ()
14882 {
14883
14884         char *path = "/tmp/foo";
14885 #ifdef DB_VERSION_MAJOR
14886 #if DB_VERSION_MAJOR >= 4
14887         DB *result = 0;
14888         db_create(&result, NULL, 0);
14889         result->open(result,
14890                 NULL,
14891                 path,
14892                 path,
14893                 DB_HASH,
14894                 DB_CREATE,
14895                 0644);
14896 #elif DB_VERSION_MAJOR >= 3
14897         DB *result = 0;
14898         db_create(&result, NULL, 0);
14899         result->open(result,
14900                 path,
14901                 path,
14902                 DB_HASH,
14903                 DB_CREATE,
14904                 0644);
14905 #elif DB_VERSION_MAJOR >= 2
14906         DB *result = 0;
14907         db_open(path,
14908                 DB_HASH,
14909                 DB_CREATE,
14910                 0644,
14911                 (DB_ENV *) 0,
14912                 (DB_INFO *) 0,
14913                 &result);
14914 #endif /* DB_VERSION_MAJOR */
14915 #else
14916         DB *result = dbopen(path,
14917                      2,
14918                      0644,
14919                      DB_HASH,
14920                      0);
14921 #endif
14922         ${cf_cv_main_return:-return}(result != 0)
14923
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 rm -f conftest.$ac_objext conftest$ac_exeext
14929 if { (eval echo "$as_me:14929: \"$ac_link\"") >&5
14930   (eval $ac_link) 2>&5
14931   ac_status=$?
14932   echo "$as_me:14932: \$? = $ac_status" >&5
14933   (exit $ac_status); } &&
14934          { ac_try='test -s conftest$ac_exeext'
14935   { (eval echo "$as_me:14935: \"$ac_try\"") >&5
14936   (eval $ac_try) 2>&5
14937   ac_status=$?
14938   echo "$as_me:14938: \$? = $ac_status" >&5
14939   (exit $ac_status); }; }; then
14940
14941         if test -n "$cf_db_libs" ; then
14942                 cf_cv_hashed_db_libs=$cf_db_libs
14943         else
14944                 cf_cv_hashed_db_libs=default
14945         fi
14946         LIBS="$cf_save_libs"
14947         break
14948
14949 else
14950   echo "$as_me: failed program was:" >&5
14951 cat conftest.$ac_ext >&5
14952 fi
14953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14954         LIBS="$cf_save_libs"
14955 done
14956
14957 fi
14958 echo "$as_me:14958: result: $cf_cv_hashed_db_libs" >&5
14959 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14960
14961         if test "$cf_cv_hashed_db_libs" = unknown ; then
14962                 { { echo "$as_me:14962: error: Cannot determine library for db" >&5
14963 echo "$as_me: error: Cannot determine library for db" >&2;}
14964    { (exit 1); exit 1; }; }
14965         elif test "$cf_cv_hashed_db_libs" != default ; then
14966                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14967         fi
14968 fi
14969
14970 else
14971
14972         { { echo "$as_me:14972: error: Cannot find db.h" >&5
14973 echo "$as_me: error: Cannot find db.h" >&2;}
14974    { (exit 1); exit 1; }; }
14975
14976 fi
14977
14978 fi
14979
14980 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14981         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14982         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14983 fi
14984
14985 # Just in case, check if the C compiler has a bool type.
14986
14987 echo "$as_me:14987: checking if we should include stdbool.h" >&5
14988 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14989
14990 if test "${cf_cv_header_stdbool_h+set}" = set; then
14991   echo $ECHO_N "(cached) $ECHO_C" >&6
14992 else
14993
14994         cat >conftest.$ac_ext <<_ACEOF
14995 #line 14995 "configure"
14996 #include "confdefs.h"
14997
14998 int
14999 main ()
15000 {
15001 bool foo = false
15002   ;
15003   return 0;
15004 }
15005 _ACEOF
15006 rm -f conftest.$ac_objext
15007 if { (eval echo "$as_me:15007: \"$ac_compile\"") >&5
15008   (eval $ac_compile) 2>&5
15009   ac_status=$?
15010   echo "$as_me:15010: \$? = $ac_status" >&5
15011   (exit $ac_status); } &&
15012          { ac_try='test -s conftest.$ac_objext'
15013   { (eval echo "$as_me:15013: \"$ac_try\"") >&5
15014   (eval $ac_try) 2>&5
15015   ac_status=$?
15016   echo "$as_me:15016: \$? = $ac_status" >&5
15017   (exit $ac_status); }; }; then
15018   cf_cv_header_stdbool_h=0
15019 else
15020   echo "$as_me: failed program was:" >&5
15021 cat conftest.$ac_ext >&5
15022 cat >conftest.$ac_ext <<_ACEOF
15023 #line 15023 "configure"
15024 #include "confdefs.h"
15025
15026 #ifndef __BEOS__
15027 #include <stdbool.h>
15028 #endif
15029
15030 int
15031 main ()
15032 {
15033 bool foo = false
15034   ;
15035   return 0;
15036 }
15037 _ACEOF
15038 rm -f conftest.$ac_objext
15039 if { (eval echo "$as_me:15039: \"$ac_compile\"") >&5
15040   (eval $ac_compile) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit $ac_status); } &&
15044          { ac_try='test -s conftest.$ac_objext'
15045   { (eval echo "$as_me:15045: \"$ac_try\"") >&5
15046   (eval $ac_try) 2>&5
15047   ac_status=$?
15048   echo "$as_me:15048: \$? = $ac_status" >&5
15049   (exit $ac_status); }; }; then
15050   cf_cv_header_stdbool_h=1
15051 else
15052   echo "$as_me: failed program was:" >&5
15053 cat conftest.$ac_ext >&5
15054 cf_cv_header_stdbool_h=0
15055 fi
15056 rm -f conftest.$ac_objext conftest.$ac_ext
15057 fi
15058 rm -f conftest.$ac_objext conftest.$ac_ext
15059 fi
15060
15061 if test "$cf_cv_header_stdbool_h" = 1
15062 then    echo "$as_me:15062: result: yes" >&5
15063 echo "${ECHO_T}yes" >&6
15064 else    echo "$as_me:15064: result: no" >&5
15065 echo "${ECHO_T}no" >&6
15066 fi
15067
15068 echo "$as_me:15068: checking for builtin bool type" >&5
15069 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15070
15071 if test "${cf_cv_cc_bool_type+set}" = set; then
15072   echo $ECHO_N "(cached) $ECHO_C" >&6
15073 else
15074
15075         cat >conftest.$ac_ext <<_ACEOF
15076 #line 15076 "configure"
15077 #include "confdefs.h"
15078
15079 #include <stdio.h>
15080 #include <sys/types.h>
15081
15082 int
15083 main ()
15084 {
15085 bool x = false
15086   ;
15087   return 0;
15088 }
15089 _ACEOF
15090 rm -f conftest.$ac_objext
15091 if { (eval echo "$as_me:15091: \"$ac_compile\"") >&5
15092   (eval $ac_compile) 2>&5
15093   ac_status=$?
15094   echo "$as_me:15094: \$? = $ac_status" >&5
15095   (exit $ac_status); } &&
15096          { ac_try='test -s conftest.$ac_objext'
15097   { (eval echo "$as_me:15097: \"$ac_try\"") >&5
15098   (eval $ac_try) 2>&5
15099   ac_status=$?
15100   echo "$as_me:15100: \$? = $ac_status" >&5
15101   (exit $ac_status); }; }; then
15102   cf_cv_cc_bool_type=1
15103 else
15104   echo "$as_me: failed program was:" >&5
15105 cat conftest.$ac_ext >&5
15106 cf_cv_cc_bool_type=0
15107 fi
15108 rm -f conftest.$ac_objext conftest.$ac_ext
15109
15110 fi
15111
15112 if test "$cf_cv_cc_bool_type" = 1
15113 then    echo "$as_me:15113: result: yes" >&5
15114 echo "${ECHO_T}yes" >&6
15115 else    echo "$as_me:15115: result: no" >&5
15116 echo "${ECHO_T}no" >&6
15117 fi
15118
15119 # Check for C++ compiler characteristics (and ensure that it's there!)
15120 if test -n "$CXX" ; then
15121         ac_ext=cc
15122 ac_cpp='$CXXCPP $CPPFLAGS'
15123 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15124 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15125 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15126 ac_main_return=return
15127
15128 if test -n "$GXX" ; then
15129 case $cf_cv_system_name in #(vi
15130 os2*) #(vi
15131         cf_stdcpp_libname=stdcpp
15132         ;;
15133 *)
15134         cf_stdcpp_libname=stdc++
15135         ;;
15136 esac
15137 echo "$as_me:15137: checking for library $cf_stdcpp_libname" >&5
15138 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15139 if test "${cf_cv_libstdcpp+set}" = set; then
15140   echo $ECHO_N "(cached) $ECHO_C" >&6
15141 else
15142
15143         cf_save="$LIBS"
15144         LIBS="$LIBS -l$cf_stdcpp_libname"
15145 cat >conftest.$ac_ext <<_ACEOF
15146 #line 15146 "configure"
15147 #include "confdefs.h"
15148
15149 #include <strstream.h>
15150 int
15151 main ()
15152 {
15153
15154 char buf[80];
15155 strstreambuf foo(buf, sizeof(buf))
15156
15157   ;
15158   return 0;
15159 }
15160 _ACEOF
15161 rm -f conftest.$ac_objext conftest$ac_exeext
15162 if { (eval echo "$as_me:15162: \"$ac_link\"") >&5
15163   (eval $ac_link) 2>&5
15164   ac_status=$?
15165   echo "$as_me:15165: \$? = $ac_status" >&5
15166   (exit $ac_status); } &&
15167          { ac_try='test -s conftest$ac_exeext'
15168   { (eval echo "$as_me:15168: \"$ac_try\"") >&5
15169   (eval $ac_try) 2>&5
15170   ac_status=$?
15171   echo "$as_me:15171: \$? = $ac_status" >&5
15172   (exit $ac_status); }; }; then
15173   cf_cv_libstdcpp=yes
15174 else
15175   echo "$as_me: failed program was:" >&5
15176 cat conftest.$ac_ext >&5
15177 cf_cv_libstdcpp=no
15178 fi
15179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15180         LIBS="$cf_save"
15181
15182 fi
15183 echo "$as_me:15183: result: $cf_cv_libstdcpp" >&5
15184 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15185 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15186 fi
15187
15188         echo "$as_me:15188: checking whether $CXX understands -c and -o together" >&5
15189 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15190 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15191   echo $ECHO_N "(cached) $ECHO_C" >&6
15192 else
15193
15194 cat > conftest.$ac_ext <<CF_EOF
15195 #include <stdio.h>
15196 int main()
15197 {
15198         ${cf_cv_main_return:-return}(0);
15199 }
15200 CF_EOF
15201 # We do the test twice because some compilers refuse to overwrite an
15202 # existing .o file with -o, though they will create one.
15203 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15204 if { (eval echo "$as_me:15204: \"$ac_try\"") >&5
15205   (eval $ac_try) 2>&5
15206   ac_status=$?
15207   echo "$as_me:15207: \$? = $ac_status" >&5
15208   (exit $ac_status); } &&
15209   test -f conftest2.$ac_objext && { (eval echo "$as_me:15209: \"$ac_try\"") >&5
15210   (eval $ac_try) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); };
15214 then
15215   eval cf_cv_prog_CXX_c_o=yes
15216 else
15217   eval cf_cv_prog_CXX_c_o=no
15218 fi
15219 rm -f conftest*
15220
15221 fi
15222 if test $cf_cv_prog_CXX_c_o = yes; then
15223   echo "$as_me:15223: result: yes" >&5
15224 echo "${ECHO_T}yes" >&6
15225 else
15226   echo "$as_me:15226: result: no" >&5
15227 echo "${ECHO_T}no" >&6
15228 fi
15229
15230         case $GXX_VERSION in
15231         1*|2.0-6*)
15232                 cf_cxx_library=yes
15233                 ;;
15234         *-2.7*|2.7*)
15235
15236 cf_cxx_library=unknown
15237 case $cf_cv_system_name in #(vi
15238 os2*) #(vi
15239         cf_gpp_libname=gpp
15240         ;;
15241 *)
15242         cf_gpp_libname=g++
15243         ;;
15244 esac
15245 if test "$GXX" = yes; then
15246         echo "$as_me:15246: checking for lib$cf_gpp_libname" >&5
15247 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15248         cf_save="$LIBS"
15249         LIBS="$LIBS -l$cf_gpp_libname"
15250         cat >conftest.$ac_ext <<_ACEOF
15251 #line 15251 "configure"
15252 #include "confdefs.h"
15253
15254 #include <$cf_gpp_libname/builtin.h>
15255
15256 int
15257 main ()
15258 {
15259 two_arg_error_handler_t foo2 = lib_error_handler
15260   ;
15261   return 0;
15262 }
15263 _ACEOF
15264 rm -f conftest.$ac_objext conftest$ac_exeext
15265 if { (eval echo "$as_me:15265: \"$ac_link\"") >&5
15266   (eval $ac_link) 2>&5
15267   ac_status=$?
15268   echo "$as_me:15268: \$? = $ac_status" >&5
15269   (exit $ac_status); } &&
15270          { ac_try='test -s conftest$ac_exeext'
15271   { (eval echo "$as_me:15271: \"$ac_try\"") >&5
15272   (eval $ac_try) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); }; }; then
15276   cf_cxx_library=yes
15277          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15278          if test "$cf_gpp_libname" = cpp ; then
15279             cat >>confdefs.h <<\EOF
15280 #define HAVE_GPP_BUILTIN_H 1
15281 EOF
15282
15283          else
15284             cat >>confdefs.h <<\EOF
15285 #define HAVE_GXX_BUILTIN_H 1
15286 EOF
15287
15288          fi
15289 else
15290   echo "$as_me: failed program was:" >&5
15291 cat conftest.$ac_ext >&5
15292 cat >conftest.$ac_ext <<_ACEOF
15293 #line 15293 "configure"
15294 #include "confdefs.h"
15295
15296 #include <builtin.h>
15297
15298 int
15299 main ()
15300 {
15301 two_arg_error_handler_t foo2 = lib_error_handler
15302   ;
15303   return 0;
15304 }
15305 _ACEOF
15306 rm -f conftest.$ac_objext conftest$ac_exeext
15307 if { (eval echo "$as_me:15307: \"$ac_link\"") >&5
15308   (eval $ac_link) 2>&5
15309   ac_status=$?
15310   echo "$as_me:15310: \$? = $ac_status" >&5
15311   (exit $ac_status); } &&
15312          { ac_try='test -s conftest$ac_exeext'
15313   { (eval echo "$as_me:15313: \"$ac_try\"") >&5
15314   (eval $ac_try) 2>&5
15315   ac_status=$?
15316   echo "$as_me:15316: \$? = $ac_status" >&5
15317   (exit $ac_status); }; }; then
15318   cf_cxx_library=yes
15319          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15320          cat >>confdefs.h <<\EOF
15321 #define HAVE_BUILTIN_H 1
15322 EOF
15323
15324 else
15325   echo "$as_me: failed program was:" >&5
15326 cat conftest.$ac_ext >&5
15327 cf_cxx_library=no
15328 fi
15329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15330 fi
15331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15332         LIBS="$cf_save"
15333         echo "$as_me:15333: result: $cf_cxx_library" >&5
15334 echo "${ECHO_T}$cf_cxx_library" >&6
15335 fi
15336
15337                 ;;
15338         *)
15339                 cf_cxx_library=no
15340                 ;;
15341         esac
15342
15343         ac_ext=cc
15344 ac_cpp='$CXXCPP $CPPFLAGS'
15345 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15346 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15347 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15348 ac_main_return=return
15349 echo "$as_me:15349: checking how to run the C++ preprocessor" >&5
15350 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15351 if test -z "$CXXCPP"; then
15352   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15353   echo $ECHO_N "(cached) $ECHO_C" >&6
15354 else
15355       # Double quotes because CXXCPP needs to be expanded
15356     for CXXCPP in "$CXX -E" "/lib/cpp"
15357     do
15358       ac_preproc_ok=false
15359 for ac_cxx_preproc_warn_flag in '' yes
15360 do
15361   # Use a header file that comes with gcc, so configuring glibc
15362   # with a fresh cross-compiler works.
15363   # On the NeXT, cc -E runs the code through the compiler's parser,
15364   # not just through cpp. "Syntax error" is here to catch this case.
15365   cat >conftest.$ac_ext <<_ACEOF
15366 #line 15366 "configure"
15367 #include "confdefs.h"
15368 #include <assert.h>
15369                      Syntax error
15370 _ACEOF
15371 if { (eval echo "$as_me:15371: \"$ac_cpp conftest.$ac_ext\"") >&5
15372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15373   ac_status=$?
15374   egrep -v '^ *\+' conftest.er1 >conftest.err
15375   rm -f conftest.er1
15376   cat conftest.err >&5
15377   echo "$as_me:15377: \$? = $ac_status" >&5
15378   (exit $ac_status); } >/dev/null; then
15379   if test -s conftest.err; then
15380     ac_cpp_err=$ac_cxx_preproc_warn_flag
15381   else
15382     ac_cpp_err=
15383   fi
15384 else
15385   ac_cpp_err=yes
15386 fi
15387 if test -z "$ac_cpp_err"; then
15388   :
15389 else
15390   echo "$as_me: failed program was:" >&5
15391   cat conftest.$ac_ext >&5
15392   # Broken: fails on valid input.
15393 continue
15394 fi
15395 rm -f conftest.err conftest.$ac_ext
15396
15397   # OK, works on sane cases.  Now check whether non-existent headers
15398   # can be detected and how.
15399   cat >conftest.$ac_ext <<_ACEOF
15400 #line 15400 "configure"
15401 #include "confdefs.h"
15402 #include <ac_nonexistent.h>
15403 _ACEOF
15404 if { (eval echo "$as_me:15404: \"$ac_cpp conftest.$ac_ext\"") >&5
15405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15406   ac_status=$?
15407   egrep -v '^ *\+' conftest.er1 >conftest.err
15408   rm -f conftest.er1
15409   cat conftest.err >&5
15410   echo "$as_me:15410: \$? = $ac_status" >&5
15411   (exit $ac_status); } >/dev/null; then
15412   if test -s conftest.err; then
15413     ac_cpp_err=$ac_cxx_preproc_warn_flag
15414   else
15415     ac_cpp_err=
15416   fi
15417 else
15418   ac_cpp_err=yes
15419 fi
15420 if test -z "$ac_cpp_err"; then
15421   # Broken: success on invalid input.
15422 continue
15423 else
15424   echo "$as_me: failed program was:" >&5
15425   cat conftest.$ac_ext >&5
15426   # Passes both tests.
15427 ac_preproc_ok=:
15428 break
15429 fi
15430 rm -f conftest.err conftest.$ac_ext
15431
15432 done
15433 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15434 rm -f conftest.err conftest.$ac_ext
15435 if $ac_preproc_ok; then
15436   break
15437 fi
15438
15439     done
15440     ac_cv_prog_CXXCPP=$CXXCPP
15441
15442 fi
15443   CXXCPP=$ac_cv_prog_CXXCPP
15444 else
15445   ac_cv_prog_CXXCPP=$CXXCPP
15446 fi
15447 echo "$as_me:15447: result: $CXXCPP" >&5
15448 echo "${ECHO_T}$CXXCPP" >&6
15449 ac_preproc_ok=false
15450 for ac_cxx_preproc_warn_flag in '' yes
15451 do
15452   # Use a header file that comes with gcc, so configuring glibc
15453   # with a fresh cross-compiler works.
15454   # On the NeXT, cc -E runs the code through the compiler's parser,
15455   # not just through cpp. "Syntax error" is here to catch this case.
15456   cat >conftest.$ac_ext <<_ACEOF
15457 #line 15457 "configure"
15458 #include "confdefs.h"
15459 #include <assert.h>
15460                      Syntax error
15461 _ACEOF
15462 if { (eval echo "$as_me:15462: \"$ac_cpp conftest.$ac_ext\"") >&5
15463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15464   ac_status=$?
15465   egrep -v '^ *\+' conftest.er1 >conftest.err
15466   rm -f conftest.er1
15467   cat conftest.err >&5
15468   echo "$as_me:15468: \$? = $ac_status" >&5
15469   (exit $ac_status); } >/dev/null; then
15470   if test -s conftest.err; then
15471     ac_cpp_err=$ac_cxx_preproc_warn_flag
15472   else
15473     ac_cpp_err=
15474   fi
15475 else
15476   ac_cpp_err=yes
15477 fi
15478 if test -z "$ac_cpp_err"; then
15479   :
15480 else
15481   echo "$as_me: failed program was:" >&5
15482   cat conftest.$ac_ext >&5
15483   # Broken: fails on valid input.
15484 continue
15485 fi
15486 rm -f conftest.err conftest.$ac_ext
15487
15488   # OK, works on sane cases.  Now check whether non-existent headers
15489   # can be detected and how.
15490   cat >conftest.$ac_ext <<_ACEOF
15491 #line 15491 "configure"
15492 #include "confdefs.h"
15493 #include <ac_nonexistent.h>
15494 _ACEOF
15495 if { (eval echo "$as_me:15495: \"$ac_cpp conftest.$ac_ext\"") >&5
15496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15497   ac_status=$?
15498   egrep -v '^ *\+' conftest.er1 >conftest.err
15499   rm -f conftest.er1
15500   cat conftest.err >&5
15501   echo "$as_me:15501: \$? = $ac_status" >&5
15502   (exit $ac_status); } >/dev/null; then
15503   if test -s conftest.err; then
15504     ac_cpp_err=$ac_cxx_preproc_warn_flag
15505   else
15506     ac_cpp_err=
15507   fi
15508 else
15509   ac_cpp_err=yes
15510 fi
15511 if test -z "$ac_cpp_err"; then
15512   # Broken: success on invalid input.
15513 continue
15514 else
15515   echo "$as_me: failed program was:" >&5
15516   cat conftest.$ac_ext >&5
15517   # Passes both tests.
15518 ac_preproc_ok=:
15519 break
15520 fi
15521 rm -f conftest.err conftest.$ac_ext
15522
15523 done
15524 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15525 rm -f conftest.err conftest.$ac_ext
15526 if $ac_preproc_ok; then
15527   :
15528 else
15529   { { echo "$as_me:15529: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15530 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15531    { (exit 1); exit 1; }; }
15532 fi
15533
15534 ac_ext=cc
15535 ac_cpp='$CXXCPP $CPPFLAGS'
15536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15539 ac_main_return=return
15540
15541 for ac_header in iostream typeinfo
15542 do
15543 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15544 echo "$as_me:15544: checking for $ac_header" >&5
15545 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15547   echo $ECHO_N "(cached) $ECHO_C" >&6
15548 else
15549   cat >conftest.$ac_ext <<_ACEOF
15550 #line 15550 "configure"
15551 #include "confdefs.h"
15552 #include <$ac_header>
15553 _ACEOF
15554 if { (eval echo "$as_me:15554: \"$ac_cpp conftest.$ac_ext\"") >&5
15555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15556   ac_status=$?
15557   egrep -v '^ *\+' conftest.er1 >conftest.err
15558   rm -f conftest.er1
15559   cat conftest.err >&5
15560   echo "$as_me:15560: \$? = $ac_status" >&5
15561   (exit $ac_status); } >/dev/null; then
15562   if test -s conftest.err; then
15563     ac_cpp_err=$ac_cxx_preproc_warn_flag
15564   else
15565     ac_cpp_err=
15566   fi
15567 else
15568   ac_cpp_err=yes
15569 fi
15570 if test -z "$ac_cpp_err"; then
15571   eval "$as_ac_Header=yes"
15572 else
15573   echo "$as_me: failed program was:" >&5
15574   cat conftest.$ac_ext >&5
15575   eval "$as_ac_Header=no"
15576 fi
15577 rm -f conftest.err conftest.$ac_ext
15578 fi
15579 echo "$as_me:15579: result: `eval echo '${'$as_ac_Header'}'`" >&5
15580 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15582   cat >>confdefs.h <<EOF
15583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15584 EOF
15585
15586 fi
15587 done
15588
15589     if test x"$ac_cv_header_iostream" = xyes ; then
15590         echo "$as_me:15590: checking if iostream uses std-namespace" >&5
15591 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15592         cat >conftest.$ac_ext <<_ACEOF
15593 #line 15593 "configure"
15594 #include "confdefs.h"
15595
15596 #include <iostream>
15597 using std::endl;
15598 using std::cerr;
15599 int
15600 main ()
15601 {
15602
15603 cerr << "testing" << endl;
15604
15605   ;
15606   return 0;
15607 }
15608 _ACEOF
15609 rm -f conftest.$ac_objext
15610 if { (eval echo "$as_me:15610: \"$ac_compile\"") >&5
15611   (eval $ac_compile) 2>&5
15612   ac_status=$?
15613   echo "$as_me:15613: \$? = $ac_status" >&5
15614   (exit $ac_status); } &&
15615          { ac_try='test -s conftest.$ac_objext'
15616   { (eval echo "$as_me:15616: \"$ac_try\"") >&5
15617   (eval $ac_try) 2>&5
15618   ac_status=$?
15619   echo "$as_me:15619: \$? = $ac_status" >&5
15620   (exit $ac_status); }; }; then
15621   cf_iostream_namespace=yes
15622 else
15623   echo "$as_me: failed program was:" >&5
15624 cat conftest.$ac_ext >&5
15625 cf_iostream_namespace=no
15626 fi
15627 rm -f conftest.$ac_objext conftest.$ac_ext
15628         echo "$as_me:15628: result: $cf_iostream_namespace" >&5
15629 echo "${ECHO_T}$cf_iostream_namespace" >&6
15630         if test "$cf_iostream_namespace" = yes ; then
15631             cat >>confdefs.h <<\EOF
15632 #define IOSTREAM_NAMESPACE 1
15633 EOF
15634
15635         fi
15636     fi
15637
15638 echo "$as_me:15638: checking if we should include stdbool.h" >&5
15639 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15640
15641 if test "${cf_cv_header_stdbool_h+set}" = set; then
15642   echo $ECHO_N "(cached) $ECHO_C" >&6
15643 else
15644
15645         cat >conftest.$ac_ext <<_ACEOF
15646 #line 15646 "configure"
15647 #include "confdefs.h"
15648
15649 int
15650 main ()
15651 {
15652 bool foo = false
15653   ;
15654   return 0;
15655 }
15656 _ACEOF
15657 rm -f conftest.$ac_objext
15658 if { (eval echo "$as_me:15658: \"$ac_compile\"") >&5
15659   (eval $ac_compile) 2>&5
15660   ac_status=$?
15661   echo "$as_me:15661: \$? = $ac_status" >&5
15662   (exit $ac_status); } &&
15663          { ac_try='test -s conftest.$ac_objext'
15664   { (eval echo "$as_me:15664: \"$ac_try\"") >&5
15665   (eval $ac_try) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit $ac_status); }; }; then
15669   cf_cv_header_stdbool_h=0
15670 else
15671   echo "$as_me: failed program was:" >&5
15672 cat conftest.$ac_ext >&5
15673 cat >conftest.$ac_ext <<_ACEOF
15674 #line 15674 "configure"
15675 #include "confdefs.h"
15676
15677 #ifndef __BEOS__
15678 #include <stdbool.h>
15679 #endif
15680
15681 int
15682 main ()
15683 {
15684 bool foo = false
15685   ;
15686   return 0;
15687 }
15688 _ACEOF
15689 rm -f conftest.$ac_objext
15690 if { (eval echo "$as_me:15690: \"$ac_compile\"") >&5
15691   (eval $ac_compile) 2>&5
15692   ac_status=$?
15693   echo "$as_me:15693: \$? = $ac_status" >&5
15694   (exit $ac_status); } &&
15695          { ac_try='test -s conftest.$ac_objext'
15696   { (eval echo "$as_me:15696: \"$ac_try\"") >&5
15697   (eval $ac_try) 2>&5
15698   ac_status=$?
15699   echo "$as_me:15699: \$? = $ac_status" >&5
15700   (exit $ac_status); }; }; then
15701   cf_cv_header_stdbool_h=1
15702 else
15703   echo "$as_me: failed program was:" >&5
15704 cat conftest.$ac_ext >&5
15705 cf_cv_header_stdbool_h=0
15706 fi
15707 rm -f conftest.$ac_objext conftest.$ac_ext
15708 fi
15709 rm -f conftest.$ac_objext conftest.$ac_ext
15710 fi
15711
15712 if test "$cf_cv_header_stdbool_h" = 1
15713 then    echo "$as_me:15713: result: yes" >&5
15714 echo "${ECHO_T}yes" >&6
15715 else    echo "$as_me:15715: result: no" >&5
15716 echo "${ECHO_T}no" >&6
15717 fi
15718
15719 echo "$as_me:15719: checking for builtin bool type" >&5
15720 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15721
15722 if test "${cf_cv_builtin_bool+set}" = set; then
15723   echo $ECHO_N "(cached) $ECHO_C" >&6
15724 else
15725
15726         cat >conftest.$ac_ext <<_ACEOF
15727 #line 15727 "configure"
15728 #include "confdefs.h"
15729
15730 #include <stdio.h>
15731 #include <sys/types.h>
15732
15733 int
15734 main ()
15735 {
15736 bool x = false
15737   ;
15738   return 0;
15739 }
15740 _ACEOF
15741 rm -f conftest.$ac_objext
15742 if { (eval echo "$as_me:15742: \"$ac_compile\"") >&5
15743   (eval $ac_compile) 2>&5
15744   ac_status=$?
15745   echo "$as_me:15745: \$? = $ac_status" >&5
15746   (exit $ac_status); } &&
15747          { ac_try='test -s conftest.$ac_objext'
15748   { (eval echo "$as_me:15748: \"$ac_try\"") >&5
15749   (eval $ac_try) 2>&5
15750   ac_status=$?
15751   echo "$as_me:15751: \$? = $ac_status" >&5
15752   (exit $ac_status); }; }; then
15753   cf_cv_builtin_bool=1
15754 else
15755   echo "$as_me: failed program was:" >&5
15756 cat conftest.$ac_ext >&5
15757 cf_cv_builtin_bool=0
15758 fi
15759 rm -f conftest.$ac_objext conftest.$ac_ext
15760
15761 fi
15762
15763 if test "$cf_cv_builtin_bool" = 1
15764 then    echo "$as_me:15764: result: yes" >&5
15765 echo "${ECHO_T}yes" >&6
15766 else    echo "$as_me:15766: result: no" >&5
15767 echo "${ECHO_T}no" >&6
15768 fi
15769
15770 echo "$as_me:15770: checking for size of bool" >&5
15771 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15772 if test "${cf_cv_type_of_bool+set}" = set; then
15773   echo $ECHO_N "(cached) $ECHO_C" >&6
15774 else
15775
15776         rm -f cf_test.out
15777         if test "$cross_compiling" = yes; then
15778   cf_cv_type_of_bool=unknown
15779 else
15780   cat >conftest.$ac_ext <<_ACEOF
15781 #line 15781 "configure"
15782 #include "confdefs.h"
15783
15784 #include <stdlib.h>
15785 #include <stdio.h>
15786
15787 #if defined(__cplusplus)
15788
15789 #ifdef HAVE_GXX_BUILTIN_H
15790 #include <g++/builtin.h>
15791 #elif HAVE_GPP_BUILTIN_H
15792 #include <gpp/builtin.h>
15793 #elif HAVE_BUILTIN_H
15794 #include <builtin.h>
15795 #endif
15796
15797 #else
15798
15799 #if $cf_cv_header_stdbool_h
15800 #include <stdbool.h>
15801 #endif
15802
15803 #endif
15804
15805 main()
15806 {
15807         FILE *fp = fopen("cf_test.out", "w");
15808         if (fp != 0) {
15809                 bool x = true;
15810                 if ((bool)(-x) >= 0)
15811                         fputs("unsigned ", fp);
15812                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15813                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15814                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15815                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15816                 fclose(fp);
15817         }
15818         ${cf_cv_main_return:-return}(0);
15819 }
15820
15821 _ACEOF
15822 rm -f conftest$ac_exeext
15823 if { (eval echo "$as_me:15823: \"$ac_link\"") >&5
15824   (eval $ac_link) 2>&5
15825   ac_status=$?
15826   echo "$as_me:15826: \$? = $ac_status" >&5
15827   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15828   { (eval echo "$as_me:15828: \"$ac_try\"") >&5
15829   (eval $ac_try) 2>&5
15830   ac_status=$?
15831   echo "$as_me:15831: \$? = $ac_status" >&5
15832   (exit $ac_status); }; }; then
15833   cf_cv_type_of_bool=`cat cf_test.out`
15834                  if test -z "$cf_cv_type_of_bool"; then
15835                    cf_cv_type_of_bool=unknown
15836                  fi
15837 else
15838   echo "$as_me: program exited with status $ac_status" >&5
15839 echo "$as_me: failed program was:" >&5
15840 cat conftest.$ac_ext >&5
15841 cf_cv_type_of_bool=unknown
15842 fi
15843 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15844 fi
15845
15846 fi
15847
15848         rm -f cf_test.out
15849 echo "$as_me:15849: result: $cf_cv_type_of_bool" >&5
15850 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15851 if test "$cf_cv_type_of_bool" = unknown ; then
15852         case .$NCURSES_BOOL in #(vi
15853         .auto|.) NCURSES_BOOL=unsigned;;
15854         esac
15855         { echo "$as_me:15855: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15856 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15857         cf_cv_type_of_bool=$NCURSES_BOOL
15858 fi
15859
15860 echo "$as_me:15860: checking for special defines needed for etip.h" >&5
15861 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15862 cf_save_CXXFLAGS="$CXXFLAGS"
15863 cf_result="none"
15864 for cf_math in "" MATH_H
15865 do
15866 for cf_excp in "" MATH_EXCEPTION
15867 do
15868         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15869         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15870         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15871 cat >conftest.$ac_ext <<_ACEOF
15872 #line 15872 "configure"
15873 #include "confdefs.h"
15874
15875 #include <etip.h.in>
15876
15877 int
15878 main ()
15879 {
15880
15881   ;
15882   return 0;
15883 }
15884 _ACEOF
15885 rm -f conftest.$ac_objext
15886 if { (eval echo "$as_me:15886: \"$ac_compile\"") >&5
15887   (eval $ac_compile) 2>&5
15888   ac_status=$?
15889   echo "$as_me:15889: \$? = $ac_status" >&5
15890   (exit $ac_status); } &&
15891          { ac_try='test -s conftest.$ac_objext'
15892   { (eval echo "$as_me:15892: \"$ac_try\"") >&5
15893   (eval $ac_try) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); }; }; then
15897
15898         test -n "$cf_math" && cat >>confdefs.h <<EOF
15899 #define ETIP_NEEDS_${cf_math} 1
15900 EOF
15901
15902         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15903 #define ETIP_NEEDS_${cf_excp} 1
15904 EOF
15905
15906         cf_result="$cf_math $cf_excp"
15907         break
15908
15909 else
15910   echo "$as_me: failed program was:" >&5
15911 cat conftest.$ac_ext >&5
15912 fi
15913 rm -f conftest.$ac_objext conftest.$ac_ext
15914 done
15915 done
15916 echo "$as_me:15916: result: $cf_result" >&5
15917 echo "${ECHO_T}$cf_result" >&6
15918 CXXFLAGS="$cf_save_CXXFLAGS"
15919
15920 if test -n "$CXX"; then
15921 echo "$as_me:15921: checking if $CXX accepts parameter initialization" >&5
15922 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15923 if test "${cf_cv_cpp_param_init+set}" = set; then
15924   echo $ECHO_N "(cached) $ECHO_C" >&6
15925 else
15926
15927         ac_ext=cc
15928 ac_cpp='$CXXCPP $CPPFLAGS'
15929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15932 ac_main_return=return
15933
15934         if test "$cross_compiling" = yes; then
15935   cf_cv_cpp_param_init=unknown
15936 else
15937   cat >conftest.$ac_ext <<_ACEOF
15938 #line 15938 "configure"
15939 #include "confdefs.h"
15940
15941 class TEST {
15942 private:
15943         int value;
15944 public:
15945         TEST(int x = 1);
15946         ~TEST();
15947 };
15948
15949 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15950 {
15951         value = x;
15952 }
15953 void main() { }
15954
15955 _ACEOF
15956 rm -f conftest$ac_exeext
15957 if { (eval echo "$as_me:15957: \"$ac_link\"") >&5
15958   (eval $ac_link) 2>&5
15959   ac_status=$?
15960   echo "$as_me:15960: \$? = $ac_status" >&5
15961   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15962   { (eval echo "$as_me:15962: \"$ac_try\"") >&5
15963   (eval $ac_try) 2>&5
15964   ac_status=$?
15965   echo "$as_me:15965: \$? = $ac_status" >&5
15966   (exit $ac_status); }; }; then
15967   cf_cv_cpp_param_init=yes
15968 else
15969   echo "$as_me: program exited with status $ac_status" >&5
15970 echo "$as_me: failed program was:" >&5
15971 cat conftest.$ac_ext >&5
15972 cf_cv_cpp_param_init=no
15973 fi
15974 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15975 fi
15976         ac_ext=cc
15977 ac_cpp='$CXXCPP $CPPFLAGS'
15978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15981 ac_main_return=return
15982
15983 fi
15984 echo "$as_me:15984: result: $cf_cv_cpp_param_init" >&5
15985 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15986 fi
15987 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15988 #define CPP_HAS_PARAM_INIT 1
15989 EOF
15990
15991 if test -n "$CXX"; then
15992
15993 echo "$as_me:15993: checking if $CXX accepts static_cast" >&5
15994 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15995 if test "${cf_cv_cpp_static_cast+set}" = set; then
15996   echo $ECHO_N "(cached) $ECHO_C" >&6
15997 else
15998
15999         ac_ext=cc
16000 ac_cpp='$CXXCPP $CPPFLAGS'
16001 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16002 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16003 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16004 ac_main_return=return
16005
16006         cat >conftest.$ac_ext <<_ACEOF
16007 #line 16007 "configure"
16008 #include "confdefs.h"
16009
16010 class NCursesPanel
16011 {
16012 public:
16013   NCursesPanel(int nlines,
16014                int ncols,
16015                int begin_y = 0,
16016                int begin_x = 0)
16017   {
16018   }
16019
16020   ~NCursesPanel();
16021 };
16022
16023 template<class T> class NCursesUserPanel : public NCursesPanel
16024 {
16025 public:
16026   NCursesUserPanel (int nlines,
16027                     int ncols,
16028                     int begin_y = 0,
16029                     int begin_x = 0,
16030                     const T* p_UserData = static_cast<T*>(0))
16031     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16032   {
16033   };
16034   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16035   {
16036   };
16037
16038   virtual ~NCursesUserPanel() {};
16039 };
16040
16041 int
16042 main ()
16043 {
16044
16045         const char* p_UserData = static_cast<char*>(0)
16046   ;
16047   return 0;
16048 }
16049 _ACEOF
16050 rm -f conftest.$ac_objext
16051 if { (eval echo "$as_me:16051: \"$ac_compile\"") >&5
16052   (eval $ac_compile) 2>&5
16053   ac_status=$?
16054   echo "$as_me:16054: \$? = $ac_status" >&5
16055   (exit $ac_status); } &&
16056          { ac_try='test -s conftest.$ac_objext'
16057   { (eval echo "$as_me:16057: \"$ac_try\"") >&5
16058   (eval $ac_try) 2>&5
16059   ac_status=$?
16060   echo "$as_me:16060: \$? = $ac_status" >&5
16061   (exit $ac_status); }; }; then
16062   cf_cv_cpp_static_cast=yes
16063 else
16064   echo "$as_me: failed program was:" >&5
16065 cat conftest.$ac_ext >&5
16066 cf_cv_cpp_static_cast=no
16067 fi
16068 rm -f conftest.$ac_objext conftest.$ac_ext
16069
16070         ac_ext=cc
16071 ac_cpp='$CXXCPP $CPPFLAGS'
16072 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16073 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16074 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16075 ac_main_return=return
16076
16077 fi
16078 echo "$as_me:16078: result: $cf_cv_cpp_static_cast" >&5
16079 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16080
16081 fi
16082
16083 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16084 #define CPP_HAS_STATIC_CAST 1
16085 EOF
16086
16087         CXX_AR='$(AR)'
16088         CXX_ARFLAGS='$(ARFLAGS)'
16089         case $cf_cv_system_name in #(vi
16090         irix*) #(vi
16091             if test "$GXX" != yes ; then
16092                 CXX_AR='$(CXX)'
16093                 CXX_ARFLAGS='-ar -o'
16094             fi
16095             ;;
16096         sco3.2v5*) #(vi
16097             CXXLDFLAGS="-u main"
16098             ;;
16099         solaris2*)
16100             if test "$GXX" != yes ; then
16101                 CXX_AR='$(CXX)'
16102                 CXX_ARFLAGS='-xar -o'
16103             fi
16104             ;;
16105         esac
16106
16107 else
16108         cf_cxx_library=no
16109         cf_cv_builtin_bool=1
16110
16111         # Just because we are not configuring against C++ right now does not
16112         # mean that a user will not want to use C++.  Some distributors disable
16113         # the C++ portion of this configuration as a shortcut (or just to avoid
16114         # compiling the demo in the c++ directory).  So we need a reasonable
16115         # default for the 'bool' type.
16116         #
16117         # Caveat: since the storage of the bool type is not standardized, it
16118         # may change.
16119
16120         if test "$NCURSES_BOOL" != auto ; then
16121                 cf_cv_type_of_bool=$NCURSES_BOOL
16122                 cf_cv_header_stdbool_h=0
16123         else
16124                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16125
16126 echo "$as_me:16126: checking for size of bool" >&5
16127 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16128 if test "${cf_cv_type_of_bool+set}" = set; then
16129   echo $ECHO_N "(cached) $ECHO_C" >&6
16130 else
16131
16132         rm -f cf_test.out
16133         if test "$cross_compiling" = yes; then
16134   cf_cv_type_of_bool=unknown
16135 else
16136   cat >conftest.$ac_ext <<_ACEOF
16137 #line 16137 "configure"
16138 #include "confdefs.h"
16139
16140 #include <stdlib.h>
16141 #include <stdio.h>
16142
16143 #if defined(__cplusplus)
16144
16145 #ifdef HAVE_GXX_BUILTIN_H
16146 #include <g++/builtin.h>
16147 #elif HAVE_GPP_BUILTIN_H
16148 #include <gpp/builtin.h>
16149 #elif HAVE_BUILTIN_H
16150 #include <builtin.h>
16151 #endif
16152
16153 #else
16154
16155 #if $cf_cv_header_stdbool_h
16156 #include <stdbool.h>
16157 #endif
16158
16159 #endif
16160
16161 main()
16162 {
16163         FILE *fp = fopen("cf_test.out", "w");
16164         if (fp != 0) {
16165                 bool x = true;
16166                 if ((bool)(-x) >= 0)
16167                         fputs("unsigned ", fp);
16168                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16169                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16170                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16171                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16172                 fclose(fp);
16173         }
16174         ${cf_cv_main_return:-return}(0);
16175 }
16176
16177 _ACEOF
16178 rm -f conftest$ac_exeext
16179 if { (eval echo "$as_me:16179: \"$ac_link\"") >&5
16180   (eval $ac_link) 2>&5
16181   ac_status=$?
16182   echo "$as_me:16182: \$? = $ac_status" >&5
16183   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16184   { (eval echo "$as_me:16184: \"$ac_try\"") >&5
16185   (eval $ac_try) 2>&5
16186   ac_status=$?
16187   echo "$as_me:16187: \$? = $ac_status" >&5
16188   (exit $ac_status); }; }; then
16189   cf_cv_type_of_bool=`cat cf_test.out`
16190                  if test -z "$cf_cv_type_of_bool"; then
16191                    cf_cv_type_of_bool=unknown
16192                  fi
16193 else
16194   echo "$as_me: program exited with status $ac_status" >&5
16195 echo "$as_me: failed program was:" >&5
16196 cat conftest.$ac_ext >&5
16197 cf_cv_type_of_bool=unknown
16198 fi
16199 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16200 fi
16201
16202 fi
16203
16204         rm -f cf_test.out
16205 echo "$as_me:16205: result: $cf_cv_type_of_bool" >&5
16206 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16207 if test "$cf_cv_type_of_bool" = unknown ; then
16208         case .$NCURSES_BOOL in #(vi
16209         .auto|.) NCURSES_BOOL=unsigned;;
16210         esac
16211         { echo "$as_me:16211: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16212 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16213         cf_cv_type_of_bool=$NCURSES_BOOL
16214 fi
16215
16216                 else
16217                         echo "$as_me:16217: checking for fallback type of bool" >&5
16218 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16219                         case "$host_cpu" in #(vi
16220                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16221                         *)      cf_cv_type_of_bool=int  ;;
16222                         esac
16223                         echo "$as_me:16223: result: $cf_cv_type_of_bool" >&5
16224 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16225                 fi
16226         fi
16227 fi
16228
16229 # If the C compiler did not declare bool, and we did not determine that the C++
16230 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16231 # ncurses library use the same type as C++ bool.  Note that this allows one to
16232 # specify the type of bool in a configure-script option and postpone
16233 # integration with the C++ compiler provided that the types are compatible.
16234 USE_CXX_BOOL=1
16235 if test $cf_cv_cc_bool_type = 1
16236 then
16237         # oops: C has a bool.  Unlikely, but C++ could differ.
16238         USE_CXX_BOOL=0
16239 elif test $cf_cv_builtin_bool = 0
16240 then
16241         # C++ has no bool
16242         USE_CXX_BOOL=0
16243 else
16244         # this is the normal case
16245         USE_CXX_BOOL='defined(__cplusplus)'
16246 fi
16247
16248 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16249
16250 if test "$cf_with_ada" != "no" ; then
16251     if test "$with_libtool" != "no"; then
16252         { echo "$as_me:16252: WARNING: libtool does not support Ada - disabling feature" >&5
16253 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16254         cf_with_ada=no
16255     fi
16256 fi
16257
16258 if test "$cf_with_ada" != "no" ; then
16259 cf_ada_make=gnatmake
16260 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16261 set dummy $cf_ada_make; ac_word=$2
16262 echo "$as_me:16262: checking for $ac_word" >&5
16263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16264 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16265   echo $ECHO_N "(cached) $ECHO_C" >&6
16266 else
16267   if test -n "$gnat_exists"; then
16268   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16269 else
16270   ac_save_IFS=$IFS; IFS=$ac_path_separator
16271 ac_dummy="$PATH"
16272 for ac_dir in $ac_dummy; do
16273   IFS=$ac_save_IFS
16274   test -z "$ac_dir" && ac_dir=.
16275   $as_executable_p "$ac_dir/$ac_word" || continue
16276 ac_cv_prog_gnat_exists="yes"
16277 echo "$as_me:16277: found $ac_dir/$ac_word" >&5
16278 break
16279 done
16280
16281   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16282 fi
16283 fi
16284 gnat_exists=$ac_cv_prog_gnat_exists
16285 if test -n "$gnat_exists"; then
16286   echo "$as_me:16286: result: $gnat_exists" >&5
16287 echo "${ECHO_T}$gnat_exists" >&6
16288 else
16289   echo "$as_me:16289: result: no" >&5
16290 echo "${ECHO_T}no" >&6
16291 fi
16292
16293 if test "$ac_cv_prog_gnat_exists" = no; then
16294    cf_ada_make=
16295 else
16296
16297 echo "$as_me:16297: checking for gnat version" >&5
16298 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16299 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16300   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16301 echo "$as_me:16301: result: $cf_gnat_version" >&5
16302 echo "${ECHO_T}$cf_gnat_version" >&6
16303
16304 case $cf_gnat_version in
16305   3.1[1-9]*|3.[2-9]*|[4-9].*)
16306     cf_cv_prog_gnat_correct=yes
16307     ;;
16308   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16309      cf_cv_prog_gnat_correct=no
16310      ;;
16311 esac
16312 case $cf_gnat_version in
16313   3.[1-9]*|[4-9].*)
16314       cf_compile_generics=generics
16315       cf_generic_objects="\${GENOBJS}"
16316       ;;
16317   *)  cf_compile_generics=
16318       cf_generic_objects=
16319       ;;
16320 esac
16321
16322    # Extract the first word of "m4", so it can be a program name with args.
16323 set dummy m4; ac_word=$2
16324 echo "$as_me:16324: checking for $ac_word" >&5
16325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16326 if test "${ac_cv_prog_M4_exists+set}" = set; then
16327   echo $ECHO_N "(cached) $ECHO_C" >&6
16328 else
16329   if test -n "$M4_exists"; then
16330   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16331 else
16332   ac_save_IFS=$IFS; IFS=$ac_path_separator
16333 ac_dummy="$PATH"
16334 for ac_dir in $ac_dummy; do
16335   IFS=$ac_save_IFS
16336   test -z "$ac_dir" && ac_dir=.
16337   $as_executable_p "$ac_dir/$ac_word" || continue
16338 ac_cv_prog_M4_exists="yes"
16339 echo "$as_me:16339: found $ac_dir/$ac_word" >&5
16340 break
16341 done
16342
16343   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16344 fi
16345 fi
16346 M4_exists=$ac_cv_prog_M4_exists
16347 if test -n "$M4_exists"; then
16348   echo "$as_me:16348: result: $M4_exists" >&5
16349 echo "${ECHO_T}$M4_exists" >&6
16350 else
16351   echo "$as_me:16351: result: no" >&5
16352 echo "${ECHO_T}no" >&6
16353 fi
16354
16355    if test "$ac_cv_prog_M4_exists" = no; then
16356       cf_cv_prog_gnat_correct=no
16357       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16358    fi
16359    if test "$cf_cv_prog_gnat_correct" = yes; then
16360       echo "$as_me:16360: checking if GNAT works" >&5
16361 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16362
16363 rm -f conftest*
16364 cat >>conftest.ads <<CF_EOF
16365 procedure conftest;
16366 CF_EOF
16367 cat >>conftest.adb <<CF_EOF
16368 with Text_IO;
16369 with GNAT.OS_Lib;
16370 procedure conftest is
16371 begin
16372    Text_IO.Put ("Hello World");
16373    Text_IO.New_Line;
16374    GNAT.OS_Lib.OS_Exit (0);
16375 end conftest;
16376 CF_EOF
16377 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16378    if ( ./conftest 1>&5 2>&1 ) ; then
16379       cf_cv_prog_gnat_correct=yes
16380    else
16381       cf_cv_prog_gnat_correct=no
16382    fi
16383 else
16384    cf_cv_prog_gnat_correct=no
16385 fi
16386 rm -f conftest*
16387
16388       echo "$as_me:16388: result: $cf_cv_prog_gnat_correct" >&5
16389 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16390    fi
16391 fi
16392 if test "$cf_cv_prog_gnat_correct" = yes; then
16393    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16394
16395    echo "$as_me:16395: checking if GNAT pragma Unreferenced works" >&5
16396 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16397
16398 rm -f conftest*
16399 cat >>conftest.ads <<CF_EOF
16400 procedure conftest;
16401 CF_EOF
16402 cat >>conftest.adb <<CF_EOF
16403 with Text_IO;
16404 with GNAT.OS_Lib;
16405 procedure conftest is
16406    test : Integer;
16407    pragma Unreferenced (test);
16408 begin
16409    test := 1;
16410    Text_IO.Put ("Hello World");
16411    Text_IO.New_Line;
16412    GNAT.OS_Lib.OS_Exit (0);
16413 end conftest;
16414 CF_EOF
16415 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16416       cf_cv_pragma_unreferenced=yes
16417 else
16418    cf_cv_pragma_unreferenced=no
16419 fi
16420 rm -f conftest*
16421
16422    echo "$as_me:16422: result: $cf_cv_pragma_unreferenced" >&5
16423 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16424
16425    # if the pragma is supported, use it (needed in the Trace code).
16426    if test $cf_cv_pragma_unreferenced = yes ; then
16427       PRAGMA_UNREF=TRUE
16428    else
16429       PRAGMA_UNREF=FALSE
16430    fi
16431
16432 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16433 if test "${with_ada_compiler+set}" = set; then
16434   withval="$with_ada_compiler"
16435   cf_ada_compiler=$withval
16436 else
16437   cf_ada_compiler=gnatmake
16438 fi;
16439
16440    cf_ada_package=terminal_interface
16441
16442 # Check whether --with-ada-include or --without-ada-include was given.
16443 if test "${with_ada_include+set}" = set; then
16444   withval="$with_ada_include"
16445
16446 else
16447   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16448 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16449
16450 if test "x$prefix" != xNONE; then
16451   cf_path_syntax="$prefix"
16452 else
16453   cf_path_syntax="$ac_default_prefix"
16454 fi
16455
16456 case ".$withval" in #(vi
16457 .\$\(*\)*|.\'*\'*) #(vi
16458   ;;
16459 ..|./*|.\\*) #(vi
16460   ;;
16461 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16462   ;;
16463 .\${*prefix}*) #(vi
16464   eval withval="$withval"
16465   case ".$withval" in #(vi
16466   .NONE/*)
16467     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16468     ;;
16469   esac
16470   ;; #(vi
16471 .no|.NONE/*)
16472   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16473   ;;
16474 *)
16475   { { echo "$as_me:16475: error: expected a pathname, not \"$withval\"" >&5
16476 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16477    { (exit 1); exit 1; }; }
16478   ;;
16479 esac
16480
16481 fi
16482 ADA_INCLUDE="$withval"
16483
16484 # Check whether --with-ada-objects or --without-ada-objects was given.
16485 if test "${with_ada_objects+set}" = set; then
16486   withval="$with_ada_objects"
16487
16488 else
16489   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16490 fi; if test -n "$prefix/lib/ada/adalib" ; then
16491
16492 if test "x$prefix" != xNONE; then
16493   cf_path_syntax="$prefix"
16494 else
16495   cf_path_syntax="$ac_default_prefix"
16496 fi
16497
16498 case ".$withval" in #(vi
16499 .\$\(*\)*|.\'*\'*) #(vi
16500   ;;
16501 ..|./*|.\\*) #(vi
16502   ;;
16503 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16504   ;;
16505 .\${*prefix}*) #(vi
16506   eval withval="$withval"
16507   case ".$withval" in #(vi
16508   .NONE/*)
16509     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16510     ;;
16511   esac
16512   ;; #(vi
16513 .no|.NONE/*)
16514   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16515   ;;
16516 *)
16517   { { echo "$as_me:16517: error: expected a pathname, not \"$withval\"" >&5
16518 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16519    { (exit 1); exit 1; }; }
16520   ;;
16521 esac
16522
16523 fi
16524 ADA_OBJECTS="$withval"
16525
16526 fi
16527 fi
16528 else
16529    cf_with_ada=no
16530 fi
16531
16532 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16533 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16534 ###
16535 ### ticlib modules may be a separate library, otherwise contained in termlib.
16536 ### termlib modules may be a separate library, otherwise contained in ncurses.
16537 ###
16538 ### The of "+" or " " between the tokens controls the way the script
16539 ### chooses to split module lists into libraries.
16540 ###
16541 ### (see CF_LIB_RULES).
16542 echo "$as_me:16542: checking for library subsets" >&5
16543 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16544 LIB_SUBSETS=
16545
16546 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16547         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16548         if test "$with_ticlib" != no ; then
16549                 LIB_SUBSETS="${LIB_SUBSETS} "
16550         else
16551                 LIB_SUBSETS="${LIB_SUBSETS}+"
16552         fi
16553 fi
16554
16555 LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
16556
16557 case $cf_cv_system_name in #(vi
16558 *mingw32*) #(vi
16559         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16560         ;;
16561 *) #(vi
16562         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16563         ;;
16564 esac
16565
16566 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16567 if test "$with_termlib" != no ; then
16568         LIB_SUBSETS="${LIB_SUBSETS} "
16569 else
16570         LIB_SUBSETS="${LIB_SUBSETS}+"
16571 fi
16572
16573 LIB_SUBSETS="${LIB_SUBSETS}base"
16574
16575 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16576 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16577
16578 echo "$as_me:16578: result: $LIB_SUBSETS" >&5
16579 echo "${ECHO_T}$LIB_SUBSETS" >&6
16580
16581 ### Construct the list of include-directories to be generated
16582
16583 CPPFLAGS="$CPPFLAGS -I. -I../include"
16584 if test "$srcdir" != "."; then
16585         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16586 fi
16587 if test "$GCC" != yes; then
16588         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16589 elif test "$includedir" != "/usr/include"; then
16590         if test "$includedir" = '${prefix}/include' ; then
16591                 if test $prefix != /usr ; then
16592                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16593                 fi
16594         else
16595                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16596         fi
16597 fi
16598
16599 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16600 if test "$srcdir" != "."; then
16601         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16602 fi
16603 if test "$GCC" != yes; then
16604         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16605 elif test "$includedir" != "/usr/include"; then
16606         if test "$includedir" = '${prefix}/include' ; then
16607                 if test $prefix != /usr ; then
16608                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16609                 fi
16610         else
16611                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16612         fi
16613 fi
16614
16615 ### Build up pieces for makefile rules
16616 echo "$as_me:16616: checking default library suffix" >&5
16617 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16618
16619         case $DFT_LWR_MODEL in
16620         libtool) DFT_ARG_SUFFIX=''   ;;
16621         normal)  DFT_ARG_SUFFIX=''   ;;
16622         debug)   DFT_ARG_SUFFIX='_g' ;;
16623         profile) DFT_ARG_SUFFIX='_p' ;;
16624         shared)  DFT_ARG_SUFFIX=''   ;;
16625         esac
16626         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16627 echo "$as_me:16627: result: $DFT_ARG_SUFFIX" >&5
16628 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16629
16630 echo "$as_me:16630: checking default library-dependency suffix" >&5
16631 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16632
16633         case $DFT_LWR_MODEL in #(vi
16634         libtool) #(vi
16635                 DFT_LIB_SUFFIX='.la'
16636                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16637                 ;;
16638         normal) #(vi
16639                 DFT_LIB_SUFFIX='.a'
16640                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16641                 ;;
16642         debug) #(vi
16643                 DFT_LIB_SUFFIX='_g.a'
16644                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16645                 ;;
16646         profile) #(vi
16647                 DFT_LIB_SUFFIX='_p.a'
16648                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16649                 ;;
16650         shared) #(vi
16651                 case $cf_cv_system_name in
16652                 aix[56]*) #(vi
16653                         DFT_LIB_SUFFIX='.a'
16654                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16655                         ;;
16656                 cygwin*) #(vi
16657                         DFT_LIB_SUFFIX='.dll'
16658                         DFT_DEP_SUFFIX='.dll.a'
16659                         ;;
16660                 darwin*) #(vi
16661                         DFT_LIB_SUFFIX='.dylib'
16662                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16663                         ;;
16664                 hpux*) #(vi
16665                         case $target in
16666                         ia64*) #(vi
16667                                 DFT_LIB_SUFFIX='.so'
16668                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16669                                 ;;
16670                         *) #(vi
16671                                 DFT_LIB_SUFFIX='.sl'
16672                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16673                                 ;;
16674                         esac
16675                         ;;
16676                 *)      DFT_LIB_SUFFIX='.so'
16677                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16678                         ;;
16679                 esac
16680         esac
16681         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16682         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16683 echo "$as_me:16683: result: $DFT_DEP_SUFFIX" >&5
16684 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16685
16686 echo "$as_me:16686: checking default object directory" >&5
16687 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16688
16689         case $DFT_LWR_MODEL in
16690         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16691         normal)  DFT_OBJ_SUBDIR='objects' ;;
16692         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16693         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16694         shared)
16695                 case $cf_cv_system_name in #(vi
16696                 cygwin) #(vi
16697                         DFT_OBJ_SUBDIR='objects' ;;
16698                 *)
16699                         DFT_OBJ_SUBDIR='obj_s' ;;
16700                 esac
16701         esac
16702 echo "$as_me:16702: result: $DFT_OBJ_SUBDIR" >&5
16703 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16704
16705 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16706 if test "$cf_with_cxx" = yes ; then
16707 echo "$as_me:16707: checking c++ library-dependency suffix" >&5
16708 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16709 if test "$with_libtool" != "no"; then
16710         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16711 else
16712
16713         case normal in #(vi
16714         libtool) #(vi
16715                 CXX_LIB_SUFFIX='.la'
16716                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16717                 ;;
16718         normal) #(vi
16719                 CXX_LIB_SUFFIX='.a'
16720                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16721                 ;;
16722         debug) #(vi
16723                 CXX_LIB_SUFFIX='_g.a'
16724                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16725                 ;;
16726         profile) #(vi
16727                 CXX_LIB_SUFFIX='_p.a'
16728                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16729                 ;;
16730         shared) #(vi
16731                 case $cf_cv_system_name in
16732                 aix[56]*) #(vi
16733                         CXX_LIB_SUFFIX='.a'
16734                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16735                         ;;
16736                 cygwin*) #(vi
16737                         CXX_LIB_SUFFIX='.dll'
16738                         CXX_DEP_SUFFIX='.dll.a'
16739                         ;;
16740                 darwin*) #(vi
16741                         CXX_LIB_SUFFIX='.dylib'
16742                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16743                         ;;
16744                 hpux*) #(vi
16745                         case $target in
16746                         ia64*) #(vi
16747                                 CXX_LIB_SUFFIX='.so'
16748                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16749                                 ;;
16750                         *) #(vi
16751                                 CXX_LIB_SUFFIX='.sl'
16752                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16753                                 ;;
16754                         esac
16755                         ;;
16756                 *)      CXX_LIB_SUFFIX='.so'
16757                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16758                         ;;
16759                 esac
16760         esac
16761         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16762         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16763 fi
16764 echo "$as_me:16764: result: $CXX_LIB_SUFFIX" >&5
16765 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16766
16767 fi
16768
16769 # do not want -ldl in build except as needed for -lncurses dependency
16770 if test "$with_dlsym" = yes ; then
16771 if test $DFT_LWR_MODEL = shared || \
16772    test $DFT_LWR_MODEL = libtool ; then
16773
16774 # remove dl library from $LIBS
16775 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16776
16777 fi
16778 fi
16779 ### Set up low-level terminfo dependencies for makefiles.
16780
16781 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16782 # do not need libdl
16783 TICS_LIST=
16784 if test "$with_dlsym" = yes ; then
16785
16786 # remove dl library from $SHLIB_LIST
16787 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16788
16789 fi
16790
16791 if test "$with_ticlib" != no ; then
16792
16793         if test "$with_ticlib" != yes ; then
16794                 TICS_NAME=$with_ticlib
16795                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16796                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16797                 TICS_LIB_SUFFIX="${with_ticlib}"
16798         else
16799                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16800                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16801                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16802         fi
16803         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16804 else
16805         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16806 fi
16807
16808 if test "$with_termlib" != no ; then
16809
16810         if test "$with_termlib" != yes ; then
16811                 TINFO_NAME=$with_termlib
16812                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16813                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16814                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16815                 TINFO_LIB_SUFFIX="${with_termlib}"
16816         else
16817                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16818                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16819                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16820                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16821         fi
16822
16823         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16824         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16825         if test "$DFT_LWR_MODEL" = "libtool"; then
16826                 TEST_ARGS="${TEST_DEPS}"
16827                 TEST_ARG2="${TEST_DEP2}"
16828                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16829         else
16830                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16831                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16832                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16833                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16834                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16835         fi
16836 else
16837         # the next lines are needed for linking libtic over libncurses
16838         TINFO_NAME=${LIB_NAME}
16839         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16840         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16841         if test "$with_tic_depends" = yes ; then
16842                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16843         else
16844                 TICS_LIST="$SHLIB_LIST"
16845         fi
16846
16847         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16848 fi
16849
16850 if test "$DFT_LWR_MODEL" = shared ; then
16851         case $cf_cv_system_name in #(vi
16852         cygwin*)
16853                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16854                 TINFO_SUFFIX=.dll
16855                 ;;
16856         esac
16857 fi
16858
16859 if test "$with_dlsym" = yes ; then
16860
16861 # remove dl library from $TICS_LIST
16862 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16863
16864 fi
16865
16866 if test "$DFT_LWR_MODEL" = "libtool"; then
16867     OBJEXT=lo
16868 fi
16869
16870 # needed for Ada95
16871 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16872
16873 case $DFT_LWR_MODEL in
16874 normal|debug|profile)
16875
16876 if test "$GCC" = yes ; then
16877         case $cf_cv_system_name in #(
16878         OS/2*|os2*|aix[4]*|solaris2.1[0-9])     #( vi
16879                 LDFLAGS_STATIC=
16880                 LDFLAGS_SHARED=
16881                 ;;
16882     *)  #( normally, except when broken
16883         LDFLAGS_STATIC=-static
16884         LDFLAGS_SHARED=-dynamic
16885         ;;
16886     esac
16887 else
16888         case $cf_cv_system_name in #(
16889         aix[456]*)      #( from ld manpage
16890                 LDFLAGS_STATIC=-bstatic
16891                 LDFLAGS_SHARED=-bdynamic
16892                 ;;
16893         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16894                 # We could also use just "archive" and "shared".
16895                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16896                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16897                 ;;
16898         irix*)          #( from ld manpage IRIX64
16899                 LDFLAGS_STATIC=-Bstatic
16900                 LDFLAGS_SHARED=-Bdynamic
16901                 ;;
16902         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16903                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16904                 LDFLAGS_STATIC=-noso
16905                 LDFLAGS_SHARED=-so_archive
16906                 ;;
16907         solaris2*)
16908                 LDFLAGS_STATIC=-Bstatic
16909                 LDFLAGS_SHARED=-Bdynamic
16910                 ;;
16911         esac
16912 fi
16913
16914         ;;
16915 esac
16916
16917 echo "$as_me:16917: checking where we will install curses.h" >&5
16918 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16919 test "$with_overwrite" = no && \
16920 test "x$includedir" = 'x${prefix}/include' && \
16921         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16922 echo "$as_me:16922: result: $includedir" >&5
16923 echo "${ECHO_T}$includedir" >&6
16924
16925 ### Resolve a conflict between normal and wide-curses by forcing applications
16926 ### that will need libutf8 to add it to their configure script.
16927 if test "$with_overwrite" != no ; then
16928 if test "$NCURSES_LIBUTF8" = 1 ; then
16929         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16930         { echo "$as_me:16930: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16931 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16932 fi
16933 fi
16934 WITH_OVERWRITE=$with_overwrite
16935
16936 # used to separate tack out of the tree
16937 NCURSES_TREE=
16938
16939 ### predefined stuff for the test programs
16940 cat >>confdefs.h <<\EOF
16941 #define HAVE_SLK_COLOR 1
16942 EOF
16943
16944 ### Construct the list of subdirectories for which we'll customize makefiles
16945 ### with the appropriate compile-rules.
16946
16947 echo "$as_me:16947: checking for src modules" >&5
16948 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16949
16950 # dependencies and linker-arguments for test-programs
16951 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16952 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16953 if test "$DFT_LWR_MODEL" = "libtool"; then
16954         TEST_ARGS="${TEST_DEPS}"
16955         TEST_ARG2="${TEST_DEP2}"
16956 else
16957         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16958         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16959 fi
16960
16961 cf_cv_src_modules=
16962 for cf_dir in $modules_to_build
16963 do
16964         if test -f $srcdir/$cf_dir/modules; then
16965
16966                 # We may/may not have tack in the distribution, though the
16967                 # makefile is.
16968                 if test $cf_dir = tack ; then
16969                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16970                                 continue
16971                         fi
16972                 fi
16973
16974                 if test -z "$cf_cv_src_modules"; then
16975                         cf_cv_src_modules=$cf_dir
16976                 else
16977                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16978                 fi
16979
16980                 # Make the ncurses_cfg.h file record the library interface files as
16981                 # well.  These are header files that are the same name as their
16982                 # directory.  Ncurses is the only library that does not follow
16983                 # that pattern.
16984                 if test $cf_dir = tack ; then
16985                         continue
16986                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16987
16988 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16989
16990                         cat >>confdefs.h <<EOF
16991 #define HAVE_${cf_have_include}_H 1
16992 EOF
16993
16994                         cat >>confdefs.h <<EOF
16995 #define HAVE_LIB${cf_have_include} 1
16996 EOF
16997
16998                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16999                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17000                         if test "$DFT_LWR_MODEL" = "libtool"; then
17001                                 TEST_ARGS="${TEST_DEPS}"
17002                                 TEST_ARG2="${TEST_DEP2}"
17003                         else
17004                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17005                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17006                         fi
17007                 fi
17008         fi
17009 done
17010 echo "$as_me:17010: result: $cf_cv_src_modules" >&5
17011 echo "${ECHO_T}$cf_cv_src_modules" >&6
17012
17013 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17014 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17015
17016 SRC_SUBDIRS=
17017 if test "x$cf_with_manpages" != xno ; then
17018         SRC_SUBDIRS="$SRC_SUBDIRS man"
17019 fi
17020 SRC_SUBDIRS="$SRC_SUBDIRS include"
17021 for cf_dir in $cf_cv_src_modules
17022 do
17023         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17024 done
17025 SRC_SUBDIRS="$SRC_SUBDIRS test"
17026 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17027 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17028
17029 ADA_SUBDIRS=
17030 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17031         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17032         ADA_SUBDIRS="gen src samples"
17033 fi
17034
17035 SUB_MAKEFILES=
17036 for cf_dir in $SRC_SUBDIRS
17037 do
17038         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17039 done
17040
17041 if test -n "$ADA_SUBDIRS"; then
17042         for cf_dir in $ADA_SUBDIRS
17043         do
17044                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17045         done
17046
17047 fi
17048
17049 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17050    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17051 fi
17052
17053 DIRS_TO_MAKE="lib"
17054 for cf_item in $cf_list_models
17055 do
17056
17057         case $cf_item in
17058         libtool) cf_subdir='obj_lo'  ;;
17059         normal)  cf_subdir='objects' ;;
17060         debug)   cf_subdir='obj_g' ;;
17061         profile) cf_subdir='obj_p' ;;
17062         shared)
17063                 case $cf_cv_system_name in #(vi
17064                 cygwin) #(vi
17065                         cf_subdir='objects' ;;
17066                 *)
17067                         cf_subdir='obj_s' ;;
17068                 esac
17069         esac
17070
17071         for cf_item2 in $DIRS_TO_MAKE
17072         do
17073                 test $cf_item2 = $cf_subdir && break
17074         done
17075         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17076 done
17077 for cf_dir in $DIRS_TO_MAKE
17078 do
17079         test ! -d $cf_dir && mkdir $cf_dir
17080 done
17081
17082 cat >>confdefs.h <<EOF
17083 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17084 EOF
17085
17086 cat >>confdefs.h <<EOF
17087 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17088 EOF
17089
17090 ### Now that we're done running tests, add the compiler-warnings, if any
17091
17092 cf_fix_cppflags=no
17093 cf_new_cflags=
17094 cf_new_cppflags=
17095 cf_new_extra_cppflags=
17096
17097 for cf_add_cflags in $EXTRA_CFLAGS
17098 do
17099 case $cf_fix_cppflags in
17100 no)
17101         case $cf_add_cflags in #(vi
17102         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17103                 case $cf_add_cflags in
17104                 -D*)
17105                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17106
17107                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17108                         && test -z "${cf_tst_cflags}" \
17109                         && cf_fix_cppflags=yes
17110
17111                         if test $cf_fix_cppflags = yes ; then
17112                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17113                                 continue
17114                         elif test "${cf_tst_cflags}" = "\"'" ; then
17115                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17116                                 continue
17117                         fi
17118                         ;;
17119                 esac
17120                 case "$CPPFLAGS" in
17121                 *$cf_add_cflags) #(vi
17122                         ;;
17123                 *) #(vi
17124                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17125                         ;;
17126                 esac
17127                 ;;
17128         *)
17129                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17130                 ;;
17131         esac
17132         ;;
17133 yes)
17134         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17135
17136         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17137
17138         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17139         && test -z "${cf_tst_cflags}" \
17140         && cf_fix_cppflags=no
17141         ;;
17142 esac
17143 done
17144
17145 if test -n "$cf_new_cflags" ; then
17146
17147         CFLAGS="$CFLAGS $cf_new_cflags"
17148 fi
17149
17150 if test -n "$cf_new_cppflags" ; then
17151
17152         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17153 fi
17154
17155 if test -n "$cf_new_extra_cppflags" ; then
17156
17157         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17158 fi
17159
17160 ### If we're building with rpath, try to link non-standard libs that way too.
17161 if test "$DFT_LWR_MODEL" = "shared"; then
17162
17163 echo "$as_me:17163: checking for updated LDFLAGS" >&5
17164 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17165 if test -n "$LDFLAGS" ; then
17166 echo "$as_me:17166: result: maybe" >&5
17167 echo "${ECHO_T}maybe" >&6
17168 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17169
17170 echo "${as_me-configure}:17170: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17171
17172 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17173
17174 echo "${as_me-configure}:17174: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17175
17176 case "$EXTRA_LDFLAGS" in #(vi
17177 -Wl,-rpath,*) #(vi
17178         cf_rpath_hack="-Wl,-rpath,"
17179         ;;
17180 -R\ *)
17181         cf_rpath_hack="-R "
17182         ;;
17183 -R*)
17184         cf_rpath_hack="-R"
17185         ;;
17186 *)
17187         cf_rpath_hack=
17188         ;;
17189 esac
17190 if test -n "$cf_rpath_hack" ; then
17191         cf_rpath_dst=
17192         for cf_rpath_src in $LDFLAGS
17193         do
17194                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17195
17196 echo "${as_me-configure}:17196: testing Filtering $cf_rpath_src ..." 1>&5
17197
17198                 case $cf_rpath_src in #(vi
17199                 -L*) #(vi
17200                         if test "$cf_rpath_hack" = "-R " ; then
17201                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17202                         else
17203                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17204                         fi
17205                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17206
17207 echo "${as_me-configure}:17207: testing ...Filter $cf_rpath_tmp ..." 1>&5
17208
17209                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17210                         ;;
17211                 esac
17212                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17213         done
17214         LDFLAGS=$cf_rpath_dst
17215         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17216
17217 echo "${as_me-configure}:17217: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17218
17219         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17220
17221 echo "${as_me-configure}:17221: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17222
17223 fi
17224 else
17225 echo "$as_me:17225: result: no" >&5
17226 echo "${ECHO_T}no" >&6
17227 fi
17228
17229 fi
17230
17231 ### Define substitutions for header files to avoid name-pollution
17232
17233 if test "$cf_cv_have_tcgetattr" = yes ; then
17234         HAVE_TCGETATTR=1
17235 else
17236         HAVE_TCGETATTR=0
17237 fi
17238
17239 if test "$ac_cv_header_termio_h" = yes ; then
17240         HAVE_TERMIO_H=1
17241 else
17242         HAVE_TERMIO_H=0
17243 fi
17244
17245 if test "$ac_cv_header_termios_h" = yes ; then
17246         HAVE_TERMIOS_H=1
17247 else
17248         HAVE_TERMIOS_H=0
17249 fi
17250
17251 ################################################################################
17252 test "$use_database" = yes && \
17253 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17254
17255 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17256
17257 if test x"$enable_pc_files" = xyes ; then \
17258 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17259 MAKE_PC_FILES=
17260 else
17261 MAKE_PC_FILES="#"
17262 fi
17263
17264 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"
17265 ac_config_commands="$ac_config_commands default"
17266 cat >confcache <<\_ACEOF
17267 # This file is a shell script that caches the results of configure
17268 # tests run on this system so they can be shared between configure
17269 # scripts and configure runs, see configure's option --config-cache.
17270 # It is not useful on other systems.  If it contains results you don't
17271 # want to keep, you may remove or edit it.
17272 #
17273 # config.status only pays attention to the cache file if you give it
17274 # the --recheck option to rerun configure.
17275 #
17276 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17277 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17278 # following values.
17279
17280 _ACEOF
17281
17282 # The following way of writing the cache mishandles newlines in values,
17283 # but we know of no workaround that is simple, portable, and efficient.
17284 # So, don't put newlines in cache variables' values.
17285 # Ultrix sh set writes to stderr and can't be redirected directly,
17286 # and sets the high bit in the cache file unless we assign to the vars.
17287 {
17288   (set) 2>&1 |
17289     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17290     *ac_space=\ *)
17291       # `set' does not quote correctly, so add quotes (double-quote
17292       # substitution turns \\\\ into \\, and sed turns \\ into \).
17293       sed -n \
17294         "s/'/'\\\\''/g;
17295           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17296       ;;
17297     *)
17298       # `set' quotes correctly as required by POSIX, so do not add quotes.
17299       sed -n \
17300         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17301       ;;
17302     esac;
17303 } |
17304   sed '
17305      t clear
17306      : clear
17307      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17308      t end
17309      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17310      : end' >>confcache
17311 if cmp -s $cache_file confcache; then :; else
17312   if test -w $cache_file; then
17313     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17314     cat confcache >$cache_file
17315   else
17316     echo "not updating unwritable cache $cache_file"
17317   fi
17318 fi
17319 rm -f confcache
17320
17321 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17322 # Let make expand exec_prefix.
17323 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17324
17325 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17326 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17327 # trailing colons and then remove the whole line if VPATH becomes empty
17328 # (actually we leave an empty line to preserve line numbers).
17329 if test "x$srcdir" = x.; then
17330   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17331 s/:*\$(srcdir):*/:/;
17332 s/:*\${srcdir}:*/:/;
17333 s/:*@srcdir@:*/:/;
17334 s/^\([^=]*=[    ]*\):*/\1/;
17335 s/:*$//;
17336 s/^[^=]*=[      ]*$//;
17337 }'
17338 fi
17339
17340 DEFS=-DHAVE_CONFIG_H
17341
17342 : ${CONFIG_STATUS=./config.status}
17343 ac_clean_files_save=$ac_clean_files
17344 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17345 { echo "$as_me:17345: creating $CONFIG_STATUS" >&5
17346 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17347 cat >$CONFIG_STATUS <<_ACEOF
17348 #! $SHELL
17349 # Generated automatically by configure.
17350 # Run this file to recreate the current configuration.
17351 # Compiler output produced by configure, useful for debugging
17352 # configure, is in config.log if it exists.
17353
17354 debug=false
17355 SHELL=\${CONFIG_SHELL-$SHELL}
17356 ac_cs_invocation="\$0 \$@"
17357
17358 _ACEOF
17359
17360 cat >>$CONFIG_STATUS <<\_ACEOF
17361 # Be Bourne compatible
17362 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17363   emulate sh
17364   NULLCMD=:
17365 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17366   set -o posix
17367 fi
17368
17369 # Name of the executable.
17370 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17371
17372 if expr a : '\(a\)' >/dev/null 2>&1; then
17373   as_expr=expr
17374 else
17375   as_expr=false
17376 fi
17377
17378 rm -f conf$$ conf$$.exe conf$$.file
17379 echo >conf$$.file
17380 if ln -s conf$$.file conf$$ 2>/dev/null; then
17381   # We could just check for DJGPP; but this test a) works b) is more generic
17382   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17383   if test -f conf$$.exe; then
17384     # Don't use ln at all; we don't have any links
17385     as_ln_s='cp -p'
17386   else
17387     as_ln_s='ln -s'
17388   fi
17389 elif ln conf$$.file conf$$ 2>/dev/null; then
17390   as_ln_s=ln
17391 else
17392   as_ln_s='cp -p'
17393 fi
17394 rm -f conf$$ conf$$.exe conf$$.file
17395
17396 as_executable_p="test -f"
17397
17398 # Support unset when possible.
17399 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17400   as_unset=unset
17401 else
17402   as_unset=false
17403 fi
17404
17405 # NLS nuisances.
17406 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17407 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17408 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17409 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17410 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17411 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17412 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17413 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17414
17415 # IFS
17416 # We need space, tab and new line, in precisely that order.
17417 as_nl='
17418 '
17419 IFS="   $as_nl"
17420
17421 # CDPATH.
17422 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17423
17424 exec 6>&1
17425
17426 _ACEOF
17427
17428 # Files that config.status was made for.
17429 if test -n "$ac_config_files"; then
17430   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17431 fi
17432
17433 if test -n "$ac_config_headers"; then
17434   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17435 fi
17436
17437 if test -n "$ac_config_links"; then
17438   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17439 fi
17440
17441 if test -n "$ac_config_commands"; then
17442   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17443 fi
17444
17445 cat >>$CONFIG_STATUS <<\EOF
17446
17447 ac_cs_usage="\
17448 \`$as_me' instantiates files from templates according to the
17449 current configuration.
17450
17451 Usage: $0 [OPTIONS] [FILE]...
17452
17453   -h, --help       print this help, then exit
17454   -V, --version    print version number, then exit
17455   -d, --debug      don't remove temporary files
17456       --recheck    update $as_me by reconfiguring in the same conditions
17457   --file=FILE[:TEMPLATE]
17458                    instantiate the configuration file FILE
17459   --header=FILE[:TEMPLATE]
17460                    instantiate the configuration header FILE
17461
17462 Configuration files:
17463 $config_files
17464
17465 Configuration headers:
17466 $config_headers
17467
17468 Configuration commands:
17469 $config_commands
17470
17471 Report bugs to <bug-autoconf@gnu.org>."
17472 EOF
17473
17474 cat >>$CONFIG_STATUS <<EOF
17475 ac_cs_version="\\
17476 config.status
17477 configured by $0, generated by GNU Autoconf 2.52.20081225,
17478   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17479
17480 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17481 Free Software Foundation, Inc.
17482 This config.status script is free software; the Free Software Foundation
17483 gives unlimited permission to copy, distribute and modify it."
17484 srcdir=$srcdir
17485 INSTALL="$INSTALL"
17486 EOF
17487
17488 cat >>$CONFIG_STATUS <<\EOF
17489 # If no file are specified by the user, then we need to provide default
17490 # value.  By we need to know if files were specified by the user.
17491 ac_need_defaults=:
17492 while test $# != 0
17493 do
17494   case $1 in
17495   --*=*)
17496     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17497     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17498     shift
17499     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17500     shift
17501     ;;
17502   -*);;
17503   *) # This is not an option, so the user has probably given explicit
17504      # arguments.
17505      ac_need_defaults=false;;
17506   esac
17507
17508   case $1 in
17509   # Handling of the options.
17510 EOF
17511 cat >>$CONFIG_STATUS <<EOF
17512   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17513     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17514     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17515 EOF
17516 cat >>$CONFIG_STATUS <<\EOF
17517   --version | --vers* | -V )
17518     echo "$ac_cs_version"; exit 0 ;;
17519   --he | --h)
17520     # Conflict between --help and --header
17521     { { echo "$as_me:17521: error: ambiguous option: $1
17522 Try \`$0 --help' for more information." >&5
17523 echo "$as_me: error: ambiguous option: $1
17524 Try \`$0 --help' for more information." >&2;}
17525    { (exit 1); exit 1; }; };;
17526   --help | --hel | -h )
17527     echo "$ac_cs_usage"; exit 0 ;;
17528   --debug | --d* | -d )
17529     debug=: ;;
17530   --file | --fil | --fi | --f )
17531     shift
17532     CONFIG_FILES="$CONFIG_FILES $1"
17533     ac_need_defaults=false;;
17534   --header | --heade | --head | --hea )
17535     shift
17536     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17537     ac_need_defaults=false;;
17538
17539   # This is an error.
17540   -*) { { echo "$as_me:17540: error: unrecognized option: $1
17541 Try \`$0 --help' for more information." >&5
17542 echo "$as_me: error: unrecognized option: $1
17543 Try \`$0 --help' for more information." >&2;}
17544    { (exit 1); exit 1; }; } ;;
17545
17546   *) ac_config_targets="$ac_config_targets $1" ;;
17547
17548   esac
17549   shift
17550 done
17551
17552 exec 5>>config.log
17553 cat >&5 << _ACEOF
17554
17555 ## ----------------------- ##
17556 ## Running config.status.  ##
17557 ## ----------------------- ##
17558
17559 This file was extended by $as_me 2.52.20081225, executed with
17560   CONFIG_FILES    = $CONFIG_FILES
17561   CONFIG_HEADERS  = $CONFIG_HEADERS
17562   CONFIG_LINKS    = $CONFIG_LINKS
17563   CONFIG_COMMANDS = $CONFIG_COMMANDS
17564   > $ac_cs_invocation
17565 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17566
17567 _ACEOF
17568 EOF
17569
17570 cat >>$CONFIG_STATUS <<EOF
17571 #
17572 # INIT-COMMANDS section.
17573 #
17574
17575 ### Special initialization commands, used to pass information from the
17576 ### configuration-run into config.status
17577
17578 AWK="$AWK"
17579 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17580 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17581 ECHO_LINK="$ECHO_LINK"
17582 LDCONFIG="$LDCONFIG"
17583 LIB_NAME="$LIB_NAME"
17584 LIB_SUBSETS="$LIB_SUBSETS"
17585 LIB_SUFFIX="$LIB_SUFFIX"
17586 LIB_TRACING="$LIB_TRACING"
17587 MAKE_TERMINFO="$MAKE_TERMINFO"
17588 NCURSES_MAJOR="$NCURSES_MAJOR"
17589 NCURSES_MINOR="$NCURSES_MINOR"
17590 NCURSES_OSPEED="$NCURSES_OSPEED"
17591 NCURSES_PATCH="$NCURSES_PATCH"
17592 SRC_SUBDIRS="$SRC_SUBDIRS"
17593 TERMINFO="$TERMINFO"
17594 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17595 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17596 TICS_NAME="$TICS_NAME"
17597 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17598 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17599 TINFO_NAME="$TINFO_NAME"
17600 TINFO_SUFFIX="$TINFO_SUFFIX"
17601 WITH_CURSES_H="$with_curses_h"
17602 WITH_ECHO="$with_echo"
17603 WITH_OVERWRITE="$with_overwrite"
17604 cf_LIST_MODELS="$cf_list_models"
17605 cf_cv_abi_version="$cf_cv_abi_version"
17606 cf_cv_do_relink="$cf_cv_do_relink"
17607 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17608 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17609 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17610 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17611 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17612 cf_cv_rel_version="$cf_cv_rel_version"
17613 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17614 cf_cv_shared_soname='$cf_cv_shared_soname'
17615 cf_cv_shlib_version="$cf_cv_shlib_version"
17616 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17617 cf_cv_system_name="$cf_cv_system_name"
17618 cf_with_cxx_binding="$cf_with_cxx_binding"
17619 cf_with_manpages="$cf_with_manpages"
17620 host="$host"
17621 target="$target"
17622
17623 EOF
17624
17625 cat >>$CONFIG_STATUS <<\EOF
17626 for ac_config_target in $ac_config_targets
17627 do
17628   case "$ac_config_target" in
17629   # Handling of arguments.
17630   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17631   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17632   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17633   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17634   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17635   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17636   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17637   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17638   *) { { echo "$as_me:17638: error: invalid argument: $ac_config_target" >&5
17639 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17640    { (exit 1); exit 1; }; };;
17641   esac
17642 done
17643
17644 # If the user did not use the arguments to specify the items to instantiate,
17645 # then the envvar interface is used.  Set only those that are not.
17646 # We use the long form for the default assignment because of an extremely
17647 # bizarre bug on SunOS 4.1.3.
17648 if $ac_need_defaults; then
17649   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17650   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17651   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17652 fi
17653
17654 # Create a temporary directory, and hook for its removal unless debugging.
17655 $debug ||
17656 {
17657   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17658   trap '{ (exit 1); exit 1; }' 1 2 13 15
17659 }
17660
17661 # Create a (secure) tmp directory for tmp files.
17662 : ${TMPDIR=/tmp}
17663 {
17664   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17665   test -n "$tmp" && test -d "$tmp"
17666 }  ||
17667 {
17668   tmp=$TMPDIR/cs$$-$RANDOM
17669   (umask 077 && mkdir $tmp)
17670 } ||
17671 {
17672    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17673    { (exit 1); exit 1; }
17674 }
17675
17676 EOF
17677
17678 cat >>$CONFIG_STATUS <<EOF
17679
17680 #
17681 # CONFIG_FILES section.
17682 #
17683
17684 # No need to generate the scripts if there are no CONFIG_FILES.
17685 # This happens for instance when ./config.status config.h
17686 if test -n "\$CONFIG_FILES"; then
17687   # Protect against being on the right side of a sed subst in config.status.
17688   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17689    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17690 s,@SHELL@,$SHELL,;t t
17691 s,@exec_prefix@,$exec_prefix,;t t
17692 s,@prefix@,$prefix,;t t
17693 s,@program_transform_name@,$program_transform_name,;t t
17694 s,@bindir@,$bindir,;t t
17695 s,@sbindir@,$sbindir,;t t
17696 s,@libexecdir@,$libexecdir,;t t
17697 s,@datadir@,$datadir,;t t
17698 s,@sysconfdir@,$sysconfdir,;t t
17699 s,@sharedstatedir@,$sharedstatedir,;t t
17700 s,@localstatedir@,$localstatedir,;t t
17701 s,@libdir@,$libdir,;t t
17702 s,@includedir@,$includedir,;t t
17703 s,@oldincludedir@,$oldincludedir,;t t
17704 s,@infodir@,$infodir,;t t
17705 s,@mandir@,$mandir,;t t
17706 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17707 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17708 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17709 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17710 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17711 s,@build_alias@,$build_alias,;t t
17712 s,@host_alias@,$host_alias,;t t
17713 s,@target_alias@,$target_alias,;t t
17714 s,@ECHO_C@,$ECHO_C,;t t
17715 s,@ECHO_N@,$ECHO_N,;t t
17716 s,@ECHO_T@,$ECHO_T,;t t
17717 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17718 s,@DEFS@,$DEFS,;t t
17719 s,@LIBS@,$LIBS,;t t
17720 s,@top_builddir@,$top_builddir,;t t
17721 s,@EGREP@,$EGREP,;t t
17722 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17723 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17724 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17725 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17726 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17727 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17728 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17729 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17730 s,@build@,$build,;t t
17731 s,@build_cpu@,$build_cpu,;t t
17732 s,@build_vendor@,$build_vendor,;t t
17733 s,@build_os@,$build_os,;t t
17734 s,@host@,$host,;t t
17735 s,@host_cpu@,$host_cpu,;t t
17736 s,@host_vendor@,$host_vendor,;t t
17737 s,@host_os@,$host_os,;t t
17738 s,@target@,$target,;t t
17739 s,@target_cpu@,$target_cpu,;t t
17740 s,@target_vendor@,$target_vendor,;t t
17741 s,@target_os@,$target_os,;t t
17742 s,@CC@,$CC,;t t
17743 s,@CFLAGS@,$CFLAGS,;t t
17744 s,@LDFLAGS@,$LDFLAGS,;t t
17745 s,@CPPFLAGS@,$CPPFLAGS,;t t
17746 s,@ac_ct_CC@,$ac_ct_CC,;t t
17747 s,@EXEEXT@,$EXEEXT,;t t
17748 s,@OBJEXT@,$OBJEXT,;t t
17749 s,@CPP@,$CPP,;t t
17750 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17751 s,@PROG_EXT@,$PROG_EXT,;t t
17752 s,@LDCONFIG@,$LDCONFIG,;t t
17753 s,@CXX@,$CXX,;t t
17754 s,@CXXFLAGS@,$CXXFLAGS,;t t
17755 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17756 s,@AWK@,$AWK,;t t
17757 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17758 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17759 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17760 s,@LINT@,$LINT,;t t
17761 s,@LINT_OPTS@,$LINT_OPTS,;t t
17762 s,@LN_S@,$LN_S,;t t
17763 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17764 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17765 s,@SET_MAKE@,$SET_MAKE,;t t
17766 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17767 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17768 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17769 s,@RANLIB@,$RANLIB,;t t
17770 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17771 s,@LD@,$LD,;t t
17772 s,@ac_ct_LD@,$ac_ct_LD,;t t
17773 s,@AR@,$AR,;t t
17774 s,@ac_ct_AR@,$ac_ct_AR,;t t
17775 s,@ARFLAGS@,$ARFLAGS,;t t
17776 s,@DESTDIR@,$DESTDIR,;t t
17777 s,@BUILD_CC@,$BUILD_CC,;t t
17778 s,@BUILD_CPP@,$BUILD_CPP,;t t
17779 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17780 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17781 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17782 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17783 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17784 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17785 s,@cf_list_models@,$cf_list_models,;t t
17786 s,@LIBTOOL@,$LIBTOOL,;t t
17787 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17788 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17789 s,@LIB_CREATE@,$LIB_CREATE,;t t
17790 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17791 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17792 s,@LIB_PREP@,$LIB_PREP,;t t
17793 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17794 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17795 s,@LIB_LINK@,$LIB_LINK,;t t
17796 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17797 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17798 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17799 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17800 s,@TICS_NAME@,$TICS_NAME,;t t
17801 s,@TINFO_NAME@,$TINFO_NAME,;t t
17802 s,@LIB_NAME@,$LIB_NAME,;t t
17803 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17804 s,@CC_G_OPT@,$CC_G_OPT,;t t
17805 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17806 s,@LD_MODEL@,$LD_MODEL,;t t
17807 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17808 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17809 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17810 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17811 s,@LINK_PROGS@,$LINK_PROGS,;t t
17812 s,@LINK_TESTS@,$LINK_TESTS,;t t
17813 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17814 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17815 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17816 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17817 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17818 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17819 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17820 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17821 s,@TERMINFO@,$TERMINFO,;t t
17822 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17823 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17824 s,@TERMPATH@,$TERMPATH,;t t
17825 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17826 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17827 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17828 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17829 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17830 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17831 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17832 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17833 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17834 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17835 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17836 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17837 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17838 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17839 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17840 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17841 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17842 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17843 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17844 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17845 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17846 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17847 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17848 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17849 s,@PTHREAD@,$PTHREAD,;t t
17850 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17851 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17852 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17853 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17854 s,@ECHO_LINK@,$ECHO_LINK,;t t
17855 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17856 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17857 s,@ADA_TRACE@,$ADA_TRACE,;t t
17858 s,@MATH_LIB@,$MATH_LIB,;t t
17859 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17860 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17861 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17862 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17863 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17864 s,@TEST_LIBS@,$TEST_LIBS,;t t
17865 s,@CXXCPP@,$CXXCPP,;t t
17866 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17867 s,@CXX_AR@,$CXX_AR,;t t
17868 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17869 s,@CXXLIBS@,$CXXLIBS,;t t
17870 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17871 s,@gnat_exists@,$gnat_exists,;t t
17872 s,@M4_exists@,$M4_exists,;t t
17873 s,@cf_ada_make@,$cf_ada_make,;t t
17874 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17875 s,@cf_ada_package@,$cf_ada_package,;t t
17876 s,@ADAFLAGS@,$ADAFLAGS,;t t
17877 s,@cf_compile_generics@,$cf_compile_generics,;t t
17878 s,@cf_generic_objects@,$cf_generic_objects,;t t
17879 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17880 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17881 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17882 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17883 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17884 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17885 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17886 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17887 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17888 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17889 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17890 s,@TICS_ARGS@,$TICS_ARGS,;t t
17891 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17892 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17893 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17894 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17895 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17896 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17897 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17898 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17899 s,@TICS_LIST@,$TICS_LIST,;t t
17900 s,@TINFO_LIST@,$TINFO_LIST,;t t
17901 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17902 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17903 s,@TEST_ARGS@,$TEST_ARGS,;t t
17904 s,@TEST_DEPS@,$TEST_DEPS,;t t
17905 s,@TEST_ARG2@,$TEST_ARG2,;t t
17906 s,@TEST_DEP2@,$TEST_DEP2,;t t
17907 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17908 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17909 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17910 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17911 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17912 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17913 CEOF
17914
17915 EOF
17916
17917   cat >>$CONFIG_STATUS <<\EOF
17918   # Split the substitutions into bite-sized pieces for seds with
17919   # small command number limits, like on Digital OSF/1 and HP-UX.
17920   ac_max_sed_lines=48
17921   ac_sed_frag=1 # Number of current file.
17922   ac_beg=1 # First line for current file.
17923   ac_end=$ac_max_sed_lines # Line after last line for current file.
17924   ac_more_lines=:
17925   ac_sed_cmds=
17926   while $ac_more_lines; do
17927     if test $ac_beg -gt 1; then
17928       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17929     else
17930       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17931     fi
17932     if test ! -s $tmp/subs.frag; then
17933       ac_more_lines=false
17934     else
17935       # The purpose of the label and of the branching condition is to
17936       # speed up the sed processing (if there are no `@' at all, there
17937       # is no need to browse any of the substitutions).
17938       # These are the two extra sed commands mentioned above.
17939       (echo ':t
17940   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17941       if test -z "$ac_sed_cmds"; then
17942         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17943       else
17944         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17945       fi
17946       ac_sed_frag=`expr $ac_sed_frag + 1`
17947       ac_beg=$ac_end
17948       ac_end=`expr $ac_end + $ac_max_sed_lines`
17949     fi
17950   done
17951   if test -z "$ac_sed_cmds"; then
17952     ac_sed_cmds=cat
17953   fi
17954 fi # test -n "$CONFIG_FILES"
17955
17956 EOF
17957 cat >>$CONFIG_STATUS <<\EOF
17958 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17959   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17960   case $ac_file in
17961   - | *:- | *:-:* ) # input from stdin
17962         cat >$tmp/stdin
17963         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17964         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17965   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17966         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17967   * )   ac_file_in=$ac_file.in ;;
17968   esac
17969
17970   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17971   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17972          X"$ac_file" : 'X\(//\)[^/]' \| \
17973          X"$ac_file" : 'X\(//\)$' \| \
17974          X"$ac_file" : 'X\(/\)' \| \
17975          .     : '\(.\)' 2>/dev/null ||
17976 echo X"$ac_file" |
17977     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17978           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17979           /^X\(\/\/\)$/{ s//\1/; q; }
17980           /^X\(\/\).*/{ s//\1/; q; }
17981           s/.*/./; q'`
17982   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17983     { case "$ac_dir" in
17984   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17985   *)                      as_incr_dir=.;;
17986 esac
17987 as_dummy="$ac_dir"
17988 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17989   case $as_mkdir_dir in
17990     # Skip DOS drivespec
17991     ?:) as_incr_dir=$as_mkdir_dir ;;
17992     *)
17993       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17994       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17995     ;;
17996   esac
17997 done; }
17998
17999     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18000     # A "../" for each directory in $ac_dir_suffix.
18001     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18002   else
18003     ac_dir_suffix= ac_dots=
18004   fi
18005
18006   case $srcdir in
18007   .)  ac_srcdir=.
18008       if test -z "$ac_dots"; then
18009          ac_top_srcdir=.
18010       else
18011          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18012       fi ;;
18013   [\\/]* | ?:[\\/]* )
18014       ac_srcdir=$srcdir$ac_dir_suffix;
18015       ac_top_srcdir=$srcdir ;;
18016   *) # Relative path.
18017     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18018     ac_top_srcdir=$ac_dots$srcdir ;;
18019   esac
18020
18021   case $INSTALL in
18022   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18023   *) ac_INSTALL=$ac_dots$INSTALL ;;
18024   esac
18025
18026   if test x"$ac_file" != x-; then
18027     { echo "$as_me:18027: creating $ac_file" >&5
18028 echo "$as_me: creating $ac_file" >&6;}
18029     rm -f "$ac_file"
18030   fi
18031   # Let's still pretend it is `configure' which instantiates (i.e., don't
18032   # use $as_me), people would be surprised to read:
18033   #    /* config.h.  Generated automatically by config.status.  */
18034   configure_input="Generated automatically from `echo $ac_file_in |
18035                                                  sed 's,.*/,,'` by configure."
18036
18037   # First look for the input files in the build tree, otherwise in the
18038   # src tree.
18039   ac_file_inputs=`IFS=:
18040     for f in $ac_file_in; do
18041       case $f in
18042       -) echo $tmp/stdin ;;
18043       [\\/$]*)
18044          # Absolute (can't be DOS-style, as IFS=:)
18045          test -f "$f" || { { echo "$as_me:18045: error: cannot find input file: $f" >&5
18046 echo "$as_me: error: cannot find input file: $f" >&2;}
18047    { (exit 1); exit 1; }; }
18048          echo $f;;
18049       *) # Relative
18050          if test -f "$f"; then
18051            # Build tree
18052            echo $f
18053          elif test -f "$srcdir/$f"; then
18054            # Source tree
18055            echo $srcdir/$f
18056          else
18057            # /dev/null tree
18058            { { echo "$as_me:18058: error: cannot find input file: $f" >&5
18059 echo "$as_me: error: cannot find input file: $f" >&2;}
18060    { (exit 1); exit 1; }; }
18061          fi;;
18062       esac
18063     done` || { (exit 1); exit 1; }
18064 EOF
18065 cat >>$CONFIG_STATUS <<EOF
18066   sed "$ac_vpsub
18067 $extrasub
18068 EOF
18069 cat >>$CONFIG_STATUS <<\EOF
18070 :t
18071 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18072 s,@configure_input@,$configure_input,;t t
18073 s,@srcdir@,$ac_srcdir,;t t
18074 s,@top_srcdir@,$ac_top_srcdir,;t t
18075 s,@INSTALL@,$ac_INSTALL,;t t
18076 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18077   rm -f $tmp/stdin
18078   if test x"$ac_file" != x-; then
18079     mv $tmp/out $ac_file
18080   else
18081     cat $tmp/out
18082     rm -f $tmp/out
18083   fi
18084
18085 done
18086 EOF
18087 cat >>$CONFIG_STATUS <<\EOF
18088
18089 #
18090 # CONFIG_HEADER section.
18091 #
18092
18093 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18094 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18095 #
18096 # ac_d sets the value in "#define NAME VALUE" lines.
18097 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18098 ac_dB='[        ].*$,\1#\2'
18099 ac_dC=' '
18100 ac_dD=',;t'
18101 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18102 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18103 ac_iB='\([      ]\),\1#\2define\3'
18104 ac_iC=' '
18105 ac_iD='\4,;t'
18106 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18107 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18108 ac_uB='$,\1#\2define\3'
18109 ac_uC=' '
18110 ac_uD=',;t'
18111
18112 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18113   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18114   case $ac_file in
18115   - | *:- | *:-:* ) # input from stdin
18116         cat >$tmp/stdin
18117         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18118         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18119   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18120         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18121   * )   ac_file_in=$ac_file.in ;;
18122   esac
18123
18124   test x"$ac_file" != x- && { echo "$as_me:18124: creating $ac_file" >&5
18125 echo "$as_me: creating $ac_file" >&6;}
18126
18127   # First look for the input files in the build tree, otherwise in the
18128   # src tree.
18129   ac_file_inputs=`IFS=:
18130     for f in $ac_file_in; do
18131       case $f in
18132       -) echo $tmp/stdin ;;
18133       [\\/$]*)
18134          # Absolute (can't be DOS-style, as IFS=:)
18135          test -f "$f" || { { echo "$as_me:18135: error: cannot find input file: $f" >&5
18136 echo "$as_me: error: cannot find input file: $f" >&2;}
18137    { (exit 1); exit 1; }; }
18138          echo $f;;
18139       *) # Relative
18140          if test -f "$f"; then
18141            # Build tree
18142            echo $f
18143          elif test -f "$srcdir/$f"; then
18144            # Source tree
18145            echo $srcdir/$f
18146          else
18147            # /dev/null tree
18148            { { echo "$as_me:18148: error: cannot find input file: $f" >&5
18149 echo "$as_me: error: cannot find input file: $f" >&2;}
18150    { (exit 1); exit 1; }; }
18151          fi;;
18152       esac
18153     done` || { (exit 1); exit 1; }
18154   # Remove the trailing spaces.
18155   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18156
18157 EOF
18158
18159 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18160 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18161 # be either 'cat' or 'sort'.
18162 cat confdefs.h | uniq >conftest.vals
18163
18164 # Break up conftest.vals because some shells have a limit on
18165 # the size of here documents, and old seds have small limits too.
18166
18167 rm -f conftest.tail
18168 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18169 while grep . conftest.vals >/dev/null
18170 do
18171   # Write chunks of a limited-size here document to conftest.frag.
18172   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18173   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18174   echo 'CEOF' >> $CONFIG_STATUS
18175   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18176   rm -f conftest.vals
18177   mv conftest.tail conftest.vals
18178 done
18179 rm -f conftest.vals
18180
18181 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18182 # marker @DEFS@.
18183 echo '  cat >> conftest.edit <<CEOF
18184 /@DEFS@/r conftest.frag
18185 /@DEFS@/d
18186 CEOF
18187 sed -f conftest.edit $tmp/in > $tmp/out
18188 rm -f $tmp/in
18189 mv $tmp/out $tmp/in
18190 rm -f conftest.edit conftest.frag
18191 ' >> $CONFIG_STATUS
18192
18193 cat >>$CONFIG_STATUS <<\EOF
18194   # Let's still pretend it is `configure' which instantiates (i.e., don't
18195   # use $as_me), people would be surprised to read:
18196   #    /* config.h.  Generated automatically by config.status.  */
18197   if test x"$ac_file" = x-; then
18198     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18199   else
18200     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18201   fi
18202   cat $tmp/in >>$tmp/config.h
18203   rm -f $tmp/in
18204   if test x"$ac_file" != x-; then
18205     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18206       { echo "$as_me:18206: $ac_file is unchanged" >&5
18207 echo "$as_me: $ac_file is unchanged" >&6;}
18208     else
18209       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18210          X"$ac_file" : 'X\(//\)[^/]' \| \
18211          X"$ac_file" : 'X\(//\)$' \| \
18212          X"$ac_file" : 'X\(/\)' \| \
18213          .     : '\(.\)' 2>/dev/null ||
18214 echo X"$ac_file" |
18215     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18216           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18217           /^X\(\/\/\)$/{ s//\1/; q; }
18218           /^X\(\/\).*/{ s//\1/; q; }
18219           s/.*/./; q'`
18220       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18221         { case "$ac_dir" in
18222   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18223   *)                      as_incr_dir=.;;
18224 esac
18225 as_dummy="$ac_dir"
18226 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18227   case $as_mkdir_dir in
18228     # Skip DOS drivespec
18229     ?:) as_incr_dir=$as_mkdir_dir ;;
18230     *)
18231       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18232       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18233     ;;
18234   esac
18235 done; }
18236
18237       fi
18238       rm -f $ac_file
18239       mv $tmp/config.h $ac_file
18240     fi
18241   else
18242     cat $tmp/config.h
18243     rm -f $tmp/config.h
18244   fi
18245 done
18246 EOF
18247 cat >>$CONFIG_STATUS <<\EOF
18248
18249 #
18250 # CONFIG_COMMANDS section.
18251 #
18252 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18253   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18254   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18255
18256   case $ac_dest in
18257     default )
18258
18259 for cf_dir in test
18260 do
18261         if test ! -d $srcdir/$cf_dir; then
18262                 continue
18263         elif test -f $srcdir/$cf_dir/programs; then
18264                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18265         fi
18266 done
18267
18268         case $cf_cv_system_name in #(vi
18269         OS/2*|os2*) #(vi
18270         LIB_PREFIX=''
18271         ;;
18272         *)      LIB_PREFIX='lib'
18273         ;;
18274         esac
18275 cf_prefix=$LIB_PREFIX
18276
18277 if test $cf_cv_shlib_version = cygdll ; then
18278         TINFO_NAME=$TINFO_ARG_SUFFIX
18279         TINFO_SUFFIX=.dll
18280 fi
18281
18282 for cf_dir in $SRC_SUBDIRS
18283 do
18284         if test ! -d $srcdir/$cf_dir ; then
18285                 continue
18286         elif test -f $srcdir/$cf_dir/modules; then
18287
18288                 SHARED_LIB=
18289                 LIBS_TO_MAKE=
18290                 for cf_item in $cf_LIST_MODELS
18291                 do
18292
18293         case $cf_item in #(vi
18294         libtool) #(vi
18295                 cf_suffix='.la'
18296                 cf_depsuf=$cf_suffix
18297                 ;;
18298         normal) #(vi
18299                 cf_suffix='.a'
18300                 cf_depsuf=$cf_suffix
18301                 ;;
18302         debug) #(vi
18303                 cf_suffix='_g.a'
18304                 cf_depsuf=$cf_suffix
18305                 ;;
18306         profile) #(vi
18307                 cf_suffix='_p.a'
18308                 cf_depsuf=$cf_suffix
18309                 ;;
18310         shared) #(vi
18311                 case $cf_cv_system_name in
18312                 aix[56]*) #(vi
18313                         cf_suffix='.a'
18314                         cf_depsuf=$cf_suffix
18315                         ;;
18316                 cygwin*) #(vi
18317                         cf_suffix='.dll'
18318                         cf_depsuf='.dll.a'
18319                         ;;
18320                 darwin*) #(vi
18321                         cf_suffix='.dylib'
18322                         cf_depsuf=$cf_suffix
18323                         ;;
18324                 hpux*) #(vi
18325                         case $target in
18326                         ia64*) #(vi
18327                                 cf_suffix='.so'
18328                                 cf_depsuf=$cf_suffix
18329                                 ;;
18330                         *) #(vi
18331                                 cf_suffix='.sl'
18332                                 cf_depsuf=$cf_suffix
18333                                 ;;
18334                         esac
18335                         ;;
18336                 *)      cf_suffix='.so'
18337                         cf_depsuf=$cf_suffix
18338                         ;;
18339                 esac
18340         esac
18341         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18342         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18343
18344                         if test $cf_item = shared ; then
18345                         if test "$cf_cv_do_symlinks" = yes ; then
18346                                 case "$cf_cv_shlib_version" in #(vi
18347                                 rel) #(vi
18348                                         case "$cf_cv_system_name" in #(vi
18349                                         darwin*)
18350                                         case .${LIB_SUFFIX} in
18351                                         .w*)
18352                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18353                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18354                                                 ;;
18355                                         *)
18356                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18357                                                 ;;
18358                                         esac
18359                                         ;; #(vi
18360                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18361                                         esac
18362                                         ;;
18363                                 abi)
18364                                         case "$cf_cv_system_name" in #(vi
18365                                         darwin*)
18366                                         case .${LIB_SUFFIX} in
18367                                         .w*)
18368                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18369                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18370                                                 ;;
18371                                         *)
18372                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18373                                                 ;;
18374                                         esac
18375                                         ;; #(vi
18376                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18377                                         esac
18378                                         ;;
18379                                 esac
18380                         fi
18381                         # cygwin needs import library, and has unique naming convention
18382                         # use autodetected ${cf_prefix} for import lib and static lib, but
18383                         # use 'cyg' prefix for shared lib.
18384                         if test $cf_cv_shlib_version = cygdll ; then
18385                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18386                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18387                                 continue
18388                         fi
18389                         fi
18390                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18391                 done
18392
18393                 if test $cf_dir = ncurses ; then
18394                         cf_subsets="$LIB_SUBSETS"
18395                         cf_r_parts="$cf_subsets"
18396                         cf_liblist="$LIBS_TO_MAKE"
18397
18398                         while test -n "$cf_r_parts"
18399                         do
18400                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18401                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18402                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18403                                         cf_item=
18404                                         case $cf_l_parts in #(vi
18405                                         *termlib*) #(vi
18406                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18407                                                 ;;
18408                                         *ticlib*)
18409                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18410                                                 ;;
18411                                         *)
18412                                                 break
18413                                                 ;;
18414                                         esac
18415                                         if test -n "$cf_item"; then
18416                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18417                                         fi
18418                                 else
18419                                         break
18420                                 fi
18421                         done
18422                 else
18423                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18424                 fi
18425
18426                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18427                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18428                         $cf_dir/Makefile >$cf_dir/Makefile.out
18429                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18430
18431                 $AWK -f $srcdir/mk-0th.awk \
18432                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18433                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18434
18435                 for cf_subset in $cf_subsets
18436                 do
18437                         cf_subdirs=
18438                         for cf_item in $cf_LIST_MODELS
18439                         do
18440                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18441
18442 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18443
18444         case $cf_item in #(vi
18445         libtool) #(vi
18446                 cf_suffix='.la'
18447                 cf_depsuf=$cf_suffix
18448                 ;;
18449         normal) #(vi
18450                 cf_suffix='.a'
18451                 cf_depsuf=$cf_suffix
18452                 ;;
18453         debug) #(vi
18454                 cf_suffix='_g.a'
18455                 cf_depsuf=$cf_suffix
18456                 ;;
18457         profile) #(vi
18458                 cf_suffix='_p.a'
18459                 cf_depsuf=$cf_suffix
18460                 ;;
18461         shared) #(vi
18462                 case $cf_cv_system_name in
18463                 aix[56]*) #(vi
18464                         cf_suffix='.a'
18465                         cf_depsuf=$cf_suffix
18466                         ;;
18467                 cygwin*) #(vi
18468                         cf_suffix='.dll'
18469                         cf_depsuf='.dll.a'
18470                         ;;
18471                 darwin*) #(vi
18472                         cf_suffix='.dylib'
18473                         cf_depsuf=$cf_suffix
18474                         ;;
18475                 hpux*) #(vi
18476                         case $target in
18477                         ia64*) #(vi
18478                                 cf_suffix='.so'
18479                                 cf_depsuf=$cf_suffix
18480                                 ;;
18481                         *) #(vi
18482                                 cf_suffix='.sl'
18483                                 cf_depsuf=$cf_suffix
18484                                 ;;
18485                         esac
18486                         ;;
18487                 *)      cf_suffix='.so'
18488                         cf_depsuf=$cf_suffix
18489                         ;;
18490                 esac
18491         esac
18492         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18493         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18494
18495         case $cf_item in
18496         libtool) cf_subdir='obj_lo'  ;;
18497         normal)  cf_subdir='objects' ;;
18498         debug)   cf_subdir='obj_g' ;;
18499         profile) cf_subdir='obj_p' ;;
18500         shared)
18501                 case $cf_cv_system_name in #(vi
18502                 cygwin) #(vi
18503                         cf_subdir='objects' ;;
18504                 *)
18505                         cf_subdir='obj_s' ;;
18506                 esac
18507         esac
18508
18509                         # Test for case where we build libtinfo with a different name.
18510                         cf_libname=$cf_dir
18511                         if test $cf_dir = ncurses ; then
18512                                 case $cf_subset in
18513                                 *base*)
18514                                         cf_libname=${cf_libname}$LIB_SUFFIX
18515                                         ;;
18516                                 *termlib*)
18517                                         cf_libname=$TINFO_LIB_SUFFIX
18518                                         ;;
18519                                 ticlib*)
18520                                         cf_libname=$TICS_LIB_SUFFIX
18521                                         ;;
18522                                 esac
18523                         else
18524                                 cf_libname=${cf_libname}$LIB_SUFFIX
18525                         fi
18526                         if test -n "${DFT_ARG_SUFFIX}" ; then
18527                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18528                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18529                         fi
18530
18531                         # These dependencies really are for development, not
18532                         # builds, but they are useful in porting, too.
18533                         cf_depend="../include/ncurses_cfg.h"
18534                         if test "$srcdir" = "."; then
18535                                 cf_reldir="."
18536                         else
18537                                 cf_reldir="\${srcdir}"
18538                         fi
18539
18540                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18541                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18542                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18543                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18544                         fi
18545
18546                         cf_dir_suffix=
18547                         old_cf_suffix="$cf_suffix"
18548                         if test "$cf_cv_shlib_version_infix" = yes ; then
18549                         if test -n "$LIB_SUFFIX" ; then
18550                                 case $LIB_SUFFIX in
18551                                 w*)
18552                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18553                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18554                                         cf_dir_suffix=w
18555                                         ;;
18556                                 esac
18557                         fi
18558                         fi
18559
18560                         $AWK -f $srcdir/mk-1st.awk \
18561                                 name=${cf_libname}${cf_dir_suffix} \
18562                                 traces=$LIB_TRACING \
18563                                 MODEL=$cf_ITEM \
18564                                 model=$cf_subdir \
18565                                 prefix=$cf_prefix \
18566                                 suffix=$cf_suffix \
18567                                 subset=$cf_subset \
18568                                 TermlibRoot=$TINFO_NAME \
18569                                 TermlibSuffix=$TINFO_SUFFIX \
18570                                 ShlibVer=$cf_cv_shlib_version \
18571                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18572                                 ReLink=${cf_cv_do_relink-no} \
18573                                 DoLinks=$cf_cv_do_symlinks \
18574                                 rmSoLocs=$cf_cv_rm_so_locs \
18575                                 ldconfig="$LDCONFIG" \
18576                                 overwrite=$WITH_OVERWRITE \
18577                                 depend="$cf_depend" \
18578                                 host="$host" \
18579                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18580
18581                         cf_suffix="$old_cf_suffix"
18582
18583                         for cf_subdir2 in $cf_subdirs lib
18584                         do
18585                                 test $cf_subdir = $cf_subdir2 && break
18586                         done
18587                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18588                         $AWK -f $srcdir/mk-2nd.awk \
18589                                 name=$cf_dir \
18590                                 traces=$LIB_TRACING \
18591                                 MODEL=$cf_ITEM \
18592                                 model=$cf_subdir \
18593                                 subset=$cf_subset \
18594                                 srcdir=$srcdir \
18595                                 echo=$WITH_ECHO \
18596                                 crenames=$cf_cv_prog_CC_c_o \
18597                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18598                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18599                         cf_subdirs="$cf_subdirs $cf_subdir"
18600                         done
18601                 done
18602         fi
18603
18604         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18605 done
18606
18607 for cf_dir in $SRC_SUBDIRS
18608 do
18609         if test ! -d $srcdir/$cf_dir ; then
18610                 continue
18611         fi
18612
18613         if test -f $cf_dir/Makefile ; then
18614                 case "$cf_dir" in
18615                 Ada95) #(vi
18616                         echo 'libs \' >> Makefile
18617                         echo 'install.libs \' >> Makefile
18618                         echo 'uninstall.libs ::' >> Makefile
18619                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18620                         ;;
18621                 esac
18622         fi
18623
18624         if test -f $srcdir/$cf_dir/modules; then
18625                 echo >> Makefile
18626                 if test -f $srcdir/$cf_dir/headers; then
18627 cat >> Makefile <<CF_EOF
18628 install.includes \\
18629 uninstall.includes \\
18630 CF_EOF
18631                 fi
18632 if test "$cf_dir" != "c++" ; then
18633 echo 'lint \' >> Makefile
18634 fi
18635 cat >> Makefile <<CF_EOF
18636 libs \\
18637 lintlib \\
18638 install.libs \\
18639 uninstall.libs \\
18640 install.$cf_dir \\
18641 uninstall.$cf_dir ::
18642         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18643 CF_EOF
18644         elif test -f $srcdir/$cf_dir/headers; then
18645 cat >> Makefile <<CF_EOF
18646
18647 libs \\
18648 install.libs \\
18649 uninstall.libs \\
18650 install.includes \\
18651 uninstall.includes ::
18652         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18653 CF_EOF
18654 fi
18655 done
18656
18657 cat >> Makefile <<CF_EOF
18658
18659 install.libs uninstall.libs \\
18660 install.data uninstall.data ::
18661 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18662 CF_EOF
18663
18664 if test "x$cf_with_manpages" = xyes; then
18665 cat >> Makefile <<CF_EOF
18666
18667 install.man \\
18668 uninstall.man ::
18669         cd man && \${MAKE} \${CF_MFLAGS} \$@
18670 CF_EOF
18671 fi
18672
18673 cat >> Makefile <<CF_EOF
18674
18675 distclean ::
18676         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18677         rm -f headers.sh headers.sed mk_shared_lib.sh
18678         rm -f edit_man.* man_alias.*
18679         rm -rf \${DIRS_TO_MAKE}
18680 CF_EOF
18681
18682 # Special case: tack's manpage lives in its own directory.
18683 if test "x$cf_with_manpages" = xyes; then
18684 if test -d tack ; then
18685 if test -f $srcdir/$tack.h; then
18686 cat >> Makefile <<CF_EOF
18687
18688 install.man \\
18689 uninstall.man ::
18690         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18691 CF_EOF
18692 fi
18693 fi
18694 fi
18695
18696 rm -f headers.sed headers.sh
18697
18698 echo creating headers.sh
18699 cat >headers.sh <<CF_EOF
18700 #! /bin/sh
18701 # This shell script is generated by the 'configure' script.  It is invoked in a
18702 # subdirectory of the build tree.  It generates a sed-script in the parent
18703 # directory that is used to adjust includes for header files that reside in a
18704 # subdirectory of /usr/include, etc.
18705 PRG=""
18706 while test \$# != 3
18707 do
18708 PRG="\$PRG \$1"; shift
18709 done
18710 DST=\$1
18711 REF=\$2
18712 SRC=\$3
18713 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18714 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18715 echo installing \$SRC in \$DST
18716 CF_EOF
18717
18718 if test $WITH_CURSES_H = yes; then
18719         cat >>headers.sh <<CF_EOF
18720 case \$DST in
18721 /*/include/*)
18722         END=\`basename \$DST\`
18723         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18724         do
18725                 NAME=\`basename \$i\`
18726                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18727         done
18728         ;;
18729 *)
18730         echo "" >> \$TMPSED
18731         ;;
18732 esac
18733 CF_EOF
18734
18735 else
18736         cat >>headers.sh <<CF_EOF
18737 case \$DST in
18738 /*/include/*)
18739         END=\`basename \$DST\`
18740         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18741         do
18742                 NAME=\`basename \$i\`
18743                 if test "\$NAME" = "curses.h"
18744                 then
18745                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18746                         NAME=ncurses.h
18747                 fi
18748                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18749         done
18750         ;;
18751 *)
18752         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18753         ;;
18754 esac
18755 CF_EOF
18756 fi
18757 cat >>headers.sh <<CF_EOF
18758 rm -f \$TMPSRC
18759 sed -f \$TMPSED \$SRC > \$TMPSRC
18760 NAME=\`basename \$SRC\`
18761 CF_EOF
18762 if test $WITH_CURSES_H != yes; then
18763         cat >>headers.sh <<CF_EOF
18764 test "\$NAME" = "curses.h" && NAME=ncurses.h
18765 CF_EOF
18766 fi
18767 cat >>headers.sh <<CF_EOF
18768 # Just in case someone gzip'd manpages, remove the conflicting copy.
18769 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18770
18771 eval \$PRG \$TMPSRC \$DST/\$NAME
18772 rm -f \$TMPSRC \$TMPSED
18773 CF_EOF
18774
18775 chmod 0755 headers.sh
18776
18777 for cf_dir in $SRC_SUBDIRS
18778 do
18779         if test ! -d $srcdir/$cf_dir ; then
18780                 continue
18781         fi
18782
18783         if test -f $srcdir/$cf_dir/headers; then
18784                 $AWK -f $srcdir/mk-hdr.awk \
18785                         subset="$LIB_SUBSETS" \
18786                         compat="$WITH_CURSES_H" \
18787                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18788         fi
18789
18790         if test -f $srcdir/$cf_dir/modules; then
18791                 if test "$cf_dir" != "c++" ; then
18792                         cat >>$cf_dir/Makefile <<"CF_EOF"
18793 depend : ${AUTO_SRC}
18794         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18795
18796 # DO NOT DELETE THIS LINE -- make depend depends on it.
18797 CF_EOF
18798                 fi
18799         fi
18800 done
18801
18802  ;;
18803   esac
18804 done
18805 EOF
18806
18807 cat >>$CONFIG_STATUS <<\EOF
18808
18809 { (exit 0); exit 0; }
18810 EOF
18811 chmod +x $CONFIG_STATUS
18812 ac_clean_files=$ac_clean_files_save
18813
18814 # configure is writing to config.log, and then calls config.status.
18815 # config.status does its own redirection, appending to config.log.
18816 # Unfortunately, on DOS this fails, as config.log is still kept open
18817 # by configure, so config.status won't be able to write to it; its
18818 # output is simply discarded.  So we exec the FD to /dev/null,
18819 # effectively closing config.log, so it can be properly (re)opened and
18820 # appended to by config.status.  When coming back to configure, we
18821 # need to make the FD available again.
18822 if test "$no_create" != yes; then
18823   ac_cs_success=:
18824   exec 5>/dev/null
18825   $SHELL $CONFIG_STATUS || ac_cs_success=false
18826   exec 5>>config.log
18827   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18828   # would make configure fail if this is the last instruction.
18829   $ac_cs_success || { (exit 1); exit 1; }
18830 fi
18831 ${MAKE-make} preinstall