]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090214
[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 #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10433 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10434 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10435 # remark #193: zero used for undefined preprocessing identifier
10436 # remark #593: variable "curs_sb_left_arrow" was set but never used
10437 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10438 # remark #869: parameter "tw" was never referenced
10439 # remark #981: operands are evaluated in unspecified order
10440 # warning #269: invalid format string conversion
10441
10442         { echo "$as_me:10442: checking for $CC warning options..." >&5
10443 echo "$as_me: checking for $CC warning options..." >&6;}
10444         cf_save_CFLAGS="$CFLAGS"
10445         EXTRA_CFLAGS="-Wall"
10446         for cf_opt in \
10447                 wd1419 \
10448                 wd1682 \
10449                 wd1683 \
10450                 wd1684 \
10451                 wd193 \
10452                 wd279 \
10453                 wd593 \
10454                 wd810 \
10455                 wd869 \
10456                 wd981
10457         do
10458                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10459                 if { (eval echo "$as_me:10459: \"$ac_compile\"") >&5
10460   (eval $ac_compile) 2>&5
10461   ac_status=$?
10462   echo "$as_me:10462: \$? = $ac_status" >&5
10463   (exit $ac_status); }; then
10464                         test -n "$verbose" && echo "$as_me:10464: result: ... -$cf_opt" >&5
10465 echo "${ECHO_T}... -$cf_opt" >&6
10466                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10467                 fi
10468         done
10469         CFLAGS="$cf_save_CFLAGS"
10470
10471 elif test "$GCC" = yes
10472 then
10473         { echo "$as_me:10473: checking for $CC warning options..." >&5
10474 echo "$as_me: checking for $CC warning options..." >&6;}
10475         cf_save_CFLAGS="$CFLAGS"
10476         EXTRA_CFLAGS="-W -Wall"
10477         cf_warn_CONST=""
10478         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10479         for cf_opt in \
10480                 Wbad-function-cast \
10481                 Wcast-align \
10482                 Wcast-qual \
10483                 Winline \
10484                 Wmissing-declarations \
10485                 Wmissing-prototypes \
10486                 Wnested-externs \
10487                 Wpointer-arith \
10488                 Wshadow \
10489                 Wstrict-prototypes \
10490                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10491         do
10492                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10493                 if { (eval echo "$as_me:10493: \"$ac_compile\"") >&5
10494   (eval $ac_compile) 2>&5
10495   ac_status=$?
10496   echo "$as_me:10496: \$? = $ac_status" >&5
10497   (exit $ac_status); }; then
10498                         test -n "$verbose" && echo "$as_me:10498: result: ... -$cf_opt" >&5
10499 echo "${ECHO_T}... -$cf_opt" >&6
10500                         case $cf_opt in #(vi
10501                         Wcast-qual) #(vi
10502                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10503                                 ;;
10504                         Winline) #(vi
10505                                 case $GCC_VERSION in
10506                                 [34].*)
10507                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10508
10509 echo "${as_me-configure}:10509: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10510
10511                                         continue;;
10512                                 esac
10513                                 ;;
10514                         esac
10515                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10516                 fi
10517         done
10518         CFLAGS="$cf_save_CFLAGS"
10519 fi
10520 rm -f conftest*
10521
10522         if test "$cf_with_cxx" = yes ; then
10523
10524 INTEL_CPLUSPLUS=no
10525
10526 if test "$GCC" = yes ; then
10527         case $host_os in
10528         linux*|gnu*)
10529                 echo "$as_me:10529: checking if this is really Intel C++ compiler" >&5
10530 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10531                 cf_save_CFLAGS="$CXXFLAGS"
10532                 CXXFLAGS="$CXXFLAGS -no-gcc"
10533                 cat >conftest.$ac_ext <<_ACEOF
10534 #line 10534 "configure"
10535 #include "confdefs.h"
10536
10537 int
10538 main ()
10539 {
10540
10541 #ifdef __INTEL_COMPILER
10542 #else
10543 make an error
10544 #endif
10545
10546   ;
10547   return 0;
10548 }
10549 _ACEOF
10550 rm -f conftest.$ac_objext
10551 if { (eval echo "$as_me:10551: \"$ac_compile\"") >&5
10552   (eval $ac_compile) 2>&5
10553   ac_status=$?
10554   echo "$as_me:10554: \$? = $ac_status" >&5
10555   (exit $ac_status); } &&
10556          { ac_try='test -s conftest.$ac_objext'
10557   { (eval echo "$as_me:10557: \"$ac_try\"") >&5
10558   (eval $ac_try) 2>&5
10559   ac_status=$?
10560   echo "$as_me:10560: \$? = $ac_status" >&5
10561   (exit $ac_status); }; }; then
10562   INTEL_CPLUSPLUS=yes
10563 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10564
10565 else
10566   echo "$as_me: failed program was:" >&5
10567 cat conftest.$ac_ext >&5
10568 fi
10569 rm -f conftest.$ac_objext conftest.$ac_ext
10570                 CXXFLAGS="$cf_save_CFLAGS"
10571                 echo "$as_me:10571: result: $INTEL_CPLUSPLUS" >&5
10572 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10573                 ;;
10574         esac
10575 fi
10576
10577 ac_ext=cc
10578 ac_cpp='$CXXCPP $CPPFLAGS'
10579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10582 ac_main_return=return
10583
10584 cat > conftest.$ac_ext <<EOF
10585 #line 10585 "configure"
10586 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10587 EOF
10588
10589 if test "$INTEL_CPLUSPLUS" = yes
10590 then
10591 # The "-wdXXX" options suppress warnings:
10592 # remark #1419: external declaration in primary source file
10593 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10594 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10595 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10596 # remark #193: zero used for undefined preprocessing identifier
10597 # remark #593: variable "curs_sb_left_arrow" was set but never used
10598 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10599 # remark #869: parameter "tw" was never referenced
10600 # remark #981: operands are evaluated in unspecified order
10601 # warning #269: invalid format string conversion
10602
10603         { echo "$as_me:10603: checking for $CC warning options..." >&5
10604 echo "$as_me: checking for $CC warning options..." >&6;}
10605         cf_save_CXXFLAGS="$CXXFLAGS"
10606         EXTRA_CXXFLAGS="-Wall"
10607         for cf_opt in \
10608                 wd1419 \
10609                 wd1682 \
10610                 wd1683 \
10611                 wd1684 \
10612                 wd193 \
10613                 wd279 \
10614                 wd593 \
10615                 wd810 \
10616                 wd869 \
10617                 wd981
10618         do
10619                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10620                 if { (eval echo "$as_me:10620: \"$ac_compile\"") >&5
10621   (eval $ac_compile) 2>&5
10622   ac_status=$?
10623   echo "$as_me:10623: \$? = $ac_status" >&5
10624   (exit $ac_status); }; then
10625                         test -n "$verbose" && echo "$as_me:10625: result: ... -$cf_opt" >&5
10626 echo "${ECHO_T}... -$cf_opt" >&6
10627                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10628                 fi
10629         done
10630         CXXFLAGS="$cf_save_CXXFLAGS"
10631
10632 elif test "$GXX" = yes
10633 then
10634         { echo "$as_me:10634: checking for $CXX warning options..." >&5
10635 echo "$as_me: checking for $CXX warning options..." >&6;}
10636         cf_save_CXXFLAGS="$CXXFLAGS"
10637         EXTRA_CXXFLAGS="-W -Wall"
10638         cf_gxx_extra_warnings=""
10639         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10640         case "$GCC_VERSION" in
10641         [1-2].*)
10642                 ;;
10643         *)
10644                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10645                 ;;
10646         esac
10647         for cf_opt in \
10648                 Wabi \
10649                 fabi-version=0 \
10650                 Woverloaded-virtual \
10651                 Wsign-promo \
10652                 Wsynth \
10653                 Wold-style-cast \
10654                 Wcast-align \
10655                 Wcast-qual \
10656                 Wmissing-prototypes \
10657                 Wpointer-arith \
10658                 Wshadow \
10659                 Wstrict-prototypes \
10660                 Wundef $cf_gxx_extra_warnings Wno-unused
10661         do
10662                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10663                 if { (eval echo "$as_me:10663: \"$ac_compile\"") >&5
10664   (eval $ac_compile) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit $ac_status); }; then
10668                         test -n "$verbose" && echo "$as_me:10668: result: ... -$cf_opt" >&5
10669 echo "${ECHO_T}... -$cf_opt" >&6
10670                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10671                 else
10672                         test -n "$verbose" && echo "$as_me:10672: result: ... no -$cf_opt" >&5
10673 echo "${ECHO_T}... no -$cf_opt" >&6
10674                 fi
10675         done
10676         CXXFLAGS="$cf_save_CXXFLAGS"
10677 fi
10678
10679 rm -f conftest*
10680 ac_ext=c
10681 ac_cpp='$CPP $CPPFLAGS'
10682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10685 ac_main_return=return
10686
10687         fi
10688 fi
10689
10690 if test "$GCC" = yes
10691 then
10692 cat > conftest.i <<EOF
10693 #ifndef GCC_PRINTF
10694 #define GCC_PRINTF 0
10695 #endif
10696 #ifndef GCC_SCANF
10697 #define GCC_SCANF 0
10698 #endif
10699 #ifndef GCC_NORETURN
10700 #define GCC_NORETURN /* nothing */
10701 #endif
10702 #ifndef GCC_UNUSED
10703 #define GCC_UNUSED /* nothing */
10704 #endif
10705 EOF
10706 if test "$GCC" = yes
10707 then
10708         { echo "$as_me:10708: checking for $CC __attribute__ directives..." >&5
10709 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10710 cat > conftest.$ac_ext <<EOF
10711 #line 10711 "${as_me-configure}"
10712 #include "confdefs.h"
10713 #include "conftest.h"
10714 #include "conftest.i"
10715 #if     GCC_PRINTF
10716 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10717 #else
10718 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10719 #endif
10720 #if     GCC_SCANF
10721 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10722 #else
10723 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10724 #endif
10725 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10726 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10727 extern void foo(void) GCC_NORETURN;
10728 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10729 EOF
10730         for cf_attribute in scanf printf unused noreturn
10731         do
10732
10733 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10734
10735                 cf_directive="__attribute__(($cf_attribute))"
10736                 echo "checking for $CC $cf_directive" 1>&5
10737                 case $cf_attribute in
10738                 scanf|printf)
10739                 cat >conftest.h <<EOF
10740 #define GCC_$cf_ATTRIBUTE 1
10741 EOF
10742                         ;;
10743                 *)
10744                 cat >conftest.h <<EOF
10745 #define GCC_$cf_ATTRIBUTE $cf_directive
10746 EOF
10747                         ;;
10748                 esac
10749                 if { (eval echo "$as_me:10749: \"$ac_compile\"") >&5
10750   (eval $ac_compile) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit $ac_status); }; then
10754                         test -n "$verbose" && echo "$as_me:10754: result: ... $cf_attribute" >&5
10755 echo "${ECHO_T}... $cf_attribute" >&6
10756                         cat conftest.h >>confdefs.h
10757                 fi
10758         done
10759 else
10760         fgrep define conftest.i >>confdefs.h
10761 fi
10762 rm -rf conftest*
10763 fi
10764
10765 ###     use option --enable-assertions to turn on generation of assertion code
10766 echo "$as_me:10766: checking if you want to enable runtime assertions" >&5
10767 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10768
10769 # Check whether --enable-assertions or --disable-assertions was given.
10770 if test "${enable_assertions+set}" = set; then
10771   enableval="$enable_assertions"
10772   with_assertions=$enableval
10773 else
10774   with_assertions=no
10775 fi;
10776 echo "$as_me:10776: result: $with_assertions" >&5
10777 echo "${ECHO_T}$with_assertions" >&6
10778 if test -n "$GCC"
10779 then
10780         if test "$with_assertions" = no
10781         then
10782                 cat >>confdefs.h <<\EOF
10783 #define NDEBUG 1
10784 EOF
10785
10786                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10787         else
10788                 ADAFLAGS="$ADAFLAGS -gnata"
10789         fi
10790 fi
10791
10792 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10793
10794 echo "$as_me:10794: checking if you want to use dmalloc for testing" >&5
10795 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10796
10797 # Check whether --with-dmalloc or --without-dmalloc was given.
10798 if test "${with_dmalloc+set}" = set; then
10799   withval="$with_dmalloc"
10800   cat >>confdefs.h <<\EOF
10801 #define USE_DMALLOC 1
10802 EOF
10803
10804         : ${with_cflags:=-g}
10805         : ${with_no_leaks:=yes}
10806          with_dmalloc=yes
10807 else
10808   with_dmalloc=
10809 fi;
10810 echo "$as_me:10810: result: ${with_dmalloc:-no}" >&5
10811 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10812
10813 case .$with_cflags in #(vi
10814 .*-g*)
10815         case .$CFLAGS in #(vi
10816         .*-g*) #(vi
10817                 ;;
10818         *)
10819
10820 cf_fix_cppflags=no
10821 cf_new_cflags=
10822 cf_new_cppflags=
10823 cf_new_extra_cppflags=
10824
10825 for cf_add_cflags in -g
10826 do
10827 case $cf_fix_cppflags in
10828 no)
10829         case $cf_add_cflags in #(vi
10830         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10831                 case $cf_add_cflags in
10832                 -D*)
10833                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10834
10835                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10836                         && test -z "${cf_tst_cflags}" \
10837                         && cf_fix_cppflags=yes
10838
10839                         if test $cf_fix_cppflags = yes ; then
10840                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10841                                 continue
10842                         elif test "${cf_tst_cflags}" = "\"'" ; then
10843                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10844                                 continue
10845                         fi
10846                         ;;
10847                 esac
10848                 case "$CPPFLAGS" in
10849                 *$cf_add_cflags) #(vi
10850                         ;;
10851                 *) #(vi
10852                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10853                         ;;
10854                 esac
10855                 ;;
10856         *)
10857                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10858                 ;;
10859         esac
10860         ;;
10861 yes)
10862         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10863
10864         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10865
10866         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10867         && test -z "${cf_tst_cflags}" \
10868         && cf_fix_cppflags=no
10869         ;;
10870 esac
10871 done
10872
10873 if test -n "$cf_new_cflags" ; then
10874
10875         CFLAGS="$CFLAGS $cf_new_cflags"
10876 fi
10877
10878 if test -n "$cf_new_cppflags" ; then
10879
10880         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10881 fi
10882
10883 if test -n "$cf_new_extra_cppflags" ; then
10884
10885         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10886 fi
10887
10888                 ;;
10889         esac
10890         ;;
10891 esac
10892
10893 if test "$with_dmalloc" = yes ; then
10894         echo "$as_me:10894: checking for dmalloc.h" >&5
10895 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10896 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10897   echo $ECHO_N "(cached) $ECHO_C" >&6
10898 else
10899   cat >conftest.$ac_ext <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 #include <dmalloc.h>
10903 _ACEOF
10904 if { (eval echo "$as_me:10904: \"$ac_cpp conftest.$ac_ext\"") >&5
10905   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10906   ac_status=$?
10907   egrep -v '^ *\+' conftest.er1 >conftest.err
10908   rm -f conftest.er1
10909   cat conftest.err >&5
10910   echo "$as_me:10910: \$? = $ac_status" >&5
10911   (exit $ac_status); } >/dev/null; then
10912   if test -s conftest.err; then
10913     ac_cpp_err=$ac_c_preproc_warn_flag
10914   else
10915     ac_cpp_err=
10916   fi
10917 else
10918   ac_cpp_err=yes
10919 fi
10920 if test -z "$ac_cpp_err"; then
10921   ac_cv_header_dmalloc_h=yes
10922 else
10923   echo "$as_me: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   ac_cv_header_dmalloc_h=no
10926 fi
10927 rm -f conftest.err conftest.$ac_ext
10928 fi
10929 echo "$as_me:10929: result: $ac_cv_header_dmalloc_h" >&5
10930 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10931 if test $ac_cv_header_dmalloc_h = yes; then
10932
10933 echo "$as_me:10933: checking for dmalloc_debug in -ldmalloc" >&5
10934 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10935 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10936   echo $ECHO_N "(cached) $ECHO_C" >&6
10937 else
10938   ac_check_lib_save_LIBS=$LIBS
10939 LIBS="-ldmalloc  $LIBS"
10940 cat >conftest.$ac_ext <<_ACEOF
10941 #line 10941 "configure"
10942 #include "confdefs.h"
10943
10944 /* Override any gcc2 internal prototype to avoid an error.  */
10945 #ifdef __cplusplus
10946 extern "C"
10947 #endif
10948 /* We use char because int might match the return type of a gcc2
10949    builtin and then its argument prototype would still apply.  */
10950 char dmalloc_debug ();
10951 int
10952 main ()
10953 {
10954 dmalloc_debug ();
10955   ;
10956   return 0;
10957 }
10958 _ACEOF
10959 rm -f conftest.$ac_objext conftest$ac_exeext
10960 if { (eval echo "$as_me:10960: \"$ac_link\"") >&5
10961   (eval $ac_link) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit $ac_status); } &&
10965          { ac_try='test -s conftest$ac_exeext'
10966   { (eval echo "$as_me:10966: \"$ac_try\"") >&5
10967   (eval $ac_try) 2>&5
10968   ac_status=$?
10969   echo "$as_me:10969: \$? = $ac_status" >&5
10970   (exit $ac_status); }; }; then
10971   ac_cv_lib_dmalloc_dmalloc_debug=yes
10972 else
10973   echo "$as_me: failed program was:" >&5
10974 cat conftest.$ac_ext >&5
10975 ac_cv_lib_dmalloc_dmalloc_debug=no
10976 fi
10977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10978 LIBS=$ac_check_lib_save_LIBS
10979 fi
10980 echo "$as_me:10980: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10981 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10982 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10983   cat >>confdefs.h <<EOF
10984 #define HAVE_LIBDMALLOC 1
10985 EOF
10986
10987   LIBS="-ldmalloc $LIBS"
10988
10989 fi
10990
10991 fi
10992
10993 fi
10994
10995 echo "$as_me:10995: checking if you want to use dbmalloc for testing" >&5
10996 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10997
10998 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10999 if test "${with_dbmalloc+set}" = set; then
11000   withval="$with_dbmalloc"
11001   cat >>confdefs.h <<\EOF
11002 #define USE_DBMALLOC 1
11003 EOF
11004
11005         : ${with_cflags:=-g}
11006         : ${with_no_leaks:=yes}
11007          with_dbmalloc=yes
11008 else
11009   with_dbmalloc=
11010 fi;
11011 echo "$as_me:11011: result: ${with_dbmalloc:-no}" >&5
11012 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11013
11014 case .$with_cflags in #(vi
11015 .*-g*)
11016         case .$CFLAGS in #(vi
11017         .*-g*) #(vi
11018                 ;;
11019         *)
11020
11021 cf_fix_cppflags=no
11022 cf_new_cflags=
11023 cf_new_cppflags=
11024 cf_new_extra_cppflags=
11025
11026 for cf_add_cflags in -g
11027 do
11028 case $cf_fix_cppflags in
11029 no)
11030         case $cf_add_cflags in #(vi
11031         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11032                 case $cf_add_cflags in
11033                 -D*)
11034                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11035
11036                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11037                         && test -z "${cf_tst_cflags}" \
11038                         && cf_fix_cppflags=yes
11039
11040                         if test $cf_fix_cppflags = yes ; then
11041                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11042                                 continue
11043                         elif test "${cf_tst_cflags}" = "\"'" ; then
11044                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11045                                 continue
11046                         fi
11047                         ;;
11048                 esac
11049                 case "$CPPFLAGS" in
11050                 *$cf_add_cflags) #(vi
11051                         ;;
11052                 *) #(vi
11053                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11054                         ;;
11055                 esac
11056                 ;;
11057         *)
11058                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11059                 ;;
11060         esac
11061         ;;
11062 yes)
11063         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11064
11065         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11066
11067         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11068         && test -z "${cf_tst_cflags}" \
11069         && cf_fix_cppflags=no
11070         ;;
11071 esac
11072 done
11073
11074 if test -n "$cf_new_cflags" ; then
11075
11076         CFLAGS="$CFLAGS $cf_new_cflags"
11077 fi
11078
11079 if test -n "$cf_new_cppflags" ; then
11080
11081         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11082 fi
11083
11084 if test -n "$cf_new_extra_cppflags" ; then
11085
11086         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11087 fi
11088
11089                 ;;
11090         esac
11091         ;;
11092 esac
11093
11094 if test "$with_dbmalloc" = yes ; then
11095         echo "$as_me:11095: checking for dbmalloc.h" >&5
11096 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11097 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11098   echo $ECHO_N "(cached) $ECHO_C" >&6
11099 else
11100   cat >conftest.$ac_ext <<_ACEOF
11101 #line 11101 "configure"
11102 #include "confdefs.h"
11103 #include <dbmalloc.h>
11104 _ACEOF
11105 if { (eval echo "$as_me:11105: \"$ac_cpp conftest.$ac_ext\"") >&5
11106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11107   ac_status=$?
11108   egrep -v '^ *\+' conftest.er1 >conftest.err
11109   rm -f conftest.er1
11110   cat conftest.err >&5
11111   echo "$as_me:11111: \$? = $ac_status" >&5
11112   (exit $ac_status); } >/dev/null; then
11113   if test -s conftest.err; then
11114     ac_cpp_err=$ac_c_preproc_warn_flag
11115   else
11116     ac_cpp_err=
11117   fi
11118 else
11119   ac_cpp_err=yes
11120 fi
11121 if test -z "$ac_cpp_err"; then
11122   ac_cv_header_dbmalloc_h=yes
11123 else
11124   echo "$as_me: failed program was:" >&5
11125   cat conftest.$ac_ext >&5
11126   ac_cv_header_dbmalloc_h=no
11127 fi
11128 rm -f conftest.err conftest.$ac_ext
11129 fi
11130 echo "$as_me:11130: result: $ac_cv_header_dbmalloc_h" >&5
11131 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11132 if test $ac_cv_header_dbmalloc_h = yes; then
11133
11134 echo "$as_me:11134: checking for debug_malloc in -ldbmalloc" >&5
11135 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11136 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11137   echo $ECHO_N "(cached) $ECHO_C" >&6
11138 else
11139   ac_check_lib_save_LIBS=$LIBS
11140 LIBS="-ldbmalloc  $LIBS"
11141 cat >conftest.$ac_ext <<_ACEOF
11142 #line 11142 "configure"
11143 #include "confdefs.h"
11144
11145 /* Override any gcc2 internal prototype to avoid an error.  */
11146 #ifdef __cplusplus
11147 extern "C"
11148 #endif
11149 /* We use char because int might match the return type of a gcc2
11150    builtin and then its argument prototype would still apply.  */
11151 char debug_malloc ();
11152 int
11153 main ()
11154 {
11155 debug_malloc ();
11156   ;
11157   return 0;
11158 }
11159 _ACEOF
11160 rm -f conftest.$ac_objext conftest$ac_exeext
11161 if { (eval echo "$as_me:11161: \"$ac_link\"") >&5
11162   (eval $ac_link) 2>&5
11163   ac_status=$?
11164   echo "$as_me:11164: \$? = $ac_status" >&5
11165   (exit $ac_status); } &&
11166          { ac_try='test -s conftest$ac_exeext'
11167   { (eval echo "$as_me:11167: \"$ac_try\"") >&5
11168   (eval $ac_try) 2>&5
11169   ac_status=$?
11170   echo "$as_me:11170: \$? = $ac_status" >&5
11171   (exit $ac_status); }; }; then
11172   ac_cv_lib_dbmalloc_debug_malloc=yes
11173 else
11174   echo "$as_me: failed program was:" >&5
11175 cat conftest.$ac_ext >&5
11176 ac_cv_lib_dbmalloc_debug_malloc=no
11177 fi
11178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11179 LIBS=$ac_check_lib_save_LIBS
11180 fi
11181 echo "$as_me:11181: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11182 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11183 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11184   cat >>confdefs.h <<EOF
11185 #define HAVE_LIBDBMALLOC 1
11186 EOF
11187
11188   LIBS="-ldbmalloc $LIBS"
11189
11190 fi
11191
11192 fi
11193
11194 fi
11195
11196 echo "$as_me:11196: checking if you want to use valgrind for testing" >&5
11197 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11198
11199 # Check whether --with-valgrind or --without-valgrind was given.
11200 if test "${with_valgrind+set}" = set; then
11201   withval="$with_valgrind"
11202   cat >>confdefs.h <<\EOF
11203 #define USE_VALGRIND 1
11204 EOF
11205
11206         : ${with_cflags:=-g}
11207         : ${with_no_leaks:=yes}
11208          with_valgrind=yes
11209 else
11210   with_valgrind=
11211 fi;
11212 echo "$as_me:11212: result: ${with_valgrind:-no}" >&5
11213 echo "${ECHO_T}${with_valgrind:-no}" >&6
11214
11215 case .$with_cflags in #(vi
11216 .*-g*)
11217         case .$CFLAGS in #(vi
11218         .*-g*) #(vi
11219                 ;;
11220         *)
11221
11222 cf_fix_cppflags=no
11223 cf_new_cflags=
11224 cf_new_cppflags=
11225 cf_new_extra_cppflags=
11226
11227 for cf_add_cflags in -g
11228 do
11229 case $cf_fix_cppflags in
11230 no)
11231         case $cf_add_cflags in #(vi
11232         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11233                 case $cf_add_cflags in
11234                 -D*)
11235                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11236
11237                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11238                         && test -z "${cf_tst_cflags}" \
11239                         && cf_fix_cppflags=yes
11240
11241                         if test $cf_fix_cppflags = yes ; then
11242                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11243                                 continue
11244                         elif test "${cf_tst_cflags}" = "\"'" ; then
11245                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11246                                 continue
11247                         fi
11248                         ;;
11249                 esac
11250                 case "$CPPFLAGS" in
11251                 *$cf_add_cflags) #(vi
11252                         ;;
11253                 *) #(vi
11254                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11255                         ;;
11256                 esac
11257                 ;;
11258         *)
11259                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11260                 ;;
11261         esac
11262         ;;
11263 yes)
11264         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11265
11266         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11267
11268         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11269         && test -z "${cf_tst_cflags}" \
11270         && cf_fix_cppflags=no
11271         ;;
11272 esac
11273 done
11274
11275 if test -n "$cf_new_cflags" ; then
11276
11277         CFLAGS="$CFLAGS $cf_new_cflags"
11278 fi
11279
11280 if test -n "$cf_new_cppflags" ; then
11281
11282         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11283 fi
11284
11285 if test -n "$cf_new_extra_cppflags" ; then
11286
11287         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11288 fi
11289
11290                 ;;
11291         esac
11292         ;;
11293 esac
11294
11295 echo "$as_me:11295: checking if you want to perform memory-leak testing" >&5
11296 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11297
11298 # Check whether --enable-leaks or --disable-leaks was given.
11299 if test "${enable_leaks+set}" = set; then
11300   enableval="$enable_leaks"
11301   with_no_leaks=yes
11302 else
11303   : ${with_no_leaks:=no}
11304 fi;
11305 echo "$as_me:11305: result: $with_no_leaks" >&5
11306 echo "${ECHO_T}$with_no_leaks" >&6
11307
11308 if test "$with_no_leaks" = yes ; then
11309         cat >>confdefs.h <<\EOF
11310 #define NO_LEAKS 1
11311 EOF
11312
11313 fi
11314
11315 cat >>confdefs.h <<\EOF
11316 #define HAVE_NC_ALLOC_H 1
11317 EOF
11318
11319 ###     use option --enable-expanded to generate certain macros as functions
11320
11321 # Check whether --enable-expanded or --disable-expanded was given.
11322 if test "${enable_expanded+set}" = set; then
11323   enableval="$enable_expanded"
11324   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11325 #define NCURSES_EXPANDED 1
11326 EOF
11327
11328 fi;
11329
11330 ###     use option --disable-macros to suppress macros in favor of functions
11331
11332 # Check whether --enable-macros or --disable-macros was given.
11333 if test "${enable_macros+set}" = set; then
11334   enableval="$enable_macros"
11335   test "$enableval" = no && cat >>confdefs.h <<\EOF
11336 #define NCURSES_NOMACROS 1
11337 EOF
11338
11339 fi;
11340
11341 # Normally we only add trace() to the debug-library.  Allow this to be
11342 # extended to all models of the ncurses library:
11343 cf_all_traces=no
11344 case "$CFLAGS $CPPFLAGS" in
11345 *-DTRACE*)
11346         cf_all_traces=yes
11347         ;;
11348 esac
11349
11350 echo "$as_me:11350: checking whether to add trace feature to all models" >&5
11351 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11352
11353 # Check whether --with-trace or --without-trace was given.
11354 if test "${with_trace+set}" = set; then
11355   withval="$with_trace"
11356   cf_with_trace=$withval
11357 else
11358   cf_with_trace=$cf_all_traces
11359 fi;
11360 echo "$as_me:11360: result: $cf_with_trace" >&5
11361 echo "${ECHO_T}$cf_with_trace" >&6
11362
11363 if test "$cf_with_trace" = yes ; then
11364         LIB_TRACING=all
11365         ADA_TRACE=TRUE
11366
11367 cf_fix_cppflags=no
11368 cf_new_cflags=
11369 cf_new_cppflags=
11370 cf_new_extra_cppflags=
11371
11372 for cf_add_cflags in -DTRACE
11373 do
11374 case $cf_fix_cppflags in
11375 no)
11376         case $cf_add_cflags in #(vi
11377         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11378                 case $cf_add_cflags in
11379                 -D*)
11380                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11381
11382                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11383                         && test -z "${cf_tst_cflags}" \
11384                         && cf_fix_cppflags=yes
11385
11386                         if test $cf_fix_cppflags = yes ; then
11387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11388                                 continue
11389                         elif test "${cf_tst_cflags}" = "\"'" ; then
11390                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11391                                 continue
11392                         fi
11393                         ;;
11394                 esac
11395                 case "$CPPFLAGS" in
11396                 *$cf_add_cflags) #(vi
11397                         ;;
11398                 *) #(vi
11399                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11400                         ;;
11401                 esac
11402                 ;;
11403         *)
11404                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11405                 ;;
11406         esac
11407         ;;
11408 yes)
11409         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11410
11411         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11412
11413         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11414         && test -z "${cf_tst_cflags}" \
11415         && cf_fix_cppflags=no
11416         ;;
11417 esac
11418 done
11419
11420 if test -n "$cf_new_cflags" ; then
11421
11422         CFLAGS="$CFLAGS $cf_new_cflags"
11423 fi
11424
11425 if test -n "$cf_new_cppflags" ; then
11426
11427         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11428 fi
11429
11430 if test -n "$cf_new_extra_cppflags" ; then
11431
11432         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11433 fi
11434
11435 else
11436         LIB_TRACING=DEBUG
11437         ADA_TRACE=FALSE
11438 fi
11439
11440 ###     Checks for libraries.
11441 case $cf_cv_system_name in #(vi
11442 *mingw32*) #(vi
11443         ;;
11444 *)
11445 echo "$as_me:11445: checking for gettimeofday" >&5
11446 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11447 if test "${ac_cv_func_gettimeofday+set}" = set; then
11448   echo $ECHO_N "(cached) $ECHO_C" >&6
11449 else
11450   cat >conftest.$ac_ext <<_ACEOF
11451 #line 11451 "configure"
11452 #include "confdefs.h"
11453 /* System header to define __stub macros and hopefully few prototypes,
11454     which can conflict with char gettimeofday (); below.  */
11455 #include <assert.h>
11456 /* Override any gcc2 internal prototype to avoid an error.  */
11457 #ifdef __cplusplus
11458 extern "C"
11459 #endif
11460 /* We use char because int might match the return type of a gcc2
11461    builtin and then its argument prototype would still apply.  */
11462 char gettimeofday ();
11463 char (*f) ();
11464
11465 int
11466 main ()
11467 {
11468 /* The GNU C library defines this for functions which it implements
11469     to always fail with ENOSYS.  Some functions are actually named
11470     something starting with __ and the normal name is an alias.  */
11471 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11472 choke me
11473 #else
11474 f = gettimeofday;
11475 #endif
11476
11477   ;
11478   return 0;
11479 }
11480 _ACEOF
11481 rm -f conftest.$ac_objext conftest$ac_exeext
11482 if { (eval echo "$as_me:11482: \"$ac_link\"") >&5
11483   (eval $ac_link) 2>&5
11484   ac_status=$?
11485   echo "$as_me:11485: \$? = $ac_status" >&5
11486   (exit $ac_status); } &&
11487          { ac_try='test -s conftest$ac_exeext'
11488   { (eval echo "$as_me:11488: \"$ac_try\"") >&5
11489   (eval $ac_try) 2>&5
11490   ac_status=$?
11491   echo "$as_me:11491: \$? = $ac_status" >&5
11492   (exit $ac_status); }; }; then
11493   ac_cv_func_gettimeofday=yes
11494 else
11495   echo "$as_me: failed program was:" >&5
11496 cat conftest.$ac_ext >&5
11497 ac_cv_func_gettimeofday=no
11498 fi
11499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11500 fi
11501 echo "$as_me:11501: result: $ac_cv_func_gettimeofday" >&5
11502 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11503 if test $ac_cv_func_gettimeofday = yes; then
11504   cat >>confdefs.h <<\EOF
11505 #define HAVE_GETTIMEOFDAY 1
11506 EOF
11507
11508 else
11509
11510 echo "$as_me:11510: checking for gettimeofday in -lbsd" >&5
11511 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11512 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11513   echo $ECHO_N "(cached) $ECHO_C" >&6
11514 else
11515   ac_check_lib_save_LIBS=$LIBS
11516 LIBS="-lbsd  $LIBS"
11517 cat >conftest.$ac_ext <<_ACEOF
11518 #line 11518 "configure"
11519 #include "confdefs.h"
11520
11521 /* Override any gcc2 internal prototype to avoid an error.  */
11522 #ifdef __cplusplus
11523 extern "C"
11524 #endif
11525 /* We use char because int might match the return type of a gcc2
11526    builtin and then its argument prototype would still apply.  */
11527 char gettimeofday ();
11528 int
11529 main ()
11530 {
11531 gettimeofday ();
11532   ;
11533   return 0;
11534 }
11535 _ACEOF
11536 rm -f conftest.$ac_objext conftest$ac_exeext
11537 if { (eval echo "$as_me:11537: \"$ac_link\"") >&5
11538   (eval $ac_link) 2>&5
11539   ac_status=$?
11540   echo "$as_me:11540: \$? = $ac_status" >&5
11541   (exit $ac_status); } &&
11542          { ac_try='test -s conftest$ac_exeext'
11543   { (eval echo "$as_me:11543: \"$ac_try\"") >&5
11544   (eval $ac_try) 2>&5
11545   ac_status=$?
11546   echo "$as_me:11546: \$? = $ac_status" >&5
11547   (exit $ac_status); }; }; then
11548   ac_cv_lib_bsd_gettimeofday=yes
11549 else
11550   echo "$as_me: failed program was:" >&5
11551 cat conftest.$ac_ext >&5
11552 ac_cv_lib_bsd_gettimeofday=no
11553 fi
11554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11555 LIBS=$ac_check_lib_save_LIBS
11556 fi
11557 echo "$as_me:11557: result: $ac_cv_lib_bsd_gettimeofday" >&5
11558 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11559 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11560   cat >>confdefs.h <<\EOF
11561 #define HAVE_GETTIMEOFDAY 1
11562 EOF
11563
11564         LIBS="$LIBS -lbsd"
11565 fi
11566
11567 fi
11568         ;;
11569 esac
11570
11571 echo "$as_me:11571: checking if -lm needed for math functions" >&5
11572 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11573 if test "${cf_cv_need_libm+set}" = set; then
11574   echo $ECHO_N "(cached) $ECHO_C" >&6
11575 else
11576
11577         cat >conftest.$ac_ext <<_ACEOF
11578 #line 11578 "configure"
11579 #include "confdefs.h"
11580
11581         #include <stdio.h>
11582         #include <math.h>
11583
11584 int
11585 main ()
11586 {
11587 double x = rand(); printf("result = %g\n", sin(x))
11588   ;
11589   return 0;
11590 }
11591 _ACEOF
11592 rm -f conftest.$ac_objext conftest$ac_exeext
11593 if { (eval echo "$as_me:11593: \"$ac_link\"") >&5
11594   (eval $ac_link) 2>&5
11595   ac_status=$?
11596   echo "$as_me:11596: \$? = $ac_status" >&5
11597   (exit $ac_status); } &&
11598          { ac_try='test -s conftest$ac_exeext'
11599   { (eval echo "$as_me:11599: \"$ac_try\"") >&5
11600   (eval $ac_try) 2>&5
11601   ac_status=$?
11602   echo "$as_me:11602: \$? = $ac_status" >&5
11603   (exit $ac_status); }; }; then
11604   cf_cv_need_libm=no
11605 else
11606   echo "$as_me: failed program was:" >&5
11607 cat conftest.$ac_ext >&5
11608 cf_cv_need_libm=yes
11609 fi
11610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11611 fi
11612 echo "$as_me:11612: result: $cf_cv_need_libm" >&5
11613 echo "${ECHO_T}$cf_cv_need_libm" >&6
11614 if test "$cf_cv_need_libm" = yes
11615 then
11616 MATH_LIB=-lm
11617 fi
11618
11619 ###     Checks for header files.
11620 echo "$as_me:11620: checking for ANSI C header files" >&5
11621 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11622 if test "${ac_cv_header_stdc+set}" = set; then
11623   echo $ECHO_N "(cached) $ECHO_C" >&6
11624 else
11625   cat >conftest.$ac_ext <<_ACEOF
11626 #line 11626 "configure"
11627 #include "confdefs.h"
11628 #include <stdlib.h>
11629 #include <stdarg.h>
11630 #include <string.h>
11631 #include <float.h>
11632
11633 _ACEOF
11634 if { (eval echo "$as_me:11634: \"$ac_cpp conftest.$ac_ext\"") >&5
11635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11636   ac_status=$?
11637   egrep -v '^ *\+' conftest.er1 >conftest.err
11638   rm -f conftest.er1
11639   cat conftest.err >&5
11640   echo "$as_me:11640: \$? = $ac_status" >&5
11641   (exit $ac_status); } >/dev/null; then
11642   if test -s conftest.err; then
11643     ac_cpp_err=$ac_c_preproc_warn_flag
11644   else
11645     ac_cpp_err=
11646   fi
11647 else
11648   ac_cpp_err=yes
11649 fi
11650 if test -z "$ac_cpp_err"; then
11651   ac_cv_header_stdc=yes
11652 else
11653   echo "$as_me: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   ac_cv_header_stdc=no
11656 fi
11657 rm -f conftest.err conftest.$ac_ext
11658
11659 if test $ac_cv_header_stdc = yes; then
11660   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11661   cat >conftest.$ac_ext <<_ACEOF
11662 #line 11662 "configure"
11663 #include "confdefs.h"
11664 #include <string.h>
11665
11666 _ACEOF
11667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11668   egrep "memchr" >/dev/null 2>&1; then
11669   :
11670 else
11671   ac_cv_header_stdc=no
11672 fi
11673 rm -f conftest*
11674
11675 fi
11676
11677 if test $ac_cv_header_stdc = yes; then
11678   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11679   cat >conftest.$ac_ext <<_ACEOF
11680 #line 11680 "configure"
11681 #include "confdefs.h"
11682 #include <stdlib.h>
11683
11684 _ACEOF
11685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11686   egrep "free" >/dev/null 2>&1; then
11687   :
11688 else
11689   ac_cv_header_stdc=no
11690 fi
11691 rm -f conftest*
11692
11693 fi
11694
11695 if test $ac_cv_header_stdc = yes; then
11696   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11697   if test "$cross_compiling" = yes; then
11698   :
11699 else
11700   cat >conftest.$ac_ext <<_ACEOF
11701 #line 11701 "configure"
11702 #include "confdefs.h"
11703 #include <ctype.h>
11704 #if ((' ' & 0x0FF) == 0x020)
11705 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11706 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11707 #else
11708 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11709                      || ('j' <= (c) && (c) <= 'r') \
11710                      || ('s' <= (c) && (c) <= 'z'))
11711 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11712 #endif
11713
11714 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11715 int
11716 main ()
11717 {
11718   int i;
11719   for (i = 0; i < 256; i++)
11720     if (XOR (islower (i), ISLOWER (i))
11721         || toupper (i) != TOUPPER (i))
11722       $ac_main_return(2);
11723   $ac_main_return (0);
11724 }
11725 _ACEOF
11726 rm -f conftest$ac_exeext
11727 if { (eval echo "$as_me:11727: \"$ac_link\"") >&5
11728   (eval $ac_link) 2>&5
11729   ac_status=$?
11730   echo "$as_me:11730: \$? = $ac_status" >&5
11731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11732   { (eval echo "$as_me:11732: \"$ac_try\"") >&5
11733   (eval $ac_try) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit $ac_status); }; }; then
11737   :
11738 else
11739   echo "$as_me: program exited with status $ac_status" >&5
11740 echo "$as_me: failed program was:" >&5
11741 cat conftest.$ac_ext >&5
11742 ac_cv_header_stdc=no
11743 fi
11744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11745 fi
11746 fi
11747 fi
11748 echo "$as_me:11748: result: $ac_cv_header_stdc" >&5
11749 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11750 if test $ac_cv_header_stdc = yes; then
11751
11752 cat >>confdefs.h <<\EOF
11753 #define STDC_HEADERS 1
11754 EOF
11755
11756 fi
11757
11758 ac_header_dirent=no
11759 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11760   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11761 echo "$as_me:11761: checking for $ac_hdr that defines DIR" >&5
11762 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11763 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11764   echo $ECHO_N "(cached) $ECHO_C" >&6
11765 else
11766   cat >conftest.$ac_ext <<_ACEOF
11767 #line 11767 "configure"
11768 #include "confdefs.h"
11769 #include <sys/types.h>
11770 #include <$ac_hdr>
11771
11772 int
11773 main ()
11774 {
11775 if ((DIR *) 0)
11776 return 0;
11777   ;
11778   return 0;
11779 }
11780 _ACEOF
11781 rm -f conftest.$ac_objext
11782 if { (eval echo "$as_me:11782: \"$ac_compile\"") >&5
11783   (eval $ac_compile) 2>&5
11784   ac_status=$?
11785   echo "$as_me:11785: \$? = $ac_status" >&5
11786   (exit $ac_status); } &&
11787          { ac_try='test -s conftest.$ac_objext'
11788   { (eval echo "$as_me:11788: \"$ac_try\"") >&5
11789   (eval $ac_try) 2>&5
11790   ac_status=$?
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); }; }; then
11793   eval "$as_ac_Header=yes"
11794 else
11795   echo "$as_me: failed program was:" >&5
11796 cat conftest.$ac_ext >&5
11797 eval "$as_ac_Header=no"
11798 fi
11799 rm -f conftest.$ac_objext conftest.$ac_ext
11800 fi
11801 echo "$as_me:11801: result: `eval echo '${'$as_ac_Header'}'`" >&5
11802 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11803 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11804   cat >>confdefs.h <<EOF
11805 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11806 EOF
11807
11808 ac_header_dirent=$ac_hdr; break
11809 fi
11810
11811 done
11812 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11813 if test $ac_header_dirent = dirent.h; then
11814   echo "$as_me:11814: checking for opendir in -ldir" >&5
11815 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11816 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11817   echo $ECHO_N "(cached) $ECHO_C" >&6
11818 else
11819   ac_check_lib_save_LIBS=$LIBS
11820 LIBS="-ldir  $LIBS"
11821 cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824
11825 /* Override any gcc2 internal prototype to avoid an error.  */
11826 #ifdef __cplusplus
11827 extern "C"
11828 #endif
11829 /* We use char because int might match the return type of a gcc2
11830    builtin and then its argument prototype would still apply.  */
11831 char opendir ();
11832 int
11833 main ()
11834 {
11835 opendir ();
11836   ;
11837   return 0;
11838 }
11839 _ACEOF
11840 rm -f conftest.$ac_objext conftest$ac_exeext
11841 if { (eval echo "$as_me:11841: \"$ac_link\"") >&5
11842   (eval $ac_link) 2>&5
11843   ac_status=$?
11844   echo "$as_me:11844: \$? = $ac_status" >&5
11845   (exit $ac_status); } &&
11846          { ac_try='test -s conftest$ac_exeext'
11847   { (eval echo "$as_me:11847: \"$ac_try\"") >&5
11848   (eval $ac_try) 2>&5
11849   ac_status=$?
11850   echo "$as_me:11850: \$? = $ac_status" >&5
11851   (exit $ac_status); }; }; then
11852   ac_cv_lib_dir_opendir=yes
11853 else
11854   echo "$as_me: failed program was:" >&5
11855 cat conftest.$ac_ext >&5
11856 ac_cv_lib_dir_opendir=no
11857 fi
11858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11859 LIBS=$ac_check_lib_save_LIBS
11860 fi
11861 echo "$as_me:11861: result: $ac_cv_lib_dir_opendir" >&5
11862 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11863 if test $ac_cv_lib_dir_opendir = yes; then
11864   LIBS="$LIBS -ldir"
11865 fi
11866
11867 else
11868   echo "$as_me:11868: checking for opendir in -lx" >&5
11869 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11870 if test "${ac_cv_lib_x_opendir+set}" = set; then
11871   echo $ECHO_N "(cached) $ECHO_C" >&6
11872 else
11873   ac_check_lib_save_LIBS=$LIBS
11874 LIBS="-lx  $LIBS"
11875 cat >conftest.$ac_ext <<_ACEOF
11876 #line 11876 "configure"
11877 #include "confdefs.h"
11878
11879 /* Override any gcc2 internal prototype to avoid an error.  */
11880 #ifdef __cplusplus
11881 extern "C"
11882 #endif
11883 /* We use char because int might match the return type of a gcc2
11884    builtin and then its argument prototype would still apply.  */
11885 char opendir ();
11886 int
11887 main ()
11888 {
11889 opendir ();
11890   ;
11891   return 0;
11892 }
11893 _ACEOF
11894 rm -f conftest.$ac_objext conftest$ac_exeext
11895 if { (eval echo "$as_me:11895: \"$ac_link\"") >&5
11896   (eval $ac_link) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); } &&
11900          { ac_try='test -s conftest$ac_exeext'
11901   { (eval echo "$as_me:11901: \"$ac_try\"") >&5
11902   (eval $ac_try) 2>&5
11903   ac_status=$?
11904   echo "$as_me:11904: \$? = $ac_status" >&5
11905   (exit $ac_status); }; }; then
11906   ac_cv_lib_x_opendir=yes
11907 else
11908   echo "$as_me: failed program was:" >&5
11909 cat conftest.$ac_ext >&5
11910 ac_cv_lib_x_opendir=no
11911 fi
11912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11913 LIBS=$ac_check_lib_save_LIBS
11914 fi
11915 echo "$as_me:11915: result: $ac_cv_lib_x_opendir" >&5
11916 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11917 if test $ac_cv_lib_x_opendir = yes; then
11918   LIBS="$LIBS -lx"
11919 fi
11920
11921 fi
11922
11923 echo "$as_me:11923: checking whether time.h and sys/time.h may both be included" >&5
11924 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11925 if test "${ac_cv_header_time+set}" = set; then
11926   echo $ECHO_N "(cached) $ECHO_C" >&6
11927 else
11928   cat >conftest.$ac_ext <<_ACEOF
11929 #line 11929 "configure"
11930 #include "confdefs.h"
11931 #include <sys/types.h>
11932 #include <sys/time.h>
11933 #include <time.h>
11934
11935 int
11936 main ()
11937 {
11938 if ((struct tm *) 0)
11939 return 0;
11940   ;
11941   return 0;
11942 }
11943 _ACEOF
11944 rm -f conftest.$ac_objext
11945 if { (eval echo "$as_me:11945: \"$ac_compile\"") >&5
11946   (eval $ac_compile) 2>&5
11947   ac_status=$?
11948   echo "$as_me:11948: \$? = $ac_status" >&5
11949   (exit $ac_status); } &&
11950          { ac_try='test -s conftest.$ac_objext'
11951   { (eval echo "$as_me:11951: \"$ac_try\"") >&5
11952   (eval $ac_try) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); }; }; then
11956   ac_cv_header_time=yes
11957 else
11958   echo "$as_me: failed program was:" >&5
11959 cat conftest.$ac_ext >&5
11960 ac_cv_header_time=no
11961 fi
11962 rm -f conftest.$ac_objext conftest.$ac_ext
11963 fi
11964 echo "$as_me:11964: result: $ac_cv_header_time" >&5
11965 echo "${ECHO_T}$ac_cv_header_time" >&6
11966 if test $ac_cv_header_time = yes; then
11967
11968 cat >>confdefs.h <<\EOF
11969 #define TIME_WITH_SYS_TIME 1
11970 EOF
11971
11972 fi
11973
11974 echo "$as_me:11974: checking for regular-expression headers" >&5
11975 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11976 if test "${cf_cv_regex+set}" = set; then
11977   echo $ECHO_N "(cached) $ECHO_C" >&6
11978 else
11979
11980 cat >conftest.$ac_ext <<_ACEOF
11981 #line 11981 "configure"
11982 #include "confdefs.h"
11983 #include <sys/types.h>
11984 #include <regex.h>
11985 int
11986 main ()
11987 {
11988
11989         regex_t *p;
11990         int x = regcomp(p, "", 0);
11991         int y = regexec(p, "", 0, 0, 0);
11992         regfree(p);
11993
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext conftest$ac_exeext
11999 if { (eval echo "$as_me:11999: \"$ac_link\"") >&5
12000   (eval $ac_link) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest$ac_exeext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010   cf_cv_regex="regex.h"
12011 else
12012   echo "$as_me: failed program was:" >&5
12013 cat conftest.$ac_ext >&5
12014
12015         cat >conftest.$ac_ext <<_ACEOF
12016 #line 12016 "configure"
12017 #include "confdefs.h"
12018 #include <regexp.h>
12019 int
12020 main ()
12021 {
12022
12023                 char *p = compile("", "", "", 0);
12024                 int x = step("", "");
12025
12026   ;
12027   return 0;
12028 }
12029 _ACEOF
12030 rm -f conftest.$ac_objext conftest$ac_exeext
12031 if { (eval echo "$as_me:12031: \"$ac_link\"") >&5
12032   (eval $ac_link) 2>&5
12033   ac_status=$?
12034   echo "$as_me:12034: \$? = $ac_status" >&5
12035   (exit $ac_status); } &&
12036          { ac_try='test -s conftest$ac_exeext'
12037   { (eval echo "$as_me:12037: \"$ac_try\"") >&5
12038   (eval $ac_try) 2>&5
12039   ac_status=$?
12040   echo "$as_me:12040: \$? = $ac_status" >&5
12041   (exit $ac_status); }; }; then
12042   cf_cv_regex="regexp.h"
12043 else
12044   echo "$as_me: failed program was:" >&5
12045 cat conftest.$ac_ext >&5
12046
12047                 cf_save_LIBS="$LIBS"
12048                 LIBS="-lgen $LIBS"
12049                 cat >conftest.$ac_ext <<_ACEOF
12050 #line 12050 "configure"
12051 #include "confdefs.h"
12052 #include <regexpr.h>
12053 int
12054 main ()
12055 {
12056
12057                         char *p = compile("", "", "");
12058                         int x = step("", "");
12059
12060   ;
12061   return 0;
12062 }
12063 _ACEOF
12064 rm -f conftest.$ac_objext conftest$ac_exeext
12065 if { (eval echo "$as_me:12065: \"$ac_link\"") >&5
12066   (eval $ac_link) 2>&5
12067   ac_status=$?
12068   echo "$as_me:12068: \$? = $ac_status" >&5
12069   (exit $ac_status); } &&
12070          { ac_try='test -s conftest$ac_exeext'
12071   { (eval echo "$as_me:12071: \"$ac_try\"") >&5
12072   (eval $ac_try) 2>&5
12073   ac_status=$?
12074   echo "$as_me:12074: \$? = $ac_status" >&5
12075   (exit $ac_status); }; }; then
12076   cf_cv_regex="regexpr.h"
12077 else
12078   echo "$as_me: failed program was:" >&5
12079 cat conftest.$ac_ext >&5
12080 LIBS="$cf_save_LIBS"
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 fi
12086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12087
12088 fi
12089
12090 echo "$as_me:12090: result: $cf_cv_regex" >&5
12091 echo "${ECHO_T}$cf_cv_regex" >&6
12092 case $cf_cv_regex in
12093         regex.h)   cat >>confdefs.h <<\EOF
12094 #define HAVE_REGEX_H_FUNCS 1
12095 EOF
12096  ;;
12097         regexp.h)  cat >>confdefs.h <<\EOF
12098 #define HAVE_REGEXP_H_FUNCS 1
12099 EOF
12100  ;;
12101         regexpr.h) cat >>confdefs.h <<\EOF
12102 #define HAVE_REGEXPR_H_FUNCS 1
12103 EOF
12104  ;;
12105 esac
12106
12107 for ac_header in \
12108 fcntl.h \
12109 getopt.h \
12110 limits.h \
12111 locale.h \
12112 poll.h \
12113 sys/bsdtypes.h \
12114 sys/ioctl.h \
12115 sys/param.h \
12116 sys/poll.h \
12117 sys/select.h \
12118 sys/time.h \
12119 sys/times.h \
12120 ttyent.h \
12121 unistd.h \
12122 wctype.h \
12123
12124 do
12125 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12126 echo "$as_me:12126: checking for $ac_header" >&5
12127 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12128 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12129   echo $ECHO_N "(cached) $ECHO_C" >&6
12130 else
12131   cat >conftest.$ac_ext <<_ACEOF
12132 #line 12132 "configure"
12133 #include "confdefs.h"
12134 #include <$ac_header>
12135 _ACEOF
12136 if { (eval echo "$as_me:12136: \"$ac_cpp conftest.$ac_ext\"") >&5
12137   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12138   ac_status=$?
12139   egrep -v '^ *\+' conftest.er1 >conftest.err
12140   rm -f conftest.er1
12141   cat conftest.err >&5
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); } >/dev/null; then
12144   if test -s conftest.err; then
12145     ac_cpp_err=$ac_c_preproc_warn_flag
12146   else
12147     ac_cpp_err=
12148   fi
12149 else
12150   ac_cpp_err=yes
12151 fi
12152 if test -z "$ac_cpp_err"; then
12153   eval "$as_ac_Header=yes"
12154 else
12155   echo "$as_me: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   eval "$as_ac_Header=no"
12158 fi
12159 rm -f conftest.err conftest.$ac_ext
12160 fi
12161 echo "$as_me:12161: result: `eval echo '${'$as_ac_Header'}'`" >&5
12162 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12163 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12164   cat >>confdefs.h <<EOF
12165 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12166 EOF
12167
12168 fi
12169 done
12170
12171 # check for ISC (this may also define _POSIX_SOURCE)
12172 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12173 if test "$ISC" = yes ; then
12174
12175 echo "$as_me:12175: checking for main in -lcposix" >&5
12176 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12177 if test "${ac_cv_lib_cposix_main+set}" = set; then
12178   echo $ECHO_N "(cached) $ECHO_C" >&6
12179 else
12180   ac_check_lib_save_LIBS=$LIBS
12181 LIBS="-lcposix  $LIBS"
12182 cat >conftest.$ac_ext <<_ACEOF
12183 #line 12183 "configure"
12184 #include "confdefs.h"
12185
12186 int
12187 main ()
12188 {
12189 main ();
12190   ;
12191   return 0;
12192 }
12193 _ACEOF
12194 rm -f conftest.$ac_objext conftest$ac_exeext
12195 if { (eval echo "$as_me:12195: \"$ac_link\"") >&5
12196   (eval $ac_link) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); } &&
12200          { ac_try='test -s conftest$ac_exeext'
12201   { (eval echo "$as_me:12201: \"$ac_try\"") >&5
12202   (eval $ac_try) 2>&5
12203   ac_status=$?
12204   echo "$as_me:12204: \$? = $ac_status" >&5
12205   (exit $ac_status); }; }; then
12206   ac_cv_lib_cposix_main=yes
12207 else
12208   echo "$as_me: failed program was:" >&5
12209 cat conftest.$ac_ext >&5
12210 ac_cv_lib_cposix_main=no
12211 fi
12212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12213 LIBS=$ac_check_lib_save_LIBS
12214 fi
12215 echo "$as_me:12215: result: $ac_cv_lib_cposix_main" >&5
12216 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12217 if test $ac_cv_lib_cposix_main = yes; then
12218   cat >>confdefs.h <<EOF
12219 #define HAVE_LIBCPOSIX 1
12220 EOF
12221
12222   LIBS="-lcposix $LIBS"
12223
12224 fi
12225
12226         echo "$as_me:12226: checking for bzero in -linet" >&5
12227 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12228 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12229   echo $ECHO_N "(cached) $ECHO_C" >&6
12230 else
12231   ac_check_lib_save_LIBS=$LIBS
12232 LIBS="-linet  $LIBS"
12233 cat >conftest.$ac_ext <<_ACEOF
12234 #line 12234 "configure"
12235 #include "confdefs.h"
12236
12237 /* Override any gcc2 internal prototype to avoid an error.  */
12238 #ifdef __cplusplus
12239 extern "C"
12240 #endif
12241 /* We use char because int might match the return type of a gcc2
12242    builtin and then its argument prototype would still apply.  */
12243 char bzero ();
12244 int
12245 main ()
12246 {
12247 bzero ();
12248   ;
12249   return 0;
12250 }
12251 _ACEOF
12252 rm -f conftest.$ac_objext conftest$ac_exeext
12253 if { (eval echo "$as_me:12253: \"$ac_link\"") >&5
12254   (eval $ac_link) 2>&5
12255   ac_status=$?
12256   echo "$as_me:12256: \$? = $ac_status" >&5
12257   (exit $ac_status); } &&
12258          { ac_try='test -s conftest$ac_exeext'
12259   { (eval echo "$as_me:12259: \"$ac_try\"") >&5
12260   (eval $ac_try) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit $ac_status); }; }; then
12264   ac_cv_lib_inet_bzero=yes
12265 else
12266   echo "$as_me: failed program was:" >&5
12267 cat conftest.$ac_ext >&5
12268 ac_cv_lib_inet_bzero=no
12269 fi
12270 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12271 LIBS=$ac_check_lib_save_LIBS
12272 fi
12273 echo "$as_me:12273: result: $ac_cv_lib_inet_bzero" >&5
12274 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12275 if test $ac_cv_lib_inet_bzero = yes; then
12276   LIBS="$LIBS -linet"
12277 fi
12278 fi
12279
12280 echo "$as_me:12280: checking if sys/time.h works with sys/select.h" >&5
12281 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12282 if test "${cf_cv_sys_time_select+set}" = set; then
12283   echo $ECHO_N "(cached) $ECHO_C" >&6
12284 else
12285
12286 cat >conftest.$ac_ext <<_ACEOF
12287 #line 12287 "configure"
12288 #include "confdefs.h"
12289
12290 #include <sys/types.h>
12291 #ifdef HAVE_SYS_TIME_H
12292 #include <sys/time.h>
12293 #endif
12294 #ifdef HAVE_SYS_SELECT_H
12295 #include <sys/select.h>
12296 #endif
12297
12298 int
12299 main ()
12300 {
12301
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 rm -f conftest.$ac_objext
12307 if { (eval echo "$as_me:12307: \"$ac_compile\"") >&5
12308   (eval $ac_compile) 2>&5
12309   ac_status=$?
12310   echo "$as_me:12310: \$? = $ac_status" >&5
12311   (exit $ac_status); } &&
12312          { ac_try='test -s conftest.$ac_objext'
12313   { (eval echo "$as_me:12313: \"$ac_try\"") >&5
12314   (eval $ac_try) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); }; }; then
12318   cf_cv_sys_time_select=yes
12319 else
12320   echo "$as_me: failed program was:" >&5
12321 cat conftest.$ac_ext >&5
12322 cf_cv_sys_time_select=no
12323 fi
12324 rm -f conftest.$ac_objext conftest.$ac_ext
12325
12326 fi
12327
12328 echo "$as_me:12328: result: $cf_cv_sys_time_select" >&5
12329 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12330 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12331 #define HAVE_SYS_TIME_SELECT 1
12332 EOF
12333
12334 ###     checks for compiler characteristics
12335 ac_ext=c
12336 ac_cpp='$CPP $CPPFLAGS'
12337 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12338 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12339 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12340 ac_main_return=return
12341
12342 echo "$as_me:12342: checking for $CC option to accept ANSI C" >&5
12343 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12344 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12345   echo $ECHO_N "(cached) $ECHO_C" >&6
12346 else
12347   ac_cv_prog_cc_stdc=no
12348 ac_save_CC=$CC
12349 cat >conftest.$ac_ext <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352 #include <stdarg.h>
12353 #include <stdio.h>
12354 #include <sys/types.h>
12355 #include <sys/stat.h>
12356 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12357 struct buf { int x; };
12358 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12359 static char *e (p, i)
12360      char **p;
12361      int i;
12362 {
12363   return p[i];
12364 }
12365 static char *f (char * (*g) (char **, int), char **p, ...)
12366 {
12367   char *s;
12368   va_list v;
12369   va_start (v,p);
12370   s = g (p, va_arg (v,int));
12371   va_end (v);
12372   return s;
12373 }
12374 int test (int i, double x);
12375 struct s1 {int (*f) (int a);};
12376 struct s2 {int (*f) (double a);};
12377 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12378 int argc;
12379 char **argv;
12380 int
12381 main ()
12382 {
12383 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12384   ;
12385   return 0;
12386 }
12387 _ACEOF
12388 # Don't try gcc -ansi; that turns off useful extensions and
12389 # breaks some systems' header files.
12390 # AIX                   -qlanglvl=ansi
12391 # Ultrix and OSF/1      -std1
12392 # HP-UX 10.20 and later -Ae
12393 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12394 # SVR4                  -Xc -D__EXTENSIONS__
12395 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12396 do
12397   CC="$ac_save_CC $ac_arg"
12398   rm -f conftest.$ac_objext
12399 if { (eval echo "$as_me:12399: \"$ac_compile\"") >&5
12400   (eval $ac_compile) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); } &&
12404          { ac_try='test -s conftest.$ac_objext'
12405   { (eval echo "$as_me:12405: \"$ac_try\"") >&5
12406   (eval $ac_try) 2>&5
12407   ac_status=$?
12408   echo "$as_me:12408: \$? = $ac_status" >&5
12409   (exit $ac_status); }; }; then
12410   ac_cv_prog_cc_stdc=$ac_arg
12411 break
12412 else
12413   echo "$as_me: failed program was:" >&5
12414 cat conftest.$ac_ext >&5
12415 fi
12416 rm -f conftest.$ac_objext
12417 done
12418 rm -f conftest.$ac_ext conftest.$ac_objext
12419 CC=$ac_save_CC
12420
12421 fi
12422
12423 case "x$ac_cv_prog_cc_stdc" in
12424   x|xno)
12425     echo "$as_me:12425: result: none needed" >&5
12426 echo "${ECHO_T}none needed" >&6 ;;
12427   *)
12428     echo "$as_me:12428: result: $ac_cv_prog_cc_stdc" >&5
12429 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12430     CC="$CC $ac_cv_prog_cc_stdc" ;;
12431 esac
12432
12433 echo "$as_me:12433: checking for an ANSI C-conforming const" >&5
12434 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12435 if test "${ac_cv_c_const+set}" = set; then
12436   echo $ECHO_N "(cached) $ECHO_C" >&6
12437 else
12438   cat >conftest.$ac_ext <<_ACEOF
12439 #line 12439 "configure"
12440 #include "confdefs.h"
12441
12442 int
12443 main ()
12444 {
12445 /* FIXME: Include the comments suggested by Paul. */
12446 #ifndef __cplusplus
12447   /* Ultrix mips cc rejects this.  */
12448   typedef int charset[2];
12449   const charset x;
12450   /* SunOS 4.1.1 cc rejects this.  */
12451   char const *const *ccp;
12452   char **p;
12453   /* NEC SVR4.0.2 mips cc rejects this.  */
12454   struct point {int x, y;};
12455   static struct point const zero = {0,0};
12456   /* AIX XL C 1.02.0.0 rejects this.
12457      It does not let you subtract one const X* pointer from another in
12458      an arm of an if-expression whose if-part is not a constant
12459      expression */
12460   const char *g = "string";
12461   ccp = &g + (g ? g-g : 0);
12462   /* HPUX 7.0 cc rejects these. */
12463   ++ccp;
12464   p = (char**) ccp;
12465   ccp = (char const *const *) p;
12466   { /* SCO 3.2v4 cc rejects this.  */
12467     char *t;
12468     char const *s = 0 ? (char *) 0 : (char const *) 0;
12469
12470     *t++ = 0;
12471   }
12472   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12473     int x[] = {25, 17};
12474     const int *foo = &x[0];
12475     ++foo;
12476   }
12477   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12478     typedef const int *iptr;
12479     iptr p = 0;
12480     ++p;
12481   }
12482   { /* AIX XL C 1.02.0.0 rejects this saying
12483        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12484     struct s { int j; const int *ap[3]; };
12485     struct s *b; b->j = 5;
12486   }
12487   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12488     const int foo = 10;
12489   }
12490 #endif
12491
12492   ;
12493   return 0;
12494 }
12495 _ACEOF
12496 rm -f conftest.$ac_objext
12497 if { (eval echo "$as_me:12497: \"$ac_compile\"") >&5
12498   (eval $ac_compile) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); } &&
12502          { ac_try='test -s conftest.$ac_objext'
12503   { (eval echo "$as_me:12503: \"$ac_try\"") >&5
12504   (eval $ac_try) 2>&5
12505   ac_status=$?
12506   echo "$as_me:12506: \$? = $ac_status" >&5
12507   (exit $ac_status); }; }; then
12508   ac_cv_c_const=yes
12509 else
12510   echo "$as_me: failed program was:" >&5
12511 cat conftest.$ac_ext >&5
12512 ac_cv_c_const=no
12513 fi
12514 rm -f conftest.$ac_objext conftest.$ac_ext
12515 fi
12516 echo "$as_me:12516: result: $ac_cv_c_const" >&5
12517 echo "${ECHO_T}$ac_cv_c_const" >&6
12518 if test $ac_cv_c_const = no; then
12519
12520 cat >>confdefs.h <<\EOF
12521 #define const
12522 EOF
12523
12524 fi
12525
12526 echo "$as_me:12526: checking for inline" >&5
12527 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12528 if test "${ac_cv_c_inline+set}" = set; then
12529   echo $ECHO_N "(cached) $ECHO_C" >&6
12530 else
12531   ac_cv_c_inline=no
12532 for ac_kw in inline __inline__ __inline; do
12533   cat >conftest.$ac_ext <<_ACEOF
12534 #line 12534 "configure"
12535 #include "confdefs.h"
12536 #ifndef __cplusplus
12537 static $ac_kw int static_foo () {return 0; }
12538 $ac_kw int foo () {return 0; }
12539 #endif
12540
12541 _ACEOF
12542 rm -f conftest.$ac_objext
12543 if { (eval echo "$as_me:12543: \"$ac_compile\"") >&5
12544   (eval $ac_compile) 2>&5
12545   ac_status=$?
12546   echo "$as_me:12546: \$? = $ac_status" >&5
12547   (exit $ac_status); } &&
12548          { ac_try='test -s conftest.$ac_objext'
12549   { (eval echo "$as_me:12549: \"$ac_try\"") >&5
12550   (eval $ac_try) 2>&5
12551   ac_status=$?
12552   echo "$as_me:12552: \$? = $ac_status" >&5
12553   (exit $ac_status); }; }; then
12554   ac_cv_c_inline=$ac_kw; break
12555 else
12556   echo "$as_me: failed program was:" >&5
12557 cat conftest.$ac_ext >&5
12558 fi
12559 rm -f conftest.$ac_objext conftest.$ac_ext
12560 done
12561
12562 fi
12563 echo "$as_me:12563: result: $ac_cv_c_inline" >&5
12564 echo "${ECHO_T}$ac_cv_c_inline" >&6
12565 case $ac_cv_c_inline in
12566   inline | yes) ;;
12567   no)
12568 cat >>confdefs.h <<\EOF
12569 #define inline
12570 EOF
12571  ;;
12572   *)  cat >>confdefs.h <<EOF
12573 #define inline $ac_cv_c_inline
12574 EOF
12575  ;;
12576 esac
12577
12578 NCURSES_INLINE=
12579 if test "$ac_cv_c_inline" != no ; then
12580   NCURSES_INLINE=inline
12581   if test "$INTEL_COMPILER" = yes
12582   then
12583     :
12584   elif test "$GCC" = yes
12585   then
12586     echo "$as_me:12586: checking if gcc supports options to tune inlining" >&5
12587 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12588 if test "${cf_cv_gcc_inline+set}" = set; then
12589   echo $ECHO_N "(cached) $ECHO_C" >&6
12590 else
12591
12592       cf_save_CFLAGS=$CFLAGS
12593       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12594       cat >conftest.$ac_ext <<_ACEOF
12595 #line 12595 "configure"
12596 #include "confdefs.h"
12597 inline int foo(void) { return 1; }
12598 int
12599 main ()
12600 {
12601 ${cf_cv_main_return:-return} foo()
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f conftest.$ac_objext
12607 if { (eval echo "$as_me:12607: \"$ac_compile\"") >&5
12608   (eval $ac_compile) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit $ac_status); } &&
12612          { ac_try='test -s conftest.$ac_objext'
12613   { (eval echo "$as_me:12613: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:12616: \$? = $ac_status" >&5
12617   (exit $ac_status); }; }; then
12618   cf_cv_gcc_inline=yes
12619 else
12620   echo "$as_me: failed program was:" >&5
12621 cat conftest.$ac_ext >&5
12622 cf_cv_gcc_inline=no
12623 fi
12624 rm -f conftest.$ac_objext conftest.$ac_ext
12625       CFLAGS=$cf_save_CFLAGS
12626
12627 fi
12628 echo "$as_me:12628: result: $cf_cv_gcc_inline" >&5
12629 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12630     if test "$cf_cv_gcc_inline" = yes ; then
12631
12632 cf_fix_cppflags=no
12633 cf_new_cflags=
12634 cf_new_cppflags=
12635 cf_new_extra_cppflags=
12636
12637 for cf_add_cflags in --param max-inline-insns-single=1200
12638 do
12639 case $cf_fix_cppflags in
12640 no)
12641         case $cf_add_cflags in #(vi
12642         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12643                 case $cf_add_cflags in
12644                 -D*)
12645                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12646
12647                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12648                         && test -z "${cf_tst_cflags}" \
12649                         && cf_fix_cppflags=yes
12650
12651                         if test $cf_fix_cppflags = yes ; then
12652                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12653                                 continue
12654                         elif test "${cf_tst_cflags}" = "\"'" ; then
12655                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12656                                 continue
12657                         fi
12658                         ;;
12659                 esac
12660                 case "$CPPFLAGS" in
12661                 *$cf_add_cflags) #(vi
12662                         ;;
12663                 *) #(vi
12664                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12665                         ;;
12666                 esac
12667                 ;;
12668         *)
12669                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12670                 ;;
12671         esac
12672         ;;
12673 yes)
12674         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12675
12676         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12677
12678         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12679         && test -z "${cf_tst_cflags}" \
12680         && cf_fix_cppflags=no
12681         ;;
12682 esac
12683 done
12684
12685 if test -n "$cf_new_cflags" ; then
12686
12687         CFLAGS="$CFLAGS $cf_new_cflags"
12688 fi
12689
12690 if test -n "$cf_new_cppflags" ; then
12691
12692         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12693 fi
12694
12695 if test -n "$cf_new_extra_cppflags" ; then
12696
12697         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12698 fi
12699
12700     fi
12701   fi
12702 fi
12703
12704 echo "$as_me:12704: checking for signal global datatype" >&5
12705 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12706 if test "${cf_cv_sig_atomic_t+set}" = set; then
12707   echo $ECHO_N "(cached) $ECHO_C" >&6
12708 else
12709
12710         for cf_type in \
12711                 "volatile sig_atomic_t" \
12712                 "sig_atomic_t" \
12713                 "int"
12714         do
12715         cat >conftest.$ac_ext <<_ACEOF
12716 #line 12716 "configure"
12717 #include "confdefs.h"
12718
12719 #include <sys/types.h>
12720 #include <signal.h>
12721 #include <stdio.h>
12722
12723 extern $cf_type x;
12724 $cf_type x;
12725 static void handler(int sig)
12726 {
12727         x = 5;
12728 }
12729 int
12730 main ()
12731 {
12732 signal(SIGINT, handler);
12733                  x = 1
12734   ;
12735   return 0;
12736 }
12737 _ACEOF
12738 rm -f conftest.$ac_objext
12739 if { (eval echo "$as_me:12739: \"$ac_compile\"") >&5
12740   (eval $ac_compile) 2>&5
12741   ac_status=$?
12742   echo "$as_me:12742: \$? = $ac_status" >&5
12743   (exit $ac_status); } &&
12744          { ac_try='test -s conftest.$ac_objext'
12745   { (eval echo "$as_me:12745: \"$ac_try\"") >&5
12746   (eval $ac_try) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); }; }; then
12750   cf_cv_sig_atomic_t=$cf_type
12751 else
12752   echo "$as_me: failed program was:" >&5
12753 cat conftest.$ac_ext >&5
12754 cf_cv_sig_atomic_t=no
12755 fi
12756 rm -f conftest.$ac_objext conftest.$ac_ext
12757                 test "$cf_cv_sig_atomic_t" != no && break
12758         done
12759
12760 fi
12761
12762 echo "$as_me:12762: result: $cf_cv_sig_atomic_t" >&5
12763 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12764 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12765 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12766 EOF
12767
12768 if test $NCURSES_CHTYPE = auto ; then
12769
12770 echo "$as_me:12770: checking for type of chtype" >&5
12771 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12772 if test "${cf_cv_typeof_chtype+set}" = set; then
12773   echo $ECHO_N "(cached) $ECHO_C" >&6
12774 else
12775
12776                 if test "$cross_compiling" = yes; then
12777   cf_cv_typeof_chtype=long
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782
12783 #define WANT_BITS 31
12784 #include <stdio.h>
12785 int main()
12786 {
12787         FILE *fp = fopen("cf_test.out", "w");
12788         if (fp != 0) {
12789                 char *result = "long";
12790                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12791                         int n;
12792                         unsigned int x, y;
12793                         for (n = 0; n < WANT_BITS; n++) {
12794                                 x = (1 << n);
12795                                 y = (x >> n);
12796                                 if (y != 1 || x == 0) {
12797                                         x = 0;
12798                                         break;
12799                                 }
12800                         }
12801                         /*
12802                          * If x is nonzero, an int is big enough for the bits
12803                          * that we want.
12804                          */
12805                         result = (x != 0) ? "int" : "long";
12806                 }
12807                 fputs(result, fp);
12808                 fclose(fp);
12809         }
12810         ${cf_cv_main_return:-return}(0);
12811 }
12812
12813 _ACEOF
12814 rm -f conftest$ac_exeext
12815 if { (eval echo "$as_me:12815: \"$ac_link\"") >&5
12816   (eval $ac_link) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   cf_cv_typeof_chtype=`cat cf_test.out`
12826 else
12827   echo "$as_me: program exited with status $ac_status" >&5
12828 echo "$as_me: failed program was:" >&5
12829 cat conftest.$ac_ext >&5
12830 cf_cv_typeof_chtype=long
12831 fi
12832 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12833 fi
12834                 rm -f cf_test.out
12835
12836 fi
12837
12838 echo "$as_me:12838: result: $cf_cv_typeof_chtype" >&5
12839 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12840
12841 cat >>confdefs.h <<EOF
12842 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12843 EOF
12844
12845 else
12846         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12847 fi
12848 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12849
12850 echo "$as_me:12850: checking if unsigned literals are legal" >&5
12851 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12852 if test "${cf_cv_unsigned_literals+set}" = set; then
12853   echo $ECHO_N "(cached) $ECHO_C" >&6
12854 else
12855
12856         cat >conftest.$ac_ext <<_ACEOF
12857 #line 12857 "configure"
12858 #include "confdefs.h"
12859
12860 int
12861 main ()
12862 {
12863 long x = 1L + 1UL + 1U + 1
12864   ;
12865   return 0;
12866 }
12867 _ACEOF
12868 rm -f conftest.$ac_objext
12869 if { (eval echo "$as_me:12869: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit $ac_status); } &&
12874          { ac_try='test -s conftest.$ac_objext'
12875   { (eval echo "$as_me:12875: \"$ac_try\"") >&5
12876   (eval $ac_try) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit $ac_status); }; }; then
12880   cf_cv_unsigned_literals=yes
12881 else
12882   echo "$as_me: failed program was:" >&5
12883 cat conftest.$ac_ext >&5
12884 cf_cv_unsigned_literals=no
12885 fi
12886 rm -f conftest.$ac_objext conftest.$ac_ext
12887
12888 fi
12889
12890 echo "$as_me:12890: result: $cf_cv_unsigned_literals" >&5
12891 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12892
12893 cf_cv_1UL="1"
12894 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12895 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12896
12897 if test $NCURSES_MMASK_T = auto ; then
12898         cf_cv_typeof_mmask_t=long
12899 else
12900         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12901 fi
12902 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12903
12904 ###     Checks for external-data
12905
12906 echo "$as_me:12906: checking if external errno is declared" >&5
12907 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12908 if test "${cf_cv_dcl_errno+set}" = set; then
12909   echo $ECHO_N "(cached) $ECHO_C" >&6
12910 else
12911
12912     cat >conftest.$ac_ext <<_ACEOF
12913 #line 12913 "configure"
12914 #include "confdefs.h"
12915
12916 #ifdef HAVE_STDLIB_H
12917 #include <stdlib.h>
12918 #endif
12919 #include <stdio.h>
12920 #include <sys/types.h>
12921 #include <errno.h>
12922 int
12923 main ()
12924 {
12925 int x = (int) errno
12926   ;
12927   return 0;
12928 }
12929 _ACEOF
12930 rm -f conftest.$ac_objext
12931 if { (eval echo "$as_me:12931: \"$ac_compile\"") >&5
12932   (eval $ac_compile) 2>&5
12933   ac_status=$?
12934   echo "$as_me:12934: \$? = $ac_status" >&5
12935   (exit $ac_status); } &&
12936          { ac_try='test -s conftest.$ac_objext'
12937   { (eval echo "$as_me:12937: \"$ac_try\"") >&5
12938   (eval $ac_try) 2>&5
12939   ac_status=$?
12940   echo "$as_me:12940: \$? = $ac_status" >&5
12941   (exit $ac_status); }; }; then
12942   cf_cv_dcl_errno=yes
12943 else
12944   echo "$as_me: failed program was:" >&5
12945 cat conftest.$ac_ext >&5
12946 cf_cv_dcl_errno=no
12947 fi
12948 rm -f conftest.$ac_objext conftest.$ac_ext
12949
12950 fi
12951 echo "$as_me:12951: result: $cf_cv_dcl_errno" >&5
12952 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12953
12954 if test "$cf_cv_dcl_errno" = no ; then
12955
12956 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12957
12958     cat >>confdefs.h <<EOF
12959 #define $cf_result 1
12960 EOF
12961
12962 fi
12963
12964 # It's possible (for near-UNIX clones) that the data doesn't exist
12965
12966 echo "$as_me:12966: checking if external errno exists" >&5
12967 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12968 if test "${cf_cv_have_errno+set}" = set; then
12969   echo $ECHO_N "(cached) $ECHO_C" >&6
12970 else
12971
12972     cat >conftest.$ac_ext <<_ACEOF
12973 #line 12973 "configure"
12974 #include "confdefs.h"
12975
12976 #undef errno
12977 extern int errno;
12978
12979 int
12980 main ()
12981 {
12982 errno = 2
12983   ;
12984   return 0;
12985 }
12986 _ACEOF
12987 rm -f conftest.$ac_objext conftest$ac_exeext
12988 if { (eval echo "$as_me:12988: \"$ac_link\"") >&5
12989   (eval $ac_link) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit $ac_status); } &&
12993          { ac_try='test -s conftest$ac_exeext'
12994   { (eval echo "$as_me:12994: \"$ac_try\"") >&5
12995   (eval $ac_try) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); }; }; then
12999   cf_cv_have_errno=yes
13000 else
13001   echo "$as_me: failed program was:" >&5
13002 cat conftest.$ac_ext >&5
13003 cf_cv_have_errno=no
13004 fi
13005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13006
13007 fi
13008 echo "$as_me:13008: result: $cf_cv_have_errno" >&5
13009 echo "${ECHO_T}$cf_cv_have_errno" >&6
13010
13011 if test "$cf_cv_have_errno" = yes ; then
13012
13013 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13014
13015     cat >>confdefs.h <<EOF
13016 #define $cf_result 1
13017 EOF
13018
13019 fi
13020
13021 echo "$as_me:13021: checking if data-only library module links" >&5
13022 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13023 if test "${cf_cv_link_dataonly+set}" = set; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026
13027         rm -f conftest.a
13028         cat >conftest.$ac_ext <<EOF
13029 #line 13029 "configure"
13030 int     testdata[3] = { 123, 456, 789 };
13031 EOF
13032         if { (eval echo "$as_me:13032: \"$ac_compile\"") >&5
13033   (eval $ac_compile) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); } ; then
13037                 mv conftest.o data.o && \
13038                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13039         fi
13040         rm -f conftest.$ac_ext data.o
13041         cat >conftest.$ac_ext <<EOF
13042 #line 13042 "configure"
13043 int     testfunc()
13044 {
13045 #if defined(NeXT)
13046         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13047 #else
13048         extern int testdata[3];
13049         return testdata[0] == 123
13050            &&  testdata[1] == 456
13051            &&  testdata[2] == 789;
13052 #endif
13053 }
13054 EOF
13055         if { (eval echo "$as_me:13055: \"$ac_compile\"") >&5
13056   (eval $ac_compile) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); }; then
13060                 mv conftest.o func.o && \
13061                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13062         fi
13063         rm -f conftest.$ac_ext func.o
13064         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13065         cf_saveLIBS="$LIBS"
13066         LIBS="conftest.a $LIBS"
13067         if test "$cross_compiling" = yes; then
13068   cf_cv_link_dataonly=unknown
13069 else
13070   cat >conftest.$ac_ext <<_ACEOF
13071 #line 13071 "configure"
13072 #include "confdefs.h"
13073
13074         int main()
13075         {
13076                 extern int testfunc();
13077                 ${cf_cv_main_return:-return} (!testfunc());
13078         }
13079
13080 _ACEOF
13081 rm -f conftest$ac_exeext
13082 if { (eval echo "$as_me:13082: \"$ac_link\"") >&5
13083   (eval $ac_link) 2>&5
13084   ac_status=$?
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13087   { (eval echo "$as_me:13087: \"$ac_try\"") >&5
13088   (eval $ac_try) 2>&5
13089   ac_status=$?
13090   echo "$as_me:13090: \$? = $ac_status" >&5
13091   (exit $ac_status); }; }; then
13092   cf_cv_link_dataonly=yes
13093 else
13094   echo "$as_me: program exited with status $ac_status" >&5
13095 echo "$as_me: failed program was:" >&5
13096 cat conftest.$ac_ext >&5
13097 cf_cv_link_dataonly=no
13098 fi
13099 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13100 fi
13101         LIBS="$cf_saveLIBS"
13102
13103 fi
13104
13105 echo "$as_me:13105: result: $cf_cv_link_dataonly" >&5
13106 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13107
13108 if test "$cf_cv_link_dataonly" = no ; then
13109         cat >>confdefs.h <<\EOF
13110 #define BROKEN_LINKER 1
13111 EOF
13112
13113         BROKEN_LINKER=1
13114 fi
13115
13116 ###     Checks for library functions.
13117
13118 for ac_func in \
13119 getcwd \
13120 getegid \
13121 geteuid \
13122 getttynam \
13123 issetugid \
13124 poll \
13125 remove \
13126 select \
13127 setbuf \
13128 setbuffer \
13129 setvbuf \
13130 sigaction \
13131 sigvec \
13132 strdup \
13133 strstr \
13134 tcgetpgrp \
13135 times \
13136 vsnprintf \
13137
13138 do
13139 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13140 echo "$as_me:13140: checking for $ac_func" >&5
13141 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13142 if eval "test \"\${$as_ac_var+set}\" = set"; then
13143   echo $ECHO_N "(cached) $ECHO_C" >&6
13144 else
13145   cat >conftest.$ac_ext <<_ACEOF
13146 #line 13146 "configure"
13147 #include "confdefs.h"
13148 /* System header to define __stub macros and hopefully few prototypes,
13149     which can conflict with char $ac_func (); below.  */
13150 #include <assert.h>
13151 /* Override any gcc2 internal prototype to avoid an error.  */
13152 #ifdef __cplusplus
13153 extern "C"
13154 #endif
13155 /* We use char because int might match the return type of a gcc2
13156    builtin and then its argument prototype would still apply.  */
13157 char $ac_func ();
13158 char (*f) ();
13159
13160 int
13161 main ()
13162 {
13163 /* The GNU C library defines this for functions which it implements
13164     to always fail with ENOSYS.  Some functions are actually named
13165     something starting with __ and the normal name is an alias.  */
13166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13167 choke me
13168 #else
13169 f = $ac_func;
13170 #endif
13171
13172   ;
13173   return 0;
13174 }
13175 _ACEOF
13176 rm -f conftest.$ac_objext conftest$ac_exeext
13177 if { (eval echo "$as_me:13177: \"$ac_link\"") >&5
13178   (eval $ac_link) 2>&5
13179   ac_status=$?
13180   echo "$as_me:13180: \$? = $ac_status" >&5
13181   (exit $ac_status); } &&
13182          { ac_try='test -s conftest$ac_exeext'
13183   { (eval echo "$as_me:13183: \"$ac_try\"") >&5
13184   (eval $ac_try) 2>&5
13185   ac_status=$?
13186   echo "$as_me:13186: \$? = $ac_status" >&5
13187   (exit $ac_status); }; }; then
13188   eval "$as_ac_var=yes"
13189 else
13190   echo "$as_me: failed program was:" >&5
13191 cat conftest.$ac_ext >&5
13192 eval "$as_ac_var=no"
13193 fi
13194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13195 fi
13196 echo "$as_me:13196: result: `eval echo '${'$as_ac_var'}'`" >&5
13197 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13198 if test `eval echo '${'$as_ac_var'}'` = yes; then
13199   cat >>confdefs.h <<EOF
13200 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13201 EOF
13202
13203 fi
13204 done
13205
13206 if test "$with_getcap" = "yes" ; then
13207
13208 echo "$as_me:13208: checking for terminal-capability database functions" >&5
13209 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13210 if test "${cf_cv_cgetent+set}" = set; then
13211   echo $ECHO_N "(cached) $ECHO_C" >&6
13212 else
13213
13214 cat >conftest.$ac_ext <<_ACEOF
13215 #line 13215 "configure"
13216 #include "confdefs.h"
13217
13218 #include <stdlib.h>
13219 int
13220 main ()
13221 {
13222
13223         char temp[128];
13224         char *buf = temp;
13225         char *db_array = temp;
13226         cgetent(&buf, /* int *, */ &db_array, "vt100");
13227         cgetcap(buf, "tc", '=');
13228         cgetmatch(buf, "tc");
13229
13230   ;
13231   return 0;
13232 }
13233 _ACEOF
13234 rm -f conftest.$ac_objext conftest$ac_exeext
13235 if { (eval echo "$as_me:13235: \"$ac_link\"") >&5
13236   (eval $ac_link) 2>&5
13237   ac_status=$?
13238   echo "$as_me:13238: \$? = $ac_status" >&5
13239   (exit $ac_status); } &&
13240          { ac_try='test -s conftest$ac_exeext'
13241   { (eval echo "$as_me:13241: \"$ac_try\"") >&5
13242   (eval $ac_try) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit $ac_status); }; }; then
13246   cf_cv_cgetent=yes
13247 else
13248   echo "$as_me: failed program was:" >&5
13249 cat conftest.$ac_ext >&5
13250 cf_cv_cgetent=no
13251 fi
13252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13253
13254 fi
13255
13256 echo "$as_me:13256: result: $cf_cv_cgetent" >&5
13257 echo "${ECHO_T}$cf_cv_cgetent" >&6
13258 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13259 #define HAVE_BSD_CGETENT 1
13260 EOF
13261
13262 fi
13263
13264 echo "$as_me:13264: checking for isascii" >&5
13265 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13266 if test "${cf_cv_have_isascii+set}" = set; then
13267   echo $ECHO_N "(cached) $ECHO_C" >&6
13268 else
13269
13270         cat >conftest.$ac_ext <<_ACEOF
13271 #line 13271 "configure"
13272 #include "confdefs.h"
13273 #include <ctype.h>
13274 int
13275 main ()
13276 {
13277 int x = isascii(' ')
13278   ;
13279   return 0;
13280 }
13281 _ACEOF
13282 rm -f conftest.$ac_objext conftest$ac_exeext
13283 if { (eval echo "$as_me:13283: \"$ac_link\"") >&5
13284   (eval $ac_link) 2>&5
13285   ac_status=$?
13286   echo "$as_me:13286: \$? = $ac_status" >&5
13287   (exit $ac_status); } &&
13288          { ac_try='test -s conftest$ac_exeext'
13289   { (eval echo "$as_me:13289: \"$ac_try\"") >&5
13290   (eval $ac_try) 2>&5
13291   ac_status=$?
13292   echo "$as_me:13292: \$? = $ac_status" >&5
13293   (exit $ac_status); }; }; then
13294   cf_cv_have_isascii=yes
13295 else
13296   echo "$as_me: failed program was:" >&5
13297 cat conftest.$ac_ext >&5
13298 cf_cv_have_isascii=no
13299 fi
13300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13301
13302 fi
13303 echo "$as_me:13303: result: $cf_cv_have_isascii" >&5
13304 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13305 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13306 #define HAVE_ISASCII 1
13307 EOF
13308
13309 if test "$ac_cv_func_sigaction" = yes; then
13310 echo "$as_me:13310: checking whether sigaction needs _POSIX_SOURCE" >&5
13311 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13312 cat >conftest.$ac_ext <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315
13316 #include <sys/types.h>
13317 #include <signal.h>
13318 int
13319 main ()
13320 {
13321 struct sigaction act
13322   ;
13323   return 0;
13324 }
13325 _ACEOF
13326 rm -f conftest.$ac_objext
13327 if { (eval echo "$as_me:13327: \"$ac_compile\"") >&5
13328   (eval $ac_compile) 2>&5
13329   ac_status=$?
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit $ac_status); } &&
13332          { ac_try='test -s conftest.$ac_objext'
13333   { (eval echo "$as_me:13333: \"$ac_try\"") >&5
13334   (eval $ac_try) 2>&5
13335   ac_status=$?
13336   echo "$as_me:13336: \$? = $ac_status" >&5
13337   (exit $ac_status); }; }; then
13338   sigact_bad=no
13339 else
13340   echo "$as_me: failed program was:" >&5
13341 cat conftest.$ac_ext >&5
13342
13343 cat >conftest.$ac_ext <<_ACEOF
13344 #line 13344 "configure"
13345 #include "confdefs.h"
13346
13347 #define _POSIX_SOURCE
13348 #include <sys/types.h>
13349 #include <signal.h>
13350 int
13351 main ()
13352 {
13353 struct sigaction act
13354   ;
13355   return 0;
13356 }
13357 _ACEOF
13358 rm -f conftest.$ac_objext
13359 if { (eval echo "$as_me:13359: \"$ac_compile\"") >&5
13360   (eval $ac_compile) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); } &&
13364          { ac_try='test -s conftest.$ac_objext'
13365   { (eval echo "$as_me:13365: \"$ac_try\"") >&5
13366   (eval $ac_try) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); }; }; then
13370   sigact_bad=yes
13371          cat >>confdefs.h <<\EOF
13372 #define SVR4_ACTION 1
13373 EOF
13374
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat conftest.$ac_ext >&5
13378 sigact_bad=unknown
13379 fi
13380 rm -f conftest.$ac_objext conftest.$ac_ext
13381 fi
13382 rm -f conftest.$ac_objext conftest.$ac_ext
13383 echo "$as_me:13383: result: $sigact_bad" >&5
13384 echo "${ECHO_T}$sigact_bad" >&6
13385 fi
13386
13387 echo "$as_me:13387: checking if nanosleep really works" >&5
13388 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13389 if test "${cf_cv_func_nanosleep+set}" = set; then
13390   echo $ECHO_N "(cached) $ECHO_C" >&6
13391 else
13392
13393 if test "$cross_compiling" = yes; then
13394   cf_cv_func_nanosleep=unknown
13395 else
13396   cat >conftest.$ac_ext <<_ACEOF
13397 #line 13397 "configure"
13398 #include "confdefs.h"
13399
13400 #include <stdio.h>
13401 #include <errno.h>
13402 #include <time.h>
13403
13404 #ifdef HAVE_SYS_TIME_H
13405 #include <sys/time.h>
13406 #endif
13407
13408 int main() {
13409         struct timespec ts1, ts2;
13410         int code;
13411         ts1.tv_sec  = 0;
13412         ts1.tv_nsec = 750000000;
13413         ts2.tv_sec  = 0;
13414         ts2.tv_nsec = 0;
13415         errno = 0;
13416         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13417         ${cf_cv_main_return:-return}(code != 0);
13418 }
13419
13420 _ACEOF
13421 rm -f conftest$ac_exeext
13422 if { (eval echo "$as_me:13422: \"$ac_link\"") >&5
13423   (eval $ac_link) 2>&5
13424   ac_status=$?
13425   echo "$as_me:13425: \$? = $ac_status" >&5
13426   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13427   { (eval echo "$as_me:13427: \"$ac_try\"") >&5
13428   (eval $ac_try) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit $ac_status); }; }; then
13432   cf_cv_func_nanosleep=yes
13433 else
13434   echo "$as_me: program exited with status $ac_status" >&5
13435 echo "$as_me: failed program was:" >&5
13436 cat conftest.$ac_ext >&5
13437 cf_cv_func_nanosleep=no
13438 fi
13439 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13440 fi
13441 fi
13442 echo "$as_me:13442: result: $cf_cv_func_nanosleep" >&5
13443 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13444
13445 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13446 #define HAVE_NANOSLEEP 1
13447 EOF
13448
13449 for ac_header in \
13450 termio.h \
13451 termios.h \
13452 unistd.h \
13453
13454 do
13455 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13456 echo "$as_me:13456: checking for $ac_header" >&5
13457 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13458 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13459   echo $ECHO_N "(cached) $ECHO_C" >&6
13460 else
13461   cat >conftest.$ac_ext <<_ACEOF
13462 #line 13462 "configure"
13463 #include "confdefs.h"
13464 #include <$ac_header>
13465 _ACEOF
13466 if { (eval echo "$as_me:13466: \"$ac_cpp conftest.$ac_ext\"") >&5
13467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13468   ac_status=$?
13469   egrep -v '^ *\+' conftest.er1 >conftest.err
13470   rm -f conftest.er1
13471   cat conftest.err >&5
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } >/dev/null; then
13474   if test -s conftest.err; then
13475     ac_cpp_err=$ac_c_preproc_warn_flag
13476   else
13477     ac_cpp_err=
13478   fi
13479 else
13480   ac_cpp_err=yes
13481 fi
13482 if test -z "$ac_cpp_err"; then
13483   eval "$as_ac_Header=yes"
13484 else
13485   echo "$as_me: failed program was:" >&5
13486   cat conftest.$ac_ext >&5
13487   eval "$as_ac_Header=no"
13488 fi
13489 rm -f conftest.err conftest.$ac_ext
13490 fi
13491 echo "$as_me:13491: result: `eval echo '${'$as_ac_Header'}'`" >&5
13492 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13493 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13494   cat >>confdefs.h <<EOF
13495 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13496 EOF
13497
13498 fi
13499 done
13500
13501 if test "$ISC" = yes ; then
13502
13503 for ac_header in sys/termio.h
13504 do
13505 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13506 echo "$as_me:13506: checking for $ac_header" >&5
13507 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13508 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13509   echo $ECHO_N "(cached) $ECHO_C" >&6
13510 else
13511   cat >conftest.$ac_ext <<_ACEOF
13512 #line 13512 "configure"
13513 #include "confdefs.h"
13514 #include <$ac_header>
13515 _ACEOF
13516 if { (eval echo "$as_me:13516: \"$ac_cpp conftest.$ac_ext\"") >&5
13517   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13518   ac_status=$?
13519   egrep -v '^ *\+' conftest.er1 >conftest.err
13520   rm -f conftest.er1
13521   cat conftest.err >&5
13522   echo "$as_me:13522: \$? = $ac_status" >&5
13523   (exit $ac_status); } >/dev/null; then
13524   if test -s conftest.err; then
13525     ac_cpp_err=$ac_c_preproc_warn_flag
13526   else
13527     ac_cpp_err=
13528   fi
13529 else
13530   ac_cpp_err=yes
13531 fi
13532 if test -z "$ac_cpp_err"; then
13533   eval "$as_ac_Header=yes"
13534 else
13535   echo "$as_me: failed program was:" >&5
13536   cat conftest.$ac_ext >&5
13537   eval "$as_ac_Header=no"
13538 fi
13539 rm -f conftest.err conftest.$ac_ext
13540 fi
13541 echo "$as_me:13541: result: `eval echo '${'$as_ac_Header'}'`" >&5
13542 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13543 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13544   cat >>confdefs.h <<EOF
13545 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13546 EOF
13547
13548 fi
13549 done
13550
13551 fi
13552 if test "$ac_cv_header_termios_h" = yes ; then
13553         case "$CFLAGS $CPPFLAGS" in
13554         *-D_POSIX_SOURCE*)
13555                 termios_bad=dunno ;;
13556         *)      termios_bad=maybe ;;
13557         esac
13558         if test "$termios_bad" = maybe ; then
13559         echo "$as_me:13559: checking whether termios.h needs _POSIX_SOURCE" >&5
13560 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13561         cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564 #include <termios.h>
13565 int
13566 main ()
13567 {
13568 struct termios foo; int x = foo.c_iflag
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f conftest.$ac_objext
13574 if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5
13575   (eval $ac_compile) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); } &&
13579          { ac_try='test -s conftest.$ac_objext'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); }; }; then
13585   termios_bad=no
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat conftest.$ac_ext >&5
13589
13590                 cat >conftest.$ac_ext <<_ACEOF
13591 #line 13591 "configure"
13592 #include "confdefs.h"
13593
13594 #define _POSIX_SOURCE
13595 #include <termios.h>
13596 int
13597 main ()
13598 {
13599 struct termios foo; int x = foo.c_iflag
13600   ;
13601   return 0;
13602 }
13603 _ACEOF
13604 rm -f conftest.$ac_objext
13605 if { (eval echo "$as_me:13605: \"$ac_compile\"") >&5
13606   (eval $ac_compile) 2>&5
13607   ac_status=$?
13608   echo "$as_me:13608: \$? = $ac_status" >&5
13609   (exit $ac_status); } &&
13610          { ac_try='test -s conftest.$ac_objext'
13611   { (eval echo "$as_me:13611: \"$ac_try\"") >&5
13612   (eval $ac_try) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit $ac_status); }; }; then
13616   termios_bad=unknown
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 cat conftest.$ac_ext >&5
13620 termios_bad=yes cat >>confdefs.h <<\EOF
13621 #define SVR4_TERMIO 1
13622 EOF
13623
13624 fi
13625 rm -f conftest.$ac_objext conftest.$ac_ext
13626
13627 fi
13628 rm -f conftest.$ac_objext conftest.$ac_ext
13629         echo "$as_me:13629: result: $termios_bad" >&5
13630 echo "${ECHO_T}$termios_bad" >&6
13631         fi
13632 fi
13633
13634 echo "$as_me:13634: checking for tcgetattr" >&5
13635 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13636 if test "${cf_cv_have_tcgetattr+set}" = set; then
13637   echo $ECHO_N "(cached) $ECHO_C" >&6
13638 else
13639
13640 cat >conftest.$ac_ext <<_ACEOF
13641 #line 13641 "configure"
13642 #include "confdefs.h"
13643
13644 #include <sys/types.h>
13645 #ifdef HAVE_UNISTD_H
13646 #include <unistd.h>
13647 #endif
13648 #ifdef HAVE_TERMIOS_H
13649 #include <termios.h>
13650 #define TTY struct termios
13651 #else
13652 #ifdef HAVE_TERMIO_H
13653 #include <termio.h>
13654 #define TTY struct termio
13655 #endif
13656 #endif
13657
13658 int
13659 main ()
13660 {
13661
13662 TTY foo;
13663 tcgetattr(1, &foo);
13664   ;
13665   return 0;
13666 }
13667 _ACEOF
13668 rm -f conftest.$ac_objext conftest$ac_exeext
13669 if { (eval echo "$as_me:13669: \"$ac_link\"") >&5
13670   (eval $ac_link) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); } &&
13674          { ac_try='test -s conftest$ac_exeext'
13675   { (eval echo "$as_me:13675: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit $ac_status); }; }; then
13680   cf_cv_have_tcgetattr=yes
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 cat conftest.$ac_ext >&5
13684 cf_cv_have_tcgetattr=no
13685 fi
13686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13687 fi
13688 echo "$as_me:13688: result: $cf_cv_have_tcgetattr" >&5
13689 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13690 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13691 #define HAVE_TCGETATTR 1
13692 EOF
13693
13694 echo "$as_me:13694: checking for vsscanf function or workaround" >&5
13695 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13696 if test "${cf_cv_func_vsscanf+set}" = set; then
13697   echo $ECHO_N "(cached) $ECHO_C" >&6
13698 else
13699
13700 cat >conftest.$ac_ext <<_ACEOF
13701 #line 13701 "configure"
13702 #include "confdefs.h"
13703
13704 #include <stdarg.h>
13705 #include <stdio.h>
13706 int
13707 main ()
13708 {
13709
13710         va_list ap;
13711         vsscanf("from", "%d", ap)
13712   ;
13713   return 0;
13714 }
13715 _ACEOF
13716 rm -f conftest.$ac_objext conftest$ac_exeext
13717 if { (eval echo "$as_me:13717: \"$ac_link\"") >&5
13718   (eval $ac_link) 2>&5
13719   ac_status=$?
13720   echo "$as_me:13720: \$? = $ac_status" >&5
13721   (exit $ac_status); } &&
13722          { ac_try='test -s conftest$ac_exeext'
13723   { (eval echo "$as_me:13723: \"$ac_try\"") >&5
13724   (eval $ac_try) 2>&5
13725   ac_status=$?
13726   echo "$as_me:13726: \$? = $ac_status" >&5
13727   (exit $ac_status); }; }; then
13728   cf_cv_func_vsscanf=vsscanf
13729 else
13730   echo "$as_me: failed program was:" >&5
13731 cat conftest.$ac_ext >&5
13732
13733 cat >conftest.$ac_ext <<_ACEOF
13734 #line 13734 "configure"
13735 #include "confdefs.h"
13736
13737 #include <stdarg.h>
13738 #include <stdio.h>
13739 int
13740 main ()
13741 {
13742
13743     FILE strbuf;
13744     char *str = "from";
13745
13746     strbuf._flag = _IOREAD;
13747     strbuf._ptr = strbuf._base = (unsigned char *) str;
13748     strbuf._cnt = strlen(str);
13749     strbuf._file = _NFILE;
13750     return (vfscanf(&strbuf, "%d", ap))
13751   ;
13752   return 0;
13753 }
13754 _ACEOF
13755 rm -f conftest.$ac_objext conftest$ac_exeext
13756 if { (eval echo "$as_me:13756: \"$ac_link\"") >&5
13757   (eval $ac_link) 2>&5
13758   ac_status=$?
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit $ac_status); } &&
13761          { ac_try='test -s conftest$ac_exeext'
13762   { (eval echo "$as_me:13762: \"$ac_try\"") >&5
13763   (eval $ac_try) 2>&5
13764   ac_status=$?
13765   echo "$as_me:13765: \$? = $ac_status" >&5
13766   (exit $ac_status); }; }; then
13767   cf_cv_func_vsscanf=vfscanf
13768 else
13769   echo "$as_me: failed program was:" >&5
13770 cat conftest.$ac_ext >&5
13771
13772 cat >conftest.$ac_ext <<_ACEOF
13773 #line 13773 "configure"
13774 #include "confdefs.h"
13775
13776 #include <stdarg.h>
13777 #include <stdio.h>
13778 int
13779 main ()
13780 {
13781
13782     FILE strbuf;
13783     char *str = "from";
13784
13785     strbuf._flag = _IOREAD;
13786     strbuf._ptr = strbuf._base = (unsigned char *) str;
13787     strbuf._cnt = strlen(str);
13788     strbuf._file = _NFILE;
13789     return (_doscan(&strbuf, "%d", ap))
13790   ;
13791   return 0;
13792 }
13793 _ACEOF
13794 rm -f conftest.$ac_objext conftest$ac_exeext
13795 if { (eval echo "$as_me:13795: \"$ac_link\"") >&5
13796   (eval $ac_link) 2>&5
13797   ac_status=$?
13798   echo "$as_me:13798: \$? = $ac_status" >&5
13799   (exit $ac_status); } &&
13800          { ac_try='test -s conftest$ac_exeext'
13801   { (eval echo "$as_me:13801: \"$ac_try\"") >&5
13802   (eval $ac_try) 2>&5
13803   ac_status=$?
13804   echo "$as_me:13804: \$? = $ac_status" >&5
13805   (exit $ac_status); }; }; then
13806   cf_cv_func_vsscanf=_doscan
13807 else
13808   echo "$as_me: failed program was:" >&5
13809 cat conftest.$ac_ext >&5
13810
13811 cf_cv_func_vsscanf=no
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 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13818 fi
13819 echo "$as_me:13819: result: $cf_cv_func_vsscanf" >&5
13820 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13821
13822 case $cf_cv_func_vsscanf in #(vi
13823 vsscanf) cat >>confdefs.h <<\EOF
13824 #define HAVE_VSSCANF 1
13825 EOF
13826 ;; #(vi
13827 vfscanf) cat >>confdefs.h <<\EOF
13828 #define HAVE_VFSCANF 1
13829 EOF
13830 ;; #(vi
13831 _doscan) cat >>confdefs.h <<\EOF
13832 #define HAVE__DOSCAN 1
13833 EOF
13834 ;;
13835 esac
13836
13837 echo "$as_me:13837: checking for working mkstemp" >&5
13838 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13839 if test "${cf_cv_func_mkstemp+set}" = set; then
13840   echo $ECHO_N "(cached) $ECHO_C" >&6
13841 else
13842
13843 rm -f conftest*
13844 if test "$cross_compiling" = yes; then
13845   echo "$as_me:13845: checking for mkstemp" >&5
13846 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13847 if test "${ac_cv_func_mkstemp+set}" = set; then
13848   echo $ECHO_N "(cached) $ECHO_C" >&6
13849 else
13850   cat >conftest.$ac_ext <<_ACEOF
13851 #line 13851 "configure"
13852 #include "confdefs.h"
13853 /* System header to define __stub macros and hopefully few prototypes,
13854     which can conflict with char mkstemp (); below.  */
13855 #include <assert.h>
13856 /* Override any gcc2 internal prototype to avoid an error.  */
13857 #ifdef __cplusplus
13858 extern "C"
13859 #endif
13860 /* We use char because int might match the return type of a gcc2
13861    builtin and then its argument prototype would still apply.  */
13862 char mkstemp ();
13863 char (*f) ();
13864
13865 int
13866 main ()
13867 {
13868 /* The GNU C library defines this for functions which it implements
13869     to always fail with ENOSYS.  Some functions are actually named
13870     something starting with __ and the normal name is an alias.  */
13871 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13872 choke me
13873 #else
13874 f = mkstemp;
13875 #endif
13876
13877   ;
13878   return 0;
13879 }
13880 _ACEOF
13881 rm -f conftest.$ac_objext conftest$ac_exeext
13882 if { (eval echo "$as_me:13882: \"$ac_link\"") >&5
13883   (eval $ac_link) 2>&5
13884   ac_status=$?
13885   echo "$as_me:13885: \$? = $ac_status" >&5
13886   (exit $ac_status); } &&
13887          { ac_try='test -s conftest$ac_exeext'
13888   { (eval echo "$as_me:13888: \"$ac_try\"") >&5
13889   (eval $ac_try) 2>&5
13890   ac_status=$?
13891   echo "$as_me:13891: \$? = $ac_status" >&5
13892   (exit $ac_status); }; }; then
13893   ac_cv_func_mkstemp=yes
13894 else
13895   echo "$as_me: failed program was:" >&5
13896 cat conftest.$ac_ext >&5
13897 ac_cv_func_mkstemp=no
13898 fi
13899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13900 fi
13901 echo "$as_me:13901: result: $ac_cv_func_mkstemp" >&5
13902 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13903
13904 else
13905   cat >conftest.$ac_ext <<_ACEOF
13906 #line 13906 "configure"
13907 #include "confdefs.h"
13908
13909 #include <sys/types.h>
13910 #include <stdlib.h>
13911 #include <stdio.h>
13912 #include <string.h>
13913 #include <sys/stat.h>
13914 int main()
13915 {
13916         char *tmpl = "conftestXXXXXX";
13917         char name[2][80];
13918         int n;
13919         int result = 0;
13920         int fd;
13921         struct stat sb;
13922
13923         umask(077);
13924         for (n = 0; n < 2; ++n) {
13925                 strcpy(name[n], tmpl);
13926                 if ((fd = mkstemp(name[n])) >= 0) {
13927                         if (!strcmp(name[n], tmpl)
13928                          || stat(name[n], &sb) != 0
13929                          || (sb.st_mode & S_IFMT) != S_IFREG
13930                          || (sb.st_mode & 077) != 0) {
13931                                 result = 1;
13932                         }
13933                         close(fd);
13934                 }
13935         }
13936         if (result == 0
13937          && !strcmp(name[0], name[1]))
13938                 result = 1;
13939         ${cf_cv_main_return:-return}(result);
13940 }
13941
13942 _ACEOF
13943 rm -f conftest$ac_exeext
13944 if { (eval echo "$as_me:13944: \"$ac_link\"") >&5
13945   (eval $ac_link) 2>&5
13946   ac_status=$?
13947   echo "$as_me:13947: \$? = $ac_status" >&5
13948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13949   { (eval echo "$as_me:13949: \"$ac_try\"") >&5
13950   (eval $ac_try) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit $ac_status); }; }; then
13954   cf_cv_func_mkstemp=yes
13955
13956 else
13957   echo "$as_me: program exited with status $ac_status" >&5
13958 echo "$as_me: failed program was:" >&5
13959 cat conftest.$ac_ext >&5
13960 cf_cv_func_mkstemp=no
13961
13962 fi
13963 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13964 fi
13965
13966 fi
13967 echo "$as_me:13967: result: $cf_cv_func_mkstemp" >&5
13968 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13969 if test "$cf_cv_func_mkstemp" = yes ; then
13970         cat >>confdefs.h <<\EOF
13971 #define HAVE_MKSTEMP 1
13972 EOF
13973
13974 fi
13975
13976 # setup for prototype of fallback for vsscanf()
13977
13978 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13979         HAVE_VSSCANF=1
13980 else
13981         HAVE_VSSCANF=0
13982 fi
13983
13984 if test "$cross_compiling" = yes ; then
13985         { echo "$as_me:13985: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13986 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13987 else
13988         echo "$as_me:13988: checking whether setvbuf arguments are reversed" >&5
13989 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13990 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13991   echo $ECHO_N "(cached) $ECHO_C" >&6
13992 else
13993   if test "$cross_compiling" = yes; then
13994   { { echo "$as_me:13994: error: cannot run test program while cross compiling" >&5
13995 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13996    { (exit 1); exit 1; }; }
13997 else
13998   cat >conftest.$ac_ext <<_ACEOF
13999 #line 13999 "configure"
14000 #include "confdefs.h"
14001 #include <stdio.h>
14002 /* If setvbuf has the reversed format, exit 0. */
14003 int
14004 main ()
14005 {
14006   /* This call has the arguments reversed.
14007      A reversed system may check and see that the address of main
14008      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14009   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14010     $ac_main_return(1);
14011   putc('\r', stdout);
14012   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14013 }
14014 _ACEOF
14015 rm -f conftest$ac_exeext
14016 if { (eval echo "$as_me:14016: \"$ac_link\"") >&5
14017   (eval $ac_link) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14021   { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022   (eval $ac_try) 2>&5
14023   ac_status=$?
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit $ac_status); }; }; then
14026   ac_cv_func_setvbuf_reversed=yes
14027 else
14028   echo "$as_me: program exited with status $ac_status" >&5
14029 echo "$as_me: failed program was:" >&5
14030 cat conftest.$ac_ext >&5
14031 ac_cv_func_setvbuf_reversed=no
14032 fi
14033 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14034 fi
14035 rm -f core core.* *.core
14036 fi
14037 echo "$as_me:14037: result: $ac_cv_func_setvbuf_reversed" >&5
14038 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14039 if test $ac_cv_func_setvbuf_reversed = yes; then
14040
14041 cat >>confdefs.h <<\EOF
14042 #define SETVBUF_REVERSED 1
14043 EOF
14044
14045 fi
14046
14047 fi
14048 echo "$as_me:14048: checking return type of signal handlers" >&5
14049 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14050 if test "${ac_cv_type_signal+set}" = set; then
14051   echo $ECHO_N "(cached) $ECHO_C" >&6
14052 else
14053   cat >conftest.$ac_ext <<_ACEOF
14054 #line 14054 "configure"
14055 #include "confdefs.h"
14056 #include <sys/types.h>
14057 #include <signal.h>
14058 #ifdef signal
14059 # undef signal
14060 #endif
14061 #ifdef __cplusplus
14062 extern "C" void (*signal (int, void (*)(int)))(int);
14063 #else
14064 void (*signal ()) ();
14065 #endif
14066
14067 int
14068 main ()
14069 {
14070 int i;
14071   ;
14072   return 0;
14073 }
14074 _ACEOF
14075 rm -f conftest.$ac_objext
14076 if { (eval echo "$as_me:14076: \"$ac_compile\"") >&5
14077   (eval $ac_compile) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit $ac_status); } &&
14081          { ac_try='test -s conftest.$ac_objext'
14082   { (eval echo "$as_me:14082: \"$ac_try\"") >&5
14083   (eval $ac_try) 2>&5
14084   ac_status=$?
14085   echo "$as_me:14085: \$? = $ac_status" >&5
14086   (exit $ac_status); }; }; then
14087   ac_cv_type_signal=void
14088 else
14089   echo "$as_me: failed program was:" >&5
14090 cat conftest.$ac_ext >&5
14091 ac_cv_type_signal=int
14092 fi
14093 rm -f conftest.$ac_objext conftest.$ac_ext
14094 fi
14095 echo "$as_me:14095: result: $ac_cv_type_signal" >&5
14096 echo "${ECHO_T}$ac_cv_type_signal" >&6
14097
14098 cat >>confdefs.h <<EOF
14099 #define RETSIGTYPE $ac_cv_type_signal
14100 EOF
14101
14102 echo "$as_me:14102: checking for type sigaction_t" >&5
14103 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14104 if test "${cf_cv_type_sigaction+set}" = set; then
14105   echo $ECHO_N "(cached) $ECHO_C" >&6
14106 else
14107
14108         cat >conftest.$ac_ext <<_ACEOF
14109 #line 14109 "configure"
14110 #include "confdefs.h"
14111
14112 #include <signal.h>
14113 int
14114 main ()
14115 {
14116 sigaction_t x
14117   ;
14118   return 0;
14119 }
14120 _ACEOF
14121 rm -f conftest.$ac_objext
14122 if { (eval echo "$as_me:14122: \"$ac_compile\"") >&5
14123   (eval $ac_compile) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit $ac_status); } &&
14127          { ac_try='test -s conftest.$ac_objext'
14128   { (eval echo "$as_me:14128: \"$ac_try\"") >&5
14129   (eval $ac_try) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); }; }; then
14133   cf_cv_type_sigaction=yes
14134 else
14135   echo "$as_me: failed program was:" >&5
14136 cat conftest.$ac_ext >&5
14137 cf_cv_type_sigaction=no
14138 fi
14139 rm -f conftest.$ac_objext conftest.$ac_ext
14140 fi
14141
14142 echo "$as_me:14142: result: $cf_cv_type_sigaction" >&5
14143 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14144 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14145 #define HAVE_TYPE_SIGACTION 1
14146 EOF
14147
14148 echo "$as_me:14148: checking declaration of size-change" >&5
14149 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14150 if test "${cf_cv_sizechange+set}" = set; then
14151   echo $ECHO_N "(cached) $ECHO_C" >&6
14152 else
14153
14154     cf_cv_sizechange=unknown
14155     cf_save_CPPFLAGS="$CPPFLAGS"
14156
14157 for cf_opts in "" "NEED_PTEM_H"
14158 do
14159
14160     CPPFLAGS="$cf_save_CPPFLAGS"
14161     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14162     cat >conftest.$ac_ext <<_ACEOF
14163 #line 14163 "configure"
14164 #include "confdefs.h"
14165 #include <sys/types.h>
14166 #ifdef HAVE_TERMIOS_H
14167 #include <termios.h>
14168 #else
14169 #ifdef HAVE_TERMIO_H
14170 #include <termio.h>
14171 #endif
14172 #endif
14173 #ifdef NEED_PTEM_H
14174 /* This is a workaround for SCO:  they neglected to define struct winsize in
14175  * termios.h -- it's only in termio.h and ptem.h
14176  */
14177 #include        <sys/stream.h>
14178 #include        <sys/ptem.h>
14179 #endif
14180 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14181 #include <sys/ioctl.h>
14182 #endif
14183
14184 int
14185 main ()
14186 {
14187
14188 #ifdef TIOCGSIZE
14189         struct ttysize win;     /* FIXME: what system is this? */
14190         int y = win.ts_lines;
14191         int x = win.ts_cols;
14192 #else
14193 #ifdef TIOCGWINSZ
14194         struct winsize win;
14195         int y = win.ws_row;
14196         int x = win.ws_col;
14197 #else
14198         no TIOCGSIZE or TIOCGWINSZ
14199 #endif /* TIOCGWINSZ */
14200 #endif /* TIOCGSIZE */
14201
14202   ;
14203   return 0;
14204 }
14205 _ACEOF
14206 rm -f conftest.$ac_objext
14207 if { (eval echo "$as_me:14207: \"$ac_compile\"") >&5
14208   (eval $ac_compile) 2>&5
14209   ac_status=$?
14210   echo "$as_me:14210: \$? = $ac_status" >&5
14211   (exit $ac_status); } &&
14212          { ac_try='test -s conftest.$ac_objext'
14213   { (eval echo "$as_me:14213: \"$ac_try\"") >&5
14214   (eval $ac_try) 2>&5
14215   ac_status=$?
14216   echo "$as_me:14216: \$? = $ac_status" >&5
14217   (exit $ac_status); }; }; then
14218   cf_cv_sizechange=yes
14219 else
14220   echo "$as_me: failed program was:" >&5
14221 cat conftest.$ac_ext >&5
14222 cf_cv_sizechange=no
14223 fi
14224 rm -f conftest.$ac_objext conftest.$ac_ext
14225
14226         CPPFLAGS="$cf_save_CPPFLAGS"
14227         if test "$cf_cv_sizechange" = yes ; then
14228                 echo "size-change succeeded ($cf_opts)" >&5
14229                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14230                 break
14231         fi
14232 done
14233
14234 fi
14235 echo "$as_me:14235: result: $cf_cv_sizechange" >&5
14236 echo "${ECHO_T}$cf_cv_sizechange" >&6
14237 if test "$cf_cv_sizechange" != no ; then
14238         cat >>confdefs.h <<\EOF
14239 #define HAVE_SIZECHANGE 1
14240 EOF
14241
14242         case $cf_cv_sizechange in #(vi
14243         NEED*)
14244                 cat >>confdefs.h <<EOF
14245 #define $cf_cv_sizechange  1
14246 EOF
14247
14248                 ;;
14249         esac
14250 fi
14251
14252 echo "$as_me:14252: checking for memmove" >&5
14253 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14254 if test "${ac_cv_func_memmove+set}" = set; then
14255   echo $ECHO_N "(cached) $ECHO_C" >&6
14256 else
14257   cat >conftest.$ac_ext <<_ACEOF
14258 #line 14258 "configure"
14259 #include "confdefs.h"
14260 /* System header to define __stub macros and hopefully few prototypes,
14261     which can conflict with char memmove (); below.  */
14262 #include <assert.h>
14263 /* Override any gcc2 internal prototype to avoid an error.  */
14264 #ifdef __cplusplus
14265 extern "C"
14266 #endif
14267 /* We use char because int might match the return type of a gcc2
14268    builtin and then its argument prototype would still apply.  */
14269 char memmove ();
14270 char (*f) ();
14271
14272 int
14273 main ()
14274 {
14275 /* The GNU C library defines this for functions which it implements
14276     to always fail with ENOSYS.  Some functions are actually named
14277     something starting with __ and the normal name is an alias.  */
14278 #if defined (__stub_memmove) || defined (__stub___memmove)
14279 choke me
14280 #else
14281 f = memmove;
14282 #endif
14283
14284   ;
14285   return 0;
14286 }
14287 _ACEOF
14288 rm -f conftest.$ac_objext conftest$ac_exeext
14289 if { (eval echo "$as_me:14289: \"$ac_link\"") >&5
14290   (eval $ac_link) 2>&5
14291   ac_status=$?
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit $ac_status); } &&
14294          { ac_try='test -s conftest$ac_exeext'
14295   { (eval echo "$as_me:14295: \"$ac_try\"") >&5
14296   (eval $ac_try) 2>&5
14297   ac_status=$?
14298   echo "$as_me:14298: \$? = $ac_status" >&5
14299   (exit $ac_status); }; }; then
14300   ac_cv_func_memmove=yes
14301 else
14302   echo "$as_me: failed program was:" >&5
14303 cat conftest.$ac_ext >&5
14304 ac_cv_func_memmove=no
14305 fi
14306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14307 fi
14308 echo "$as_me:14308: result: $ac_cv_func_memmove" >&5
14309 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14310 if test $ac_cv_func_memmove = yes; then
14311   :
14312 else
14313
14314 echo "$as_me:14314: checking for bcopy" >&5
14315 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14316 if test "${ac_cv_func_bcopy+set}" = set; then
14317   echo $ECHO_N "(cached) $ECHO_C" >&6
14318 else
14319   cat >conftest.$ac_ext <<_ACEOF
14320 #line 14320 "configure"
14321 #include "confdefs.h"
14322 /* System header to define __stub macros and hopefully few prototypes,
14323     which can conflict with char bcopy (); below.  */
14324 #include <assert.h>
14325 /* Override any gcc2 internal prototype to avoid an error.  */
14326 #ifdef __cplusplus
14327 extern "C"
14328 #endif
14329 /* We use char because int might match the return type of a gcc2
14330    builtin and then its argument prototype would still apply.  */
14331 char bcopy ();
14332 char (*f) ();
14333
14334 int
14335 main ()
14336 {
14337 /* The GNU C library defines this for functions which it implements
14338     to always fail with ENOSYS.  Some functions are actually named
14339     something starting with __ and the normal name is an alias.  */
14340 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14341 choke me
14342 #else
14343 f = bcopy;
14344 #endif
14345
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext conftest$ac_exeext
14351 if { (eval echo "$as_me:14351: \"$ac_link\"") >&5
14352   (eval $ac_link) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest$ac_exeext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   ac_cv_func_bcopy=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 ac_cv_func_bcopy=no
14367 fi
14368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369 fi
14370 echo "$as_me:14370: result: $ac_cv_func_bcopy" >&5
14371 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14372 if test $ac_cv_func_bcopy = yes; then
14373
14374         echo "$as_me:14374: checking if bcopy does overlapping moves" >&5
14375 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14376 if test "${cf_cv_good_bcopy+set}" = set; then
14377   echo $ECHO_N "(cached) $ECHO_C" >&6
14378 else
14379
14380                 if test "$cross_compiling" = yes; then
14381   cf_cv_good_bcopy=unknown
14382 else
14383   cat >conftest.$ac_ext <<_ACEOF
14384 #line 14384 "configure"
14385 #include "confdefs.h"
14386
14387 int main() {
14388         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14389         char temp[40];
14390         bcopy(data, temp, sizeof(data));
14391         bcopy(temp+10, temp, 15);
14392         bcopy(temp+5, temp+15, 10);
14393         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14394 }
14395
14396 _ACEOF
14397 rm -f conftest$ac_exeext
14398 if { (eval echo "$as_me:14398: \"$ac_link\"") >&5
14399   (eval $ac_link) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14403   { (eval echo "$as_me:14403: \"$ac_try\"") >&5
14404   (eval $ac_try) 2>&5
14405   ac_status=$?
14406   echo "$as_me:14406: \$? = $ac_status" >&5
14407   (exit $ac_status); }; }; then
14408   cf_cv_good_bcopy=yes
14409 else
14410   echo "$as_me: program exited with status $ac_status" >&5
14411 echo "$as_me: failed program was:" >&5
14412 cat conftest.$ac_ext >&5
14413 cf_cv_good_bcopy=no
14414 fi
14415 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14416 fi
14417
14418 fi
14419 echo "$as_me:14419: result: $cf_cv_good_bcopy" >&5
14420 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14421
14422 else
14423   cf_cv_good_bcopy=no
14424 fi
14425
14426         if test "$cf_cv_good_bcopy" = yes ; then
14427                 cat >>confdefs.h <<\EOF
14428 #define USE_OK_BCOPY 1
14429 EOF
14430
14431         else
14432                 cat >>confdefs.h <<\EOF
14433 #define USE_MY_MEMMOVE 1
14434 EOF
14435
14436         fi
14437
14438 fi
14439
14440 echo "$as_me:14440: checking if poll really works" >&5
14441 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14442 if test "${cf_cv_working_poll+set}" = set; then
14443   echo $ECHO_N "(cached) $ECHO_C" >&6
14444 else
14445
14446 if test "$cross_compiling" = yes; then
14447   cf_cv_working_poll=unknown
14448 else
14449   cat >conftest.$ac_ext <<_ACEOF
14450 #line 14450 "configure"
14451 #include "confdefs.h"
14452
14453 #include <stdio.h>
14454 #ifdef HAVE_POLL_H
14455 #include <poll.h>
14456 #else
14457 #include <sys/poll.h>
14458 #endif
14459 int main() {
14460         struct pollfd myfds;
14461         int ret;
14462
14463         myfds.fd = 0;
14464         myfds.events = POLLIN;
14465
14466         ret = poll(&myfds, 1, 100);
14467         ${cf_cv_main_return:-return}(ret != 0);
14468 }
14469 _ACEOF
14470 rm -f conftest$ac_exeext
14471 if { (eval echo "$as_me:14471: \"$ac_link\"") >&5
14472   (eval $ac_link) 2>&5
14473   ac_status=$?
14474   echo "$as_me:14474: \$? = $ac_status" >&5
14475   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14476   { (eval echo "$as_me:14476: \"$ac_try\"") >&5
14477   (eval $ac_try) 2>&5
14478   ac_status=$?
14479   echo "$as_me:14479: \$? = $ac_status" >&5
14480   (exit $ac_status); }; }; then
14481   cf_cv_working_poll=yes
14482 else
14483   echo "$as_me: program exited with status $ac_status" >&5
14484 echo "$as_me: failed program was:" >&5
14485 cat conftest.$ac_ext >&5
14486 cf_cv_working_poll=no
14487 fi
14488 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14489 fi
14490 fi
14491 echo "$as_me:14491: result: $cf_cv_working_poll" >&5
14492 echo "${ECHO_T}$cf_cv_working_poll" >&6
14493 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14494 #define HAVE_WORKING_POLL 1
14495 EOF
14496
14497 # special check for test/ditto.c
14498
14499 echo "$as_me:14499: checking for openpty in -lutil" >&5
14500 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14501 if test "${ac_cv_lib_util_openpty+set}" = set; then
14502   echo $ECHO_N "(cached) $ECHO_C" >&6
14503 else
14504   ac_check_lib_save_LIBS=$LIBS
14505 LIBS="-lutil  $LIBS"
14506 cat >conftest.$ac_ext <<_ACEOF
14507 #line 14507 "configure"
14508 #include "confdefs.h"
14509
14510 /* Override any gcc2 internal prototype to avoid an error.  */
14511 #ifdef __cplusplus
14512 extern "C"
14513 #endif
14514 /* We use char because int might match the return type of a gcc2
14515    builtin and then its argument prototype would still apply.  */
14516 char openpty ();
14517 int
14518 main ()
14519 {
14520 openpty ();
14521   ;
14522   return 0;
14523 }
14524 _ACEOF
14525 rm -f conftest.$ac_objext conftest$ac_exeext
14526 if { (eval echo "$as_me:14526: \"$ac_link\"") >&5
14527   (eval $ac_link) 2>&5
14528   ac_status=$?
14529   echo "$as_me:14529: \$? = $ac_status" >&5
14530   (exit $ac_status); } &&
14531          { ac_try='test -s conftest$ac_exeext'
14532   { (eval echo "$as_me:14532: \"$ac_try\"") >&5
14533   (eval $ac_try) 2>&5
14534   ac_status=$?
14535   echo "$as_me:14535: \$? = $ac_status" >&5
14536   (exit $ac_status); }; }; then
14537   ac_cv_lib_util_openpty=yes
14538 else
14539   echo "$as_me: failed program was:" >&5
14540 cat conftest.$ac_ext >&5
14541 ac_cv_lib_util_openpty=no
14542 fi
14543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14544 LIBS=$ac_check_lib_save_LIBS
14545 fi
14546 echo "$as_me:14546: result: $ac_cv_lib_util_openpty" >&5
14547 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14548 if test $ac_cv_lib_util_openpty = yes; then
14549   cf_cv_lib_util=yes
14550 else
14551   cf_cv_lib_util=no
14552 fi
14553
14554 echo "$as_me:14554: checking for openpty header" >&5
14555 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14556 if test "${cf_cv_func_openpty+set}" = set; then
14557   echo $ECHO_N "(cached) $ECHO_C" >&6
14558 else
14559
14560     cf_save_LIBS="$LIBS"
14561     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14562     for cf_header in pty.h libutil.h util.h
14563     do
14564     cat >conftest.$ac_ext <<_ACEOF
14565 #line 14565 "configure"
14566 #include "confdefs.h"
14567
14568 #include <$cf_header>
14569
14570 int
14571 main ()
14572 {
14573
14574     int x = openpty((int *)0, (int *)0, (char *)0,
14575                    (struct termios *)0, (struct winsize *)0);
14576
14577   ;
14578   return 0;
14579 }
14580 _ACEOF
14581 rm -f conftest.$ac_objext conftest$ac_exeext
14582 if { (eval echo "$as_me:14582: \"$ac_link\"") >&5
14583   (eval $ac_link) 2>&5
14584   ac_status=$?
14585   echo "$as_me:14585: \$? = $ac_status" >&5
14586   (exit $ac_status); } &&
14587          { ac_try='test -s conftest$ac_exeext'
14588   { (eval echo "$as_me:14588: \"$ac_try\"") >&5
14589   (eval $ac_try) 2>&5
14590   ac_status=$?
14591   echo "$as_me:14591: \$? = $ac_status" >&5
14592   (exit $ac_status); }; }; then
14593
14594         cf_cv_func_openpty=$cf_header
14595         break
14596
14597 else
14598   echo "$as_me: failed program was:" >&5
14599 cat conftest.$ac_ext >&5
14600
14601         cf_cv_func_openpty=no
14602
14603 fi
14604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14605     done
14606     LIBS="$cf_save_LIBS"
14607
14608 fi
14609 echo "$as_me:14609: result: $cf_cv_func_openpty" >&5
14610 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14611
14612 if test "$cf_cv_func_openpty" != no ; then
14613     cat >>confdefs.h <<EOF
14614 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14615 EOF
14616
14617     cat >>confdefs.h <<\EOF
14618 #define USE_XTERM_PTY 1
14619 EOF
14620
14621     if test "$cf_cv_lib_util" = yes ; then
14622         TEST_LIBS="-lutil $TEST_LIBS"
14623     fi
14624 fi
14625
14626 if test "$with_hashed_db" != no ; then
14627         cat >>confdefs.h <<\EOF
14628 #define USE_HASHED_DB 1
14629 EOF
14630
14631 case $with_hashed_db in #(vi
14632 yes|*able*) #(vi
14633     ;;
14634 *)
14635     if test -d "$with_hashed_db" ; then
14636
14637 if test -n "$with_hashed_db/include" ; then
14638   for cf_add_incdir in $with_hashed_db/include
14639   do
14640         while test $cf_add_incdir != /usr/include
14641         do
14642           if test -d $cf_add_incdir
14643           then
14644                 cf_have_incdir=no
14645                 if test -n "$CFLAGS$CPPFLAGS" ; then
14646                   # a loop is needed to ensure we can add subdirs of existing dirs
14647                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14648                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14649                           cf_have_incdir=yes; break
14650                         fi
14651                   done
14652                 fi
14653
14654                 if test "$cf_have_incdir" = no ; then
14655                   if test "$cf_add_incdir" = /usr/local/include ; then
14656                         if test "$GCC" = yes
14657                         then
14658                           cf_save_CPPFLAGS=$CPPFLAGS
14659                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14660                           cat >conftest.$ac_ext <<_ACEOF
14661 #line 14661 "configure"
14662 #include "confdefs.h"
14663 #include <stdio.h>
14664 int
14665 main ()
14666 {
14667 printf("Hello")
14668   ;
14669   return 0;
14670 }
14671 _ACEOF
14672 rm -f conftest.$ac_objext
14673 if { (eval echo "$as_me:14673: \"$ac_compile\"") >&5
14674   (eval $ac_compile) 2>&5
14675   ac_status=$?
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit $ac_status); } &&
14678          { ac_try='test -s conftest.$ac_objext'
14679   { (eval echo "$as_me:14679: \"$ac_try\"") >&5
14680   (eval $ac_try) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); }; }; then
14684   :
14685 else
14686   echo "$as_me: failed program was:" >&5
14687 cat conftest.$ac_ext >&5
14688 cf_have_incdir=yes
14689 fi
14690 rm -f conftest.$ac_objext conftest.$ac_ext
14691                           CPPFLAGS=$cf_save_CPPFLAGS
14692                         fi
14693                   fi
14694                 fi
14695
14696                 if test "$cf_have_incdir" = no ; then
14697                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14698
14699 echo "${as_me-configure}:14699: testing adding $cf_add_incdir to include-path ..." 1>&5
14700
14701                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14702
14703                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14704                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14705                   cf_add_incdir="$cf_top_incdir"
14706                 else
14707                   break
14708                 fi
14709           fi
14710         done
14711   done
14712 fi
14713
14714 if test -n "$with_hashed_db/lib" ; then
14715   for cf_add_libdir in $with_hashed_db/lib
14716   do
14717     if test $cf_add_libdir = /usr/lib ; then
14718       :
14719     elif test -d $cf_add_libdir
14720     then
14721       cf_have_libdir=no
14722       if test -n "$LDFLAGS$LIBS" ; then
14723         # a loop is needed to ensure we can add subdirs of existing dirs
14724         for cf_test_libdir in $LDFLAGS $LIBS ; do
14725           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14726             cf_have_libdir=yes; break
14727           fi
14728         done
14729       fi
14730       if test "$cf_have_libdir" = no ; then
14731         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14732
14733 echo "${as_me-configure}:14733: testing adding $cf_add_libdir to library-path ..." 1>&5
14734
14735         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14736       fi
14737     fi
14738   done
14739 fi
14740
14741     fi
14742 esac
14743
14744 echo "$as_me:14744: checking for db.h" >&5
14745 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14746 if test "${ac_cv_header_db_h+set}" = set; then
14747   echo $ECHO_N "(cached) $ECHO_C" >&6
14748 else
14749   cat >conftest.$ac_ext <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752 #include <db.h>
14753 _ACEOF
14754 if { (eval echo "$as_me:14754: \"$ac_cpp conftest.$ac_ext\"") >&5
14755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14756   ac_status=$?
14757   egrep -v '^ *\+' conftest.er1 >conftest.err
14758   rm -f conftest.er1
14759   cat conftest.err >&5
14760   echo "$as_me:14760: \$? = $ac_status" >&5
14761   (exit $ac_status); } >/dev/null; then
14762   if test -s conftest.err; then
14763     ac_cpp_err=$ac_c_preproc_warn_flag
14764   else
14765     ac_cpp_err=
14766   fi
14767 else
14768   ac_cpp_err=yes
14769 fi
14770 if test -z "$ac_cpp_err"; then
14771   ac_cv_header_db_h=yes
14772 else
14773   echo "$as_me: failed program was:" >&5
14774   cat conftest.$ac_ext >&5
14775   ac_cv_header_db_h=no
14776 fi
14777 rm -f conftest.err conftest.$ac_ext
14778 fi
14779 echo "$as_me:14779: result: $ac_cv_header_db_h" >&5
14780 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14781 if test $ac_cv_header_db_h = yes; then
14782
14783 echo "$as_me:14783: checking for version of db" >&5
14784 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14785 if test "${cf_cv_hashed_db_version+set}" = set; then
14786   echo $ECHO_N "(cached) $ECHO_C" >&6
14787 else
14788
14789 cf_cv_hashed_db_version=unknown
14790
14791 for cf_db_version in 1 2 3 4 5
14792 do
14793
14794 echo "${as_me-configure}:14794: testing checking for db version $cf_db_version ..." 1>&5
14795
14796         cat >conftest.$ac_ext <<_ACEOF
14797 #line 14797 "configure"
14798 #include "confdefs.h"
14799
14800 $ac_includes_default
14801 #include <db.h>
14802
14803 #ifdef DB_VERSION_MAJOR
14804         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14805 #if $cf_db_version == DB_VERSION_MAJOR
14806         /* ok */
14807 #else
14808         make an error
14809 #endif
14810 #else
14811 #if $cf_db_version == 1
14812         /* ok: assuming this is DB 1.8.5 */
14813 #else
14814         make an error
14815 #endif
14816 #endif
14817
14818 int
14819 main ()
14820 {
14821 DBT *foo = 0
14822   ;
14823   return 0;
14824 }
14825 _ACEOF
14826 rm -f conftest.$ac_objext
14827 if { (eval echo "$as_me:14827: \"$ac_compile\"") >&5
14828   (eval $ac_compile) 2>&5
14829   ac_status=$?
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } &&
14832          { ac_try='test -s conftest.$ac_objext'
14833   { (eval echo "$as_me:14833: \"$ac_try\"") >&5
14834   (eval $ac_try) 2>&5
14835   ac_status=$?
14836   echo "$as_me:14836: \$? = $ac_status" >&5
14837   (exit $ac_status); }; }; then
14838
14839         cf_cv_hashed_db_version=$cf_db_version
14840         break
14841
14842 else
14843   echo "$as_me: failed program was:" >&5
14844 cat conftest.$ac_ext >&5
14845 fi
14846 rm -f conftest.$ac_objext conftest.$ac_ext
14847 done
14848
14849 fi
14850 echo "$as_me:14850: result: $cf_cv_hashed_db_version" >&5
14851 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14852
14853 if test "$cf_cv_hashed_db_version" = unknown ; then
14854         { { echo "$as_me:14854: error: Cannot determine version of db" >&5
14855 echo "$as_me: error: Cannot determine version of db" >&2;}
14856    { (exit 1); exit 1; }; }
14857 else
14858
14859 echo "$as_me:14859: checking for db libraries" >&5
14860 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14861 if test "${cf_cv_hashed_db_libs+set}" = set; then
14862   echo $ECHO_N "(cached) $ECHO_C" >&6
14863 else
14864
14865 cf_cv_hashed_db_libs=unknown
14866 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14867 do
14868         cf_save_libs="$LIBS"
14869         if test -n "$cf_db_libs"; then
14870                 LIBS="-l$cf_db_libs $LIBS"
14871         fi
14872
14873 echo "${as_me-configure}:14873: testing checking for library "$cf_db_libs" ..." 1>&5
14874
14875         cat >conftest.$ac_ext <<_ACEOF
14876 #line 14876 "configure"
14877 #include "confdefs.h"
14878
14879 $ac_includes_default
14880 #include <db.h>
14881
14882 int
14883 main ()
14884 {
14885
14886         char *path = "/tmp/foo";
14887 #ifdef DB_VERSION_MAJOR
14888 #if DB_VERSION_MAJOR >= 4
14889         DB *result = 0;
14890         db_create(&result, NULL, 0);
14891         result->open(result,
14892                 NULL,
14893                 path,
14894                 path,
14895                 DB_HASH,
14896                 DB_CREATE,
14897                 0644);
14898 #elif DB_VERSION_MAJOR >= 3
14899         DB *result = 0;
14900         db_create(&result, NULL, 0);
14901         result->open(result,
14902                 path,
14903                 path,
14904                 DB_HASH,
14905                 DB_CREATE,
14906                 0644);
14907 #elif DB_VERSION_MAJOR >= 2
14908         DB *result = 0;
14909         db_open(path,
14910                 DB_HASH,
14911                 DB_CREATE,
14912                 0644,
14913                 (DB_ENV *) 0,
14914                 (DB_INFO *) 0,
14915                 &result);
14916 #endif /* DB_VERSION_MAJOR */
14917 #else
14918         DB *result = dbopen(path,
14919                      2,
14920                      0644,
14921                      DB_HASH,
14922                      0);
14923 #endif
14924         ${cf_cv_main_return:-return}(result != 0)
14925
14926   ;
14927   return 0;
14928 }
14929 _ACEOF
14930 rm -f conftest.$ac_objext conftest$ac_exeext
14931 if { (eval echo "$as_me:14931: \"$ac_link\"") >&5
14932   (eval $ac_link) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest$ac_exeext'
14937   { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942
14943         if test -n "$cf_db_libs" ; then
14944                 cf_cv_hashed_db_libs=$cf_db_libs
14945         else
14946                 cf_cv_hashed_db_libs=default
14947         fi
14948         LIBS="$cf_save_libs"
14949         break
14950
14951 else
14952   echo "$as_me: failed program was:" >&5
14953 cat conftest.$ac_ext >&5
14954 fi
14955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14956         LIBS="$cf_save_libs"
14957 done
14958
14959 fi
14960 echo "$as_me:14960: result: $cf_cv_hashed_db_libs" >&5
14961 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14962
14963         if test "$cf_cv_hashed_db_libs" = unknown ; then
14964                 { { echo "$as_me:14964: error: Cannot determine library for db" >&5
14965 echo "$as_me: error: Cannot determine library for db" >&2;}
14966    { (exit 1); exit 1; }; }
14967         elif test "$cf_cv_hashed_db_libs" != default ; then
14968                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14969         fi
14970 fi
14971
14972 else
14973
14974         { { echo "$as_me:14974: error: Cannot find db.h" >&5
14975 echo "$as_me: error: Cannot find db.h" >&2;}
14976    { (exit 1); exit 1; }; }
14977
14978 fi
14979
14980 fi
14981
14982 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14983         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14984         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14985 fi
14986
14987 # Just in case, check if the C compiler has a bool type.
14988
14989 echo "$as_me:14989: checking if we should include stdbool.h" >&5
14990 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14991
14992 if test "${cf_cv_header_stdbool_h+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995
14996         cat >conftest.$ac_ext <<_ACEOF
14997 #line 14997 "configure"
14998 #include "confdefs.h"
14999
15000 int
15001 main ()
15002 {
15003 bool foo = false
15004   ;
15005   return 0;
15006 }
15007 _ACEOF
15008 rm -f conftest.$ac_objext
15009 if { (eval echo "$as_me:15009: \"$ac_compile\"") >&5
15010   (eval $ac_compile) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } &&
15014          { ac_try='test -s conftest.$ac_objext'
15015   { (eval echo "$as_me:15015: \"$ac_try\"") >&5
15016   (eval $ac_try) 2>&5
15017   ac_status=$?
15018   echo "$as_me:15018: \$? = $ac_status" >&5
15019   (exit $ac_status); }; }; then
15020   cf_cv_header_stdbool_h=0
15021 else
15022   echo "$as_me: failed program was:" >&5
15023 cat conftest.$ac_ext >&5
15024 cat >conftest.$ac_ext <<_ACEOF
15025 #line 15025 "configure"
15026 #include "confdefs.h"
15027
15028 #ifndef __BEOS__
15029 #include <stdbool.h>
15030 #endif
15031
15032 int
15033 main ()
15034 {
15035 bool foo = false
15036   ;
15037   return 0;
15038 }
15039 _ACEOF
15040 rm -f conftest.$ac_objext
15041 if { (eval echo "$as_me:15041: \"$ac_compile\"") >&5
15042   (eval $ac_compile) 2>&5
15043   ac_status=$?
15044   echo "$as_me:15044: \$? = $ac_status" >&5
15045   (exit $ac_status); } &&
15046          { ac_try='test -s conftest.$ac_objext'
15047   { (eval echo "$as_me:15047: \"$ac_try\"") >&5
15048   (eval $ac_try) 2>&5
15049   ac_status=$?
15050   echo "$as_me:15050: \$? = $ac_status" >&5
15051   (exit $ac_status); }; }; then
15052   cf_cv_header_stdbool_h=1
15053 else
15054   echo "$as_me: failed program was:" >&5
15055 cat conftest.$ac_ext >&5
15056 cf_cv_header_stdbool_h=0
15057 fi
15058 rm -f conftest.$ac_objext conftest.$ac_ext
15059 fi
15060 rm -f conftest.$ac_objext conftest.$ac_ext
15061 fi
15062
15063 if test "$cf_cv_header_stdbool_h" = 1
15064 then    echo "$as_me:15064: result: yes" >&5
15065 echo "${ECHO_T}yes" >&6
15066 else    echo "$as_me:15066: result: no" >&5
15067 echo "${ECHO_T}no" >&6
15068 fi
15069
15070 echo "$as_me:15070: checking for builtin bool type" >&5
15071 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15072
15073 if test "${cf_cv_cc_bool_type+set}" = set; then
15074   echo $ECHO_N "(cached) $ECHO_C" >&6
15075 else
15076
15077         cat >conftest.$ac_ext <<_ACEOF
15078 #line 15078 "configure"
15079 #include "confdefs.h"
15080
15081 #include <stdio.h>
15082 #include <sys/types.h>
15083
15084 int
15085 main ()
15086 {
15087 bool x = false
15088   ;
15089   return 0;
15090 }
15091 _ACEOF
15092 rm -f conftest.$ac_objext
15093 if { (eval echo "$as_me:15093: \"$ac_compile\"") >&5
15094   (eval $ac_compile) 2>&5
15095   ac_status=$?
15096   echo "$as_me:15096: \$? = $ac_status" >&5
15097   (exit $ac_status); } &&
15098          { ac_try='test -s conftest.$ac_objext'
15099   { (eval echo "$as_me:15099: \"$ac_try\"") >&5
15100   (eval $ac_try) 2>&5
15101   ac_status=$?
15102   echo "$as_me:15102: \$? = $ac_status" >&5
15103   (exit $ac_status); }; }; then
15104   cf_cv_cc_bool_type=1
15105 else
15106   echo "$as_me: failed program was:" >&5
15107 cat conftest.$ac_ext >&5
15108 cf_cv_cc_bool_type=0
15109 fi
15110 rm -f conftest.$ac_objext conftest.$ac_ext
15111
15112 fi
15113
15114 if test "$cf_cv_cc_bool_type" = 1
15115 then    echo "$as_me:15115: result: yes" >&5
15116 echo "${ECHO_T}yes" >&6
15117 else    echo "$as_me:15117: result: no" >&5
15118 echo "${ECHO_T}no" >&6
15119 fi
15120
15121 # Check for C++ compiler characteristics (and ensure that it's there!)
15122 if test -n "$CXX" ; then
15123         ac_ext=cc
15124 ac_cpp='$CXXCPP $CPPFLAGS'
15125 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15126 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15127 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15128 ac_main_return=return
15129
15130 if test -n "$GXX" ; then
15131 case $cf_cv_system_name in #(vi
15132 os2*) #(vi
15133         cf_stdcpp_libname=stdcpp
15134         ;;
15135 *)
15136         cf_stdcpp_libname=stdc++
15137         ;;
15138 esac
15139 echo "$as_me:15139: checking for library $cf_stdcpp_libname" >&5
15140 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15141 if test "${cf_cv_libstdcpp+set}" = set; then
15142   echo $ECHO_N "(cached) $ECHO_C" >&6
15143 else
15144
15145         cf_save="$LIBS"
15146         LIBS="$LIBS -l$cf_stdcpp_libname"
15147 cat >conftest.$ac_ext <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15150
15151 #include <strstream.h>
15152 int
15153 main ()
15154 {
15155
15156 char buf[80];
15157 strstreambuf foo(buf, sizeof(buf))
15158
15159   ;
15160   return 0;
15161 }
15162 _ACEOF
15163 rm -f conftest.$ac_objext conftest$ac_exeext
15164 if { (eval echo "$as_me:15164: \"$ac_link\"") >&5
15165   (eval $ac_link) 2>&5
15166   ac_status=$?
15167   echo "$as_me:15167: \$? = $ac_status" >&5
15168   (exit $ac_status); } &&
15169          { ac_try='test -s conftest$ac_exeext'
15170   { (eval echo "$as_me:15170: \"$ac_try\"") >&5
15171   (eval $ac_try) 2>&5
15172   ac_status=$?
15173   echo "$as_me:15173: \$? = $ac_status" >&5
15174   (exit $ac_status); }; }; then
15175   cf_cv_libstdcpp=yes
15176 else
15177   echo "$as_me: failed program was:" >&5
15178 cat conftest.$ac_ext >&5
15179 cf_cv_libstdcpp=no
15180 fi
15181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15182         LIBS="$cf_save"
15183
15184 fi
15185 echo "$as_me:15185: result: $cf_cv_libstdcpp" >&5
15186 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15187 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15188 fi
15189
15190         echo "$as_me:15190: checking whether $CXX understands -c and -o together" >&5
15191 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15192 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195
15196 cat > conftest.$ac_ext <<CF_EOF
15197 #include <stdio.h>
15198 int main()
15199 {
15200         ${cf_cv_main_return:-return}(0);
15201 }
15202 CF_EOF
15203 # We do the test twice because some compilers refuse to overwrite an
15204 # existing .o file with -o, though they will create one.
15205 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15206 if { (eval echo "$as_me:15206: \"$ac_try\"") >&5
15207   (eval $ac_try) 2>&5
15208   ac_status=$?
15209   echo "$as_me:15209: \$? = $ac_status" >&5
15210   (exit $ac_status); } &&
15211   test -f conftest2.$ac_objext && { (eval echo "$as_me:15211: \"$ac_try\"") >&5
15212   (eval $ac_try) 2>&5
15213   ac_status=$?
15214   echo "$as_me:15214: \$? = $ac_status" >&5
15215   (exit $ac_status); };
15216 then
15217   eval cf_cv_prog_CXX_c_o=yes
15218 else
15219   eval cf_cv_prog_CXX_c_o=no
15220 fi
15221 rm -f conftest*
15222
15223 fi
15224 if test $cf_cv_prog_CXX_c_o = yes; then
15225   echo "$as_me:15225: result: yes" >&5
15226 echo "${ECHO_T}yes" >&6
15227 else
15228   echo "$as_me:15228: result: no" >&5
15229 echo "${ECHO_T}no" >&6
15230 fi
15231
15232         case $GXX_VERSION in
15233         1*|2.0-6*)
15234                 cf_cxx_library=yes
15235                 ;;
15236         *-2.7*|2.7*)
15237
15238 cf_cxx_library=unknown
15239 case $cf_cv_system_name in #(vi
15240 os2*) #(vi
15241         cf_gpp_libname=gpp
15242         ;;
15243 *)
15244         cf_gpp_libname=g++
15245         ;;
15246 esac
15247 if test "$GXX" = yes; then
15248         echo "$as_me:15248: checking for lib$cf_gpp_libname" >&5
15249 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15250         cf_save="$LIBS"
15251         LIBS="$LIBS -l$cf_gpp_libname"
15252         cat >conftest.$ac_ext <<_ACEOF
15253 #line 15253 "configure"
15254 #include "confdefs.h"
15255
15256 #include <$cf_gpp_libname/builtin.h>
15257
15258 int
15259 main ()
15260 {
15261 two_arg_error_handler_t foo2 = lib_error_handler
15262   ;
15263   return 0;
15264 }
15265 _ACEOF
15266 rm -f conftest.$ac_objext conftest$ac_exeext
15267 if { (eval echo "$as_me:15267: \"$ac_link\"") >&5
15268   (eval $ac_link) 2>&5
15269   ac_status=$?
15270   echo "$as_me:15270: \$? = $ac_status" >&5
15271   (exit $ac_status); } &&
15272          { ac_try='test -s conftest$ac_exeext'
15273   { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274   (eval $ac_try) 2>&5
15275   ac_status=$?
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); }; }; then
15278   cf_cxx_library=yes
15279          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15280          if test "$cf_gpp_libname" = cpp ; then
15281             cat >>confdefs.h <<\EOF
15282 #define HAVE_GPP_BUILTIN_H 1
15283 EOF
15284
15285          else
15286             cat >>confdefs.h <<\EOF
15287 #define HAVE_GXX_BUILTIN_H 1
15288 EOF
15289
15290          fi
15291 else
15292   echo "$as_me: failed program was:" >&5
15293 cat conftest.$ac_ext >&5
15294 cat >conftest.$ac_ext <<_ACEOF
15295 #line 15295 "configure"
15296 #include "confdefs.h"
15297
15298 #include <builtin.h>
15299
15300 int
15301 main ()
15302 {
15303 two_arg_error_handler_t foo2 = lib_error_handler
15304   ;
15305   return 0;
15306 }
15307 _ACEOF
15308 rm -f conftest.$ac_objext conftest$ac_exeext
15309 if { (eval echo "$as_me:15309: \"$ac_link\"") >&5
15310   (eval $ac_link) 2>&5
15311   ac_status=$?
15312   echo "$as_me:15312: \$? = $ac_status" >&5
15313   (exit $ac_status); } &&
15314          { ac_try='test -s conftest$ac_exeext'
15315   { (eval echo "$as_me:15315: \"$ac_try\"") >&5
15316   (eval $ac_try) 2>&5
15317   ac_status=$?
15318   echo "$as_me:15318: \$? = $ac_status" >&5
15319   (exit $ac_status); }; }; then
15320   cf_cxx_library=yes
15321          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15322          cat >>confdefs.h <<\EOF
15323 #define HAVE_BUILTIN_H 1
15324 EOF
15325
15326 else
15327   echo "$as_me: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15329 cf_cxx_library=no
15330 fi
15331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15332 fi
15333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15334         LIBS="$cf_save"
15335         echo "$as_me:15335: result: $cf_cxx_library" >&5
15336 echo "${ECHO_T}$cf_cxx_library" >&6
15337 fi
15338
15339                 ;;
15340         *)
15341                 cf_cxx_library=no
15342                 ;;
15343         esac
15344
15345         ac_ext=cc
15346 ac_cpp='$CXXCPP $CPPFLAGS'
15347 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15348 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15349 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15350 ac_main_return=return
15351 echo "$as_me:15351: checking how to run the C++ preprocessor" >&5
15352 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15353 if test -z "$CXXCPP"; then
15354   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15355   echo $ECHO_N "(cached) $ECHO_C" >&6
15356 else
15357       # Double quotes because CXXCPP needs to be expanded
15358     for CXXCPP in "$CXX -E" "/lib/cpp"
15359     do
15360       ac_preproc_ok=false
15361 for ac_cxx_preproc_warn_flag in '' yes
15362 do
15363   # Use a header file that comes with gcc, so configuring glibc
15364   # with a fresh cross-compiler works.
15365   # On the NeXT, cc -E runs the code through the compiler's parser,
15366   # not just through cpp. "Syntax error" is here to catch this case.
15367   cat >conftest.$ac_ext <<_ACEOF
15368 #line 15368 "configure"
15369 #include "confdefs.h"
15370 #include <assert.h>
15371                      Syntax error
15372 _ACEOF
15373 if { (eval echo "$as_me:15373: \"$ac_cpp conftest.$ac_ext\"") >&5
15374   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15375   ac_status=$?
15376   egrep -v '^ *\+' conftest.er1 >conftest.err
15377   rm -f conftest.er1
15378   cat conftest.err >&5
15379   echo "$as_me:15379: \$? = $ac_status" >&5
15380   (exit $ac_status); } >/dev/null; then
15381   if test -s conftest.err; then
15382     ac_cpp_err=$ac_cxx_preproc_warn_flag
15383   else
15384     ac_cpp_err=
15385   fi
15386 else
15387   ac_cpp_err=yes
15388 fi
15389 if test -z "$ac_cpp_err"; then
15390   :
15391 else
15392   echo "$as_me: failed program was:" >&5
15393   cat conftest.$ac_ext >&5
15394   # Broken: fails on valid input.
15395 continue
15396 fi
15397 rm -f conftest.err conftest.$ac_ext
15398
15399   # OK, works on sane cases.  Now check whether non-existent headers
15400   # can be detected and how.
15401   cat >conftest.$ac_ext <<_ACEOF
15402 #line 15402 "configure"
15403 #include "confdefs.h"
15404 #include <ac_nonexistent.h>
15405 _ACEOF
15406 if { (eval echo "$as_me:15406: \"$ac_cpp conftest.$ac_ext\"") >&5
15407   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15408   ac_status=$?
15409   egrep -v '^ *\+' conftest.er1 >conftest.err
15410   rm -f conftest.er1
15411   cat conftest.err >&5
15412   echo "$as_me:15412: \$? = $ac_status" >&5
15413   (exit $ac_status); } >/dev/null; then
15414   if test -s conftest.err; then
15415     ac_cpp_err=$ac_cxx_preproc_warn_flag
15416   else
15417     ac_cpp_err=
15418   fi
15419 else
15420   ac_cpp_err=yes
15421 fi
15422 if test -z "$ac_cpp_err"; then
15423   # Broken: success on invalid input.
15424 continue
15425 else
15426   echo "$as_me: failed program was:" >&5
15427   cat conftest.$ac_ext >&5
15428   # Passes both tests.
15429 ac_preproc_ok=:
15430 break
15431 fi
15432 rm -f conftest.err conftest.$ac_ext
15433
15434 done
15435 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15436 rm -f conftest.err conftest.$ac_ext
15437 if $ac_preproc_ok; then
15438   break
15439 fi
15440
15441     done
15442     ac_cv_prog_CXXCPP=$CXXCPP
15443
15444 fi
15445   CXXCPP=$ac_cv_prog_CXXCPP
15446 else
15447   ac_cv_prog_CXXCPP=$CXXCPP
15448 fi
15449 echo "$as_me:15449: result: $CXXCPP" >&5
15450 echo "${ECHO_T}$CXXCPP" >&6
15451 ac_preproc_ok=false
15452 for ac_cxx_preproc_warn_flag in '' yes
15453 do
15454   # Use a header file that comes with gcc, so configuring glibc
15455   # with a fresh cross-compiler works.
15456   # On the NeXT, cc -E runs the code through the compiler's parser,
15457   # not just through cpp. "Syntax error" is here to catch this case.
15458   cat >conftest.$ac_ext <<_ACEOF
15459 #line 15459 "configure"
15460 #include "confdefs.h"
15461 #include <assert.h>
15462                      Syntax error
15463 _ACEOF
15464 if { (eval echo "$as_me:15464: \"$ac_cpp conftest.$ac_ext\"") >&5
15465   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15466   ac_status=$?
15467   egrep -v '^ *\+' conftest.er1 >conftest.err
15468   rm -f conftest.er1
15469   cat conftest.err >&5
15470   echo "$as_me:15470: \$? = $ac_status" >&5
15471   (exit $ac_status); } >/dev/null; then
15472   if test -s conftest.err; then
15473     ac_cpp_err=$ac_cxx_preproc_warn_flag
15474   else
15475     ac_cpp_err=
15476   fi
15477 else
15478   ac_cpp_err=yes
15479 fi
15480 if test -z "$ac_cpp_err"; then
15481   :
15482 else
15483   echo "$as_me: failed program was:" >&5
15484   cat conftest.$ac_ext >&5
15485   # Broken: fails on valid input.
15486 continue
15487 fi
15488 rm -f conftest.err conftest.$ac_ext
15489
15490   # OK, works on sane cases.  Now check whether non-existent headers
15491   # can be detected and how.
15492   cat >conftest.$ac_ext <<_ACEOF
15493 #line 15493 "configure"
15494 #include "confdefs.h"
15495 #include <ac_nonexistent.h>
15496 _ACEOF
15497 if { (eval echo "$as_me:15497: \"$ac_cpp conftest.$ac_ext\"") >&5
15498   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15499   ac_status=$?
15500   egrep -v '^ *\+' conftest.er1 >conftest.err
15501   rm -f conftest.er1
15502   cat conftest.err >&5
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit $ac_status); } >/dev/null; then
15505   if test -s conftest.err; then
15506     ac_cpp_err=$ac_cxx_preproc_warn_flag
15507   else
15508     ac_cpp_err=
15509   fi
15510 else
15511   ac_cpp_err=yes
15512 fi
15513 if test -z "$ac_cpp_err"; then
15514   # Broken: success on invalid input.
15515 continue
15516 else
15517   echo "$as_me: failed program was:" >&5
15518   cat conftest.$ac_ext >&5
15519   # Passes both tests.
15520 ac_preproc_ok=:
15521 break
15522 fi
15523 rm -f conftest.err conftest.$ac_ext
15524
15525 done
15526 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15527 rm -f conftest.err conftest.$ac_ext
15528 if $ac_preproc_ok; then
15529   :
15530 else
15531   { { echo "$as_me:15531: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15532 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15533    { (exit 1); exit 1; }; }
15534 fi
15535
15536 ac_ext=cc
15537 ac_cpp='$CXXCPP $CPPFLAGS'
15538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15541 ac_main_return=return
15542
15543 for ac_header in iostream typeinfo
15544 do
15545 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15546 echo "$as_me:15546: checking for $ac_header" >&5
15547 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15548 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551   cat >conftest.$ac_ext <<_ACEOF
15552 #line 15552 "configure"
15553 #include "confdefs.h"
15554 #include <$ac_header>
15555 _ACEOF
15556 if { (eval echo "$as_me:15556: \"$ac_cpp conftest.$ac_ext\"") >&5
15557   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15558   ac_status=$?
15559   egrep -v '^ *\+' conftest.er1 >conftest.err
15560   rm -f conftest.er1
15561   cat conftest.err >&5
15562   echo "$as_me:15562: \$? = $ac_status" >&5
15563   (exit $ac_status); } >/dev/null; then
15564   if test -s conftest.err; then
15565     ac_cpp_err=$ac_cxx_preproc_warn_flag
15566   else
15567     ac_cpp_err=
15568   fi
15569 else
15570   ac_cpp_err=yes
15571 fi
15572 if test -z "$ac_cpp_err"; then
15573   eval "$as_ac_Header=yes"
15574 else
15575   echo "$as_me: failed program was:" >&5
15576   cat conftest.$ac_ext >&5
15577   eval "$as_ac_Header=no"
15578 fi
15579 rm -f conftest.err conftest.$ac_ext
15580 fi
15581 echo "$as_me:15581: result: `eval echo '${'$as_ac_Header'}'`" >&5
15582 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15583 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15584   cat >>confdefs.h <<EOF
15585 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15586 EOF
15587
15588 fi
15589 done
15590
15591     if test x"$ac_cv_header_iostream" = xyes ; then
15592         echo "$as_me:15592: checking if iostream uses std-namespace" >&5
15593 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15594         cat >conftest.$ac_ext <<_ACEOF
15595 #line 15595 "configure"
15596 #include "confdefs.h"
15597
15598 #include <iostream>
15599 using std::endl;
15600 using std::cerr;
15601 int
15602 main ()
15603 {
15604
15605 cerr << "testing" << endl;
15606
15607   ;
15608   return 0;
15609 }
15610 _ACEOF
15611 rm -f conftest.$ac_objext
15612 if { (eval echo "$as_me:15612: \"$ac_compile\"") >&5
15613   (eval $ac_compile) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit $ac_status); } &&
15617          { ac_try='test -s conftest.$ac_objext'
15618   { (eval echo "$as_me:15618: \"$ac_try\"") >&5
15619   (eval $ac_try) 2>&5
15620   ac_status=$?
15621   echo "$as_me:15621: \$? = $ac_status" >&5
15622   (exit $ac_status); }; }; then
15623   cf_iostream_namespace=yes
15624 else
15625   echo "$as_me: failed program was:" >&5
15626 cat conftest.$ac_ext >&5
15627 cf_iostream_namespace=no
15628 fi
15629 rm -f conftest.$ac_objext conftest.$ac_ext
15630         echo "$as_me:15630: result: $cf_iostream_namespace" >&5
15631 echo "${ECHO_T}$cf_iostream_namespace" >&6
15632         if test "$cf_iostream_namespace" = yes ; then
15633             cat >>confdefs.h <<\EOF
15634 #define IOSTREAM_NAMESPACE 1
15635 EOF
15636
15637         fi
15638     fi
15639
15640 echo "$as_me:15640: checking if we should include stdbool.h" >&5
15641 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15642
15643 if test "${cf_cv_header_stdbool_h+set}" = set; then
15644   echo $ECHO_N "(cached) $ECHO_C" >&6
15645 else
15646
15647         cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650
15651 int
15652 main ()
15653 {
15654 bool foo = false
15655   ;
15656   return 0;
15657 }
15658 _ACEOF
15659 rm -f conftest.$ac_objext
15660 if { (eval echo "$as_me:15660: \"$ac_compile\"") >&5
15661   (eval $ac_compile) 2>&5
15662   ac_status=$?
15663   echo "$as_me:15663: \$? = $ac_status" >&5
15664   (exit $ac_status); } &&
15665          { ac_try='test -s conftest.$ac_objext'
15666   { (eval echo "$as_me:15666: \"$ac_try\"") >&5
15667   (eval $ac_try) 2>&5
15668   ac_status=$?
15669   echo "$as_me:15669: \$? = $ac_status" >&5
15670   (exit $ac_status); }; }; then
15671   cf_cv_header_stdbool_h=0
15672 else
15673   echo "$as_me: failed program was:" >&5
15674 cat conftest.$ac_ext >&5
15675 cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 #ifndef __BEOS__
15680 #include <stdbool.h>
15681 #endif
15682
15683 int
15684 main ()
15685 {
15686 bool foo = false
15687   ;
15688   return 0;
15689 }
15690 _ACEOF
15691 rm -f conftest.$ac_objext
15692 if { (eval echo "$as_me:15692: \"$ac_compile\"") >&5
15693   (eval $ac_compile) 2>&5
15694   ac_status=$?
15695   echo "$as_me:15695: \$? = $ac_status" >&5
15696   (exit $ac_status); } &&
15697          { ac_try='test -s conftest.$ac_objext'
15698   { (eval echo "$as_me:15698: \"$ac_try\"") >&5
15699   (eval $ac_try) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); }; }; then
15703   cf_cv_header_stdbool_h=1
15704 else
15705   echo "$as_me: failed program was:" >&5
15706 cat conftest.$ac_ext >&5
15707 cf_cv_header_stdbool_h=0
15708 fi
15709 rm -f conftest.$ac_objext conftest.$ac_ext
15710 fi
15711 rm -f conftest.$ac_objext conftest.$ac_ext
15712 fi
15713
15714 if test "$cf_cv_header_stdbool_h" = 1
15715 then    echo "$as_me:15715: result: yes" >&5
15716 echo "${ECHO_T}yes" >&6
15717 else    echo "$as_me:15717: result: no" >&5
15718 echo "${ECHO_T}no" >&6
15719 fi
15720
15721 echo "$as_me:15721: checking for builtin bool type" >&5
15722 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15723
15724 if test "${cf_cv_builtin_bool+set}" = set; then
15725   echo $ECHO_N "(cached) $ECHO_C" >&6
15726 else
15727
15728         cat >conftest.$ac_ext <<_ACEOF
15729 #line 15729 "configure"
15730 #include "confdefs.h"
15731
15732 #include <stdio.h>
15733 #include <sys/types.h>
15734
15735 int
15736 main ()
15737 {
15738 bool x = false
15739   ;
15740   return 0;
15741 }
15742 _ACEOF
15743 rm -f conftest.$ac_objext
15744 if { (eval echo "$as_me:15744: \"$ac_compile\"") >&5
15745   (eval $ac_compile) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); } &&
15749          { ac_try='test -s conftest.$ac_objext'
15750   { (eval echo "$as_me:15750: \"$ac_try\"") >&5
15751   (eval $ac_try) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); }; }; then
15755   cf_cv_builtin_bool=1
15756 else
15757   echo "$as_me: failed program was:" >&5
15758 cat conftest.$ac_ext >&5
15759 cf_cv_builtin_bool=0
15760 fi
15761 rm -f conftest.$ac_objext conftest.$ac_ext
15762
15763 fi
15764
15765 if test "$cf_cv_builtin_bool" = 1
15766 then    echo "$as_me:15766: result: yes" >&5
15767 echo "${ECHO_T}yes" >&6
15768 else    echo "$as_me:15768: result: no" >&5
15769 echo "${ECHO_T}no" >&6
15770 fi
15771
15772 echo "$as_me:15772: checking for size of bool" >&5
15773 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15774 if test "${cf_cv_type_of_bool+set}" = set; then
15775   echo $ECHO_N "(cached) $ECHO_C" >&6
15776 else
15777
15778         rm -f cf_test.out
15779         if test "$cross_compiling" = yes; then
15780   cf_cv_type_of_bool=unknown
15781 else
15782   cat >conftest.$ac_ext <<_ACEOF
15783 #line 15783 "configure"
15784 #include "confdefs.h"
15785
15786 #include <stdlib.h>
15787 #include <stdio.h>
15788
15789 #if defined(__cplusplus)
15790
15791 #ifdef HAVE_GXX_BUILTIN_H
15792 #include <g++/builtin.h>
15793 #elif HAVE_GPP_BUILTIN_H
15794 #include <gpp/builtin.h>
15795 #elif HAVE_BUILTIN_H
15796 #include <builtin.h>
15797 #endif
15798
15799 #else
15800
15801 #if $cf_cv_header_stdbool_h
15802 #include <stdbool.h>
15803 #endif
15804
15805 #endif
15806
15807 main()
15808 {
15809         FILE *fp = fopen("cf_test.out", "w");
15810         if (fp != 0) {
15811                 bool x = true;
15812                 if ((bool)(-x) >= 0)
15813                         fputs("unsigned ", fp);
15814                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15815                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15816                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15817                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15818                 fclose(fp);
15819         }
15820         ${cf_cv_main_return:-return}(0);
15821 }
15822
15823 _ACEOF
15824 rm -f conftest$ac_exeext
15825 if { (eval echo "$as_me:15825: \"$ac_link\"") >&5
15826   (eval $ac_link) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15830   { (eval echo "$as_me:15830: \"$ac_try\"") >&5
15831   (eval $ac_try) 2>&5
15832   ac_status=$?
15833   echo "$as_me:15833: \$? = $ac_status" >&5
15834   (exit $ac_status); }; }; then
15835   cf_cv_type_of_bool=`cat cf_test.out`
15836                  if test -z "$cf_cv_type_of_bool"; then
15837                    cf_cv_type_of_bool=unknown
15838                  fi
15839 else
15840   echo "$as_me: program exited with status $ac_status" >&5
15841 echo "$as_me: failed program was:" >&5
15842 cat conftest.$ac_ext >&5
15843 cf_cv_type_of_bool=unknown
15844 fi
15845 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15846 fi
15847
15848 fi
15849
15850         rm -f cf_test.out
15851 echo "$as_me:15851: result: $cf_cv_type_of_bool" >&5
15852 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15853 if test "$cf_cv_type_of_bool" = unknown ; then
15854         case .$NCURSES_BOOL in #(vi
15855         .auto|.) NCURSES_BOOL=unsigned;;
15856         esac
15857         { echo "$as_me:15857: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15858 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15859         cf_cv_type_of_bool=$NCURSES_BOOL
15860 fi
15861
15862 echo "$as_me:15862: checking for special defines needed for etip.h" >&5
15863 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15864 cf_save_CXXFLAGS="$CXXFLAGS"
15865 cf_result="none"
15866 for cf_math in "" MATH_H
15867 do
15868 for cf_excp in "" MATH_EXCEPTION
15869 do
15870         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15871         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15872         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15873 cat >conftest.$ac_ext <<_ACEOF
15874 #line 15874 "configure"
15875 #include "confdefs.h"
15876
15877 #include <etip.h.in>
15878
15879 int
15880 main ()
15881 {
15882
15883   ;
15884   return 0;
15885 }
15886 _ACEOF
15887 rm -f conftest.$ac_objext
15888 if { (eval echo "$as_me:15888: \"$ac_compile\"") >&5
15889   (eval $ac_compile) 2>&5
15890   ac_status=$?
15891   echo "$as_me:15891: \$? = $ac_status" >&5
15892   (exit $ac_status); } &&
15893          { ac_try='test -s conftest.$ac_objext'
15894   { (eval echo "$as_me:15894: \"$ac_try\"") >&5
15895   (eval $ac_try) 2>&5
15896   ac_status=$?
15897   echo "$as_me:15897: \$? = $ac_status" >&5
15898   (exit $ac_status); }; }; then
15899
15900         test -n "$cf_math" && cat >>confdefs.h <<EOF
15901 #define ETIP_NEEDS_${cf_math} 1
15902 EOF
15903
15904         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15905 #define ETIP_NEEDS_${cf_excp} 1
15906 EOF
15907
15908         cf_result="$cf_math $cf_excp"
15909         break
15910
15911 else
15912   echo "$as_me: failed program was:" >&5
15913 cat conftest.$ac_ext >&5
15914 fi
15915 rm -f conftest.$ac_objext conftest.$ac_ext
15916 done
15917 done
15918 echo "$as_me:15918: result: $cf_result" >&5
15919 echo "${ECHO_T}$cf_result" >&6
15920 CXXFLAGS="$cf_save_CXXFLAGS"
15921
15922 if test -n "$CXX"; then
15923 echo "$as_me:15923: checking if $CXX accepts parameter initialization" >&5
15924 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15925 if test "${cf_cv_cpp_param_init+set}" = set; then
15926   echo $ECHO_N "(cached) $ECHO_C" >&6
15927 else
15928
15929         ac_ext=cc
15930 ac_cpp='$CXXCPP $CPPFLAGS'
15931 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15932 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15933 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15934 ac_main_return=return
15935
15936         if test "$cross_compiling" = yes; then
15937   cf_cv_cpp_param_init=unknown
15938 else
15939   cat >conftest.$ac_ext <<_ACEOF
15940 #line 15940 "configure"
15941 #include "confdefs.h"
15942
15943 class TEST {
15944 private:
15945         int value;
15946 public:
15947         TEST(int x = 1);
15948         ~TEST();
15949 };
15950
15951 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15952 {
15953         value = x;
15954 }
15955 void main() { }
15956
15957 _ACEOF
15958 rm -f conftest$ac_exeext
15959 if { (eval echo "$as_me:15959: \"$ac_link\"") >&5
15960   (eval $ac_link) 2>&5
15961   ac_status=$?
15962   echo "$as_me:15962: \$? = $ac_status" >&5
15963   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15964   { (eval echo "$as_me:15964: \"$ac_try\"") >&5
15965   (eval $ac_try) 2>&5
15966   ac_status=$?
15967   echo "$as_me:15967: \$? = $ac_status" >&5
15968   (exit $ac_status); }; }; then
15969   cf_cv_cpp_param_init=yes
15970 else
15971   echo "$as_me: program exited with status $ac_status" >&5
15972 echo "$as_me: failed program was:" >&5
15973 cat conftest.$ac_ext >&5
15974 cf_cv_cpp_param_init=no
15975 fi
15976 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15977 fi
15978         ac_ext=cc
15979 ac_cpp='$CXXCPP $CPPFLAGS'
15980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15983 ac_main_return=return
15984
15985 fi
15986 echo "$as_me:15986: result: $cf_cv_cpp_param_init" >&5
15987 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15988 fi
15989 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15990 #define CPP_HAS_PARAM_INIT 1
15991 EOF
15992
15993 if test -n "$CXX"; then
15994
15995 echo "$as_me:15995: checking if $CXX accepts static_cast" >&5
15996 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15997 if test "${cf_cv_cpp_static_cast+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000
16001         ac_ext=cc
16002 ac_cpp='$CXXCPP $CPPFLAGS'
16003 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16004 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16005 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16006 ac_main_return=return
16007
16008         cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16011
16012 class NCursesPanel
16013 {
16014 public:
16015   NCursesPanel(int nlines,
16016                int ncols,
16017                int begin_y = 0,
16018                int begin_x = 0)
16019   {
16020   }
16021
16022   ~NCursesPanel();
16023 };
16024
16025 template<class T> class NCursesUserPanel : public NCursesPanel
16026 {
16027 public:
16028   NCursesUserPanel (int nlines,
16029                     int ncols,
16030                     int begin_y = 0,
16031                     int begin_x = 0,
16032                     const T* p_UserData = static_cast<T*>(0))
16033     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16034   {
16035   };
16036   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16037   {
16038   };
16039
16040   virtual ~NCursesUserPanel() {};
16041 };
16042
16043 int
16044 main ()
16045 {
16046
16047         const char* p_UserData = static_cast<char*>(0)
16048   ;
16049   return 0;
16050 }
16051 _ACEOF
16052 rm -f conftest.$ac_objext
16053 if { (eval echo "$as_me:16053: \"$ac_compile\"") >&5
16054   (eval $ac_compile) 2>&5
16055   ac_status=$?
16056   echo "$as_me:16056: \$? = $ac_status" >&5
16057   (exit $ac_status); } &&
16058          { ac_try='test -s conftest.$ac_objext'
16059   { (eval echo "$as_me:16059: \"$ac_try\"") >&5
16060   (eval $ac_try) 2>&5
16061   ac_status=$?
16062   echo "$as_me:16062: \$? = $ac_status" >&5
16063   (exit $ac_status); }; }; then
16064   cf_cv_cpp_static_cast=yes
16065 else
16066   echo "$as_me: failed program was:" >&5
16067 cat conftest.$ac_ext >&5
16068 cf_cv_cpp_static_cast=no
16069 fi
16070 rm -f conftest.$ac_objext conftest.$ac_ext
16071
16072         ac_ext=cc
16073 ac_cpp='$CXXCPP $CPPFLAGS'
16074 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16075 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16076 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16077 ac_main_return=return
16078
16079 fi
16080 echo "$as_me:16080: result: $cf_cv_cpp_static_cast" >&5
16081 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16082
16083 fi
16084
16085 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16086 #define CPP_HAS_STATIC_CAST 1
16087 EOF
16088
16089         CXX_AR='$(AR)'
16090         CXX_ARFLAGS='$(ARFLAGS)'
16091         case $cf_cv_system_name in #(vi
16092         irix*) #(vi
16093             if test "$GXX" != yes ; then
16094                 CXX_AR='$(CXX)'
16095                 CXX_ARFLAGS='-ar -o'
16096             fi
16097             ;;
16098         sco3.2v5*) #(vi
16099             CXXLDFLAGS="-u main"
16100             ;;
16101         solaris2*)
16102             if test "$GXX" != yes ; then
16103                 CXX_AR='$(CXX)'
16104                 CXX_ARFLAGS='-xar -o'
16105             fi
16106             ;;
16107         esac
16108
16109 else
16110         cf_cxx_library=no
16111         cf_cv_builtin_bool=1
16112
16113         # Just because we are not configuring against C++ right now does not
16114         # mean that a user will not want to use C++.  Some distributors disable
16115         # the C++ portion of this configuration as a shortcut (or just to avoid
16116         # compiling the demo in the c++ directory).  So we need a reasonable
16117         # default for the 'bool' type.
16118         #
16119         # Caveat: since the storage of the bool type is not standardized, it
16120         # may change.
16121
16122         if test "$NCURSES_BOOL" != auto ; then
16123                 cf_cv_type_of_bool=$NCURSES_BOOL
16124                 cf_cv_header_stdbool_h=0
16125         else
16126                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16127
16128 echo "$as_me:16128: checking for size of bool" >&5
16129 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16130 if test "${cf_cv_type_of_bool+set}" = set; then
16131   echo $ECHO_N "(cached) $ECHO_C" >&6
16132 else
16133
16134         rm -f cf_test.out
16135         if test "$cross_compiling" = yes; then
16136   cf_cv_type_of_bool=unknown
16137 else
16138   cat >conftest.$ac_ext <<_ACEOF
16139 #line 16139 "configure"
16140 #include "confdefs.h"
16141
16142 #include <stdlib.h>
16143 #include <stdio.h>
16144
16145 #if defined(__cplusplus)
16146
16147 #ifdef HAVE_GXX_BUILTIN_H
16148 #include <g++/builtin.h>
16149 #elif HAVE_GPP_BUILTIN_H
16150 #include <gpp/builtin.h>
16151 #elif HAVE_BUILTIN_H
16152 #include <builtin.h>
16153 #endif
16154
16155 #else
16156
16157 #if $cf_cv_header_stdbool_h
16158 #include <stdbool.h>
16159 #endif
16160
16161 #endif
16162
16163 main()
16164 {
16165         FILE *fp = fopen("cf_test.out", "w");
16166         if (fp != 0) {
16167                 bool x = true;
16168                 if ((bool)(-x) >= 0)
16169                         fputs("unsigned ", fp);
16170                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16171                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16172                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16173                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16174                 fclose(fp);
16175         }
16176         ${cf_cv_main_return:-return}(0);
16177 }
16178
16179 _ACEOF
16180 rm -f conftest$ac_exeext
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182   (eval $ac_link) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16186   { (eval echo "$as_me:16186: \"$ac_try\"") >&5
16187   (eval $ac_try) 2>&5
16188   ac_status=$?
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); }; }; then
16191   cf_cv_type_of_bool=`cat cf_test.out`
16192                  if test -z "$cf_cv_type_of_bool"; then
16193                    cf_cv_type_of_bool=unknown
16194                  fi
16195 else
16196   echo "$as_me: program exited with status $ac_status" >&5
16197 echo "$as_me: failed program was:" >&5
16198 cat conftest.$ac_ext >&5
16199 cf_cv_type_of_bool=unknown
16200 fi
16201 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16202 fi
16203
16204 fi
16205
16206         rm -f cf_test.out
16207 echo "$as_me:16207: result: $cf_cv_type_of_bool" >&5
16208 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16209 if test "$cf_cv_type_of_bool" = unknown ; then
16210         case .$NCURSES_BOOL in #(vi
16211         .auto|.) NCURSES_BOOL=unsigned;;
16212         esac
16213         { echo "$as_me:16213: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16214 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16215         cf_cv_type_of_bool=$NCURSES_BOOL
16216 fi
16217
16218                 else
16219                         echo "$as_me:16219: checking for fallback type of bool" >&5
16220 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16221                         case "$host_cpu" in #(vi
16222                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16223                         *)      cf_cv_type_of_bool=int  ;;
16224                         esac
16225                         echo "$as_me:16225: result: $cf_cv_type_of_bool" >&5
16226 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16227                 fi
16228         fi
16229 fi
16230
16231 # If the C compiler did not declare bool, and we did not determine that the C++
16232 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16233 # ncurses library use the same type as C++ bool.  Note that this allows one to
16234 # specify the type of bool in a configure-script option and postpone
16235 # integration with the C++ compiler provided that the types are compatible.
16236 USE_CXX_BOOL=1
16237 if test $cf_cv_cc_bool_type = 1
16238 then
16239         # oops: C has a bool.  Unlikely, but C++ could differ.
16240         USE_CXX_BOOL=0
16241 elif test $cf_cv_builtin_bool = 0
16242 then
16243         # C++ has no bool
16244         USE_CXX_BOOL=0
16245 else
16246         # this is the normal case
16247         USE_CXX_BOOL='defined(__cplusplus)'
16248 fi
16249
16250 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16251
16252 if test "$cf_with_ada" != "no" ; then
16253     if test "$with_libtool" != "no"; then
16254         { echo "$as_me:16254: WARNING: libtool does not support Ada - disabling feature" >&5
16255 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16256         cf_with_ada=no
16257     fi
16258 fi
16259
16260 if test "$cf_with_ada" != "no" ; then
16261 cf_ada_make=gnatmake
16262 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16263 set dummy $cf_ada_make; ac_word=$2
16264 echo "$as_me:16264: checking for $ac_word" >&5
16265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16266 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16267   echo $ECHO_N "(cached) $ECHO_C" >&6
16268 else
16269   if test -n "$gnat_exists"; then
16270   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16271 else
16272   ac_save_IFS=$IFS; IFS=$ac_path_separator
16273 ac_dummy="$PATH"
16274 for ac_dir in $ac_dummy; do
16275   IFS=$ac_save_IFS
16276   test -z "$ac_dir" && ac_dir=.
16277   $as_executable_p "$ac_dir/$ac_word" || continue
16278 ac_cv_prog_gnat_exists="yes"
16279 echo "$as_me:16279: found $ac_dir/$ac_word" >&5
16280 break
16281 done
16282
16283   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16284 fi
16285 fi
16286 gnat_exists=$ac_cv_prog_gnat_exists
16287 if test -n "$gnat_exists"; then
16288   echo "$as_me:16288: result: $gnat_exists" >&5
16289 echo "${ECHO_T}$gnat_exists" >&6
16290 else
16291   echo "$as_me:16291: result: no" >&5
16292 echo "${ECHO_T}no" >&6
16293 fi
16294
16295 if test "$ac_cv_prog_gnat_exists" = no; then
16296    cf_ada_make=
16297 else
16298
16299 echo "$as_me:16299: checking for gnat version" >&5
16300 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16301 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16302   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16303 echo "$as_me:16303: result: $cf_gnat_version" >&5
16304 echo "${ECHO_T}$cf_gnat_version" >&6
16305
16306 case $cf_gnat_version in
16307   3.1[1-9]*|3.[2-9]*|[4-9].*)
16308     cf_cv_prog_gnat_correct=yes
16309     ;;
16310   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16311      cf_cv_prog_gnat_correct=no
16312      ;;
16313 esac
16314 case $cf_gnat_version in
16315   3.[1-9]*|[4-9].*)
16316       cf_compile_generics=generics
16317       cf_generic_objects="\${GENOBJS}"
16318       ;;
16319   *)  cf_compile_generics=
16320       cf_generic_objects=
16321       ;;
16322 esac
16323
16324    # Extract the first word of "m4", so it can be a program name with args.
16325 set dummy m4; ac_word=$2
16326 echo "$as_me:16326: checking for $ac_word" >&5
16327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16328 if test "${ac_cv_prog_M4_exists+set}" = set; then
16329   echo $ECHO_N "(cached) $ECHO_C" >&6
16330 else
16331   if test -n "$M4_exists"; then
16332   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16333 else
16334   ac_save_IFS=$IFS; IFS=$ac_path_separator
16335 ac_dummy="$PATH"
16336 for ac_dir in $ac_dummy; do
16337   IFS=$ac_save_IFS
16338   test -z "$ac_dir" && ac_dir=.
16339   $as_executable_p "$ac_dir/$ac_word" || continue
16340 ac_cv_prog_M4_exists="yes"
16341 echo "$as_me:16341: found $ac_dir/$ac_word" >&5
16342 break
16343 done
16344
16345   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16346 fi
16347 fi
16348 M4_exists=$ac_cv_prog_M4_exists
16349 if test -n "$M4_exists"; then
16350   echo "$as_me:16350: result: $M4_exists" >&5
16351 echo "${ECHO_T}$M4_exists" >&6
16352 else
16353   echo "$as_me:16353: result: no" >&5
16354 echo "${ECHO_T}no" >&6
16355 fi
16356
16357    if test "$ac_cv_prog_M4_exists" = no; then
16358       cf_cv_prog_gnat_correct=no
16359       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16360    fi
16361    if test "$cf_cv_prog_gnat_correct" = yes; then
16362       echo "$as_me:16362: checking if GNAT works" >&5
16363 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16364
16365 rm -f conftest*
16366 cat >>conftest.ads <<CF_EOF
16367 procedure conftest;
16368 CF_EOF
16369 cat >>conftest.adb <<CF_EOF
16370 with Text_IO;
16371 with GNAT.OS_Lib;
16372 procedure conftest is
16373 begin
16374    Text_IO.Put ("Hello World");
16375    Text_IO.New_Line;
16376    GNAT.OS_Lib.OS_Exit (0);
16377 end conftest;
16378 CF_EOF
16379 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16380    if ( ./conftest 1>&5 2>&1 ) ; then
16381       cf_cv_prog_gnat_correct=yes
16382    else
16383       cf_cv_prog_gnat_correct=no
16384    fi
16385 else
16386    cf_cv_prog_gnat_correct=no
16387 fi
16388 rm -f conftest*
16389
16390       echo "$as_me:16390: result: $cf_cv_prog_gnat_correct" >&5
16391 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16392    fi
16393 fi
16394 if test "$cf_cv_prog_gnat_correct" = yes; then
16395    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16396
16397    echo "$as_me:16397: checking if GNAT pragma Unreferenced works" >&5
16398 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16399
16400 rm -f conftest*
16401 cat >>conftest.ads <<CF_EOF
16402 procedure conftest;
16403 CF_EOF
16404 cat >>conftest.adb <<CF_EOF
16405 with Text_IO;
16406 with GNAT.OS_Lib;
16407 procedure conftest is
16408    test : Integer;
16409    pragma Unreferenced (test);
16410 begin
16411    test := 1;
16412    Text_IO.Put ("Hello World");
16413    Text_IO.New_Line;
16414    GNAT.OS_Lib.OS_Exit (0);
16415 end conftest;
16416 CF_EOF
16417 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16418       cf_cv_pragma_unreferenced=yes
16419 else
16420    cf_cv_pragma_unreferenced=no
16421 fi
16422 rm -f conftest*
16423
16424    echo "$as_me:16424: result: $cf_cv_pragma_unreferenced" >&5
16425 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16426
16427    # if the pragma is supported, use it (needed in the Trace code).
16428    if test $cf_cv_pragma_unreferenced = yes ; then
16429       PRAGMA_UNREF=TRUE
16430    else
16431       PRAGMA_UNREF=FALSE
16432    fi
16433
16434 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16435 if test "${with_ada_compiler+set}" = set; then
16436   withval="$with_ada_compiler"
16437   cf_ada_compiler=$withval
16438 else
16439   cf_ada_compiler=gnatmake
16440 fi;
16441
16442    cf_ada_package=terminal_interface
16443
16444 # Check whether --with-ada-include or --without-ada-include was given.
16445 if test "${with_ada_include+set}" = set; then
16446   withval="$with_ada_include"
16447
16448 else
16449   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16450 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16451
16452 if test "x$prefix" != xNONE; then
16453   cf_path_syntax="$prefix"
16454 else
16455   cf_path_syntax="$ac_default_prefix"
16456 fi
16457
16458 case ".$withval" in #(vi
16459 .\$\(*\)*|.\'*\'*) #(vi
16460   ;;
16461 ..|./*|.\\*) #(vi
16462   ;;
16463 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16464   ;;
16465 .\${*prefix}*) #(vi
16466   eval withval="$withval"
16467   case ".$withval" in #(vi
16468   .NONE/*)
16469     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16470     ;;
16471   esac
16472   ;; #(vi
16473 .no|.NONE/*)
16474   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16475   ;;
16476 *)
16477   { { echo "$as_me:16477: error: expected a pathname, not \"$withval\"" >&5
16478 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16479    { (exit 1); exit 1; }; }
16480   ;;
16481 esac
16482
16483 fi
16484 ADA_INCLUDE="$withval"
16485
16486 # Check whether --with-ada-objects or --without-ada-objects was given.
16487 if test "${with_ada_objects+set}" = set; then
16488   withval="$with_ada_objects"
16489
16490 else
16491   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16492 fi; if test -n "$prefix/lib/ada/adalib" ; then
16493
16494 if test "x$prefix" != xNONE; then
16495   cf_path_syntax="$prefix"
16496 else
16497   cf_path_syntax="$ac_default_prefix"
16498 fi
16499
16500 case ".$withval" in #(vi
16501 .\$\(*\)*|.\'*\'*) #(vi
16502   ;;
16503 ..|./*|.\\*) #(vi
16504   ;;
16505 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16506   ;;
16507 .\${*prefix}*) #(vi
16508   eval withval="$withval"
16509   case ".$withval" in #(vi
16510   .NONE/*)
16511     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16512     ;;
16513   esac
16514   ;; #(vi
16515 .no|.NONE/*)
16516   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16517   ;;
16518 *)
16519   { { echo "$as_me:16519: error: expected a pathname, not \"$withval\"" >&5
16520 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16521    { (exit 1); exit 1; }; }
16522   ;;
16523 esac
16524
16525 fi
16526 ADA_OBJECTS="$withval"
16527
16528 fi
16529 fi
16530 else
16531    cf_with_ada=no
16532 fi
16533
16534 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16535 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16536 ###
16537 ### ticlib modules may be a separate library, otherwise contained in termlib.
16538 ### termlib modules may be a separate library, otherwise contained in ncurses.
16539 ###
16540 ### The of "+" or " " between the tokens controls the way the script
16541 ### chooses to split module lists into libraries.
16542 ###
16543 ### (see CF_LIB_RULES).
16544 echo "$as_me:16544: checking for library subsets" >&5
16545 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16546 LIB_SUBSETS=
16547
16548 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16549         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16550         if test "$with_ticlib" != no ; then
16551                 LIB_SUBSETS="${LIB_SUBSETS} "
16552         else
16553                 LIB_SUBSETS="${LIB_SUBSETS}+"
16554         fi
16555 fi
16556
16557 LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
16558
16559 case $cf_cv_system_name in #(vi
16560 *mingw32*) #(vi
16561         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16562         ;;
16563 *) #(vi
16564         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16565         ;;
16566 esac
16567
16568 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16569 if test "$with_termlib" != no ; then
16570         LIB_SUBSETS="${LIB_SUBSETS} "
16571 else
16572         LIB_SUBSETS="${LIB_SUBSETS}+"
16573 fi
16574
16575 LIB_SUBSETS="${LIB_SUBSETS}base"
16576
16577 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16578 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16579
16580 echo "$as_me:16580: result: $LIB_SUBSETS" >&5
16581 echo "${ECHO_T}$LIB_SUBSETS" >&6
16582
16583 ### Construct the list of include-directories to be generated
16584
16585 CPPFLAGS="$CPPFLAGS -I. -I../include"
16586 if test "$srcdir" != "."; then
16587         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16588 fi
16589 if test "$GCC" != yes; then
16590         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16591 elif test "$includedir" != "/usr/include"; then
16592         if test "$includedir" = '${prefix}/include' ; then
16593                 if test $prefix != /usr ; then
16594                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16595                 fi
16596         else
16597                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16598         fi
16599 fi
16600
16601 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16602 if test "$srcdir" != "."; then
16603         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16604 fi
16605 if test "$GCC" != yes; then
16606         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16607 elif test "$includedir" != "/usr/include"; then
16608         if test "$includedir" = '${prefix}/include' ; then
16609                 if test $prefix != /usr ; then
16610                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16611                 fi
16612         else
16613                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16614         fi
16615 fi
16616
16617 ### Build up pieces for makefile rules
16618 echo "$as_me:16618: checking default library suffix" >&5
16619 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16620
16621         case $DFT_LWR_MODEL in
16622         libtool) DFT_ARG_SUFFIX=''   ;;
16623         normal)  DFT_ARG_SUFFIX=''   ;;
16624         debug)   DFT_ARG_SUFFIX='_g' ;;
16625         profile) DFT_ARG_SUFFIX='_p' ;;
16626         shared)  DFT_ARG_SUFFIX=''   ;;
16627         esac
16628         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16629 echo "$as_me:16629: result: $DFT_ARG_SUFFIX" >&5
16630 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16631
16632 echo "$as_me:16632: checking default library-dependency suffix" >&5
16633 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16634
16635         case $DFT_LWR_MODEL in #(vi
16636         libtool) #(vi
16637                 DFT_LIB_SUFFIX='.la'
16638                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16639                 ;;
16640         normal) #(vi
16641                 DFT_LIB_SUFFIX='.a'
16642                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16643                 ;;
16644         debug) #(vi
16645                 DFT_LIB_SUFFIX='_g.a'
16646                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16647                 ;;
16648         profile) #(vi
16649                 DFT_LIB_SUFFIX='_p.a'
16650                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16651                 ;;
16652         shared) #(vi
16653                 case $cf_cv_system_name in
16654                 aix[56]*) #(vi
16655                         DFT_LIB_SUFFIX='.a'
16656                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16657                         ;;
16658                 cygwin*) #(vi
16659                         DFT_LIB_SUFFIX='.dll'
16660                         DFT_DEP_SUFFIX='.dll.a'
16661                         ;;
16662                 darwin*) #(vi
16663                         DFT_LIB_SUFFIX='.dylib'
16664                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16665                         ;;
16666                 hpux*) #(vi
16667                         case $target in
16668                         ia64*) #(vi
16669                                 DFT_LIB_SUFFIX='.so'
16670                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16671                                 ;;
16672                         *) #(vi
16673                                 DFT_LIB_SUFFIX='.sl'
16674                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16675                                 ;;
16676                         esac
16677                         ;;
16678                 *)      DFT_LIB_SUFFIX='.so'
16679                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16680                         ;;
16681                 esac
16682         esac
16683         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16684         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16685 echo "$as_me:16685: result: $DFT_DEP_SUFFIX" >&5
16686 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16687
16688 echo "$as_me:16688: checking default object directory" >&5
16689 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16690
16691         case $DFT_LWR_MODEL in
16692         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16693         normal)  DFT_OBJ_SUBDIR='objects' ;;
16694         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16695         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16696         shared)
16697                 case $cf_cv_system_name in #(vi
16698                 cygwin) #(vi
16699                         DFT_OBJ_SUBDIR='objects' ;;
16700                 *)
16701                         DFT_OBJ_SUBDIR='obj_s' ;;
16702                 esac
16703         esac
16704 echo "$as_me:16704: result: $DFT_OBJ_SUBDIR" >&5
16705 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16706
16707 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16708 if test "$cf_with_cxx" = yes ; then
16709 echo "$as_me:16709: checking c++ library-dependency suffix" >&5
16710 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16711 if test "$with_libtool" != "no"; then
16712         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16713 else
16714
16715         case normal in #(vi
16716         libtool) #(vi
16717                 CXX_LIB_SUFFIX='.la'
16718                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16719                 ;;
16720         normal) #(vi
16721                 CXX_LIB_SUFFIX='.a'
16722                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16723                 ;;
16724         debug) #(vi
16725                 CXX_LIB_SUFFIX='_g.a'
16726                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16727                 ;;
16728         profile) #(vi
16729                 CXX_LIB_SUFFIX='_p.a'
16730                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16731                 ;;
16732         shared) #(vi
16733                 case $cf_cv_system_name in
16734                 aix[56]*) #(vi
16735                         CXX_LIB_SUFFIX='.a'
16736                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16737                         ;;
16738                 cygwin*) #(vi
16739                         CXX_LIB_SUFFIX='.dll'
16740                         CXX_DEP_SUFFIX='.dll.a'
16741                         ;;
16742                 darwin*) #(vi
16743                         CXX_LIB_SUFFIX='.dylib'
16744                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16745                         ;;
16746                 hpux*) #(vi
16747                         case $target in
16748                         ia64*) #(vi
16749                                 CXX_LIB_SUFFIX='.so'
16750                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16751                                 ;;
16752                         *) #(vi
16753                                 CXX_LIB_SUFFIX='.sl'
16754                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16755                                 ;;
16756                         esac
16757                         ;;
16758                 *)      CXX_LIB_SUFFIX='.so'
16759                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16760                         ;;
16761                 esac
16762         esac
16763         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16764         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16765 fi
16766 echo "$as_me:16766: result: $CXX_LIB_SUFFIX" >&5
16767 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16768
16769 fi
16770
16771 # do not want -ldl in build except as needed for -lncurses dependency
16772 if test "$with_dlsym" = yes ; then
16773 if test $DFT_LWR_MODEL = shared || \
16774    test $DFT_LWR_MODEL = libtool ; then
16775
16776 # remove dl library from $LIBS
16777 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16778
16779 fi
16780 fi
16781 ### Set up low-level terminfo dependencies for makefiles.
16782
16783 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16784 # do not need libdl
16785 TICS_LIST=
16786 if test "$with_dlsym" = yes ; then
16787
16788 # remove dl library from $SHLIB_LIST
16789 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16790
16791 fi
16792
16793 if test "$with_ticlib" != no ; then
16794
16795         if test "$with_ticlib" != yes ; then
16796                 TICS_NAME=$with_ticlib
16797                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16798                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16799                 TICS_LIB_SUFFIX="${with_ticlib}"
16800         else
16801                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16802                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16803                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16804         fi
16805         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16806 else
16807         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16808 fi
16809
16810 if test "$with_termlib" != no ; then
16811
16812         if test "$with_termlib" != yes ; then
16813                 TINFO_NAME=$with_termlib
16814                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16815                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16816                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16817                 TINFO_LIB_SUFFIX="${with_termlib}"
16818         else
16819                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16820                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16821                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16822                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16823         fi
16824
16825         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16826         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16827         if test "$DFT_LWR_MODEL" = "libtool"; then
16828                 TEST_ARGS="${TEST_DEPS}"
16829                 TEST_ARG2="${TEST_DEP2}"
16830                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16831         else
16832                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16833                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16834                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16835                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16836                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16837         fi
16838 else
16839         # the next lines are needed for linking libtic over libncurses
16840         TINFO_NAME=${LIB_NAME}
16841         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16842         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16843         if test "$with_tic_depends" = yes ; then
16844                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16845         else
16846                 TICS_LIST="$SHLIB_LIST"
16847         fi
16848
16849         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16850 fi
16851
16852 if test "$DFT_LWR_MODEL" = shared ; then
16853         case $cf_cv_system_name in #(vi
16854         cygwin*)
16855                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16856                 TINFO_SUFFIX=.dll
16857                 ;;
16858         esac
16859 fi
16860
16861 if test "$with_dlsym" = yes ; then
16862
16863 # remove dl library from $TICS_LIST
16864 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16865
16866 fi
16867
16868 if test "$DFT_LWR_MODEL" = "libtool"; then
16869     OBJEXT=lo
16870 fi
16871
16872 # needed for Ada95
16873 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16874
16875 case $DFT_LWR_MODEL in
16876 normal|debug|profile)
16877
16878 if test "$GCC" = yes ; then
16879         case $cf_cv_system_name in #(
16880         OS/2*|os2*|aix[4]*)     #( vi
16881                 LDFLAGS_STATIC=
16882                 LDFLAGS_SHARED=
16883                 ;;
16884     *)  #( normally, except when broken
16885         LDFLAGS_STATIC=-static
16886         LDFLAGS_SHARED=-dynamic
16887         ;;
16888     esac
16889 else
16890         case $cf_cv_system_name in #(
16891         aix[456]*)      #( from ld manpage
16892                 LDFLAGS_STATIC=-bstatic
16893                 LDFLAGS_SHARED=-bdynamic
16894                 ;;
16895         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16896                 # We could also use just "archive" and "shared".
16897                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16898                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16899                 ;;
16900         irix*)          #( from ld manpage IRIX64
16901                 LDFLAGS_STATIC=-Bstatic
16902                 LDFLAGS_SHARED=-Bdynamic
16903                 ;;
16904         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16905                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16906                 LDFLAGS_STATIC=-noso
16907                 LDFLAGS_SHARED=-so_archive
16908                 ;;
16909         solaris2*)
16910                 LDFLAGS_STATIC=-Bstatic
16911                 LDFLAGS_SHARED=-Bdynamic
16912                 ;;
16913         esac
16914 fi
16915
16916         ;;
16917 esac
16918
16919 echo "$as_me:16919: checking where we will install curses.h" >&5
16920 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16921 test "$with_overwrite" = no && \
16922 test "x$includedir" = 'x${prefix}/include' && \
16923         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16924 echo "$as_me:16924: result: $includedir" >&5
16925 echo "${ECHO_T}$includedir" >&6
16926
16927 ### Resolve a conflict between normal and wide-curses by forcing applications
16928 ### that will need libutf8 to add it to their configure script.
16929 if test "$with_overwrite" != no ; then
16930 if test "$NCURSES_LIBUTF8" = 1 ; then
16931         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16932         { echo "$as_me:16932: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16933 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16934 fi
16935 fi
16936 WITH_OVERWRITE=$with_overwrite
16937
16938 # used to separate tack out of the tree
16939 NCURSES_TREE=
16940
16941 ### predefined stuff for the test programs
16942 cat >>confdefs.h <<\EOF
16943 #define HAVE_SLK_COLOR 1
16944 EOF
16945
16946 ### Construct the list of subdirectories for which we'll customize makefiles
16947 ### with the appropriate compile-rules.
16948
16949 echo "$as_me:16949: checking for src modules" >&5
16950 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16951
16952 # dependencies and linker-arguments for test-programs
16953 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16954 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16955 if test "$DFT_LWR_MODEL" = "libtool"; then
16956         TEST_ARGS="${TEST_DEPS}"
16957         TEST_ARG2="${TEST_DEP2}"
16958 else
16959         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16960         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16961 fi
16962
16963 cf_cv_src_modules=
16964 for cf_dir in $modules_to_build
16965 do
16966         if test -f $srcdir/$cf_dir/modules; then
16967
16968                 # We may/may not have tack in the distribution, though the
16969                 # makefile is.
16970                 if test $cf_dir = tack ; then
16971                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16972                                 continue
16973                         fi
16974                 fi
16975
16976                 if test -z "$cf_cv_src_modules"; then
16977                         cf_cv_src_modules=$cf_dir
16978                 else
16979                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16980                 fi
16981
16982                 # Make the ncurses_cfg.h file record the library interface files as
16983                 # well.  These are header files that are the same name as their
16984                 # directory.  Ncurses is the only library that does not follow
16985                 # that pattern.
16986                 if test $cf_dir = tack ; then
16987                         continue
16988                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16989
16990 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16991
16992                         cat >>confdefs.h <<EOF
16993 #define HAVE_${cf_have_include}_H 1
16994 EOF
16995
16996                         cat >>confdefs.h <<EOF
16997 #define HAVE_LIB${cf_have_include} 1
16998 EOF
16999
17000                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17001                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17002                         if test "$DFT_LWR_MODEL" = "libtool"; then
17003                                 TEST_ARGS="${TEST_DEPS}"
17004                                 TEST_ARG2="${TEST_DEP2}"
17005                         else
17006                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17007                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17008                         fi
17009                 fi
17010         fi
17011 done
17012 echo "$as_me:17012: result: $cf_cv_src_modules" >&5
17013 echo "${ECHO_T}$cf_cv_src_modules" >&6
17014
17015 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17016 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17017
17018 SRC_SUBDIRS=
17019 if test "x$cf_with_manpages" != xno ; then
17020         SRC_SUBDIRS="$SRC_SUBDIRS man"
17021 fi
17022 SRC_SUBDIRS="$SRC_SUBDIRS include"
17023 for cf_dir in $cf_cv_src_modules
17024 do
17025         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17026 done
17027 SRC_SUBDIRS="$SRC_SUBDIRS test"
17028 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17029 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17030
17031 ADA_SUBDIRS=
17032 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17033         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17034         ADA_SUBDIRS="gen src samples"
17035 fi
17036
17037 SUB_MAKEFILES=
17038 for cf_dir in $SRC_SUBDIRS
17039 do
17040         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17041 done
17042
17043 if test -n "$ADA_SUBDIRS"; then
17044         for cf_dir in $ADA_SUBDIRS
17045         do
17046                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17047         done
17048
17049 fi
17050
17051 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17052    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17053 fi
17054
17055 DIRS_TO_MAKE="lib"
17056 for cf_item in $cf_list_models
17057 do
17058
17059         case $cf_item in
17060         libtool) cf_subdir='obj_lo'  ;;
17061         normal)  cf_subdir='objects' ;;
17062         debug)   cf_subdir='obj_g' ;;
17063         profile) cf_subdir='obj_p' ;;
17064         shared)
17065                 case $cf_cv_system_name in #(vi
17066                 cygwin) #(vi
17067                         cf_subdir='objects' ;;
17068                 *)
17069                         cf_subdir='obj_s' ;;
17070                 esac
17071         esac
17072
17073         for cf_item2 in $DIRS_TO_MAKE
17074         do
17075                 test $cf_item2 = $cf_subdir && break
17076         done
17077         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17078 done
17079 for cf_dir in $DIRS_TO_MAKE
17080 do
17081         test ! -d $cf_dir && mkdir $cf_dir
17082 done
17083
17084 cat >>confdefs.h <<EOF
17085 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17086 EOF
17087
17088 cat >>confdefs.h <<EOF
17089 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17090 EOF
17091
17092 ### Now that we're done running tests, add the compiler-warnings, if any
17093
17094 cf_fix_cppflags=no
17095 cf_new_cflags=
17096 cf_new_cppflags=
17097 cf_new_extra_cppflags=
17098
17099 for cf_add_cflags in $EXTRA_CFLAGS
17100 do
17101 case $cf_fix_cppflags in
17102 no)
17103         case $cf_add_cflags in #(vi
17104         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17105                 case $cf_add_cflags in
17106                 -D*)
17107                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17108
17109                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17110                         && test -z "${cf_tst_cflags}" \
17111                         && cf_fix_cppflags=yes
17112
17113                         if test $cf_fix_cppflags = yes ; then
17114                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17115                                 continue
17116                         elif test "${cf_tst_cflags}" = "\"'" ; then
17117                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17118                                 continue
17119                         fi
17120                         ;;
17121                 esac
17122                 case "$CPPFLAGS" in
17123                 *$cf_add_cflags) #(vi
17124                         ;;
17125                 *) #(vi
17126                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17127                         ;;
17128                 esac
17129                 ;;
17130         *)
17131                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17132                 ;;
17133         esac
17134         ;;
17135 yes)
17136         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17137
17138         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17139
17140         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17141         && test -z "${cf_tst_cflags}" \
17142         && cf_fix_cppflags=no
17143         ;;
17144 esac
17145 done
17146
17147 if test -n "$cf_new_cflags" ; then
17148
17149         CFLAGS="$CFLAGS $cf_new_cflags"
17150 fi
17151
17152 if test -n "$cf_new_cppflags" ; then
17153
17154         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17155 fi
17156
17157 if test -n "$cf_new_extra_cppflags" ; then
17158
17159         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17160 fi
17161
17162 ### If we're building with rpath, try to link non-standard libs that way too.
17163 if test "$DFT_LWR_MODEL" = "shared"; then
17164
17165 echo "$as_me:17165: checking for updated LDFLAGS" >&5
17166 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17167 if test -n "$LDFLAGS" ; then
17168 echo "$as_me:17168: result: maybe" >&5
17169 echo "${ECHO_T}maybe" >&6
17170 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17171
17172 echo "${as_me-configure}:17172: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17173
17174 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17175
17176 echo "${as_me-configure}:17176: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17177
17178 case "$EXTRA_LDFLAGS" in #(vi
17179 -Wl,-rpath,*) #(vi
17180         cf_rpath_hack="-Wl,-rpath,"
17181         ;;
17182 -R\ *)
17183         cf_rpath_hack="-R "
17184         ;;
17185 -R*)
17186         cf_rpath_hack="-R"
17187         ;;
17188 *)
17189         cf_rpath_hack=
17190         ;;
17191 esac
17192 if test -n "$cf_rpath_hack" ; then
17193         cf_rpath_dst=
17194         for cf_rpath_src in $LDFLAGS
17195         do
17196                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17197
17198 echo "${as_me-configure}:17198: testing Filtering $cf_rpath_src ..." 1>&5
17199
17200                 case $cf_rpath_src in #(vi
17201                 -L*) #(vi
17202                         if test "$cf_rpath_hack" = "-R " ; then
17203                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17204                         else
17205                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17206                         fi
17207                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17208
17209 echo "${as_me-configure}:17209: testing ...Filter $cf_rpath_tmp ..." 1>&5
17210
17211                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17212                         ;;
17213                 esac
17214                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17215         done
17216         LDFLAGS=$cf_rpath_dst
17217         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17218
17219 echo "${as_me-configure}:17219: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17220
17221         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17222
17223 echo "${as_me-configure}:17223: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17224
17225 fi
17226 else
17227 echo "$as_me:17227: result: no" >&5
17228 echo "${ECHO_T}no" >&6
17229 fi
17230
17231 fi
17232
17233 ### Define substitutions for header files to avoid name-pollution
17234
17235 if test "$cf_cv_have_tcgetattr" = yes ; then
17236         HAVE_TCGETATTR=1
17237 else
17238         HAVE_TCGETATTR=0
17239 fi
17240
17241 if test "$ac_cv_header_termio_h" = yes ; then
17242         HAVE_TERMIO_H=1
17243 else
17244         HAVE_TERMIO_H=0
17245 fi
17246
17247 if test "$ac_cv_header_termios_h" = yes ; then
17248         HAVE_TERMIOS_H=1
17249 else
17250         HAVE_TERMIOS_H=0
17251 fi
17252
17253 ################################################################################
17254 test "$use_database" = yes && \
17255 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17256
17257 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17258
17259 if test x"$enable_pc_files" = xyes ; then \
17260 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17261 MAKE_PC_FILES=
17262 else
17263 MAKE_PC_FILES="#"
17264 fi
17265
17266 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"
17267 ac_config_commands="$ac_config_commands default"
17268 cat >confcache <<\_ACEOF
17269 # This file is a shell script that caches the results of configure
17270 # tests run on this system so they can be shared between configure
17271 # scripts and configure runs, see configure's option --config-cache.
17272 # It is not useful on other systems.  If it contains results you don't
17273 # want to keep, you may remove or edit it.
17274 #
17275 # config.status only pays attention to the cache file if you give it
17276 # the --recheck option to rerun configure.
17277 #
17278 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17279 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17280 # following values.
17281
17282 _ACEOF
17283
17284 # The following way of writing the cache mishandles newlines in values,
17285 # but we know of no workaround that is simple, portable, and efficient.
17286 # So, don't put newlines in cache variables' values.
17287 # Ultrix sh set writes to stderr and can't be redirected directly,
17288 # and sets the high bit in the cache file unless we assign to the vars.
17289 {
17290   (set) 2>&1 |
17291     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17292     *ac_space=\ *)
17293       # `set' does not quote correctly, so add quotes (double-quote
17294       # substitution turns \\\\ into \\, and sed turns \\ into \).
17295       sed -n \
17296         "s/'/'\\\\''/g;
17297           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17298       ;;
17299     *)
17300       # `set' quotes correctly as required by POSIX, so do not add quotes.
17301       sed -n \
17302         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17303       ;;
17304     esac;
17305 } |
17306   sed '
17307      t clear
17308      : clear
17309      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17310      t end
17311      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17312      : end' >>confcache
17313 if cmp -s $cache_file confcache; then :; else
17314   if test -w $cache_file; then
17315     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17316     cat confcache >$cache_file
17317   else
17318     echo "not updating unwritable cache $cache_file"
17319   fi
17320 fi
17321 rm -f confcache
17322
17323 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17324 # Let make expand exec_prefix.
17325 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17326
17327 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17328 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17329 # trailing colons and then remove the whole line if VPATH becomes empty
17330 # (actually we leave an empty line to preserve line numbers).
17331 if test "x$srcdir" = x.; then
17332   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17333 s/:*\$(srcdir):*/:/;
17334 s/:*\${srcdir}:*/:/;
17335 s/:*@srcdir@:*/:/;
17336 s/^\([^=]*=[    ]*\):*/\1/;
17337 s/:*$//;
17338 s/^[^=]*=[      ]*$//;
17339 }'
17340 fi
17341
17342 DEFS=-DHAVE_CONFIG_H
17343
17344 : ${CONFIG_STATUS=./config.status}
17345 ac_clean_files_save=$ac_clean_files
17346 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17347 { echo "$as_me:17347: creating $CONFIG_STATUS" >&5
17348 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17349 cat >$CONFIG_STATUS <<_ACEOF
17350 #! $SHELL
17351 # Generated automatically by configure.
17352 # Run this file to recreate the current configuration.
17353 # Compiler output produced by configure, useful for debugging
17354 # configure, is in config.log if it exists.
17355
17356 debug=false
17357 SHELL=\${CONFIG_SHELL-$SHELL}
17358 ac_cs_invocation="\$0 \$@"
17359
17360 _ACEOF
17361
17362 cat >>$CONFIG_STATUS <<\_ACEOF
17363 # Be Bourne compatible
17364 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17365   emulate sh
17366   NULLCMD=:
17367 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17368   set -o posix
17369 fi
17370
17371 # Name of the executable.
17372 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17373
17374 if expr a : '\(a\)' >/dev/null 2>&1; then
17375   as_expr=expr
17376 else
17377   as_expr=false
17378 fi
17379
17380 rm -f conf$$ conf$$.exe conf$$.file
17381 echo >conf$$.file
17382 if ln -s conf$$.file conf$$ 2>/dev/null; then
17383   # We could just check for DJGPP; but this test a) works b) is more generic
17384   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17385   if test -f conf$$.exe; then
17386     # Don't use ln at all; we don't have any links
17387     as_ln_s='cp -p'
17388   else
17389     as_ln_s='ln -s'
17390   fi
17391 elif ln conf$$.file conf$$ 2>/dev/null; then
17392   as_ln_s=ln
17393 else
17394   as_ln_s='cp -p'
17395 fi
17396 rm -f conf$$ conf$$.exe conf$$.file
17397
17398 as_executable_p="test -f"
17399
17400 # Support unset when possible.
17401 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17402   as_unset=unset
17403 else
17404   as_unset=false
17405 fi
17406
17407 # NLS nuisances.
17408 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17409 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17410 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17411 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17412 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17413 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17414 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17415 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17416
17417 # IFS
17418 # We need space, tab and new line, in precisely that order.
17419 as_nl='
17420 '
17421 IFS="   $as_nl"
17422
17423 # CDPATH.
17424 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17425
17426 exec 6>&1
17427
17428 _ACEOF
17429
17430 # Files that config.status was made for.
17431 if test -n "$ac_config_files"; then
17432   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17433 fi
17434
17435 if test -n "$ac_config_headers"; then
17436   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17437 fi
17438
17439 if test -n "$ac_config_links"; then
17440   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17441 fi
17442
17443 if test -n "$ac_config_commands"; then
17444   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17445 fi
17446
17447 cat >>$CONFIG_STATUS <<\EOF
17448
17449 ac_cs_usage="\
17450 \`$as_me' instantiates files from templates according to the
17451 current configuration.
17452
17453 Usage: $0 [OPTIONS] [FILE]...
17454
17455   -h, --help       print this help, then exit
17456   -V, --version    print version number, then exit
17457   -d, --debug      don't remove temporary files
17458       --recheck    update $as_me by reconfiguring in the same conditions
17459   --file=FILE[:TEMPLATE]
17460                    instantiate the configuration file FILE
17461   --header=FILE[:TEMPLATE]
17462                    instantiate the configuration header FILE
17463
17464 Configuration files:
17465 $config_files
17466
17467 Configuration headers:
17468 $config_headers
17469
17470 Configuration commands:
17471 $config_commands
17472
17473 Report bugs to <bug-autoconf@gnu.org>."
17474 EOF
17475
17476 cat >>$CONFIG_STATUS <<EOF
17477 ac_cs_version="\\
17478 config.status
17479 configured by $0, generated by GNU Autoconf 2.52.20081225,
17480   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17481
17482 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17483 Free Software Foundation, Inc.
17484 This config.status script is free software; the Free Software Foundation
17485 gives unlimited permission to copy, distribute and modify it."
17486 srcdir=$srcdir
17487 INSTALL="$INSTALL"
17488 EOF
17489
17490 cat >>$CONFIG_STATUS <<\EOF
17491 # If no file are specified by the user, then we need to provide default
17492 # value.  By we need to know if files were specified by the user.
17493 ac_need_defaults=:
17494 while test $# != 0
17495 do
17496   case $1 in
17497   --*=*)
17498     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17499     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17500     shift
17501     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17502     shift
17503     ;;
17504   -*);;
17505   *) # This is not an option, so the user has probably given explicit
17506      # arguments.
17507      ac_need_defaults=false;;
17508   esac
17509
17510   case $1 in
17511   # Handling of the options.
17512 EOF
17513 cat >>$CONFIG_STATUS <<EOF
17514   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17515     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17516     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17517 EOF
17518 cat >>$CONFIG_STATUS <<\EOF
17519   --version | --vers* | -V )
17520     echo "$ac_cs_version"; exit 0 ;;
17521   --he | --h)
17522     # Conflict between --help and --header
17523     { { echo "$as_me:17523: error: ambiguous option: $1
17524 Try \`$0 --help' for more information." >&5
17525 echo "$as_me: error: ambiguous option: $1
17526 Try \`$0 --help' for more information." >&2;}
17527    { (exit 1); exit 1; }; };;
17528   --help | --hel | -h )
17529     echo "$ac_cs_usage"; exit 0 ;;
17530   --debug | --d* | -d )
17531     debug=: ;;
17532   --file | --fil | --fi | --f )
17533     shift
17534     CONFIG_FILES="$CONFIG_FILES $1"
17535     ac_need_defaults=false;;
17536   --header | --heade | --head | --hea )
17537     shift
17538     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17539     ac_need_defaults=false;;
17540
17541   # This is an error.
17542   -*) { { echo "$as_me:17542: error: unrecognized option: $1
17543 Try \`$0 --help' for more information." >&5
17544 echo "$as_me: error: unrecognized option: $1
17545 Try \`$0 --help' for more information." >&2;}
17546    { (exit 1); exit 1; }; } ;;
17547
17548   *) ac_config_targets="$ac_config_targets $1" ;;
17549
17550   esac
17551   shift
17552 done
17553
17554 exec 5>>config.log
17555 cat >&5 << _ACEOF
17556
17557 ## ----------------------- ##
17558 ## Running config.status.  ##
17559 ## ----------------------- ##
17560
17561 This file was extended by $as_me 2.52.20081225, executed with
17562   CONFIG_FILES    = $CONFIG_FILES
17563   CONFIG_HEADERS  = $CONFIG_HEADERS
17564   CONFIG_LINKS    = $CONFIG_LINKS
17565   CONFIG_COMMANDS = $CONFIG_COMMANDS
17566   > $ac_cs_invocation
17567 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17568
17569 _ACEOF
17570 EOF
17571
17572 cat >>$CONFIG_STATUS <<EOF
17573 #
17574 # INIT-COMMANDS section.
17575 #
17576
17577 ### Special initialization commands, used to pass information from the
17578 ### configuration-run into config.status
17579
17580 AWK="$AWK"
17581 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17582 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17583 ECHO_LINK="$ECHO_LINK"
17584 LDCONFIG="$LDCONFIG"
17585 LIB_NAME="$LIB_NAME"
17586 LIB_SUBSETS="$LIB_SUBSETS"
17587 LIB_SUFFIX="$LIB_SUFFIX"
17588 LIB_TRACING="$LIB_TRACING"
17589 MAKE_TERMINFO="$MAKE_TERMINFO"
17590 NCURSES_MAJOR="$NCURSES_MAJOR"
17591 NCURSES_MINOR="$NCURSES_MINOR"
17592 NCURSES_OSPEED="$NCURSES_OSPEED"
17593 NCURSES_PATCH="$NCURSES_PATCH"
17594 SRC_SUBDIRS="$SRC_SUBDIRS"
17595 TERMINFO="$TERMINFO"
17596 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17597 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17598 TICS_NAME="$TICS_NAME"
17599 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17600 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17601 TINFO_NAME="$TINFO_NAME"
17602 TINFO_SUFFIX="$TINFO_SUFFIX"
17603 WITH_CURSES_H="$with_curses_h"
17604 WITH_ECHO="$with_echo"
17605 WITH_OVERWRITE="$with_overwrite"
17606 cf_LIST_MODELS="$cf_list_models"
17607 cf_cv_abi_version="$cf_cv_abi_version"
17608 cf_cv_do_relink="$cf_cv_do_relink"
17609 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17610 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17611 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17612 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17613 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17614 cf_cv_rel_version="$cf_cv_rel_version"
17615 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17616 cf_cv_shared_soname='$cf_cv_shared_soname'
17617 cf_cv_shlib_version="$cf_cv_shlib_version"
17618 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17619 cf_cv_system_name="$cf_cv_system_name"
17620 cf_with_cxx_binding="$cf_with_cxx_binding"
17621 cf_with_manpages="$cf_with_manpages"
17622 host="$host"
17623 target="$target"
17624
17625 EOF
17626
17627 cat >>$CONFIG_STATUS <<\EOF
17628 for ac_config_target in $ac_config_targets
17629 do
17630   case "$ac_config_target" in
17631   # Handling of arguments.
17632   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17633   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17634   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17635   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17636   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17637   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17638   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17639   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17640   *) { { echo "$as_me:17640: error: invalid argument: $ac_config_target" >&5
17641 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17642    { (exit 1); exit 1; }; };;
17643   esac
17644 done
17645
17646 # If the user did not use the arguments to specify the items to instantiate,
17647 # then the envvar interface is used.  Set only those that are not.
17648 # We use the long form for the default assignment because of an extremely
17649 # bizarre bug on SunOS 4.1.3.
17650 if $ac_need_defaults; then
17651   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17652   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17653   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17654 fi
17655
17656 # Create a temporary directory, and hook for its removal unless debugging.
17657 $debug ||
17658 {
17659   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17660   trap '{ (exit 1); exit 1; }' 1 2 13 15
17661 }
17662
17663 # Create a (secure) tmp directory for tmp files.
17664 : ${TMPDIR=/tmp}
17665 {
17666   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17667   test -n "$tmp" && test -d "$tmp"
17668 }  ||
17669 {
17670   tmp=$TMPDIR/cs$$-$RANDOM
17671   (umask 077 && mkdir $tmp)
17672 } ||
17673 {
17674    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17675    { (exit 1); exit 1; }
17676 }
17677
17678 EOF
17679
17680 cat >>$CONFIG_STATUS <<EOF
17681
17682 #
17683 # CONFIG_FILES section.
17684 #
17685
17686 # No need to generate the scripts if there are no CONFIG_FILES.
17687 # This happens for instance when ./config.status config.h
17688 if test -n "\$CONFIG_FILES"; then
17689   # Protect against being on the right side of a sed subst in config.status.
17690   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17691    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17692 s,@SHELL@,$SHELL,;t t
17693 s,@exec_prefix@,$exec_prefix,;t t
17694 s,@prefix@,$prefix,;t t
17695 s,@program_transform_name@,$program_transform_name,;t t
17696 s,@bindir@,$bindir,;t t
17697 s,@sbindir@,$sbindir,;t t
17698 s,@libexecdir@,$libexecdir,;t t
17699 s,@datadir@,$datadir,;t t
17700 s,@sysconfdir@,$sysconfdir,;t t
17701 s,@sharedstatedir@,$sharedstatedir,;t t
17702 s,@localstatedir@,$localstatedir,;t t
17703 s,@libdir@,$libdir,;t t
17704 s,@includedir@,$includedir,;t t
17705 s,@oldincludedir@,$oldincludedir,;t t
17706 s,@infodir@,$infodir,;t t
17707 s,@mandir@,$mandir,;t t
17708 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17709 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17710 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17711 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17712 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17713 s,@build_alias@,$build_alias,;t t
17714 s,@host_alias@,$host_alias,;t t
17715 s,@target_alias@,$target_alias,;t t
17716 s,@ECHO_C@,$ECHO_C,;t t
17717 s,@ECHO_N@,$ECHO_N,;t t
17718 s,@ECHO_T@,$ECHO_T,;t t
17719 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17720 s,@DEFS@,$DEFS,;t t
17721 s,@LIBS@,$LIBS,;t t
17722 s,@top_builddir@,$top_builddir,;t t
17723 s,@EGREP@,$EGREP,;t t
17724 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17725 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17726 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17727 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17728 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17729 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17730 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17731 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17732 s,@build@,$build,;t t
17733 s,@build_cpu@,$build_cpu,;t t
17734 s,@build_vendor@,$build_vendor,;t t
17735 s,@build_os@,$build_os,;t t
17736 s,@host@,$host,;t t
17737 s,@host_cpu@,$host_cpu,;t t
17738 s,@host_vendor@,$host_vendor,;t t
17739 s,@host_os@,$host_os,;t t
17740 s,@target@,$target,;t t
17741 s,@target_cpu@,$target_cpu,;t t
17742 s,@target_vendor@,$target_vendor,;t t
17743 s,@target_os@,$target_os,;t t
17744 s,@CC@,$CC,;t t
17745 s,@CFLAGS@,$CFLAGS,;t t
17746 s,@LDFLAGS@,$LDFLAGS,;t t
17747 s,@CPPFLAGS@,$CPPFLAGS,;t t
17748 s,@ac_ct_CC@,$ac_ct_CC,;t t
17749 s,@EXEEXT@,$EXEEXT,;t t
17750 s,@OBJEXT@,$OBJEXT,;t t
17751 s,@CPP@,$CPP,;t t
17752 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17753 s,@PROG_EXT@,$PROG_EXT,;t t
17754 s,@LDCONFIG@,$LDCONFIG,;t t
17755 s,@CXX@,$CXX,;t t
17756 s,@CXXFLAGS@,$CXXFLAGS,;t t
17757 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17758 s,@AWK@,$AWK,;t t
17759 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17760 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17761 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17762 s,@LINT@,$LINT,;t t
17763 s,@LINT_OPTS@,$LINT_OPTS,;t t
17764 s,@LN_S@,$LN_S,;t t
17765 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17766 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17767 s,@SET_MAKE@,$SET_MAKE,;t t
17768 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17769 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17770 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17771 s,@RANLIB@,$RANLIB,;t t
17772 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17773 s,@LD@,$LD,;t t
17774 s,@ac_ct_LD@,$ac_ct_LD,;t t
17775 s,@AR@,$AR,;t t
17776 s,@ac_ct_AR@,$ac_ct_AR,;t t
17777 s,@ARFLAGS@,$ARFLAGS,;t t
17778 s,@DESTDIR@,$DESTDIR,;t t
17779 s,@BUILD_CC@,$BUILD_CC,;t t
17780 s,@BUILD_CPP@,$BUILD_CPP,;t t
17781 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17782 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17783 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17784 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17785 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17786 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17787 s,@cf_list_models@,$cf_list_models,;t t
17788 s,@LIBTOOL@,$LIBTOOL,;t t
17789 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17790 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17791 s,@LIB_CREATE@,$LIB_CREATE,;t t
17792 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17793 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17794 s,@LIB_PREP@,$LIB_PREP,;t t
17795 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17796 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17797 s,@LIB_LINK@,$LIB_LINK,;t t
17798 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17799 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17800 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17801 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17802 s,@TICS_NAME@,$TICS_NAME,;t t
17803 s,@TINFO_NAME@,$TINFO_NAME,;t t
17804 s,@LIB_NAME@,$LIB_NAME,;t t
17805 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17806 s,@CC_G_OPT@,$CC_G_OPT,;t t
17807 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17808 s,@LD_MODEL@,$LD_MODEL,;t t
17809 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17810 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17811 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17812 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17813 s,@LINK_PROGS@,$LINK_PROGS,;t t
17814 s,@LINK_TESTS@,$LINK_TESTS,;t t
17815 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17816 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17817 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17818 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17819 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17820 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17821 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17822 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17823 s,@TERMINFO@,$TERMINFO,;t t
17824 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17825 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17826 s,@TERMPATH@,$TERMPATH,;t t
17827 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17828 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17829 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17830 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17831 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17832 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17833 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17834 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17835 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17836 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17837 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17838 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17839 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17840 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17841 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17842 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17843 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17844 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17845 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17846 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17847 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17848 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17849 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17850 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17851 s,@PTHREAD@,$PTHREAD,;t t
17852 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17853 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17854 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17855 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17856 s,@ECHO_LINK@,$ECHO_LINK,;t t
17857 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17858 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17859 s,@ADA_TRACE@,$ADA_TRACE,;t t
17860 s,@MATH_LIB@,$MATH_LIB,;t t
17861 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17862 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17863 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17864 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17865 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17866 s,@TEST_LIBS@,$TEST_LIBS,;t t
17867 s,@CXXCPP@,$CXXCPP,;t t
17868 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17869 s,@CXX_AR@,$CXX_AR,;t t
17870 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17871 s,@CXXLIBS@,$CXXLIBS,;t t
17872 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17873 s,@gnat_exists@,$gnat_exists,;t t
17874 s,@M4_exists@,$M4_exists,;t t
17875 s,@cf_ada_make@,$cf_ada_make,;t t
17876 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17877 s,@cf_ada_package@,$cf_ada_package,;t t
17878 s,@ADAFLAGS@,$ADAFLAGS,;t t
17879 s,@cf_compile_generics@,$cf_compile_generics,;t t
17880 s,@cf_generic_objects@,$cf_generic_objects,;t t
17881 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17882 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17883 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17884 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17885 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17886 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17887 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17888 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17889 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17890 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17891 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17892 s,@TICS_ARGS@,$TICS_ARGS,;t t
17893 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17894 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17895 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17896 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17897 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17898 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17899 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17900 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17901 s,@TICS_LIST@,$TICS_LIST,;t t
17902 s,@TINFO_LIST@,$TINFO_LIST,;t t
17903 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17904 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17905 s,@TEST_ARGS@,$TEST_ARGS,;t t
17906 s,@TEST_DEPS@,$TEST_DEPS,;t t
17907 s,@TEST_ARG2@,$TEST_ARG2,;t t
17908 s,@TEST_DEP2@,$TEST_DEP2,;t t
17909 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17910 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17911 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17912 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17913 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17914 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17915 CEOF
17916
17917 EOF
17918
17919   cat >>$CONFIG_STATUS <<\EOF
17920   # Split the substitutions into bite-sized pieces for seds with
17921   # small command number limits, like on Digital OSF/1 and HP-UX.
17922   ac_max_sed_lines=48
17923   ac_sed_frag=1 # Number of current file.
17924   ac_beg=1 # First line for current file.
17925   ac_end=$ac_max_sed_lines # Line after last line for current file.
17926   ac_more_lines=:
17927   ac_sed_cmds=
17928   while $ac_more_lines; do
17929     if test $ac_beg -gt 1; then
17930       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17931     else
17932       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17933     fi
17934     if test ! -s $tmp/subs.frag; then
17935       ac_more_lines=false
17936     else
17937       # The purpose of the label and of the branching condition is to
17938       # speed up the sed processing (if there are no `@' at all, there
17939       # is no need to browse any of the substitutions).
17940       # These are the two extra sed commands mentioned above.
17941       (echo ':t
17942   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17943       if test -z "$ac_sed_cmds"; then
17944         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17945       else
17946         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17947       fi
17948       ac_sed_frag=`expr $ac_sed_frag + 1`
17949       ac_beg=$ac_end
17950       ac_end=`expr $ac_end + $ac_max_sed_lines`
17951     fi
17952   done
17953   if test -z "$ac_sed_cmds"; then
17954     ac_sed_cmds=cat
17955   fi
17956 fi # test -n "$CONFIG_FILES"
17957
17958 EOF
17959 cat >>$CONFIG_STATUS <<\EOF
17960 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17961   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17962   case $ac_file in
17963   - | *:- | *:-:* ) # input from stdin
17964         cat >$tmp/stdin
17965         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17966         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17967   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17968         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17969   * )   ac_file_in=$ac_file.in ;;
17970   esac
17971
17972   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17973   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17974          X"$ac_file" : 'X\(//\)[^/]' \| \
17975          X"$ac_file" : 'X\(//\)$' \| \
17976          X"$ac_file" : 'X\(/\)' \| \
17977          .     : '\(.\)' 2>/dev/null ||
17978 echo X"$ac_file" |
17979     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17980           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17981           /^X\(\/\/\)$/{ s//\1/; q; }
17982           /^X\(\/\).*/{ s//\1/; q; }
17983           s/.*/./; q'`
17984   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17985     { case "$ac_dir" in
17986   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17987   *)                      as_incr_dir=.;;
17988 esac
17989 as_dummy="$ac_dir"
17990 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17991   case $as_mkdir_dir in
17992     # Skip DOS drivespec
17993     ?:) as_incr_dir=$as_mkdir_dir ;;
17994     *)
17995       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17996       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17997     ;;
17998   esac
17999 done; }
18000
18001     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18002     # A "../" for each directory in $ac_dir_suffix.
18003     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18004   else
18005     ac_dir_suffix= ac_dots=
18006   fi
18007
18008   case $srcdir in
18009   .)  ac_srcdir=.
18010       if test -z "$ac_dots"; then
18011          ac_top_srcdir=.
18012       else
18013          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18014       fi ;;
18015   [\\/]* | ?:[\\/]* )
18016       ac_srcdir=$srcdir$ac_dir_suffix;
18017       ac_top_srcdir=$srcdir ;;
18018   *) # Relative path.
18019     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18020     ac_top_srcdir=$ac_dots$srcdir ;;
18021   esac
18022
18023   case $INSTALL in
18024   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18025   *) ac_INSTALL=$ac_dots$INSTALL ;;
18026   esac
18027
18028   if test x"$ac_file" != x-; then
18029     { echo "$as_me:18029: creating $ac_file" >&5
18030 echo "$as_me: creating $ac_file" >&6;}
18031     rm -f "$ac_file"
18032   fi
18033   # Let's still pretend it is `configure' which instantiates (i.e., don't
18034   # use $as_me), people would be surprised to read:
18035   #    /* config.h.  Generated automatically by config.status.  */
18036   configure_input="Generated automatically from `echo $ac_file_in |
18037                                                  sed 's,.*/,,'` by configure."
18038
18039   # First look for the input files in the build tree, otherwise in the
18040   # src tree.
18041   ac_file_inputs=`IFS=:
18042     for f in $ac_file_in; do
18043       case $f in
18044       -) echo $tmp/stdin ;;
18045       [\\/$]*)
18046          # Absolute (can't be DOS-style, as IFS=:)
18047          test -f "$f" || { { echo "$as_me:18047: error: cannot find input file: $f" >&5
18048 echo "$as_me: error: cannot find input file: $f" >&2;}
18049    { (exit 1); exit 1; }; }
18050          echo $f;;
18051       *) # Relative
18052          if test -f "$f"; then
18053            # Build tree
18054            echo $f
18055          elif test -f "$srcdir/$f"; then
18056            # Source tree
18057            echo $srcdir/$f
18058          else
18059            # /dev/null tree
18060            { { echo "$as_me:18060: error: cannot find input file: $f" >&5
18061 echo "$as_me: error: cannot find input file: $f" >&2;}
18062    { (exit 1); exit 1; }; }
18063          fi;;
18064       esac
18065     done` || { (exit 1); exit 1; }
18066 EOF
18067 cat >>$CONFIG_STATUS <<EOF
18068   sed "$ac_vpsub
18069 $extrasub
18070 EOF
18071 cat >>$CONFIG_STATUS <<\EOF
18072 :t
18073 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18074 s,@configure_input@,$configure_input,;t t
18075 s,@srcdir@,$ac_srcdir,;t t
18076 s,@top_srcdir@,$ac_top_srcdir,;t t
18077 s,@INSTALL@,$ac_INSTALL,;t t
18078 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18079   rm -f $tmp/stdin
18080   if test x"$ac_file" != x-; then
18081     mv $tmp/out $ac_file
18082   else
18083     cat $tmp/out
18084     rm -f $tmp/out
18085   fi
18086
18087 done
18088 EOF
18089 cat >>$CONFIG_STATUS <<\EOF
18090
18091 #
18092 # CONFIG_HEADER section.
18093 #
18094
18095 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18096 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18097 #
18098 # ac_d sets the value in "#define NAME VALUE" lines.
18099 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18100 ac_dB='[        ].*$,\1#\2'
18101 ac_dC=' '
18102 ac_dD=',;t'
18103 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18104 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18105 ac_iB='\([      ]\),\1#\2define\3'
18106 ac_iC=' '
18107 ac_iD='\4,;t'
18108 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18109 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18110 ac_uB='$,\1#\2define\3'
18111 ac_uC=' '
18112 ac_uD=',;t'
18113
18114 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18115   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18116   case $ac_file in
18117   - | *:- | *:-:* ) # input from stdin
18118         cat >$tmp/stdin
18119         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18120         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18121   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18122         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18123   * )   ac_file_in=$ac_file.in ;;
18124   esac
18125
18126   test x"$ac_file" != x- && { echo "$as_me:18126: creating $ac_file" >&5
18127 echo "$as_me: creating $ac_file" >&6;}
18128
18129   # First look for the input files in the build tree, otherwise in the
18130   # src tree.
18131   ac_file_inputs=`IFS=:
18132     for f in $ac_file_in; do
18133       case $f in
18134       -) echo $tmp/stdin ;;
18135       [\\/$]*)
18136          # Absolute (can't be DOS-style, as IFS=:)
18137          test -f "$f" || { { echo "$as_me:18137: error: cannot find input file: $f" >&5
18138 echo "$as_me: error: cannot find input file: $f" >&2;}
18139    { (exit 1); exit 1; }; }
18140          echo $f;;
18141       *) # Relative
18142          if test -f "$f"; then
18143            # Build tree
18144            echo $f
18145          elif test -f "$srcdir/$f"; then
18146            # Source tree
18147            echo $srcdir/$f
18148          else
18149            # /dev/null tree
18150            { { echo "$as_me:18150: error: cannot find input file: $f" >&5
18151 echo "$as_me: error: cannot find input file: $f" >&2;}
18152    { (exit 1); exit 1; }; }
18153          fi;;
18154       esac
18155     done` || { (exit 1); exit 1; }
18156   # Remove the trailing spaces.
18157   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18158
18159 EOF
18160
18161 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18162 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18163 # be either 'cat' or 'sort'.
18164 cat confdefs.h | uniq >conftest.vals
18165
18166 # Break up conftest.vals because some shells have a limit on
18167 # the size of here documents, and old seds have small limits too.
18168
18169 rm -f conftest.tail
18170 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18171 while grep . conftest.vals >/dev/null
18172 do
18173   # Write chunks of a limited-size here document to conftest.frag.
18174   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18175   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18176   echo 'CEOF' >> $CONFIG_STATUS
18177   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18178   rm -f conftest.vals
18179   mv conftest.tail conftest.vals
18180 done
18181 rm -f conftest.vals
18182
18183 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18184 # marker @DEFS@.
18185 echo '  cat >> conftest.edit <<CEOF
18186 /@DEFS@/r conftest.frag
18187 /@DEFS@/d
18188 CEOF
18189 sed -f conftest.edit $tmp/in > $tmp/out
18190 rm -f $tmp/in
18191 mv $tmp/out $tmp/in
18192 rm -f conftest.edit conftest.frag
18193 ' >> $CONFIG_STATUS
18194
18195 cat >>$CONFIG_STATUS <<\EOF
18196   # Let's still pretend it is `configure' which instantiates (i.e., don't
18197   # use $as_me), people would be surprised to read:
18198   #    /* config.h.  Generated automatically by config.status.  */
18199   if test x"$ac_file" = x-; then
18200     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18201   else
18202     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18203   fi
18204   cat $tmp/in >>$tmp/config.h
18205   rm -f $tmp/in
18206   if test x"$ac_file" != x-; then
18207     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18208       { echo "$as_me:18208: $ac_file is unchanged" >&5
18209 echo "$as_me: $ac_file is unchanged" >&6;}
18210     else
18211       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18212          X"$ac_file" : 'X\(//\)[^/]' \| \
18213          X"$ac_file" : 'X\(//\)$' \| \
18214          X"$ac_file" : 'X\(/\)' \| \
18215          .     : '\(.\)' 2>/dev/null ||
18216 echo X"$ac_file" |
18217     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18218           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18219           /^X\(\/\/\)$/{ s//\1/; q; }
18220           /^X\(\/\).*/{ s//\1/; q; }
18221           s/.*/./; q'`
18222       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18223         { case "$ac_dir" in
18224   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18225   *)                      as_incr_dir=.;;
18226 esac
18227 as_dummy="$ac_dir"
18228 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18229   case $as_mkdir_dir in
18230     # Skip DOS drivespec
18231     ?:) as_incr_dir=$as_mkdir_dir ;;
18232     *)
18233       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18234       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18235     ;;
18236   esac
18237 done; }
18238
18239       fi
18240       rm -f $ac_file
18241       mv $tmp/config.h $ac_file
18242     fi
18243   else
18244     cat $tmp/config.h
18245     rm -f $tmp/config.h
18246   fi
18247 done
18248 EOF
18249 cat >>$CONFIG_STATUS <<\EOF
18250
18251 #
18252 # CONFIG_COMMANDS section.
18253 #
18254 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18255   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18256   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18257
18258   case $ac_dest in
18259     default )
18260
18261 for cf_dir in test
18262 do
18263         if test ! -d $srcdir/$cf_dir; then
18264                 continue
18265         elif test -f $srcdir/$cf_dir/programs; then
18266                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18267         fi
18268 done
18269
18270         case $cf_cv_system_name in #(vi
18271         OS/2*|os2*) #(vi
18272         LIB_PREFIX=''
18273         ;;
18274         *)      LIB_PREFIX='lib'
18275         ;;
18276         esac
18277 cf_prefix=$LIB_PREFIX
18278
18279 if test $cf_cv_shlib_version = cygdll ; then
18280         TINFO_NAME=$TINFO_ARG_SUFFIX
18281         TINFO_SUFFIX=.dll
18282 fi
18283
18284 for cf_dir in $SRC_SUBDIRS
18285 do
18286         if test ! -d $srcdir/$cf_dir ; then
18287                 continue
18288         elif test -f $srcdir/$cf_dir/modules; then
18289
18290                 SHARED_LIB=
18291                 LIBS_TO_MAKE=
18292                 for cf_item in $cf_LIST_MODELS
18293                 do
18294
18295         case $cf_item in #(vi
18296         libtool) #(vi
18297                 cf_suffix='.la'
18298                 cf_depsuf=$cf_suffix
18299                 ;;
18300         normal) #(vi
18301                 cf_suffix='.a'
18302                 cf_depsuf=$cf_suffix
18303                 ;;
18304         debug) #(vi
18305                 cf_suffix='_g.a'
18306                 cf_depsuf=$cf_suffix
18307                 ;;
18308         profile) #(vi
18309                 cf_suffix='_p.a'
18310                 cf_depsuf=$cf_suffix
18311                 ;;
18312         shared) #(vi
18313                 case $cf_cv_system_name in
18314                 aix[56]*) #(vi
18315                         cf_suffix='.a'
18316                         cf_depsuf=$cf_suffix
18317                         ;;
18318                 cygwin*) #(vi
18319                         cf_suffix='.dll'
18320                         cf_depsuf='.dll.a'
18321                         ;;
18322                 darwin*) #(vi
18323                         cf_suffix='.dylib'
18324                         cf_depsuf=$cf_suffix
18325                         ;;
18326                 hpux*) #(vi
18327                         case $target in
18328                         ia64*) #(vi
18329                                 cf_suffix='.so'
18330                                 cf_depsuf=$cf_suffix
18331                                 ;;
18332                         *) #(vi
18333                                 cf_suffix='.sl'
18334                                 cf_depsuf=$cf_suffix
18335                                 ;;
18336                         esac
18337                         ;;
18338                 *)      cf_suffix='.so'
18339                         cf_depsuf=$cf_suffix
18340                         ;;
18341                 esac
18342         esac
18343         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18344         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18345
18346                         if test $cf_item = shared ; then
18347                         if test "$cf_cv_do_symlinks" = yes ; then
18348                                 case "$cf_cv_shlib_version" in #(vi
18349                                 rel) #(vi
18350                                         case "$cf_cv_system_name" in #(vi
18351                                         darwin*)
18352                                         case .${LIB_SUFFIX} in
18353                                         .w*)
18354                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18355                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18356                                                 ;;
18357                                         *)
18358                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18359                                                 ;;
18360                                         esac
18361                                         ;; #(vi
18362                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18363                                         esac
18364                                         ;;
18365                                 abi)
18366                                         case "$cf_cv_system_name" in #(vi
18367                                         darwin*)
18368                                         case .${LIB_SUFFIX} in
18369                                         .w*)
18370                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18371                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18372                                                 ;;
18373                                         *)
18374                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18375                                                 ;;
18376                                         esac
18377                                         ;; #(vi
18378                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18379                                         esac
18380                                         ;;
18381                                 esac
18382                         fi
18383                         # cygwin needs import library, and has unique naming convention
18384                         # use autodetected ${cf_prefix} for import lib and static lib, but
18385                         # use 'cyg' prefix for shared lib.
18386                         if test $cf_cv_shlib_version = cygdll ; then
18387                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18388                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18389                                 continue
18390                         fi
18391                         fi
18392                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18393                 done
18394
18395                 if test $cf_dir = ncurses ; then
18396                         cf_subsets="$LIB_SUBSETS"
18397                         cf_r_parts="$cf_subsets"
18398                         cf_liblist="$LIBS_TO_MAKE"
18399
18400                         while test -n "$cf_r_parts"
18401                         do
18402                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18403                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18404                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18405                                         cf_item=
18406                                         case $cf_l_parts in #(vi
18407                                         *termlib*) #(vi
18408                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18409                                                 ;;
18410                                         *ticlib*)
18411                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18412                                                 ;;
18413                                         *)
18414                                                 break
18415                                                 ;;
18416                                         esac
18417                                         if test -n "$cf_item"; then
18418                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18419                                         fi
18420                                 else
18421                                         break
18422                                 fi
18423                         done
18424                 else
18425                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18426                 fi
18427
18428                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18429                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18430                         $cf_dir/Makefile >$cf_dir/Makefile.out
18431                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18432
18433                 $AWK -f $srcdir/mk-0th.awk \
18434                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18435                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18436
18437                 for cf_subset in $cf_subsets
18438                 do
18439                         cf_subdirs=
18440                         for cf_item in $cf_LIST_MODELS
18441                         do
18442                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18443
18444 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18445
18446         case $cf_item in #(vi
18447         libtool) #(vi
18448                 cf_suffix='.la'
18449                 cf_depsuf=$cf_suffix
18450                 ;;
18451         normal) #(vi
18452                 cf_suffix='.a'
18453                 cf_depsuf=$cf_suffix
18454                 ;;
18455         debug) #(vi
18456                 cf_suffix='_g.a'
18457                 cf_depsuf=$cf_suffix
18458                 ;;
18459         profile) #(vi
18460                 cf_suffix='_p.a'
18461                 cf_depsuf=$cf_suffix
18462                 ;;
18463         shared) #(vi
18464                 case $cf_cv_system_name in
18465                 aix[56]*) #(vi
18466                         cf_suffix='.a'
18467                         cf_depsuf=$cf_suffix
18468                         ;;
18469                 cygwin*) #(vi
18470                         cf_suffix='.dll'
18471                         cf_depsuf='.dll.a'
18472                         ;;
18473                 darwin*) #(vi
18474                         cf_suffix='.dylib'
18475                         cf_depsuf=$cf_suffix
18476                         ;;
18477                 hpux*) #(vi
18478                         case $target in
18479                         ia64*) #(vi
18480                                 cf_suffix='.so'
18481                                 cf_depsuf=$cf_suffix
18482                                 ;;
18483                         *) #(vi
18484                                 cf_suffix='.sl'
18485                                 cf_depsuf=$cf_suffix
18486                                 ;;
18487                         esac
18488                         ;;
18489                 *)      cf_suffix='.so'
18490                         cf_depsuf=$cf_suffix
18491                         ;;
18492                 esac
18493         esac
18494         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18495         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18496
18497         case $cf_item in
18498         libtool) cf_subdir='obj_lo'  ;;
18499         normal)  cf_subdir='objects' ;;
18500         debug)   cf_subdir='obj_g' ;;
18501         profile) cf_subdir='obj_p' ;;
18502         shared)
18503                 case $cf_cv_system_name in #(vi
18504                 cygwin) #(vi
18505                         cf_subdir='objects' ;;
18506                 *)
18507                         cf_subdir='obj_s' ;;
18508                 esac
18509         esac
18510
18511                         # Test for case where we build libtinfo with a different name.
18512                         cf_libname=$cf_dir
18513                         if test $cf_dir = ncurses ; then
18514                                 case $cf_subset in
18515                                 *base*)
18516                                         cf_libname=${cf_libname}$LIB_SUFFIX
18517                                         ;;
18518                                 *termlib*)
18519                                         cf_libname=$TINFO_LIB_SUFFIX
18520                                         ;;
18521                                 ticlib*)
18522                                         cf_libname=$TICS_LIB_SUFFIX
18523                                         ;;
18524                                 esac
18525                         else
18526                                 cf_libname=${cf_libname}$LIB_SUFFIX
18527                         fi
18528                         if test -n "${DFT_ARG_SUFFIX}" ; then
18529                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18530                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18531                         fi
18532
18533                         # These dependencies really are for development, not
18534                         # builds, but they are useful in porting, too.
18535                         cf_depend="../include/ncurses_cfg.h"
18536                         if test "$srcdir" = "."; then
18537                                 cf_reldir="."
18538                         else
18539                                 cf_reldir="\${srcdir}"
18540                         fi
18541
18542                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18543                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18544                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18545                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18546                         fi
18547
18548                         cf_dir_suffix=
18549                         old_cf_suffix="$cf_suffix"
18550                         if test "$cf_cv_shlib_version_infix" = yes ; then
18551                         if test -n "$LIB_SUFFIX" ; then
18552                                 case $LIB_SUFFIX in
18553                                 w*)
18554                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18555                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18556                                         cf_dir_suffix=w
18557                                         ;;
18558                                 esac
18559                         fi
18560                         fi
18561
18562                         $AWK -f $srcdir/mk-1st.awk \
18563                                 name=${cf_libname}${cf_dir_suffix} \
18564                                 traces=$LIB_TRACING \
18565                                 MODEL=$cf_ITEM \
18566                                 model=$cf_subdir \
18567                                 prefix=$cf_prefix \
18568                                 suffix=$cf_suffix \
18569                                 subset=$cf_subset \
18570                                 TermlibRoot=$TINFO_NAME \
18571                                 TermlibSuffix=$TINFO_SUFFIX \
18572                                 ShlibVer=$cf_cv_shlib_version \
18573                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18574                                 ReLink=${cf_cv_do_relink-no} \
18575                                 DoLinks=$cf_cv_do_symlinks \
18576                                 rmSoLocs=$cf_cv_rm_so_locs \
18577                                 ldconfig="$LDCONFIG" \
18578                                 overwrite=$WITH_OVERWRITE \
18579                                 depend="$cf_depend" \
18580                                 host="$host" \
18581                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18582
18583                         cf_suffix="$old_cf_suffix"
18584
18585                         for cf_subdir2 in $cf_subdirs lib
18586                         do
18587                                 test $cf_subdir = $cf_subdir2 && break
18588                         done
18589                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18590                         $AWK -f $srcdir/mk-2nd.awk \
18591                                 name=$cf_dir \
18592                                 traces=$LIB_TRACING \
18593                                 MODEL=$cf_ITEM \
18594                                 model=$cf_subdir \
18595                                 subset=$cf_subset \
18596                                 srcdir=$srcdir \
18597                                 echo=$WITH_ECHO \
18598                                 crenames=$cf_cv_prog_CC_c_o \
18599                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18600                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18601                         cf_subdirs="$cf_subdirs $cf_subdir"
18602                         done
18603                 done
18604         fi
18605
18606         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18607 done
18608
18609 for cf_dir in $SRC_SUBDIRS
18610 do
18611         if test ! -d $srcdir/$cf_dir ; then
18612                 continue
18613         fi
18614
18615         if test -f $cf_dir/Makefile ; then
18616                 case "$cf_dir" in
18617                 Ada95) #(vi
18618                         echo 'libs \' >> Makefile
18619                         echo 'install.libs \' >> Makefile
18620                         echo 'uninstall.libs ::' >> Makefile
18621                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18622                         ;;
18623                 esac
18624         fi
18625
18626         if test -f $srcdir/$cf_dir/modules; then
18627                 echo >> Makefile
18628                 if test -f $srcdir/$cf_dir/headers; then
18629 cat >> Makefile <<CF_EOF
18630 install.includes \\
18631 uninstall.includes \\
18632 CF_EOF
18633                 fi
18634 if test "$cf_dir" != "c++" ; then
18635 echo 'lint \' >> Makefile
18636 fi
18637 cat >> Makefile <<CF_EOF
18638 libs \\
18639 lintlib \\
18640 install.libs \\
18641 uninstall.libs \\
18642 install.$cf_dir \\
18643 uninstall.$cf_dir ::
18644         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18645 CF_EOF
18646         elif test -f $srcdir/$cf_dir/headers; then
18647 cat >> Makefile <<CF_EOF
18648
18649 libs \\
18650 install.libs \\
18651 uninstall.libs \\
18652 install.includes \\
18653 uninstall.includes ::
18654         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18655 CF_EOF
18656 fi
18657 done
18658
18659 cat >> Makefile <<CF_EOF
18660
18661 install.libs uninstall.libs \\
18662 install.data uninstall.data ::
18663 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18664 CF_EOF
18665
18666 if test "x$cf_with_manpages" = xyes; then
18667 cat >> Makefile <<CF_EOF
18668
18669 install.man \\
18670 uninstall.man ::
18671         cd man && \${MAKE} \${CF_MFLAGS} \$@
18672 CF_EOF
18673 fi
18674
18675 cat >> Makefile <<CF_EOF
18676
18677 distclean ::
18678         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18679         rm -f headers.sh headers.sed mk_shared_lib.sh
18680         rm -f edit_man.* man_alias.*
18681         rm -rf \${DIRS_TO_MAKE}
18682 CF_EOF
18683
18684 # Special case: tack's manpage lives in its own directory.
18685 if test "x$cf_with_manpages" = xyes; then
18686 if test -d tack ; then
18687 if test -f $srcdir/$tack.h; then
18688 cat >> Makefile <<CF_EOF
18689
18690 install.man \\
18691 uninstall.man ::
18692         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18693 CF_EOF
18694 fi
18695 fi
18696 fi
18697
18698 rm -f headers.sed headers.sh
18699
18700 echo creating headers.sh
18701 cat >headers.sh <<CF_EOF
18702 #! /bin/sh
18703 # This shell script is generated by the 'configure' script.  It is invoked in a
18704 # subdirectory of the build tree.  It generates a sed-script in the parent
18705 # directory that is used to adjust includes for header files that reside in a
18706 # subdirectory of /usr/include, etc.
18707 PRG=""
18708 while test \$# != 3
18709 do
18710 PRG="\$PRG \$1"; shift
18711 done
18712 DST=\$1
18713 REF=\$2
18714 SRC=\$3
18715 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18716 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18717 echo installing \$SRC in \$DST
18718 CF_EOF
18719
18720 if test $WITH_CURSES_H = yes; then
18721         cat >>headers.sh <<CF_EOF
18722 case \$DST in
18723 /*/include/*)
18724         END=\`basename \$DST\`
18725         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18726         do
18727                 NAME=\`basename \$i\`
18728                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18729         done
18730         ;;
18731 *)
18732         echo "" >> \$TMPSED
18733         ;;
18734 esac
18735 CF_EOF
18736
18737 else
18738         cat >>headers.sh <<CF_EOF
18739 case \$DST in
18740 /*/include/*)
18741         END=\`basename \$DST\`
18742         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18743         do
18744                 NAME=\`basename \$i\`
18745                 if test "\$NAME" = "curses.h"
18746                 then
18747                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18748                         NAME=ncurses.h
18749                 fi
18750                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18751         done
18752         ;;
18753 *)
18754         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18755         ;;
18756 esac
18757 CF_EOF
18758 fi
18759 cat >>headers.sh <<CF_EOF
18760 rm -f \$TMPSRC
18761 sed -f \$TMPSED \$SRC > \$TMPSRC
18762 NAME=\`basename \$SRC\`
18763 CF_EOF
18764 if test $WITH_CURSES_H != yes; then
18765         cat >>headers.sh <<CF_EOF
18766 test "\$NAME" = "curses.h" && NAME=ncurses.h
18767 CF_EOF
18768 fi
18769 cat >>headers.sh <<CF_EOF
18770 # Just in case someone gzip'd manpages, remove the conflicting copy.
18771 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18772
18773 eval \$PRG \$TMPSRC \$DST/\$NAME
18774 rm -f \$TMPSRC \$TMPSED
18775 CF_EOF
18776
18777 chmod 0755 headers.sh
18778
18779 for cf_dir in $SRC_SUBDIRS
18780 do
18781         if test ! -d $srcdir/$cf_dir ; then
18782                 continue
18783         fi
18784
18785         if test -f $srcdir/$cf_dir/headers; then
18786                 $AWK -f $srcdir/mk-hdr.awk \
18787                         subset="$LIB_SUBSETS" \
18788                         compat="$WITH_CURSES_H" \
18789                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18790         fi
18791
18792         if test -f $srcdir/$cf_dir/modules; then
18793                 if test "$cf_dir" != "c++" ; then
18794                         cat >>$cf_dir/Makefile <<"CF_EOF"
18795 depend : ${AUTO_SRC}
18796         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18797
18798 # DO NOT DELETE THIS LINE -- make depend depends on it.
18799 CF_EOF
18800                 fi
18801         fi
18802 done
18803
18804  ;;
18805   esac
18806 done
18807 EOF
18808
18809 cat >>$CONFIG_STATUS <<\EOF
18810
18811 { (exit 0); exit 0; }
18812 EOF
18813 chmod +x $CONFIG_STATUS
18814 ac_clean_files=$ac_clean_files_save
18815
18816 # configure is writing to config.log, and then calls config.status.
18817 # config.status does its own redirection, appending to config.log.
18818 # Unfortunately, on DOS this fails, as config.log is still kept open
18819 # by configure, so config.status won't be able to write to it; its
18820 # output is simply discarded.  So we exec the FD to /dev/null,
18821 # effectively closing config.log, so it can be properly (re)opened and
18822 # appended to by config.status.  When coming back to configure, we
18823 # need to make the FD available again.
18824 if test "$no_create" != yes; then
18825   ac_cs_success=:
18826   exec 5>/dev/null
18827   $SHELL $CONFIG_STATUS || ac_cs_success=false
18828   exec 5>>config.log
18829   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18830   # would make configure fail if this is the last instruction.
18831   $ac_cs_success || { (exit 1); exit 1; }
18832 fi
18833 ${MAKE-make} preinstall