]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
9083c71227b84edf0a8609b3be44ea5c62d27b74
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.523 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -v </dev/null >&5\"") >&5
1710   (eval $ac_compiler -v </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); } &&
2380   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 # This should have been defined by AC_PROG_CC
2426 : ${CC:=cc}
2427
2428 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2429 # into CC.  This will not help with broken scripts that wrap the compiler with
2430 # options, but eliminates a more common category of user confusion.
2431 echo "$as_me:2431: checking \$CC variable" >&5
2432 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2433 case "$CC" in #(vi
2434 *[\ \   ]-[IUD]*)
2435         echo "$as_me:2435: result: broken" >&5
2436 echo "${ECHO_T}broken" >&6
2437         { echo "$as_me:2437: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2438 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2439         # humor him...
2440         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2441         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2442
2443 cf_fix_cppflags=no
2444 cf_new_cflags=
2445 cf_new_cppflags=
2446 cf_new_extra_cppflags=
2447
2448 for cf_add_cflags in $cf_flags
2449 do
2450 case $cf_fix_cppflags in
2451 no)
2452         case $cf_add_cflags in #(vi
2453         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2454                 case $cf_add_cflags in
2455                 -D*)
2456                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2457
2458                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2459                                 && test -z "${cf_tst_cflags}" \
2460                                 && cf_fix_cppflags=yes
2461
2462                         if test $cf_fix_cppflags = yes ; then
2463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2464                                 continue
2465                         elif test "${cf_tst_cflags}" = "\"'" ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         fi
2469                         ;;
2470                 esac
2471                 case "$CPPFLAGS" in
2472                 *$cf_add_cflags) #(vi
2473                         ;;
2474                 *) #(vi
2475                         case $cf_add_cflags in #(vi
2476                         -D*)
2477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2478
2479 CPPFLAGS=`echo "$CPPFLAGS" | \
2480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2482
2483                                 ;;
2484                         esac
2485                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2486                         ;;
2487                 esac
2488                 ;;
2489         *)
2490                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2491                 ;;
2492         esac
2493         ;;
2494 yes)
2495         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2496
2497         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2498
2499         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2500                 && test -z "${cf_tst_cflags}" \
2501                 && cf_fix_cppflags=no
2502         ;;
2503 esac
2504 done
2505
2506 if test -n "$cf_new_cflags" ; then
2507
2508         CFLAGS="$CFLAGS $cf_new_cflags"
2509 fi
2510
2511 if test -n "$cf_new_cppflags" ; then
2512
2513         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2514 fi
2515
2516 if test -n "$cf_new_extra_cppflags" ; then
2517
2518         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2519 fi
2520
2521         ;;
2522 *)
2523         echo "$as_me:2523: result: ok" >&5
2524 echo "${ECHO_T}ok" >&6
2525         ;;
2526 esac
2527
2528 echo "$as_me:2528: checking for ${CC:-cc} option to accept ANSI C" >&5
2529 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2530 if test "${cf_cv_ansi_cc+set}" = set; then
2531   echo $ECHO_N "(cached) $ECHO_C" >&6
2532 else
2533
2534 cf_cv_ansi_cc=no
2535 cf_save_CFLAGS="$CFLAGS"
2536 cf_save_CPPFLAGS="$CPPFLAGS"
2537 # Don't try gcc -ansi; that turns off useful extensions and
2538 # breaks some systems' header files.
2539 # AIX                   -qlanglvl=ansi
2540 # Ultrix and OSF/1      -std1
2541 # HP-UX                 -Aa -D_HPUX_SOURCE
2542 # SVR4                  -Xc
2543 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2544 for cf_arg in "-DCC_HAS_PROTOS" \
2545         "" \
2546         -qlanglvl=ansi \
2547         -std1 \
2548         -Ae \
2549         "-Aa -D_HPUX_SOURCE" \
2550         -Xc
2551 do
2552
2553 cf_fix_cppflags=no
2554 cf_new_cflags=
2555 cf_new_cppflags=
2556 cf_new_extra_cppflags=
2557
2558 for cf_add_cflags in $cf_arg
2559 do
2560 case $cf_fix_cppflags in
2561 no)
2562         case $cf_add_cflags in #(vi
2563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2564                 case $cf_add_cflags in
2565                 -D*)
2566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2567
2568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2569                                 && test -z "${cf_tst_cflags}" \
2570                                 && cf_fix_cppflags=yes
2571
2572                         if test $cf_fix_cppflags = yes ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         elif test "${cf_tst_cflags}" = "\"'" ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         fi
2579                         ;;
2580                 esac
2581                 case "$CPPFLAGS" in
2582                 *$cf_add_cflags) #(vi
2583                         ;;
2584                 *) #(vi
2585                         case $cf_add_cflags in #(vi
2586                         -D*)
2587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2588
2589 CPPFLAGS=`echo "$CPPFLAGS" | \
2590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2592
2593                                 ;;
2594                         esac
2595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2596                         ;;
2597                 esac
2598                 ;;
2599         *)
2600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2601                 ;;
2602         esac
2603         ;;
2604 yes)
2605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2606
2607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2608
2609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2610                 && test -z "${cf_tst_cflags}" \
2611                 && cf_fix_cppflags=no
2612         ;;
2613 esac
2614 done
2615
2616 if test -n "$cf_new_cflags" ; then
2617
2618         CFLAGS="$CFLAGS $cf_new_cflags"
2619 fi
2620
2621 if test -n "$cf_new_cppflags" ; then
2622
2623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2624 fi
2625
2626 if test -n "$cf_new_extra_cppflags" ; then
2627
2628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2629 fi
2630
2631         cat >conftest.$ac_ext <<_ACEOF
2632 #line 2632 "configure"
2633 #include "confdefs.h"
2634
2635 #ifndef CC_HAS_PROTOS
2636 #if !defined(__STDC__) || (__STDC__ != 1)
2637 choke me
2638 #endif
2639 #endif
2640
2641 int
2642 main ()
2643 {
2644
2645         int test (int i, double x);
2646         struct s1 {int (*f) (int a);};
2647         struct s2 {int (*f) (double a);};
2648   ;
2649   return 0;
2650 }
2651 _ACEOF
2652 rm -f conftest.$ac_objext
2653 if { (eval echo "$as_me:2653: \"$ac_compile\"") >&5
2654   (eval $ac_compile) 2>&5
2655   ac_status=$?
2656   echo "$as_me:2656: \$? = $ac_status" >&5
2657   (exit $ac_status); } &&
2658          { ac_try='test -s conftest.$ac_objext'
2659   { (eval echo "$as_me:2659: \"$ac_try\"") >&5
2660   (eval $ac_try) 2>&5
2661   ac_status=$?
2662   echo "$as_me:2662: \$? = $ac_status" >&5
2663   (exit $ac_status); }; }; then
2664   cf_cv_ansi_cc="$cf_arg"; break
2665 else
2666   echo "$as_me: failed program was:" >&5
2667 cat conftest.$ac_ext >&5
2668 fi
2669 rm -f conftest.$ac_objext conftest.$ac_ext
2670 done
2671 CFLAGS="$cf_save_CFLAGS"
2672 CPPFLAGS="$cf_save_CPPFLAGS"
2673
2674 fi
2675 echo "$as_me:2675: result: $cf_cv_ansi_cc" >&5
2676 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2677
2678 if test "$cf_cv_ansi_cc" != "no"; then
2679 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2680
2681 cf_fix_cppflags=no
2682 cf_new_cflags=
2683 cf_new_cppflags=
2684 cf_new_extra_cppflags=
2685
2686 for cf_add_cflags in $cf_cv_ansi_cc
2687 do
2688 case $cf_fix_cppflags in
2689 no)
2690         case $cf_add_cflags in #(vi
2691         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2692                 case $cf_add_cflags in
2693                 -D*)
2694                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2695
2696                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2697                                 && test -z "${cf_tst_cflags}" \
2698                                 && cf_fix_cppflags=yes
2699
2700                         if test $cf_fix_cppflags = yes ; then
2701                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2702                                 continue
2703                         elif test "${cf_tst_cflags}" = "\"'" ; then
2704                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2705                                 continue
2706                         fi
2707                         ;;
2708                 esac
2709                 case "$CPPFLAGS" in
2710                 *$cf_add_cflags) #(vi
2711                         ;;
2712                 *) #(vi
2713                         case $cf_add_cflags in #(vi
2714                         -D*)
2715                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2716
2717 CPPFLAGS=`echo "$CPPFLAGS" | \
2718         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2719                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2720
2721                                 ;;
2722                         esac
2723                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2724                         ;;
2725                 esac
2726                 ;;
2727         *)
2728                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2729                 ;;
2730         esac
2731         ;;
2732 yes)
2733         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2734
2735         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2736
2737         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2738                 && test -z "${cf_tst_cflags}" \
2739                 && cf_fix_cppflags=no
2740         ;;
2741 esac
2742 done
2743
2744 if test -n "$cf_new_cflags" ; then
2745
2746         CFLAGS="$CFLAGS $cf_new_cflags"
2747 fi
2748
2749 if test -n "$cf_new_cppflags" ; then
2750
2751         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2752 fi
2753
2754 if test -n "$cf_new_extra_cppflags" ; then
2755
2756         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2757 fi
2758
2759 else
2760         cat >>confdefs.h <<\EOF
2761 #define CC_HAS_PROTOS 1
2762 EOF
2763
2764 fi
2765 fi
2766
2767 if test "$cf_cv_ansi_cc" = "no"; then
2768         { { echo "$as_me:2768: error: Your compiler does not appear to recognize prototypes.
2769 You have the following choices:
2770         a. adjust your compiler options
2771         b. get an up-to-date compiler
2772         c. use a wrapper such as unproto" >&5
2773 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2774 You have the following choices:
2775         a. adjust your compiler options
2776         b. get an up-to-date compiler
2777         c. use a wrapper such as unproto" >&2;}
2778    { (exit 1); exit 1; }; }
2779 fi
2780
2781 case $cf_cv_system_name in
2782 os2*)
2783     CFLAGS="$CFLAGS -Zmt"
2784     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2785     CXXFLAGS="$CXXFLAGS -Zmt"
2786     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2787     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2788     ac_cv_exeext=.exe
2789     ;;
2790 esac
2791
2792 PROG_EXT="$EXEEXT"
2793
2794 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2795 #define PROG_EXT "$PROG_EXT"
2796 EOF
2797
2798 if test "$cross_compiling" = yes ; then
2799   LDCONFIG=:
2800 else
2801 case "$cf_cv_system_name" in #(vi
2802 dragonfly*|mirbsd*|freebsd*) #(vi
2803   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2804   ;;
2805 *) LDPATH=$PATH:/sbin:/usr/sbin
2806   # Extract the first word of "ldconfig", so it can be a program name with args.
2807 set dummy ldconfig; ac_word=$2
2808 echo "$as_me:2808: checking for $ac_word" >&5
2809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2811   echo $ECHO_N "(cached) $ECHO_C" >&6
2812 else
2813   case $LDCONFIG in
2814   [\\/]* | ?:[\\/]*)
2815   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2816   ;;
2817   *)
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$LDPATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   if $as_executable_p "$ac_dir/$ac_word"; then
2824    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2825    echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826    break
2827 fi
2828 done
2829
2830   ;;
2831 esac
2832 fi
2833 LDCONFIG=$ac_cv_path_LDCONFIG
2834
2835 if test -n "$LDCONFIG"; then
2836   echo "$as_me:2836: result: $LDCONFIG" >&5
2837 echo "${ECHO_T}$LDCONFIG" >&6
2838 else
2839   echo "$as_me:2839: result: no" >&5
2840 echo "${ECHO_T}no" >&6
2841 fi
2842
2843   ;;
2844 esac
2845 fi
2846
2847 echo "$as_me:2847: checking if you want to ensure bool is consistent with C++" >&5
2848 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx or --without-cxx was given.
2851 if test "${with_cxx+set}" = set; then
2852   withval="$with_cxx"
2853   cf_with_cxx=$withval
2854 else
2855   cf_with_cxx=yes
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx" >&5
2858 echo "${ECHO_T}$cf_with_cxx" >&6
2859 if test "X$cf_with_cxx" = Xno ; then
2860         CXX=""
2861         GXX=""
2862 else
2863         # with autoconf 2.13, we can change the error to a warning:
2864                 ac_ext=cc
2865 ac_cpp='$CXXCPP $CPPFLAGS'
2866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2869 ac_main_return=return
2870 if test -n "$ac_tool_prefix"; then
2871   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2872   do
2873     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2874 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2875 echo "$as_me:2875: checking for $ac_word" >&5
2876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2877 if test "${ac_cv_prog_CXX+set}" = set; then
2878   echo $ECHO_N "(cached) $ECHO_C" >&6
2879 else
2880   if test -n "$CXX"; then
2881   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2882 else
2883   ac_save_IFS=$IFS; IFS=$ac_path_separator
2884 ac_dummy="$PATH"
2885 for ac_dir in $ac_dummy; do
2886   IFS=$ac_save_IFS
2887   test -z "$ac_dir" && ac_dir=.
2888   $as_executable_p "$ac_dir/$ac_word" || continue
2889 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2890 echo "$as_me:2890: found $ac_dir/$ac_word" >&5
2891 break
2892 done
2893
2894 fi
2895 fi
2896 CXX=$ac_cv_prog_CXX
2897 if test -n "$CXX"; then
2898   echo "$as_me:2898: result: $CXX" >&5
2899 echo "${ECHO_T}$CXX" >&6
2900 else
2901   echo "$as_me:2901: result: no" >&5
2902 echo "${ECHO_T}no" >&6
2903 fi
2904
2905     test -n "$CXX" && break
2906   done
2907 fi
2908 if test -z "$CXX"; then
2909   ac_ct_CXX=$CXX
2910   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2911 do
2912   # Extract the first word of "$ac_prog", so it can be a program name with args.
2913 set dummy $ac_prog; ac_word=$2
2914 echo "$as_me:2914: checking for $ac_word" >&5
2915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2916 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   if test -n "$ac_ct_CXX"; then
2920   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2921 else
2922   ac_save_IFS=$IFS; IFS=$ac_path_separator
2923 ac_dummy="$PATH"
2924 for ac_dir in $ac_dummy; do
2925   IFS=$ac_save_IFS
2926   test -z "$ac_dir" && ac_dir=.
2927   $as_executable_p "$ac_dir/$ac_word" || continue
2928 ac_cv_prog_ac_ct_CXX="$ac_prog"
2929 echo "$as_me:2929: found $ac_dir/$ac_word" >&5
2930 break
2931 done
2932
2933 fi
2934 fi
2935 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2936 if test -n "$ac_ct_CXX"; then
2937   echo "$as_me:2937: result: $ac_ct_CXX" >&5
2938 echo "${ECHO_T}$ac_ct_CXX" >&6
2939 else
2940   echo "$as_me:2940: result: no" >&5
2941 echo "${ECHO_T}no" >&6
2942 fi
2943
2944   test -n "$ac_ct_CXX" && break
2945 done
2946 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2947
2948   CXX=$ac_ct_CXX
2949 fi
2950
2951 # Provide some information about the compiler.
2952 echo "$as_me:2952:" \
2953      "checking for C++ compiler version" >&5
2954 ac_compiler=`set X $ac_compile; echo $2`
2955 { (eval echo "$as_me:2955: \"$ac_compiler --version </dev/null >&5\"") >&5
2956   (eval $ac_compiler --version </dev/null >&5) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); }
2960 { (eval echo "$as_me:2960: \"$ac_compiler -v </dev/null >&5\"") >&5
2961   (eval $ac_compiler -v </dev/null >&5) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }
2965 { (eval echo "$as_me:2965: \"$ac_compiler -V </dev/null >&5\"") >&5
2966   (eval $ac_compiler -V </dev/null >&5) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }
2970
2971 echo "$as_me:2971: checking whether we are using the GNU C++ compiler" >&5
2972 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2973 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main ()
2982 {
2983 #ifndef __GNUC__
2984        choke me
2985 #endif
2986
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   ac_compiler_gnu=yes
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 ac_compiler_gnu=no
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3011
3012 fi
3013 echo "$as_me:3013: result: $ac_cv_cxx_compiler_gnu" >&5
3014 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3015 GXX=`test $ac_compiler_gnu = yes && echo yes`
3016 ac_test_CXXFLAGS=${CXXFLAGS+set}
3017 ac_save_CXXFLAGS=$CXXFLAGS
3018 CXXFLAGS="-g"
3019 echo "$as_me:3019: checking whether $CXX accepts -g" >&5
3020 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3021 if test "${ac_cv_prog_cxx_g+set}" = set; then
3022   echo $ECHO_N "(cached) $ECHO_C" >&6
3023 else
3024   cat >conftest.$ac_ext <<_ACEOF
3025 #line 3025 "configure"
3026 #include "confdefs.h"
3027
3028 int
3029 main ()
3030 {
3031
3032   ;
3033   return 0;
3034 }
3035 _ACEOF
3036 rm -f conftest.$ac_objext
3037 if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5
3038   (eval $ac_compile) 2>&5
3039   ac_status=$?
3040   echo "$as_me:3040: \$? = $ac_status" >&5
3041   (exit $ac_status); } &&
3042          { ac_try='test -s conftest.$ac_objext'
3043   { (eval echo "$as_me:3043: \"$ac_try\"") >&5
3044   (eval $ac_try) 2>&5
3045   ac_status=$?
3046   echo "$as_me:3046: \$? = $ac_status" >&5
3047   (exit $ac_status); }; }; then
3048   ac_cv_prog_cxx_g=yes
3049 else
3050   echo "$as_me: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 ac_cv_prog_cxx_g=no
3053 fi
3054 rm -f conftest.$ac_objext conftest.$ac_ext
3055 fi
3056 echo "$as_me:3056: result: $ac_cv_prog_cxx_g" >&5
3057 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3058 if test "$ac_test_CXXFLAGS" = set; then
3059   CXXFLAGS=$ac_save_CXXFLAGS
3060 elif test $ac_cv_prog_cxx_g = yes; then
3061   if test "$GXX" = yes; then
3062     CXXFLAGS="-g -O2"
3063   else
3064     CXXFLAGS="-g"
3065   fi
3066 else
3067   if test "$GXX" = yes; then
3068     CXXFLAGS="-O2"
3069   else
3070     CXXFLAGS=
3071   fi
3072 fi
3073 for ac_declaration in \
3074    ''\
3075    '#include <stdlib.h>' \
3076    'extern "C" void std::exit (int) throw (); using std::exit;' \
3077    'extern "C" void std::exit (int); using std::exit;' \
3078    'extern "C" void exit (int) throw ();' \
3079    'extern "C" void exit (int);' \
3080    'void exit (int);'
3081 do
3082   cat >conftest.$ac_ext <<_ACEOF
3083 #line 3083 "configure"
3084 #include "confdefs.h"
3085 #include <stdlib.h>
3086 $ac_declaration
3087 int
3088 main ()
3089 {
3090 exit (42);
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 rm -f conftest.$ac_objext
3096 if { (eval echo "$as_me:3096: \"$ac_compile\"") >&5
3097   (eval $ac_compile) 2>&5
3098   ac_status=$?
3099   echo "$as_me:3099: \$? = $ac_status" >&5
3100   (exit $ac_status); } &&
3101          { ac_try='test -s conftest.$ac_objext'
3102   { (eval echo "$as_me:3102: \"$ac_try\"") >&5
3103   (eval $ac_try) 2>&5
3104   ac_status=$?
3105   echo "$as_me:3105: \$? = $ac_status" >&5
3106   (exit $ac_status); }; }; then
3107   :
3108 else
3109   echo "$as_me: failed program was:" >&5
3110 cat conftest.$ac_ext >&5
3111 continue
3112 fi
3113 rm -f conftest.$ac_objext conftest.$ac_ext
3114   cat >conftest.$ac_ext <<_ACEOF
3115 #line 3115 "configure"
3116 #include "confdefs.h"
3117 $ac_declaration
3118 int
3119 main ()
3120 {
3121 exit (42);
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 rm -f conftest.$ac_objext
3127 if { (eval echo "$as_me:3127: \"$ac_compile\"") >&5
3128   (eval $ac_compile) 2>&5
3129   ac_status=$?
3130   echo "$as_me:3130: \$? = $ac_status" >&5
3131   (exit $ac_status); } &&
3132          { ac_try='test -s conftest.$ac_objext'
3133   { (eval echo "$as_me:3133: \"$ac_try\"") >&5
3134   (eval $ac_try) 2>&5
3135   ac_status=$?
3136   echo "$as_me:3136: \$? = $ac_status" >&5
3137   (exit $ac_status); }; }; then
3138   break
3139 else
3140   echo "$as_me: failed program was:" >&5
3141 cat conftest.$ac_ext >&5
3142 fi
3143 rm -f conftest.$ac_objext conftest.$ac_ext
3144 done
3145 rm -rf conftest*
3146 if test -n "$ac_declaration"; then
3147   echo '#ifdef __cplusplus' >>confdefs.h
3148   echo $ac_declaration      >>confdefs.h
3149   echo '#endif'             >>confdefs.h
3150 fi
3151
3152 ac_ext=c
3153 ac_cpp='$CPP $CPPFLAGS'
3154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3157 ac_main_return=return
3158
3159                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3160         if test "$CXX" = "g++" ; then
3161                 # Extract the first word of "g++", so it can be a program name with args.
3162 set dummy g++; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_path_CXX+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   case $CXX in
3169   [\\/]* | ?:[\\/]*)
3170   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3171   ;;
3172   *)
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   if $as_executable_p "$ac_dir/$ac_word"; then
3179    ac_cv_path_CXX="$ac_dir/$ac_word"
3180    echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181    break
3182 fi
3183 done
3184
3185   ;;
3186 esac
3187 fi
3188 CXX=$ac_cv_path_CXX
3189
3190 if test -n "$CXX"; then
3191   echo "$as_me:3191: result: $CXX" >&5
3192 echo "${ECHO_T}$CXX" >&6
3193 else
3194   echo "$as_me:3194: result: no" >&5
3195 echo "${ECHO_T}no" >&6
3196 fi
3197
3198         fi
3199         if test "$CXX" = "g++" ; then
3200                 { echo "$as_me:3200: WARNING: ignoring hardcoded g++" >&5
3201 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3202                 cf_with_cxx=no; CXX=""; GXX="";
3203         fi
3204 fi
3205
3206 GXX_VERSION=none
3207 if test "$GXX" = yes; then
3208         echo "$as_me:3208: checking version of g++" >&5
3209 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3210         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3211         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3212         echo "$as_me:3212: result: $GXX_VERSION" >&5
3213 echo "${ECHO_T}$GXX_VERSION" >&6
3214 fi
3215
3216 case $GXX_VERSION in
3217 1*|2.[0-6]*)
3218         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3219         # cf_cxx_library=no
3220         { echo "$as_me:3220: WARNING: templates do not work" >&5
3221 echo "$as_me: WARNING: templates do not work" >&2;}
3222         ;;
3223 esac
3224
3225 echo "$as_me:3225: checking if you want to build C++ binding and demo" >&5
3226 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3227
3228 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3229 if test "${with_cxx_binding+set}" = set; then
3230   withval="$with_cxx_binding"
3231   cf_with_cxx_binding=$withval
3232 else
3233   cf_with_cxx_binding=$cf_with_cxx
3234 fi;
3235 echo "$as_me:3235: result: $cf_with_cxx_binding" >&5
3236 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3237
3238 echo "$as_me:3238: checking if you want to build with Ada95" >&5
3239 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3240
3241 # Check whether --with-ada or --without-ada was given.
3242 if test "${with_ada+set}" = set; then
3243   withval="$with_ada"
3244   cf_with_ada=$withval
3245 else
3246   cf_with_ada=yes
3247 fi;
3248 echo "$as_me:3248: result: $cf_with_ada" >&5
3249 echo "${ECHO_T}$cf_with_ada" >&6
3250
3251 echo "$as_me:3251: checking if you want to install manpages" >&5
3252 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3253
3254 # Check whether --with-manpages or --without-manpages was given.
3255 if test "${with_manpages+set}" = set; then
3256   withval="$with_manpages"
3257   cf_with_manpages=$withval
3258 else
3259   cf_with_manpages=yes
3260 fi;
3261 echo "$as_me:3261: result: $cf_with_manpages" >&5
3262 echo "${ECHO_T}$cf_with_manpages" >&6
3263
3264 echo "$as_me:3264: checking if you want to build programs such as tic" >&5
3265 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3266
3267 # Check whether --with-progs or --without-progs was given.
3268 if test "${with_progs+set}" = set; then
3269   withval="$with_progs"
3270   cf_with_progs=$withval
3271 else
3272   cf_with_progs=yes
3273 fi;
3274 echo "$as_me:3274: result: $cf_with_progs" >&5
3275 echo "${ECHO_T}$cf_with_progs" >&6
3276
3277 echo "$as_me:3277: checking if you want to build test-programs" >&5
3278 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3279
3280 # Check whether --with-tests or --without-tests was given.
3281 if test "${with_tests+set}" = set; then
3282   withval="$with_tests"
3283   cf_with_tests=$withval
3284 else
3285   cf_with_tests=yes
3286 fi;
3287 echo "$as_me:3287: result: $cf_with_tests" >&5
3288 echo "${ECHO_T}$cf_with_tests" >&6
3289
3290 echo "$as_me:3290: checking if you wish to install curses.h" >&5
3291 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3292
3293 # Check whether --with-curses-h or --without-curses-h was given.
3294 if test "${with_curses_h+set}" = set; then
3295   withval="$with_curses_h"
3296   with_curses_h=$withval
3297 else
3298   with_curses_h=yes
3299 fi;
3300 echo "$as_me:3300: result: $with_curses_h" >&5
3301 echo "${ECHO_T}$with_curses_h" >&6
3302
3303 modules_to_build="ncurses"
3304 if test "X$cf_with_progs" != Xno ; then
3305 modules_to_build="$modules_to_build progs tack"
3306 fi
3307 modules_to_build="$modules_to_build panel menu form"
3308
3309 test "$program_prefix" != NONE &&
3310   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3311 # Use a double $ so make ignores it.
3312 test "$program_suffix" != NONE &&
3313   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3314 # Double any \ or $.  echo might interpret backslashes.
3315 # By default was `s,x,x', remove it if useless.
3316 cat <<\_ACEOF >conftest.sed
3317 s/[\\$]/&&/g;s/;s,x,x,$//
3318 _ACEOF
3319 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3320 rm conftest.sed
3321
3322 for ac_prog in mawk gawk nawk awk
3323 do
3324   # Extract the first word of "$ac_prog", so it can be a program name with args.
3325 set dummy $ac_prog; ac_word=$2
3326 echo "$as_me:3326: checking for $ac_word" >&5
3327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328 if test "${ac_cv_prog_AWK+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331   if test -n "$AWK"; then
3332   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3333 else
3334   ac_save_IFS=$IFS; IFS=$ac_path_separator
3335 ac_dummy="$PATH"
3336 for ac_dir in $ac_dummy; do
3337   IFS=$ac_save_IFS
3338   test -z "$ac_dir" && ac_dir=.
3339   $as_executable_p "$ac_dir/$ac_word" || continue
3340 ac_cv_prog_AWK="$ac_prog"
3341 echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342 break
3343 done
3344
3345 fi
3346 fi
3347 AWK=$ac_cv_prog_AWK
3348 if test -n "$AWK"; then
3349   echo "$as_me:3349: result: $AWK" >&5
3350 echo "${ECHO_T}$AWK" >&6
3351 else
3352   echo "$as_me:3352: result: no" >&5
3353 echo "${ECHO_T}no" >&6
3354 fi
3355
3356   test -n "$AWK" && break
3357 done
3358
3359 test -z "$AWK" && { { echo "$as_me:3359: error: No awk program found" >&5
3360 echo "$as_me: error: No awk program found" >&2;}
3361    { (exit 1); exit 1; }; }
3362
3363 echo "$as_me:3363: checking for egrep" >&5
3364 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3365 if test "${ac_cv_prog_egrep+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3369     then ac_cv_prog_egrep='grep -E'
3370     else ac_cv_prog_egrep='egrep'
3371     fi
3372 fi
3373 echo "$as_me:3373: result: $ac_cv_prog_egrep" >&5
3374 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3375  EGREP=$ac_cv_prog_egrep
3376
3377 test -z "$EGREP" && { { echo "$as_me:3377: error: No egrep program found" >&5
3378 echo "$as_me: error: No egrep program found" >&2;}
3379    { (exit 1); exit 1; }; }
3380
3381 # Find a good install program.  We prefer a C program (faster),
3382 # so one script is as good as another.  But avoid the broken or
3383 # incompatible versions:
3384 # SysV /etc/install, /usr/sbin/install
3385 # SunOS /usr/etc/install
3386 # IRIX /sbin/install
3387 # AIX /bin/install
3388 # AmigaOS /C/install, which installs bootblocks on floppy discs
3389 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3390 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3391 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3392 # ./install, which can be erroneously created by make from ./install.sh.
3393 echo "$as_me:3393: checking for a BSD compatible install" >&5
3394 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3395 if test -z "$INSTALL"; then
3396 if test "${ac_cv_path_install+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399     ac_save_IFS=$IFS; IFS=$ac_path_separator
3400   for ac_dir in $PATH; do
3401     IFS=$ac_save_IFS
3402     # Account for people who put trailing slashes in PATH elements.
3403     case $ac_dir/ in
3404     / | ./ | .// | /cC/* \
3405     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3406     | /usr/ucb/* ) ;;
3407     *)
3408       # OSF1 and SCO ODT 3.0 have their own names for install.
3409       # Don't use installbsd from OSF since it installs stuff as root
3410       # by default.
3411       for ac_prog in ginstall scoinst install; do
3412         if $as_executable_p "$ac_dir/$ac_prog"; then
3413           if test $ac_prog = install &&
3414             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3415             # AIX install.  It has an incompatible calling convention.
3416             :
3417           elif test $ac_prog = install &&
3418             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3419             # program-specific install script used by HP pwplus--don't use.
3420             :
3421           else
3422             ac_cv_path_install="$ac_dir/$ac_prog -c"
3423             break 2
3424           fi
3425         fi
3426       done
3427       ;;
3428     esac
3429   done
3430
3431 fi
3432   if test "${ac_cv_path_install+set}" = set; then
3433     INSTALL=$ac_cv_path_install
3434   else
3435     # As a last resort, use the slow shell script.  We don't cache a
3436     # path for INSTALL within a source directory, because that will
3437     # break other packages using the cache if that directory is
3438     # removed, or if the path is relative.
3439     INSTALL=$ac_install_sh
3440   fi
3441 fi
3442 echo "$as_me:3442: result: $INSTALL" >&5
3443 echo "${ECHO_T}$INSTALL" >&6
3444
3445 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3446 # It thinks the first close brace ends the variable substitution.
3447 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3448
3449 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3450
3451 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3452
3453 case $INSTALL in
3454 /*)
3455   ;;
3456 *)
3457   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3458   test -z "$cf_dir" && cf_dir=.
3459   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3460   ;;
3461 esac
3462
3463 for ac_prog in tdlint lint alint splint lclint
3464 do
3465   # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 echo "$as_me:3467: checking for $ac_word" >&5
3468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3469 if test "${ac_cv_prog_LINT+set}" = set; then
3470   echo $ECHO_N "(cached) $ECHO_C" >&6
3471 else
3472   if test -n "$LINT"; then
3473   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3474 else
3475   ac_save_IFS=$IFS; IFS=$ac_path_separator
3476 ac_dummy="$PATH"
3477 for ac_dir in $ac_dummy; do
3478   IFS=$ac_save_IFS
3479   test -z "$ac_dir" && ac_dir=.
3480   $as_executable_p "$ac_dir/$ac_word" || continue
3481 ac_cv_prog_LINT="$ac_prog"
3482 echo "$as_me:3482: found $ac_dir/$ac_word" >&5
3483 break
3484 done
3485
3486 fi
3487 fi
3488 LINT=$ac_cv_prog_LINT
3489 if test -n "$LINT"; then
3490   echo "$as_me:3490: result: $LINT" >&5
3491 echo "${ECHO_T}$LINT" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497   test -n "$LINT" && break
3498 done
3499
3500 echo "$as_me:3500: checking whether ln -s works" >&5
3501 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3502 LN_S=$as_ln_s
3503 if test "$LN_S" = "ln -s"; then
3504   echo "$as_me:3504: result: yes" >&5
3505 echo "${ECHO_T}yes" >&6
3506 else
3507   echo "$as_me:3507: result: no, using $LN_S" >&5
3508 echo "${ECHO_T}no, using $LN_S" >&6
3509 fi
3510
3511 echo "$as_me:3511: checking if $LN_S -f options work" >&5
3512 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3513
3514 rm -f conf$$.src conf$$dst
3515 echo >conf$$.dst
3516 echo first >conf$$.src
3517 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3518         cf_prog_ln_sf=yes
3519 else
3520         cf_prog_ln_sf=no
3521 fi
3522 rm -f conf$$.dst conf$$src
3523 echo "$as_me:3523: result: $cf_prog_ln_sf" >&5
3524 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3525
3526 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3527
3528 echo "$as_me:3528: checking for long file names" >&5
3529 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3530 if test "${ac_cv_sys_long_file_names+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   ac_cv_sys_long_file_names=yes
3534 # Test for long file names in all the places we know might matter:
3535 #      .                the current directory, where building will happen
3536 #      $prefix/lib      where we will be installing things
3537 #      $exec_prefix/lib likewise
3538 # eval it to expand exec_prefix.
3539 #      $TMPDIR          if set, where it might want to write temporary files
3540 # if $TMPDIR is not set:
3541 #      /tmp             where it might want to write temporary files
3542 #      /var/tmp         likewise
3543 #      /usr/tmp         likewise
3544 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3545   ac_tmpdirs=$TMPDIR
3546 else
3547   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3548 fi
3549 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3550   test -d $ac_dir || continue
3551   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3552   ac_xdir=$ac_dir/cf$$
3553   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3554   ac_tf1=$ac_xdir/conftest9012345
3555   ac_tf2=$ac_xdir/conftest9012346
3556   (echo 1 >$ac_tf1) 2>/dev/null
3557   (echo 2 >$ac_tf2) 2>/dev/null
3558   ac_val=`cat $ac_tf1 2>/dev/null`
3559   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3560     ac_cv_sys_long_file_names=no
3561     rm -rf $ac_xdir 2>/dev/null
3562     break
3563   fi
3564   rm -rf $ac_xdir 2>/dev/null
3565 done
3566 fi
3567 echo "$as_me:3567: result: $ac_cv_sys_long_file_names" >&5
3568 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3569 if test $ac_cv_sys_long_file_names = yes; then
3570
3571 cat >>confdefs.h <<\EOF
3572 #define HAVE_LONG_FILE_NAMES 1
3573 EOF
3574
3575 fi
3576
3577 # if we find pkg-config, check if we should install the ".pc" files.
3578
3579 echo "$as_me:3579: checking if you want to use pkg-config" >&5
3580 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3581
3582 # Check whether --with-pkg-config or --without-pkg-config was given.
3583 if test "${with_pkg_config+set}" = set; then
3584   withval="$with_pkg_config"
3585   cf_pkg_config=$withval
3586 else
3587   cf_pkg_config=yes
3588 fi;
3589 echo "$as_me:3589: result: $cf_pkg_config" >&5
3590 echo "${ECHO_T}$cf_pkg_config" >&6
3591
3592 case $cf_pkg_config in #(vi
3593 no) #(vi
3594         PKG_CONFIG=none
3595         ;;
3596 yes) #(vi
3597
3598 if test -n "$ac_tool_prefix"; then
3599   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3600 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3601 echo "$as_me:3601: checking for $ac_word" >&5
3602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3603 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3604   echo $ECHO_N "(cached) $ECHO_C" >&6
3605 else
3606   case $PKG_CONFIG in
3607   [\\/]* | ?:[\\/]*)
3608   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3609   ;;
3610   *)
3611   ac_save_IFS=$IFS; IFS=$ac_path_separator
3612 ac_dummy="$PATH"
3613 for ac_dir in $ac_dummy; do
3614   IFS=$ac_save_IFS
3615   test -z "$ac_dir" && ac_dir=.
3616   if $as_executable_p "$ac_dir/$ac_word"; then
3617    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3618    echo "$as_me:3618: found $ac_dir/$ac_word" >&5
3619    break
3620 fi
3621 done
3622
3623   ;;
3624 esac
3625 fi
3626 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3627
3628 if test -n "$PKG_CONFIG"; then
3629   echo "$as_me:3629: result: $PKG_CONFIG" >&5
3630 echo "${ECHO_T}$PKG_CONFIG" >&6
3631 else
3632   echo "$as_me:3632: result: no" >&5
3633 echo "${ECHO_T}no" >&6
3634 fi
3635
3636 fi
3637 if test -z "$ac_cv_path_PKG_CONFIG"; then
3638   ac_pt_PKG_CONFIG=$PKG_CONFIG
3639   # Extract the first word of "pkg-config", so it can be a program name with args.
3640 set dummy pkg-config; ac_word=$2
3641 echo "$as_me:3641: checking for $ac_word" >&5
3642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3644   echo $ECHO_N "(cached) $ECHO_C" >&6
3645 else
3646   case $ac_pt_PKG_CONFIG in
3647   [\\/]* | ?:[\\/]*)
3648   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3649   ;;
3650   *)
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   if $as_executable_p "$ac_dir/$ac_word"; then
3657    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3658    echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659    break
3660 fi
3661 done
3662
3663   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3664   ;;
3665 esac
3666 fi
3667 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3668
3669 if test -n "$ac_pt_PKG_CONFIG"; then
3670   echo "$as_me:3670: result: $ac_pt_PKG_CONFIG" >&5
3671 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   PKG_CONFIG=$ac_pt_PKG_CONFIG
3678 else
3679   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3680 fi
3681
3682         ;;
3683 *)
3684         PKG_CONFIG=$withval
3685         ;;
3686 esac
3687
3688 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3689 if test "$PKG_CONFIG" != none ; then
3690
3691 if test "x$prefix" != xNONE; then
3692   cf_path_syntax="$prefix"
3693 else
3694   cf_path_syntax="$ac_default_prefix"
3695 fi
3696
3697 case ".$PKG_CONFIG" in #(vi
3698 .\$\(*\)*|.\'*\'*) #(vi
3699   ;;
3700 ..|./*|.\\*) #(vi
3701   ;;
3702 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3703   ;;
3704 .\${*prefix}*) #(vi
3705   eval PKG_CONFIG="$PKG_CONFIG"
3706   case ".$PKG_CONFIG" in #(vi
3707   .NONE/*)
3708     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3709     ;;
3710   esac
3711   ;; #(vi
3712 .no|.NONE/*)
3713   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3714   ;;
3715 *)
3716   { { echo "$as_me:3716: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3717 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3718    { (exit 1); exit 1; }; }
3719   ;;
3720 esac
3721
3722 fi
3723
3724         case $cf_cv_system_name in
3725         os2*)   PATH_SEPARATOR=';'  ;;
3726         *)      PATH_SEPARATOR=':'  ;;
3727         esac
3728
3729 if test "$PKG_CONFIG" != no ; then
3730         echo "$as_me:3730: checking if we should install .pc files for $PKG_CONFIG" >&5
3731 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3732
3733         # Leave this as something that can be overridden in the environment.
3734         if test -z "$PKG_CONFIG_LIBDIR" ; then
3735                 if test -n "$PKG_CONFIG_PATH" ; then
3736                         for cf_config in `echo "$PKG_CONFIG_PATH" | sed -e 's/'$PATH_SEPARATOR'/ /g'`
3737                         do
3738                                 if test -n "$cf_config" && test -d "$cf_config"
3739                                 then
3740                                         PKG_CONFIG_LIBDIR=$cf_config
3741                                         break
3742                                 fi
3743                         done
3744                 fi
3745                 if test -z "$PKG_CONFIG_LIBDIR" ; then
3746                         cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3747                         case x`(arch) 2>/dev/null` in #(vi
3748                         *64) #(vi
3749                                 for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3750                                 do
3751                                         if test -d $cf_config/pkgconfig
3752                                         then
3753                                                 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3754                                                 break
3755                                         fi
3756                                 done
3757                                 ;;
3758                         *)
3759                                 PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3760                                 ;;
3761                         esac
3762                 fi
3763         else
3764                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3765         fi
3766         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3767
3768 # Check whether --enable-pc-files or --disable-pc-files was given.
3769 if test "${enable_pc_files+set}" = set; then
3770   enableval="$enable_pc_files"
3771   enable_pc_files=$enableval
3772 else
3773   enable_pc_files=no
3774 fi;
3775                 echo "$as_me:3775: result: $enable_pc_files" >&5
3776 echo "${ECHO_T}$enable_pc_files" >&6
3777                 test -n "$verbose" && echo "    found library $PKG_CONFIG_LIBDIR" 1>&6
3778
3779 echo "${as_me:-configure}:3779: testing found library $PKG_CONFIG_LIBDIR ..." 1>&5
3780
3781         else
3782                 echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784                 { echo "$as_me:3784: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3785 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3786                 enable_pc_files=no
3787         fi
3788 fi
3789
3790 echo "$as_me:3790: checking if we should assume mixed-case filenames" >&5
3791 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3792
3793 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3794 if test "${enable_mixed_case+set}" = set; then
3795   enableval="$enable_mixed_case"
3796   enable_mixedcase=$enableval
3797 else
3798   enable_mixedcase=auto
3799 fi;
3800 echo "$as_me:3800: result: $enable_mixedcase" >&5
3801 echo "${ECHO_T}$enable_mixedcase" >&6
3802 if test "$enable_mixedcase" = "auto" ; then
3803
3804 echo "$as_me:3804: checking if filesystem supports mixed-case filenames" >&5
3805 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3806 if test "${cf_cv_mixedcase+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809
3810 if test "$cross_compiling" = yes ; then
3811         case $target_alias in #(vi
3812         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3813                 cf_cv_mixedcase=no
3814                 ;;
3815         *)
3816                 cf_cv_mixedcase=yes
3817                 ;;
3818         esac
3819 else
3820         rm -f conftest CONFTEST
3821         echo test >conftest
3822         if test -f CONFTEST ; then
3823                 cf_cv_mixedcase=no
3824         else
3825                 cf_cv_mixedcase=yes
3826         fi
3827         rm -f conftest CONFTEST
3828 fi
3829
3830 fi
3831 echo "$as_me:3831: result: $cf_cv_mixedcase" >&5
3832 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3833 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3834 #define MIXEDCASE_FILENAMES 1
3835 EOF
3836
3837 else
3838     cf_cv_mixedcase=$enable_mixedcase
3839     if test "$enable_mixedcase" = "yes" ; then
3840         cat >>confdefs.h <<\EOF
3841 #define MIXEDCASE_FILENAMES 1
3842 EOF
3843
3844     fi
3845 fi
3846
3847 # do this after mixed-case option (tags/TAGS is not as important as tic).
3848 echo "$as_me:3848: checking whether ${MAKE-make} sets \${MAKE}" >&5
3849 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3850 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3851 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   cat >conftest.make <<\EOF
3855 all:
3856         @echo 'ac_maketemp="${MAKE}"'
3857 EOF
3858 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3859 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3860 if test -n "$ac_maketemp"; then
3861   eval ac_cv_prog_make_${ac_make}_set=yes
3862 else
3863   eval ac_cv_prog_make_${ac_make}_set=no
3864 fi
3865 rm -f conftest.make
3866 fi
3867 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3868   echo "$as_me:3868: result: yes" >&5
3869 echo "${ECHO_T}yes" >&6
3870   SET_MAKE=
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874   SET_MAKE="MAKE=${MAKE-make}"
3875 fi
3876
3877 for ac_prog in exctags ctags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_CTAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$CTAGS"; then
3887   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_CTAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 CTAGS=$ac_cv_prog_CTAGS
3903 if test -n "$CTAGS"; then
3904   echo "$as_me:3904: result: $CTAGS" >&5
3905 echo "${ECHO_T}$CTAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$CTAGS" && break
3912 done
3913
3914 for ac_prog in exetags etags
3915 do
3916   # Extract the first word of "$ac_prog", so it can be a program name with args.
3917 set dummy $ac_prog; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ETAGS+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ETAGS"; then
3924   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ETAGS="$ac_prog"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937 fi
3938 fi
3939 ETAGS=$ac_cv_prog_ETAGS
3940 if test -n "$ETAGS"; then
3941   echo "$as_me:3941: result: $ETAGS" >&5
3942 echo "${ECHO_T}$ETAGS" >&6
3943 else
3944   echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3946 fi
3947
3948   test -n "$ETAGS" && break
3949 done
3950
3951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3952 set dummy ${CTAGS:-ctags}; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3956   echo $ECHO_N "(cached) $ECHO_C" >&6
3957 else
3958   if test -n "$MAKE_LOWER_TAGS"; then
3959   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3960 else
3961   ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 ac_dummy="$PATH"
3963 for ac_dir in $ac_dummy; do
3964   IFS=$ac_save_IFS
3965   test -z "$ac_dir" && ac_dir=.
3966   $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3969 break
3970 done
3971
3972   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3973 fi
3974 fi
3975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3976 if test -n "$MAKE_LOWER_TAGS"; then
3977   echo "$as_me:3977: result: $MAKE_LOWER_TAGS" >&5
3978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3979 else
3980   echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3982 fi
3983
3984 if test "$cf_cv_mixedcase" = yes ; then
3985         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3986 set dummy ${ETAGS:-etags}; ac_word=$2
3987 echo "$as_me:3987: checking for $ac_word" >&5
3988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3990   echo $ECHO_N "(cached) $ECHO_C" >&6
3991 else
3992   if test -n "$MAKE_UPPER_TAGS"; then
3993   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3994 else
3995   ac_save_IFS=$IFS; IFS=$ac_path_separator
3996 ac_dummy="$PATH"
3997 for ac_dir in $ac_dummy; do
3998   IFS=$ac_save_IFS
3999   test -z "$ac_dir" && ac_dir=.
4000   $as_executable_p "$ac_dir/$ac_word" || continue
4001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4002 echo "$as_me:4002: found $ac_dir/$ac_word" >&5
4003 break
4004 done
4005
4006   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4007 fi
4008 fi
4009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4010 if test -n "$MAKE_UPPER_TAGS"; then
4011   echo "$as_me:4011: result: $MAKE_UPPER_TAGS" >&5
4012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4013 else
4014   echo "$as_me:4014: result: no" >&5
4015 echo "${ECHO_T}no" >&6
4016 fi
4017
4018 else
4019         MAKE_UPPER_TAGS=no
4020 fi
4021
4022 if test "$MAKE_UPPER_TAGS" = yes ; then
4023         MAKE_UPPER_TAGS=
4024 else
4025         MAKE_UPPER_TAGS="#"
4026 fi
4027
4028 if test "$MAKE_LOWER_TAGS" = yes ; then
4029         MAKE_LOWER_TAGS=
4030 else
4031         MAKE_LOWER_TAGS="#"
4032 fi
4033
4034 echo "$as_me:4034: checking for makeflags variable" >&5
4035 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4036 if test "${cf_cv_makeflags+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039
4040         cf_cv_makeflags=''
4041         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4042         do
4043                 cat >cf_makeflags.tmp <<CF_EOF
4044 SHELL = /bin/sh
4045 all :
4046         @ echo '.$cf_option'
4047 CF_EOF
4048                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4049                 case "$cf_result" in
4050                 .*k)
4051                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4052                         case "$cf_result" in
4053                         .*CC=*) cf_cv_makeflags=
4054                                 ;;
4055                         *)      cf_cv_makeflags=$cf_option
4056                                 ;;
4057                         esac
4058                         break
4059                         ;;
4060                 .-)     ;;
4061                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4062                         ;;
4063                 esac
4064         done
4065         rm -f cf_makeflags.tmp
4066
4067 fi
4068 echo "$as_me:4068: result: $cf_cv_makeflags" >&5
4069 echo "${ECHO_T}$cf_cv_makeflags" >&6
4070
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_RANLIB+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 RANLIB=$ac_cv_prog_RANLIB
4096 if test -n "$RANLIB"; then
4097   echo "$as_me:4097: result: $RANLIB" >&5
4098 echo "${ECHO_T}$RANLIB" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104 fi
4105 if test -z "$ac_cv_prog_RANLIB"; then
4106   ac_ct_RANLIB=$RANLIB
4107   # Extract the first word of "ranlib", so it can be a program name with args.
4108 set dummy ranlib; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_RANLIB"; then
4115   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ac_ct_RANLIB="ranlib"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4129 fi
4130 fi
4131 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4132 if test -n "$ac_ct_RANLIB"; then
4133   echo "$as_me:4133: result: $ac_ct_RANLIB" >&5
4134 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   RANLIB=$ac_ct_RANLIB
4141 else
4142   RANLIB="$ac_cv_prog_RANLIB"
4143 fi
4144
4145 if test -n "$ac_tool_prefix"; then
4146   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}ld; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_LD+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$LD"; then
4154   ac_cv_prog_LD="$LD" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_LD="${ac_tool_prefix}ld"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167 fi
4168 fi
4169 LD=$ac_cv_prog_LD
4170 if test -n "$LD"; then
4171   echo "$as_me:4171: result: $LD" >&5
4172 echo "${ECHO_T}$LD" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178 fi
4179 if test -z "$ac_cv_prog_LD"; then
4180   ac_ct_LD=$LD
4181   # Extract the first word of "ld", so it can be a program name with args.
4182 set dummy ld; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$ac_ct_LD"; then
4189   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_ac_ct_LD="ld"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4203 fi
4204 fi
4205 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4206 if test -n "$ac_ct_LD"; then
4207   echo "$as_me:4207: result: $ac_ct_LD" >&5
4208 echo "${ECHO_T}$ac_ct_LD" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214   LD=$ac_ct_LD
4215 else
4216   LD="$ac_cv_prog_LD"
4217 fi
4218
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4221 set dummy ${ac_tool_prefix}ar; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_AR+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$AR"; then
4228   ac_cv_prog_AR="$AR" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_AR="${ac_tool_prefix}ar"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241 fi
4242 fi
4243 AR=$ac_cv_prog_AR
4244 if test -n "$AR"; then
4245   echo "$as_me:4245: result: $AR" >&5
4246 echo "${ECHO_T}$AR" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252 fi
4253 if test -z "$ac_cv_prog_AR"; then
4254   ac_ct_AR=$AR
4255   # Extract the first word of "ar", so it can be a program name with args.
4256 set dummy ar; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$ac_ct_AR"; then
4263   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_ac_ct_AR="ar"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4277 fi
4278 fi
4279 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4280 if test -n "$ac_ct_AR"; then
4281   echo "$as_me:4281: result: $ac_ct_AR" >&5
4282 echo "${ECHO_T}$ac_ct_AR" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   AR=$ac_ct_AR
4289 else
4290   AR="$ac_cv_prog_AR"
4291 fi
4292
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$AR"; then
4302   ac_cv_prog_AR="$AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_AR="${ac_tool_prefix}ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 AR=$ac_cv_prog_AR
4318 if test -n "$AR"; then
4319   echo "$as_me:4319: result: $AR" >&5
4320 echo "${ECHO_T}$AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 fi
4327 if test -z "$ac_cv_prog_AR"; then
4328   ac_ct_AR=$AR
4329   # Extract the first word of "ar", so it can be a program name with args.
4330 set dummy ar; ac_word=$2
4331 echo "$as_me:4331: checking for $ac_word" >&5
4332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if test -n "$ac_ct_AR"; then
4337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4338 else
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   $as_executable_p "$ac_dir/$ac_word" || continue
4345 ac_cv_prog_ac_ct_AR="ar"
4346 echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347 break
4348 done
4349
4350   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4351 fi
4352 fi
4353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4354 if test -n "$ac_ct_AR"; then
4355   echo "$as_me:4355: result: $ac_ct_AR" >&5
4356 echo "${ECHO_T}$ac_ct_AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362   AR=$ac_ct_AR
4363 else
4364   AR="$ac_cv_prog_AR"
4365 fi
4366
4367 echo "$as_me:4367: checking for options to update archives" >&5
4368 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4369 if test "${cf_cv_ar_flags+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372
4373         cf_cv_ar_flags=unknown
4374         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4375         do
4376
4377                 # check if $ARFLAGS already contains this choice
4378                 if test "x$ARFLAGS" != "x" ; then
4379                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4380                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4381                                 cf_cv_ar_flags=
4382                                 break
4383                         fi
4384                 fi
4385
4386                 rm -f conftest.$ac_cv_objext
4387                 rm -f conftest.a
4388
4389                 cat >conftest.$ac_ext <<EOF
4390 #line 4390 "configure"
4391 int     testdata[3] = { 123, 456, 789 };
4392 EOF
4393                 if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } ; then
4398                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4399                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4400                         if test -f conftest.a ; then
4401                                 cf_cv_ar_flags=$cf_ar_flags
4402                                 break
4403                         fi
4404                 else
4405                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4406
4407 echo "${as_me:-configure}:4407: testing cannot compile test-program ..." 1>&5
4408
4409                         break
4410                 fi
4411         done
4412         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4413
4414 fi
4415 echo "$as_me:4415: result: $cf_cv_ar_flags" >&5
4416 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4417
4418 if test -n "$ARFLAGS" ; then
4419         if test -n "$cf_cv_ar_flags" ; then
4420                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4421         fi
4422 else
4423         ARFLAGS=$cf_cv_ar_flags
4424 fi
4425
4426 echo "$as_me:4426: checking if you have specified an install-prefix" >&5
4427 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4428
4429 # Check whether --with-install-prefix or --without-install-prefix was given.
4430 if test "${with_install_prefix+set}" = set; then
4431   withval="$with_install_prefix"
4432   case "$withval" in #(vi
4433         yes|no) #(vi
4434                 ;;
4435         *)      DESTDIR="$withval"
4436                 ;;
4437         esac
4438 fi;
4439 echo "$as_me:4439: result: $DESTDIR" >&5
4440 echo "${ECHO_T}$DESTDIR" >&6
4441
4442 ###############################################################################
4443
4444 # If we're cross-compiling, allow the user to override the tools and their
4445 # options.  The configure script is oriented toward identifying the host
4446 # compiler, etc., but we need a build compiler to generate parts of the source.
4447
4448 if test "$cross_compiling" = yes ; then
4449
4450         # defaults that we might want to override
4451         : ${BUILD_CFLAGS:=''}
4452         : ${BUILD_CPPFLAGS:=''}
4453         : ${BUILD_LDFLAGS:=''}
4454         : ${BUILD_LIBS:=''}
4455         : ${BUILD_EXEEXT:='$x'}
4456         : ${BUILD_OBJEXT:='o'}
4457
4458 # Check whether --with-build-cc or --without-build-cc was given.
4459 if test "${with_build_cc+set}" = set; then
4460   withval="$with_build_cc"
4461   BUILD_CC="$withval"
4462 else
4463   for ac_prog in gcc cc cl
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$BUILD_CC"; then
4473   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_BUILD_CC="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 BUILD_CC=$ac_cv_prog_BUILD_CC
4489 if test -n "$BUILD_CC"; then
4490   echo "$as_me:4490: result: $BUILD_CC" >&5
4491 echo "${ECHO_T}$BUILD_CC" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$BUILD_CC" && break
4498 done
4499
4500 fi;
4501         echo "$as_me:4501: checking for native build C compiler" >&5
4502 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4503         echo "$as_me:4503: result: $BUILD_CC" >&5
4504 echo "${ECHO_T}$BUILD_CC" >&6
4505
4506         echo "$as_me:4506: checking for native build C preprocessor" >&5
4507 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4508
4509 # Check whether --with-build-cpp or --without-build-cpp was given.
4510 if test "${with_build_cpp+set}" = set; then
4511   withval="$with_build_cpp"
4512   BUILD_CPP="$withval"
4513 else
4514   BUILD_CPP='${BUILD_CC} -E'
4515 fi;
4516         echo "$as_me:4516: result: $BUILD_CPP" >&5
4517 echo "${ECHO_T}$BUILD_CPP" >&6
4518
4519         echo "$as_me:4519: checking for native build C flags" >&5
4520 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4521
4522 # Check whether --with-build-cflags or --without-build-cflags was given.
4523 if test "${with_build_cflags+set}" = set; then
4524   withval="$with_build_cflags"
4525   BUILD_CFLAGS="$withval"
4526 fi;
4527         echo "$as_me:4527: result: $BUILD_CFLAGS" >&5
4528 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4529
4530         echo "$as_me:4530: checking for native build C preprocessor-flags" >&5
4531 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4532
4533 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4534 if test "${with_build_cppflags+set}" = set; then
4535   withval="$with_build_cppflags"
4536   BUILD_CPPFLAGS="$withval"
4537 fi;
4538         echo "$as_me:4538: result: $BUILD_CPPFLAGS" >&5
4539 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4540
4541         echo "$as_me:4541: checking for native build linker-flags" >&5
4542 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4543
4544 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4545 if test "${with_build_ldflags+set}" = set; then
4546   withval="$with_build_ldflags"
4547   BUILD_LDFLAGS="$withval"
4548 fi;
4549         echo "$as_me:4549: result: $BUILD_LDFLAGS" >&5
4550 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4551
4552         echo "$as_me:4552: checking for native build linker-libraries" >&5
4553 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4554
4555 # Check whether --with-build-libs or --without-build-libs was given.
4556 if test "${with_build_libs+set}" = set; then
4557   withval="$with_build_libs"
4558   BUILD_LIBS="$withval"
4559 fi;
4560         echo "$as_me:4560: result: $BUILD_LIBS" >&5
4561 echo "${ECHO_T}$BUILD_LIBS" >&6
4562
4563         # this assumes we're on Unix.
4564         BUILD_EXEEXT=
4565         BUILD_OBJEXT=o
4566
4567         : ${BUILD_CC:='${CC}'}
4568
4569         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4570                 { { echo "$as_me:4570: error: Cross-build requires two compilers.
4571 Use --with-build-cc to specify the native compiler." >&5
4572 echo "$as_me: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576
4577 else
4578         : ${BUILD_CC:='${CC}'}
4579         : ${BUILD_CPP:='${CPP}'}
4580         : ${BUILD_CFLAGS:='${CFLAGS}'}
4581         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4582         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4583         : ${BUILD_LIBS:='${LIBS}'}
4584         : ${BUILD_EXEEXT:='$x'}
4585         : ${BUILD_OBJEXT:='o'}
4586 fi
4587
4588 ###############################################################################
4589
4590 ### Options to allow the user to specify the set of libraries which are used.
4591 ### Use "--without-normal --with-shared" to allow the default model to be
4592 ### shared, for example.
4593 cf_list_models=""
4594
4595 echo "$as_me:4595: checking if libtool -version-number should be used" >&5
4596 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4597
4598 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4599 if test "${enable_libtool_version+set}" = set; then
4600   enableval="$enable_libtool_version"
4601   test "$enableval" != no && enableval=yes
4602   if test "$enableval" != "yes" ; then
4603     cf_libtool_version=no
4604   else
4605     cf_libtool_version=yes
4606   fi
4607 else
4608   enableval=yes
4609   cf_libtool_version=yes
4610
4611 fi;
4612 echo "$as_me:4612: result: $cf_libtool_version" >&5
4613 echo "${ECHO_T}$cf_libtool_version" >&6
4614
4615 if test "$cf_libtool_version" = yes ; then
4616         LIBTOOL_VERSION="-version-number"
4617 else
4618         LIBTOOL_VERSION="-version-info"
4619 fi
4620
4621 LIBTOOL=
4622
4623 # common library maintenance symbols that are convenient for libtool scripts:
4624 LIB_CREATE='${AR} -cr'
4625 LIB_OBJECT='${OBJECTS}'
4626 LIB_SUFFIX=.a
4627 LIB_PREP="$RANLIB"
4628
4629 # symbols used to prop libtool up to enable it to determine what it should be
4630 # doing:
4631 LIB_CLEAN=
4632 LIB_COMPILE=
4633 LIB_LINK='${CC}'
4634 LIB_INSTALL=
4635 LIB_UNINSTALL=
4636
4637 echo "$as_me:4637: checking if you want to build libraries with libtool" >&5
4638 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4639
4640 # Check whether --with-libtool or --without-libtool was given.
4641 if test "${with_libtool+set}" = set; then
4642   withval="$with_libtool"
4643   with_libtool=$withval
4644 else
4645   with_libtool=no
4646 fi;
4647 echo "$as_me:4647: result: $with_libtool" >&5
4648 echo "${ECHO_T}$with_libtool" >&6
4649 if test "$with_libtool" != "no"; then
4650
4651         if test "$with_libtool" != "yes" ; then
4652
4653 if test "x$prefix" != xNONE; then
4654   cf_path_syntax="$prefix"
4655 else
4656   cf_path_syntax="$ac_default_prefix"
4657 fi
4658
4659 case ".$with_libtool" in #(vi
4660 .\$\(*\)*|.\'*\'*) #(vi
4661   ;;
4662 ..|./*|.\\*) #(vi
4663   ;;
4664 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4665   ;;
4666 .\${*prefix}*) #(vi
4667   eval with_libtool="$with_libtool"
4668   case ".$with_libtool" in #(vi
4669   .NONE/*)
4670     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671     ;;
4672   esac
4673   ;; #(vi
4674 .no|.NONE/*)
4675   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4676   ;;
4677 *)
4678   { { echo "$as_me:4678: error: expected a pathname, not \"$with_libtool\"" >&5
4679 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4680    { (exit 1); exit 1; }; }
4681   ;;
4682 esac
4683
4684                 LIBTOOL=$with_libtool
4685         else
4686                 # Extract the first word of "libtool", so it can be a program name with args.
4687 set dummy libtool; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   case $LIBTOOL in
4694   [\\/]* | ?:[\\/]*)
4695   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4696   ;;
4697   *)
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   if $as_executable_p "$ac_dir/$ac_word"; then
4704    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4705    echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706    break
4707 fi
4708 done
4709
4710   ;;
4711 esac
4712 fi
4713 LIBTOOL=$ac_cv_path_LIBTOOL
4714
4715 if test -n "$LIBTOOL"; then
4716   echo "$as_me:4716: result: $LIBTOOL" >&5
4717 echo "${ECHO_T}$LIBTOOL" >&6
4718 else
4719   echo "$as_me:4719: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723         fi
4724         if test -z "$LIBTOOL" ; then
4725                 { { echo "$as_me:4725: error: Cannot find libtool" >&5
4726 echo "$as_me: error: Cannot find libtool" >&2;}
4727    { (exit 1); exit 1; }; }
4728         fi
4729         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4730         LIB_OBJECT='${OBJECTS:.o=.lo}'
4731         LIB_SUFFIX=.la
4732         LIB_CLEAN='${LIBTOOL} --mode=clean'
4733         LIB_COMPILE='${LIBTOOL} --mode=compile'
4734         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4735         LIB_INSTALL='${LIBTOOL} --mode=install'
4736         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4737         LIB_PREP=:
4738
4739         # Show the version of libtool
4740         echo "$as_me:4740: checking version of libtool" >&5
4741 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4742
4743         # Save the version in a cache variable - this is not entirely a good
4744         # thing, but the version string from libtool is very ugly, and for
4745         # bug reports it might be useful to have the original string. "("
4746         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.].*//'`
4747         echo "$as_me:4747: result: $cf_cv_libtool_version" >&5
4748 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4749         if test -z "$cf_cv_libtool_version" ; then
4750                 { { echo "$as_me:4750: error: This is not GNU libtool" >&5
4751 echo "$as_me: error: This is not GNU libtool" >&2;}
4752    { (exit 1); exit 1; }; }
4753         fi
4754
4755         # special hack to add -no-undefined (which libtool should do for itself)
4756         LT_UNDEF=
4757         case "$cf_cv_system_name" in #(vi
4758         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4759                 LT_UNDEF=-no-undefined
4760                 ;;
4761         esac
4762
4763         # special hack to add --tag option for C++ compiler
4764         case $cf_cv_libtool_version in #(vi
4765         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4766                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4767                 LIBTOOL="$LIBTOOL --tag=CC"
4768                 ;;
4769         *)
4770                 LIBTOOL_CXX="$LIBTOOL"
4771                 ;;
4772         esac
4773 else
4774         LIBTOOL=""
4775         LIBTOOL_CXX=""
4776 fi
4777
4778 test -z "$LIBTOOL" && ECHO_LT=
4779
4780 if test "$with_libtool" != "no" ; then
4781
4782 cf_list_models="$cf_list_models libtool"
4783
4784 else
4785
4786 echo "$as_me:4786: checking if you want to build shared libraries" >&5
4787 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4788
4789 # Check whether --with-shared or --without-shared was given.
4790 if test "${with_shared+set}" = set; then
4791   withval="$with_shared"
4792   with_shared=$withval
4793 else
4794   with_shared=no
4795 fi;
4796 echo "$as_me:4796: result: $with_shared" >&5
4797 echo "${ECHO_T}$with_shared" >&6
4798 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4799
4800 echo "$as_me:4800: checking if you want to build static libraries" >&5
4801 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-normal or --without-normal was given.
4804 if test "${with_normal+set}" = set; then
4805   withval="$with_normal"
4806   with_normal=$withval
4807 else
4808   with_normal=yes
4809 fi;
4810 echo "$as_me:4810: result: $with_normal" >&5
4811 echo "${ECHO_T}$with_normal" >&6
4812 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4813
4814 echo "$as_me:4814: checking if you want to build debug libraries" >&5
4815 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-debug or --without-debug was given.
4818 if test "${with_debug+set}" = set; then
4819   withval="$with_debug"
4820   with_debug=$withval
4821 else
4822   with_debug=yes
4823 fi;
4824 echo "$as_me:4824: result: $with_debug" >&5
4825 echo "${ECHO_T}$with_debug" >&6
4826 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4827
4828 echo "$as_me:4828: checking if you want to build profiling libraries" >&5
4829 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4830
4831 # Check whether --with-profile or --without-profile was given.
4832 if test "${with_profile+set}" = set; then
4833   withval="$with_profile"
4834   with_profile=$withval
4835 else
4836   with_profile=no
4837 fi;
4838 echo "$as_me:4838: result: $with_profile" >&5
4839 echo "${ECHO_T}$with_profile" >&6
4840 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4841
4842 fi
4843
4844 ###############################################################################
4845
4846 echo "$as_me:4846: checking for specified models" >&5
4847 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4848 test -z "$cf_list_models" && cf_list_models=normal
4849 test "$with_libtool" != "no" && cf_list_models=libtool
4850 echo "$as_me:4850: result: $cf_list_models" >&5
4851 echo "${ECHO_T}$cf_list_models" >&6
4852
4853 ### Use the first model as the default, and save its suffix for use in building
4854 ### up test-applications.
4855 echo "$as_me:4855: checking for default model" >&5
4856 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4857 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4858 echo "$as_me:4858: result: $DFT_LWR_MODEL" >&5
4859 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4860
4861 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4862
4863 TICS_NAME=tic
4864
4865 TINFO_NAME=tinfo
4866
4867 LIB_NAME=ncurses
4868
4869 LIB_DIR=../lib
4870 LIB_2ND=../../lib
4871
4872         case $cf_cv_system_name in #(vi
4873         OS/2*|os2*) #(vi
4874         LIB_PREFIX=''
4875         ;;
4876         *)      LIB_PREFIX='lib'
4877         ;;
4878         esac
4879 cf_prefix=$LIB_PREFIX
4880
4881 LIB_PREFIX=$cf_prefix
4882
4883 LIB_SUFFIX=
4884
4885 ###############################################################################
4886
4887 echo "$as_me:4887: checking if you want to build a separate terminfo library" >&5
4888 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4889
4890 # Check whether --with-termlib or --without-termlib was given.
4891 if test "${with_termlib+set}" = set; then
4892   withval="$with_termlib"
4893   with_termlib=$withval
4894 else
4895   with_termlib=no
4896 fi;
4897 echo "$as_me:4897: result: $with_termlib" >&5
4898 echo "${ECHO_T}$with_termlib" >&6
4899
4900 echo "$as_me:4900: checking if you want to build a separate tic library" >&5
4901 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4902
4903 # Check whether --with-ticlib or --without-ticlib was given.
4904 if test "${with_ticlib+set}" = set; then
4905   withval="$with_ticlib"
4906   with_ticlib=$withval
4907 else
4908   with_ticlib=no
4909 fi;
4910 echo "$as_me:4910: result: $with_ticlib" >&5
4911 echo "${ECHO_T}$with_ticlib" >&6
4912
4913 ### Checks for special libraries, must be done up-front.
4914 SHLIB_LIST=""
4915
4916 echo "$as_me:4916: checking if you want to link with the GPM mouse library" >&5
4917 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4918
4919 # Check whether --with-gpm or --without-gpm was given.
4920 if test "${with_gpm+set}" = set; then
4921   withval="$with_gpm"
4922   with_gpm=$withval
4923 else
4924   with_gpm=maybe
4925 fi;
4926 echo "$as_me:4926: result: $with_gpm" >&5
4927 echo "${ECHO_T}$with_gpm" >&6
4928
4929 if test "$with_gpm" != no ; then
4930         echo "$as_me:4930: checking for gpm.h" >&5
4931 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4932 if test "${ac_cv_header_gpm_h+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 #line 4936 "configure"
4937 #include "confdefs.h"
4938 #include <gpm.h>
4939 _ACEOF
4940 if { (eval echo "$as_me:4940: \"$ac_cpp conftest.$ac_ext\"") >&5
4941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4942   ac_status=$?
4943   egrep -v '^ *\+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null; then
4948   if test -s conftest.err; then
4949     ac_cpp_err=$ac_c_preproc_warn_flag
4950   else
4951     ac_cpp_err=
4952   fi
4953 else
4954   ac_cpp_err=yes
4955 fi
4956 if test -z "$ac_cpp_err"; then
4957   ac_cv_header_gpm_h=yes
4958 else
4959   echo "$as_me: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   ac_cv_header_gpm_h=no
4962 fi
4963 rm -f conftest.err conftest.$ac_ext
4964 fi
4965 echo "$as_me:4965: result: $ac_cv_header_gpm_h" >&5
4966 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4967 if test $ac_cv_header_gpm_h = yes; then
4968
4969                 cat >>confdefs.h <<\EOF
4970 #define HAVE_GPM_H 1
4971 EOF
4972
4973                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4974                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing assuming we really have GPM library ..." 1>&5
4977
4978                         cat >>confdefs.h <<\EOF
4979 #define HAVE_LIBGPM 1
4980 EOF
4981
4982                 else
4983                         echo "$as_me:4983: checking for Gpm_Open in -lgpm" >&5
4984 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4985 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   ac_check_lib_save_LIBS=$LIBS
4989 LIBS="-lgpm  $LIBS"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 #ifdef __cplusplus
4996 extern "C"
4997 #endif
4998 /* We use char because int might match the return type of a gcc2
4999    builtin and then its argument prototype would still apply.  */
5000 char Gpm_Open ();
5001 int
5002 main ()
5003 {
5004 Gpm_Open ();
5005   ;
5006   return 0;
5007 }
5008 _ACEOF
5009 rm -f conftest.$ac_objext conftest$ac_exeext
5010 if { (eval echo "$as_me:5010: \"$ac_link\"") >&5
5011   (eval $ac_link) 2>&5
5012   ac_status=$?
5013   echo "$as_me:5013: \$? = $ac_status" >&5
5014   (exit $ac_status); } &&
5015          { ac_try='test -s conftest$ac_exeext'
5016   { (eval echo "$as_me:5016: \"$ac_try\"") >&5
5017   (eval $ac_try) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); }; }; then
5021   ac_cv_lib_gpm_Gpm_Open=yes
5022 else
5023   echo "$as_me: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 ac_cv_lib_gpm_Gpm_Open=no
5026 fi
5027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5028 LIBS=$ac_check_lib_save_LIBS
5029 fi
5030 echo "$as_me:5030: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5031 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5032 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5033   :
5034 else
5035
5036                                 { { echo "$as_me:5036: error: Cannot link with GPM library" >&5
5037 echo "$as_me: error: Cannot link with GPM library" >&2;}
5038    { (exit 1); exit 1; }; }
5039                 fi
5040                 with_gpm=yes
5041
5042 fi
5043
5044 else
5045
5046                 test "$with_gpm" != maybe && { echo "$as_me:5046: WARNING: Cannot find GPM header" >&5
5047 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5048                 with_gpm=no
5049
5050 fi
5051
5052 fi
5053
5054 if test "$with_gpm" != no ; then
5055         echo "$as_me:5055: checking if you want to load GPM dynamically" >&5
5056 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5057
5058 # Check whether --with-dlsym or --without-dlsym was given.
5059 if test "${with_dlsym+set}" = set; then
5060   withval="$with_dlsym"
5061   with_dlsym=$withval
5062 else
5063   with_dlsym=yes
5064 fi;
5065         echo "$as_me:5065: result: $with_dlsym" >&5
5066 echo "${ECHO_T}$with_dlsym" >&6
5067         if test "$with_dlsym" = yes ; then
5068
5069 cf_have_dlsym=no
5070 echo "$as_me:5070: checking for dlsym" >&5
5071 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5072 if test "${ac_cv_func_dlsym+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   cat >conftest.$ac_ext <<_ACEOF
5076 #line 5076 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char dlsym (); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 #ifdef __cplusplus
5083 extern "C"
5084 #endif
5085 /* We use char because int might match the return type of a gcc2
5086    builtin and then its argument prototype would still apply.  */
5087 char dlsym ();
5088 char (*f) ();
5089
5090 int
5091 main ()
5092 {
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5097 choke me
5098 #else
5099 f = dlsym;
5100 #endif
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); } &&
5112          { ac_try='test -s conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118   ac_cv_func_dlsym=yes
5119 else
5120   echo "$as_me: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 ac_cv_func_dlsym=no
5123 fi
5124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5125 fi
5126 echo "$as_me:5126: result: $ac_cv_func_dlsym" >&5
5127 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5128 if test $ac_cv_func_dlsym = yes; then
5129   cf_have_dlsym=yes
5130 else
5131
5132 cf_have_libdl=no
5133 echo "$as_me:5133: checking for dlsym in -ldl" >&5
5134 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5135 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   ac_check_lib_save_LIBS=$LIBS
5139 LIBS="-ldl  $LIBS"
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 #ifdef __cplusplus
5146 extern "C"
5147 #endif
5148 /* We use char because int might match the return type of a gcc2
5149    builtin and then its argument prototype would still apply.  */
5150 char dlsym ();
5151 int
5152 main ()
5153 {
5154 dlsym ();
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161   (eval $ac_link) 2>&5
5162   ac_status=$?
5163   echo "$as_me:5163: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -s conftest$ac_exeext'
5166   { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5167   (eval $ac_try) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); }; }; then
5171   ac_cv_lib_dl_dlsym=yes
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175 ac_cv_lib_dl_dlsym=no
5176 fi
5177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5178 LIBS=$ac_check_lib_save_LIBS
5179 fi
5180 echo "$as_me:5180: result: $ac_cv_lib_dl_dlsym" >&5
5181 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5182 if test $ac_cv_lib_dl_dlsym = yes; then
5183
5184         cf_have_dlsym=yes
5185         cf_have_libdl=yes
5186 fi
5187
5188 fi
5189
5190 if test "$cf_have_dlsym" = yes ; then
5191         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5192
5193         echo "$as_me:5193: checking whether able to link to dl*() functions" >&5
5194 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5195         cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198 #include <dlfcn.h>
5199 int
5200 main ()
5201 {
5202
5203                 void *obj;
5204                 if ((obj = dlopen("filename", 0)) != 0) {
5205                         if (dlsym(obj, "symbolname") == 0) {
5206                         dlclose(obj);
5207                         }
5208                 }
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225
5226                 cat >>confdefs.h <<\EOF
5227 #define HAVE_LIBDL 1
5228 EOF
5229
5230 else
5231   echo "$as_me: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233
5234                 { { echo "$as_me:5234: error: Cannot link test program for libdl" >&5
5235 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5236    { (exit 1); exit 1; }; }
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         echo "$as_me:5239: result: ok" >&5
5240 echo "${ECHO_T}ok" >&6
5241 else
5242         { { echo "$as_me:5242: error: Cannot find dlsym function" >&5
5243 echo "$as_me: error: Cannot find dlsym function" >&2;}
5244    { (exit 1); exit 1; }; }
5245 fi
5246
5247                 if test "$with_gpm" != yes ; then
5248                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5249
5250 echo "${as_me:-configure}:5250: testing assuming soname for gpm is $with_gpm ..." 1>&5
5251
5252                         cf_cv_gpm_soname="$with_gpm"
5253                 else
5254
5255 echo "$as_me:5255: checking for soname of gpm library" >&5
5256 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5257 if test "${cf_cv_gpm_soname+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260
5261 cf_cv_gpm_soname=unknown
5262 if test "$cross_compiling" != yes ; then
5263 cat >conftest.$ac_ext <<CF_EOF
5264 #include <gpm.h>
5265 int main()
5266 {
5267 if (Gpm_Open(0,0)) Gpm_Close();
5268         ${cf_cv_main_return:-return}(0);
5269 }
5270 CF_EOF
5271 cf_save_LIBS="$LIBS"
5272         LIBS="-lgpm $LIBS"
5273         if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274   (eval $ac_compile) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); } ; then
5278                 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } ; then
5283                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5284                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5285                 fi
5286         fi
5287 rm -rf conftest*
5288 LIBS="$cf_save_LIBS"
5289 fi
5290
5291 fi
5292 echo "$as_me:5292: result: $cf_cv_gpm_soname" >&5
5293 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5294
5295                 fi
5296                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5297 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5298 EOF
5299
5300                 SHLIB_LIST="-ldl $SHLIB_LIST"
5301         else
5302                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5303                 TEST_LIBS="-lgpm $TEST_LIBS"
5304         fi
5305         cat >>confdefs.h <<\EOF
5306 #define HAVE_LIBGPM 1
5307 EOF
5308
5309 echo "$as_me:5309: checking for Gpm_Wgetch in -lgpm" >&5
5310 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5311 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5312   echo $ECHO_N "(cached) $ECHO_C" >&6
5313 else
5314   ac_check_lib_save_LIBS=$LIBS
5315 LIBS="-lgpm  $LIBS"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char Gpm_Wgetch ();
5327 int
5328 main ()
5329 {
5330 Gpm_Wgetch ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:5339: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_gpm_Gpm_Wgetch=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 ac_cv_lib_gpm_Gpm_Wgetch=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:5356: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5357 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5358 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5359
5360 echo "$as_me:5360: checking if GPM is weakly bound to curses library" >&5
5361 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5362 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366 cf_cv_check_gpm_wgetch=unknown
5367 if test "$cross_compiling" != yes ; then
5368
5369 cat >conftest.$ac_ext <<CF_EOF
5370 #include <gpm.h>
5371 int main()
5372 {
5373         Gpm_Wgetch();
5374         ${cf_cv_main_return:-return}(0);
5375 }
5376 CF_EOF
5377
5378         cf_save_LIBS="$LIBS"
5379         # This only works if we can look at the symbol table.  If a shared
5380         # library is stripped for install, we cannot use that.  So we're forced
5381         # to rely on the static library, noting that some packagers may not
5382         # include it.
5383         LIBS="-static -lgpm -dynamic $LIBS"
5384         if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
5385   (eval $ac_compile) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); } ; then
5389                 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } ; then
5394                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5395                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5396                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5397                 fi
5398         fi
5399         rm -rf conftest*
5400         LIBS="$cf_save_LIBS"
5401 fi
5402
5403 fi
5404 echo "$as_me:5404: result: $cf_cv_check_gpm_wgetch" >&5
5405 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5406
5407 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5408         { echo "$as_me:5408: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5409 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5410 fi
5411
5412 fi
5413
5414 fi
5415
5416 # not everyone has "test -c"
5417 if test -c /dev/sysmouse 2>/dev/null ; then
5418 echo "$as_me:5418: checking if you want to use sysmouse" >&5
5419 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5420
5421 # Check whether --with-sysmouse or --without-sysmouse was given.
5422 if test "${with_sysmouse+set}" = set; then
5423   withval="$with_sysmouse"
5424   cf_with_sysmouse=$withval
5425 else
5426   cf_with_sysmouse=maybe
5427 fi;
5428         if test "$cf_with_sysmouse" != no ; then
5429         cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 #include <osreldate.h>
5434 #if (__FreeBSD_version >= 400017)
5435 #include <sys/consio.h>
5436 #include <sys/fbio.h>
5437 #else
5438 #include <machine/console.h>
5439 #endif
5440
5441 int
5442 main ()
5443 {
5444
5445         struct mouse_info the_mouse;
5446         ioctl(0, CONS_MOUSECTL, &the_mouse);
5447
5448   ;
5449   return 0;
5450 }
5451 _ACEOF
5452 rm -f conftest.$ac_objext
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454   (eval $ac_compile) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -s conftest.$ac_objext'
5459   { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460   (eval $ac_try) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); }; }; then
5464   cf_with_sysmouse=yes
5465 else
5466   echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 cf_with_sysmouse=no
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471         fi
5472 echo "$as_me:5472: result: $cf_with_sysmouse" >&5
5473 echo "${ECHO_T}$cf_with_sysmouse" >&6
5474 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_SYSMOUSE 1
5476 EOF
5477
5478 fi
5479
5480 if test X"$CC_G_OPT" = X"" ; then
5481         CC_G_OPT='-g'
5482         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5483 fi
5484
5485 if test X"$CXX_G_OPT" = X"" ; then
5486         CXX_G_OPT='-g'
5487         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5488 fi
5489
5490 echo "$as_me:5490: checking for default loader flags" >&5
5491 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5492 case $DFT_LWR_MODEL in
5493 libtool) LD_MODEL=''   ;;
5494 normal)  LD_MODEL=''   ;;
5495 debug)   LD_MODEL=$CC_G_OPT ;;
5496 profile) LD_MODEL='-pg';;
5497 shared)  LD_MODEL=''   ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_MODEL" >&5
5500 echo "${ECHO_T}$LD_MODEL" >&6
5501
5502 case $DFT_LWR_MODEL in
5503 shared)
5504
5505 echo "$as_me:5505: checking if rpath option should be used" >&5
5506 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5507
5508 # Check whether --enable-rpath or --disable-rpath was given.
5509 if test "${enable_rpath+set}" = set; then
5510   enableval="$enable_rpath"
5511   cf_cv_enable_rpath=$enableval
5512 else
5513   cf_cv_enable_rpath=no
5514 fi;
5515 echo "$as_me:5515: result: $cf_cv_enable_rpath" >&5
5516 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5517
5518 echo "$as_me:5518: checking if shared libraries should be relinked during install" >&5
5519 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5520
5521 # Check whether --enable-relink or --disable-relink was given.
5522 if test "${enable_relink+set}" = set; then
5523   enableval="$enable_relink"
5524   cf_cv_do_relink=$enableval
5525 else
5526   cf_cv_do_relink=yes
5527 fi;
5528 echo "$as_me:5528: result: $cf_cv_do_relink" >&5
5529 echo "${ECHO_T}$cf_cv_do_relink" >&6
5530         ;;
5531 esac
5532
5533 LD_RPATH_OPT=
5534 echo "$as_me:5534: checking for an rpath option" >&5
5535 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5536 case $cf_cv_system_name in #(vi
5537 irix*) #(vi
5538         if test "$GCC" = yes; then
5539                 LD_RPATH_OPT="-Wl,-rpath,"
5540         else
5541                 LD_RPATH_OPT="-rpath "
5542         fi
5543         ;;
5544 linux*|gnu*|k*bsd*-gnu) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 openbsd[2-9].*|mirbsd*) #(vi
5548         LD_RPATH_OPT="-Wl,-rpath,"
5549         ;;
5550 dragonfly*|freebsd*) #(vi
5551         LD_RPATH_OPT="-rpath "
5552         ;;
5553 netbsd*) #(vi
5554         LD_RPATH_OPT="-Wl,-rpath,"
5555         ;;
5556 osf*|mls+*) #(vi
5557         LD_RPATH_OPT="-rpath "
5558         ;;
5559 solaris2*) #(vi
5560         LD_RPATH_OPT="-R"
5561         ;;
5562 *)
5563         ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_RPATH_OPT" >&5
5566 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5567
5568 case "x$LD_RPATH_OPT" in #(vi
5569 x-R*)
5570         echo "$as_me:5570: checking if we need a space after rpath option" >&5
5571 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5572         cf_save_LIBS="$LIBS"
5573         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5574         cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577
5578 int
5579 main ()
5580 {
5581
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   cf_rpath_space=no
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 cf_rpath_space=yes
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605         LIBS="$cf_save_LIBS"
5606         echo "$as_me:5606: result: $cf_rpath_space" >&5
5607 echo "${ECHO_T}$cf_rpath_space" >&6
5608         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5609         ;;
5610 esac
5611
5612         LOCAL_LDFLAGS=
5613         LOCAL_LDFLAGS2=
5614         LD_SHARED_OPTS=
5615         INSTALL_LIB="-m 644"
5616
5617         cf_cv_do_symlinks=no
5618         cf_ld_rpath_opt=
5619         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5620
5621         echo "$as_me:5621: checking if release/abi version should be used for shared libs" >&5
5622 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5623
5624 # Check whether --with-shlib-version or --without-shlib-version was given.
5625 if test "${with_shlib_version+set}" = set; then
5626   withval="$with_shlib_version"
5627   test -z "$withval" && withval=auto
5628         case $withval in #(vi
5629         yes) #(vi
5630                 cf_cv_shlib_version=auto
5631                 ;;
5632         rel|abi|auto|no) #(vi
5633                 cf_cv_shlib_version=$withval
5634                 ;;
5635         *)
5636                 { { echo "$as_me:5636: error: option value must be one of: rel, abi, auto or no" >&5
5637 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 ;;
5640         esac
5641
5642 else
5643   cf_cv_shlib_version=auto
5644 fi;
5645         echo "$as_me:5645: result: $cf_cv_shlib_version" >&5
5646 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5647
5648         cf_cv_rm_so_locs=no
5649
5650         # Some less-capable ports of gcc support only -fpic
5651         CC_SHARED_OPTS=
5652         if test "$GCC" = yes
5653         then
5654                 echo "$as_me:5654: checking which $CC option to use" >&5
5655 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5656                 cf_save_CFLAGS="$CFLAGS"
5657                 for CC_SHARED_OPTS in -fPIC -fpic ''
5658                 do
5659                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5660                         cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5663 #include <stdio.h>
5664 int
5665 main ()
5666 {
5667 int x = 1
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest.$ac_objext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   break
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 fi
5689 rm -f conftest.$ac_objext conftest.$ac_ext
5690                 done
5691                 echo "$as_me:5691: result: $CC_SHARED_OPTS" >&5
5692 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5693                 CFLAGS="$cf_save_CFLAGS"
5694         fi
5695
5696         cf_cv_shlib_version_infix=no
5697
5698         case $cf_cv_system_name in #(vi
5699         aix4.3-9*|aix[5-7]*) #(vi
5700                 if test "$GCC" = yes; then
5701                         CC_SHARED_OPTS=
5702                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5703                 else
5704                         # CC_SHARED_OPTS='-qpic=large -G'
5705                         # perhaps "-bM:SRE -bnoentry -bexpall"
5706                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5707                 fi
5708                 ;;
5709         beos*) #(vi
5710                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5711                 ;;
5712         cygwin*) #(vi
5713                 CC_SHARED_OPTS=
5714                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5715                 cf_cv_shlib_version=cygdll
5716                 cf_cv_shlib_version_infix=cygdll
5717                 cat >mk_shared_lib.sh <<-CF_EOF
5718                 #!/bin/sh
5719                 SHARED_LIB=\$1
5720                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5721                 shift
5722                 cat <<-EOF
5723                 Linking shared library
5724                 ** SHARED_LIB \$SHARED_LIB
5725                 ** IMPORT_LIB \$IMPORT_LIB
5726 EOF
5727                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5728 CF_EOF
5729                 chmod +x mk_shared_lib.sh
5730                 ;;
5731         darwin*) #(vi
5732                 EXTRA_CFLAGS="-no-cpp-precomp"
5733                 CC_SHARED_OPTS="-dynamic"
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5735                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5736                 cf_cv_shlib_version_infix=yes
5737                 echo "$as_me:5737: checking if ld -search_paths_first works" >&5
5738 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5739 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742
5743                         cf_save_LDFLAGS=$LDFLAGS
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                         cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748
5749 int
5750 main ()
5751 {
5752 int i;
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext conftest$ac_exeext
5758 if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
5759   (eval $ac_link) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ldflags_search_paths_first=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_cv_ldflags_search_paths_first=no
5774 fi
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776                                 LDFLAGS=$cf_save_LDFLAGS
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ldflags_search_paths_first" >&5
5779 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5780                 if test $cf_cv_ldflags_search_paths_first = yes; then
5781                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5782                 fi
5783                 ;;
5784         hpux*) #(vi
5785                 # (tested with gcc 2.7.2 -- I don't have c89)
5786                 if test "$GCC" = yes; then
5787                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5788                 else
5789                         CC_SHARED_OPTS='+Z'
5790                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5791                 fi
5792                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5793                 # HP-UX shared libraries must be executable, and should be
5794                 # readonly to exploit a quirk in the memory manager.
5795                 INSTALL_LIB="-m 555"
5796                 ;;
5797         interix*)
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 if test "$cf_cv_shlib_version" = rel; then
5800                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5801                 else
5802                         cf_shared_soname='`basename `'
5803                 fi
5804                 CC_SHARED_OPTS=
5805                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5806                 ;;
5807         irix*) #(vi
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5810                 fi
5811                 # tested with IRIX 5.2 and 'cc'.
5812                 if test "$GCC" != yes; then
5813                         CC_SHARED_OPTS='-KPIC'
5814                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5815                 else
5816                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5817                 fi
5818                 cf_cv_rm_so_locs=yes
5819                 ;;
5820         linux*|gnu*|k*bsd*-gnu) #(vi
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                 fi
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828
5829         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830         if test "$cf_cv_shlib_version" = rel; then
5831                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5832         else
5833                 cf_cv_shared_soname='`basename $@`'
5834         fi
5835
5836                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5837                 ;;
5838         openbsd[2-9].*|mirbsd*) #(vi
5839                 if test "$DFT_LWR_MODEL" = "shared" ; then
5840                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5841                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5842                 fi
5843                 if test "$cf_cv_enable_rpath" = yes ; then
5844                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5845                 fi
5846                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5847
5848         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5849         if test "$cf_cv_shlib_version" = rel; then
5850                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5851         else
5852                 cf_cv_shared_soname='`basename $@`'
5853         fi
5854
5855                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5856                 ;;
5857         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5858                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5859                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5860                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5861                 ;;
5862         dragonfly*|freebsd*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5865                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5866                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869
5870         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5871         if test "$cf_cv_shlib_version" = rel; then
5872                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5873         else
5874                 cf_cv_shared_soname='`basename $@`'
5875         fi
5876
5877                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5878                 ;;
5879         netbsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                         if test "$cf_cv_shlib_version" = auto; then
5886                         if test -f /usr/libexec/ld.elf_so; then
5887                                 cf_cv_shlib_version=abi
5888                         else
5889                                 cf_cv_shlib_version=rel
5890                         fi
5891                         fi
5892
5893         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5894         if test "$cf_cv_shlib_version" = rel; then
5895                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5896         else
5897                 cf_cv_shared_soname='`basename $@`'
5898         fi
5899
5900                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5901                 else
5902                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5903                 fi
5904                 ;;
5905         osf*|mls+*) #(vi
5906                 # tested with OSF/1 V3.2 and 'cc'
5907                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5908                 # link with shared libs).
5909                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5910                 case $host_os in #(vi
5911                 osf4*)
5912                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5913                         ;;
5914                 esac
5915                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5916                 if test "$DFT_LWR_MODEL" = "shared" ; then
5917                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5918                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5919                 fi
5920                 cf_cv_rm_so_locs=yes
5921                 ;;
5922         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5923                 # tested with osr5.0.5
5924                 if test "$GCC" != yes; then
5925                         CC_SHARED_OPTS='-belf -KPIC'
5926                 fi
5927                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         # only way is to set LD_RUN_PATH but no switch for it
5930                         RUN_PATH=$libdir
5931                 fi
5932                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5933                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5934                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5935                 ;;
5936         sunos4*) #(vi
5937                 # tested with SunOS 4.1.1 and gcc 2.7.0
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                 fi
5941                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5943                 ;;
5944         solaris2*) #(vi
5945                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5946                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5947                 if test "$DFT_LWR_MODEL" = "shared" ; then
5948                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 if test "$GCC" != yes; then
5963                         cf_save_CFLAGS="$CFLAGS"
5964                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5965                         do
5966                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5967                                 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #include <stdio.h>
5971 int
5972 main ()
5973 {
5974 printf("Hello\n");
5975   ;
5976   return 0;
5977 }
5978 _ACEOF
5979 rm -f conftest.$ac_objext
5980 if { (eval echo "$as_me:5980: \"$ac_compile\"") >&5
5981   (eval $ac_compile) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); } &&
5985          { ac_try='test -s conftest.$ac_objext'
5986   { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5987   (eval $ac_try) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); }; }; then
5991   break
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 fi
5996 rm -f conftest.$ac_objext conftest.$ac_ext
5997                         done
5998                         CFLAGS="$cf_save_CFLAGS"
5999                         CC_SHARED_OPTS=$cf_shared_opts
6000                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6001                 else
6002                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6003                 fi
6004                 ;;
6005         sysv5uw7*|unix_sv*) #(vi
6006                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6007                 if test "$GCC" != yes; then
6008                         CC_SHARED_OPTS='-KPIC'
6009                 fi
6010                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6011                 ;;
6012         *)
6013                 CC_SHARED_OPTS='unknown'
6014                 MK_SHARED_LIB='echo unknown'
6015                 ;;
6016         esac
6017
6018         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6019         case "$cf_cv_shlib_version" in #(vi
6020         rel|abi)
6021                 case "$MK_SHARED_LIB" in #(vi
6022                 *'-o $@') #(vi
6023                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6024                         ;;
6025                 *)
6026                         { echo "$as_me:6026: WARNING: ignored --with-shlib-version" >&5
6027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6028                         ;;
6029                 esac
6030                 ;;
6031         esac
6032
6033         # RPATH_LIST is a colon-separated list of directories
6034         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6035         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6036
6037 if test "$CC_SHARED_OPTS" = "unknown"; then
6038         for model in $cf_list_models; do
6039                 if test "$model" = "shared"; then
6040                         { { echo "$as_me:6040: error: Shared libraries are not supported in this version" >&5
6041 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6042    { (exit 1); exit 1; }; }
6043                 fi
6044         done
6045 fi
6046
6047 ### If we're building with rpath, try to link non-standard libs that way too.
6048 if test "$DFT_LWR_MODEL" = "shared"; then
6049
6050 echo "$as_me:6050: checking if rpath-hack should be disabled" >&5
6051 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6052
6053 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6054 if test "${enable_rpath_hack+set}" = set; then
6055   enableval="$enable_rpath_hack"
6056   test "$enableval" != no && enableval=yes
6057   if test "$enableval" != "yes" ; then
6058     cf_disable_rpath_hack=yes
6059   else
6060     cf_disable_rpath_hack=no
6061   fi
6062 else
6063   enableval=yes
6064   cf_disable_rpath_hack=no
6065
6066 fi;
6067 echo "$as_me:6067: result: $cf_disable_rpath_hack" >&5
6068 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6069 if test "$cf_disable_rpath_hack" = no ; then
6070
6071 echo "$as_me:6071: checking for updated LDFLAGS" >&5
6072 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6073 if test -n "$LD_RPATH_OPT" ; then
6074         echo "$as_me:6074: result: maybe" >&5
6075 echo "${ECHO_T}maybe" >&6
6076
6077         for ac_prog in ldd
6078 do
6079   # Extract the first word of "$ac_prog", so it can be a program name with args.
6080 set dummy $ac_prog; ac_word=$2
6081 echo "$as_me:6081: checking for $ac_word" >&5
6082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6083 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6084   echo $ECHO_N "(cached) $ECHO_C" >&6
6085 else
6086   if test -n "$cf_ldd_prog"; then
6087   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6088 else
6089   ac_save_IFS=$IFS; IFS=$ac_path_separator
6090 ac_dummy="$PATH"
6091 for ac_dir in $ac_dummy; do
6092   IFS=$ac_save_IFS
6093   test -z "$ac_dir" && ac_dir=.
6094   $as_executable_p "$ac_dir/$ac_word" || continue
6095 ac_cv_prog_cf_ldd_prog="$ac_prog"
6096 echo "$as_me:6096: found $ac_dir/$ac_word" >&5
6097 break
6098 done
6099
6100 fi
6101 fi
6102 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6103 if test -n "$cf_ldd_prog"; then
6104   echo "$as_me:6104: result: $cf_ldd_prog" >&5
6105 echo "${ECHO_T}$cf_ldd_prog" >&6
6106 else
6107   echo "$as_me:6107: result: no" >&5
6108 echo "${ECHO_T}no" >&6
6109 fi
6110
6111   test -n "$cf_ldd_prog" && break
6112 done
6113 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6114
6115         cf_rpath_list="/usr/lib /lib"
6116         if test "$cf_ldd_prog" != no
6117         then
6118                 cf_rpath_oops=
6119
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main ()
6126 {
6127 printf("Hello");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6145                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152                 # If we passed the link-test, but get a "not found" on a given library,
6153                 # this could be due to inept reconfiguration of gcc to make it only
6154                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6155                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6156                 # /usr/local libraries.
6157                 if test -n "$cf_rpath_oops"
6158                 then
6159                         for cf_rpath_src in $cf_rpath_oops
6160                         do
6161                                 for cf_rpath_dir in \
6162                                         /usr/local \
6163                                         /usr/pkg \
6164                                         /opt/sfw
6165                                 do
6166                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6167                                         then
6168                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6169
6170 echo "${as_me:-configure}:6170: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6171
6172                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6173                                                 break
6174                                         fi
6175                                 done
6176                         done
6177                 fi
6178         fi
6179
6180         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6187
6188 cf_rpath_dst=
6189 for cf_rpath_src in $LDFLAGS
6190 do
6191         case $cf_rpath_src in #(vi
6192         -L*) #(vi
6193
6194                 # check if this refers to a directory which we will ignore
6195                 cf_rpath_skip=no
6196                 if test -n "$cf_rpath_list"
6197                 then
6198                         for cf_rpath_item in $cf_rpath_list
6199                         do
6200                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6201                                 then
6202                                         cf_rpath_skip=yes
6203                                         break
6204                                 fi
6205                         done
6206                 fi
6207
6208                 if test "$cf_rpath_skip" = no
6209                 then
6210                         # transform the option
6211                         if test "$LD_RPATH_OPT" = "-R " ; then
6212                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6213                         else
6214                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6215                         fi
6216
6217                         # if we have not already added this, add it now
6218                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6219                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6220                         then
6221                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6222
6223 echo "${as_me:-configure}:6223: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6224
6225                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6226                         fi
6227                 fi
6228                 ;;
6229         esac
6230         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6231 done
6232 LDFLAGS=$cf_rpath_dst
6233
6234 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LIBS $LIBS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LIBS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LIBS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LIBS $LIBS ..." 1>&5
6291
6292         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6295
6296 fi
6297
6298 fi
6299
6300 fi
6301
6302 ###############################################################################
6303
6304 ###     use option --disable-overwrite to leave out the link to -lcurses
6305 echo "$as_me:6305: checking if you wish to install ncurses overwriting curses" >&5
6306 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6307
6308 # Check whether --enable-overwrite or --disable-overwrite was given.
6309 if test "${enable_overwrite+set}" = set; then
6310   enableval="$enable_overwrite"
6311   with_overwrite=$enableval
6312 else
6313   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6314 fi;
6315 echo "$as_me:6315: result: $with_overwrite" >&5
6316 echo "${ECHO_T}$with_overwrite" >&6
6317
6318 echo "$as_me:6318: checking if external terminfo-database is used" >&5
6319 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6320
6321 # Check whether --enable-database or --disable-database was given.
6322 if test "${enable_database+set}" = set; then
6323   enableval="$enable_database"
6324   use_database=$enableval
6325 else
6326   use_database=yes
6327 fi;
6328 echo "$as_me:6328: result: $use_database" >&5
6329 echo "${ECHO_T}$use_database" >&6
6330
6331 case $host_os in #(vi
6332 os2*) #(vi
6333         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6334         ;;
6335 *) #(vi
6336         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6337         ;;
6338 esac
6339
6340 if test "$use_database" != no ; then
6341         cat >>confdefs.h <<\EOF
6342 #define USE_DATABASE 1
6343 EOF
6344
6345         echo "$as_me:6345: checking which terminfo source-file will be installed" >&5
6346 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6347
6348 # Check whether --with-database or --without-database was given.
6349 if test "${with_database+set}" = set; then
6350   withval="$with_database"
6351   TERMINFO_SRC=$withval
6352 fi;
6353         echo "$as_me:6353: result: $TERMINFO_SRC" >&5
6354 echo "${ECHO_T}$TERMINFO_SRC" >&6
6355
6356         echo "$as_me:6356: checking whether to use hashed database instead of directory/tree" >&5
6357 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6358
6359 # Check whether --with-hashed-db or --without-hashed-db was given.
6360 if test "${with_hashed_db+set}" = set; then
6361   withval="$with_hashed_db"
6362
6363 else
6364   with_hashed_db=no
6365 fi;
6366         echo "$as_me:6366: result: $with_hashed_db" >&5
6367 echo "${ECHO_T}$with_hashed_db" >&6
6368 else
6369         with_hashed_db=no
6370 fi
6371
6372 echo "$as_me:6372: checking for list of fallback descriptions" >&5
6373 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6374
6375 # Check whether --with-fallbacks or --without-fallbacks was given.
6376 if test "${with_fallbacks+set}" = set; then
6377   withval="$with_fallbacks"
6378   with_fallback=$withval
6379 else
6380   with_fallback=
6381 fi;
6382 echo "$as_me:6382: result: $with_fallback" >&5
6383 echo "${ECHO_T}$with_fallback" >&6
6384 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6385
6386 echo "$as_me:6386: checking if you want modern xterm or antique" >&5
6387 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6388
6389 # Check whether --with-xterm-new or --without-xterm-new was given.
6390 if test "${with_xterm_new+set}" = set; then
6391   withval="$with_xterm_new"
6392   with_xterm_new=$withval
6393 else
6394   with_xterm_new=yes
6395 fi;
6396 case $with_xterm_new in
6397 no)     with_xterm_new=xterm-old;;
6398 *)      with_xterm_new=xterm-new;;
6399 esac
6400 echo "$as_me:6400: result: $with_xterm_new" >&5
6401 echo "${ECHO_T}$with_xterm_new" >&6
6402 WHICH_XTERM=$with_xterm_new
6403
6404 MAKE_TERMINFO=
6405 if test "$use_database" = no ; then
6406         TERMINFO="${datadir}/terminfo"
6407         MAKE_TERMINFO="#"
6408 else
6409
6410 echo "$as_me:6410: checking for list of terminfo directories" >&5
6411 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6412
6413 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6414 if test "${with_terminfo_dirs+set}" = set; then
6415   withval="$with_terminfo_dirs"
6416
6417 else
6418   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6419 fi;
6420 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6421 cf_dst_path=
6422 for cf_src_path in $withval
6423 do
6424
6425 if test "x$prefix" != xNONE; then
6426   cf_path_syntax="$prefix"
6427 else
6428   cf_path_syntax="$ac_default_prefix"
6429 fi
6430
6431 case ".$cf_src_path" in #(vi
6432 .\$\(*\)*|.\'*\'*) #(vi
6433   ;;
6434 ..|./*|.\\*) #(vi
6435   ;;
6436 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6437   ;;
6438 .\${*prefix}*) #(vi
6439   eval cf_src_path="$cf_src_path"
6440   case ".$cf_src_path" in #(vi
6441   .NONE/*)
6442     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6443     ;;
6444   esac
6445   ;; #(vi
6446 .no|.NONE/*)
6447   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6448   ;;
6449 *)
6450   { { echo "$as_me:6450: error: expected a pathname, not \"$cf_src_path\"" >&5
6451 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6452    { (exit 1); exit 1; }; }
6453   ;;
6454 esac
6455
6456   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6457   cf_dst_path="${cf_dst_path}${cf_src_path}"
6458 done
6459 IFS="$ac_save_ifs"
6460
6461 eval 'TERMINFO_DIRS="$cf_dst_path"'
6462
6463 echo "$as_me:6463: result: $TERMINFO_DIRS" >&5
6464 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6465 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6466 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6467 EOF
6468
6469 echo "$as_me:6469: checking for default terminfo directory" >&5
6470 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6471
6472 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6473 if test "${with_default_terminfo_dir+set}" = set; then
6474   withval="$with_default_terminfo_dir"
6475
6476 else
6477   withval="${TERMINFO:-${datadir}/terminfo}"
6478 fi; if test -n "${datadir}/terminfo" ; then
6479
6480 if test "x$prefix" != xNONE; then
6481   cf_path_syntax="$prefix"
6482 else
6483   cf_path_syntax="$ac_default_prefix"
6484 fi
6485
6486 case ".$withval" in #(vi
6487 .\$\(*\)*|.\'*\'*) #(vi
6488   ;;
6489 ..|./*|.\\*) #(vi
6490   ;;
6491 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6492   ;;
6493 .\${*prefix}*) #(vi
6494   eval withval="$withval"
6495   case ".$withval" in #(vi
6496   .NONE/*)
6497     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6498     ;;
6499   esac
6500   ;; #(vi
6501 .no|.NONE/*)
6502   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6503   ;;
6504 *)
6505   { { echo "$as_me:6505: error: expected a pathname, not \"$withval\"" >&5
6506 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6507    { (exit 1); exit 1; }; }
6508   ;;
6509 esac
6510
6511 fi
6512 TERMINFO="$withval"
6513
6514 echo "$as_me:6514: result: $TERMINFO" >&5
6515 echo "${ECHO_T}$TERMINFO" >&6
6516 cat >>confdefs.h <<EOF
6517 #define TERMINFO "$TERMINFO"
6518 EOF
6519
6520 fi
6521
6522 ###     use option --disable-big-core to make tic run on small machines
6523 ###     We need 4Mb, check if we can allocate 50% more than that.
6524 echo "$as_me:6524: checking if big-core option selected" >&5
6525 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6526
6527 # Check whether --enable-big-core or --disable-big-core was given.
6528 if test "${enable_big_core+set}" = set; then
6529   enableval="$enable_big_core"
6530   with_big_core=$enableval
6531 else
6532   if test "$cross_compiling" = yes; then
6533   with_big_core=no
6534 else
6535   cat >conftest.$ac_ext <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538
6539 #include <stdlib.h>
6540 #include <string.h>
6541 int main() {
6542         unsigned long n = 6000000L;
6543         char *s = malloc(n);
6544         if (s != 0)
6545                 s[0] = s[n-1] = 0;
6546         ${cf_cv_main_return:-return}(s == 0);
6547 }
6548 _ACEOF
6549 rm -f conftest$ac_exeext
6550 if { (eval echo "$as_me:6550: \"$ac_link\"") >&5
6551   (eval $ac_link) 2>&5
6552   ac_status=$?
6553   echo "$as_me:6553: \$? = $ac_status" >&5
6554   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6555   { (eval echo "$as_me:6555: \"$ac_try\"") >&5
6556   (eval $ac_try) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); }; }; then
6560   with_big_core=yes
6561 else
6562   echo "$as_me: program exited with status $ac_status" >&5
6563 echo "$as_me: failed program was:" >&5
6564 cat conftest.$ac_ext >&5
6565 with_big_core=no
6566 fi
6567 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6568 fi
6569 fi;
6570 echo "$as_me:6570: result: $with_big_core" >&5
6571 echo "${ECHO_T}$with_big_core" >&6
6572 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6573 #define HAVE_BIG_CORE 1
6574 EOF
6575
6576 ### ISO C only guarantees 512-char strings, we have tables which load faster
6577 ### when constructed using "big" strings.  More than the C compiler, the awk
6578 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6579 echo "$as_me:6579: checking if big-strings option selected" >&5
6580 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6581
6582 # Check whether --enable-big-strings or --disable-big-strings was given.
6583 if test "${enable_big_strings+set}" = set; then
6584   enableval="$enable_big_strings"
6585   with_big_strings=$enableval
6586 else
6587
6588         case x$AWK in #(vi
6589         x)
6590                 eval with_big_strings=no
6591                 ;;
6592         *) #(vi
6593                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6594                         | $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
6595                         eval with_big_strings=yes
6596                 else
6597                         eval with_big_strings=no
6598                 fi
6599                 ;;
6600         esac
6601
6602 fi;
6603 echo "$as_me:6603: result: $with_big_strings" >&5
6604 echo "${ECHO_T}$with_big_strings" >&6
6605
6606 USE_BIG_STRINGS=0
6607 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6608
6609 ###     use option --enable-termcap to compile in the termcap fallback support
6610 echo "$as_me:6610: checking if you want termcap-fallback support" >&5
6611 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6612
6613 # Check whether --enable-termcap or --disable-termcap was given.
6614 if test "${enable_termcap+set}" = set; then
6615   enableval="$enable_termcap"
6616   with_termcap=$enableval
6617 else
6618   with_termcap=no
6619 fi;
6620 echo "$as_me:6620: result: $with_termcap" >&5
6621 echo "${ECHO_T}$with_termcap" >&6
6622
6623 if test "$with_termcap" != "yes" ; then
6624         if test "$use_database" = no ; then
6625                 if test -z "$with_fallback" ; then
6626                         { { echo "$as_me:6626: error: You have disabled the database w/o specifying fallbacks" >&5
6627 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6628    { (exit 1); exit 1; }; }
6629                 fi
6630         fi
6631         cat >>confdefs.h <<\EOF
6632 #define PURE_TERMINFO 1
6633 EOF
6634
6635 else
6636
6637 if test "$with_ticlib" != no ; then
6638         { { echo "$as_me:6638: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6639 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6640    { (exit 1); exit 1; }; }
6641 fi
6642
6643 cat >>confdefs.h <<\EOF
6644 #define USE_TERMCAP 1
6645 EOF
6646
6647 echo "$as_me:6647: checking for list of termcap files" >&5
6648 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6649
6650 # Check whether --with-termpath or --without-termpath was given.
6651 if test "${with_termpath+set}" = set; then
6652   withval="$with_termpath"
6653
6654 else
6655   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6656 fi;
6657 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6658 cf_dst_path=
6659 for cf_src_path in $withval
6660 do
6661
6662 if test "x$prefix" != xNONE; then
6663   cf_path_syntax="$prefix"
6664 else
6665   cf_path_syntax="$ac_default_prefix"
6666 fi
6667
6668 case ".$cf_src_path" in #(vi
6669 .\$\(*\)*|.\'*\'*) #(vi
6670   ;;
6671 ..|./*|.\\*) #(vi
6672   ;;
6673 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6674   ;;
6675 .\${*prefix}*) #(vi
6676   eval cf_src_path="$cf_src_path"
6677   case ".$cf_src_path" in #(vi
6678   .NONE/*)
6679     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6680     ;;
6681   esac
6682   ;; #(vi
6683 .no|.NONE/*)
6684   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6685   ;;
6686 *)
6687   { { echo "$as_me:6687: error: expected a pathname, not \"$cf_src_path\"" >&5
6688 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6689    { (exit 1); exit 1; }; }
6690   ;;
6691 esac
6692
6693   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6694   cf_dst_path="${cf_dst_path}${cf_src_path}"
6695 done
6696 IFS="$ac_save_ifs"
6697
6698 eval 'TERMPATH="$cf_dst_path"'
6699
6700 echo "$as_me:6700: result: $TERMPATH" >&5
6701 echo "${ECHO_T}$TERMPATH" >&6
6702 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6703 #define TERMPATH "$TERMPATH"
6704 EOF
6705
6706 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6707 echo "$as_me:6707: checking if fast termcap-loader is needed" >&5
6708 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6709
6710 # Check whether --enable-getcap or --disable-getcap was given.
6711 if test "${enable_getcap+set}" = set; then
6712   enableval="$enable_getcap"
6713   with_getcap=$enableval
6714 else
6715   with_getcap=no
6716 fi;
6717 echo "$as_me:6717: result: $with_getcap" >&5
6718 echo "${ECHO_T}$with_getcap" >&6
6719 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6720 #define USE_GETCAP 1
6721 EOF
6722
6723 echo "$as_me:6723: checking if translated termcaps will be cached in ~/.terminfo" >&5
6724 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6725
6726 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6727 if test "${enable_getcap_cache+set}" = set; then
6728   enableval="$enable_getcap_cache"
6729   with_getcap_cache=$enableval
6730 else
6731   with_getcap_cache=no
6732 fi;
6733 echo "$as_me:6733: result: $with_getcap_cache" >&5
6734 echo "${ECHO_T}$with_getcap_cache" >&6
6735 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6736 #define USE_GETCAP_CACHE 1
6737 EOF
6738
6739 fi
6740
6741 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6742 echo "$as_me:6742: checking if ~/.terminfo is wanted" >&5
6743 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6744
6745 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6746 if test "${enable_home_terminfo+set}" = set; then
6747   enableval="$enable_home_terminfo"
6748   with_home_terminfo=$enableval
6749 else
6750   with_home_terminfo=yes
6751 fi;
6752 echo "$as_me:6752: result: $with_home_terminfo" >&5
6753 echo "${ECHO_T}$with_home_terminfo" >&6
6754 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6755 #define USE_HOME_TERMINFO 1
6756 EOF
6757
6758 echo "$as_me:6758: checking if you want to use restricted environment when running as root" >&5
6759 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6760
6761 # Check whether --enable-root-environ or --disable-root-environ was given.
6762 if test "${enable_root_environ+set}" = set; then
6763   enableval="$enable_root_environ"
6764   with_root_environ=$enableval
6765 else
6766   with_root_environ=yes
6767 fi;
6768 echo "$as_me:6768: result: $with_root_environ" >&5
6769 echo "${ECHO_T}$with_root_environ" >&6
6770 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6771 #define USE_ROOT_ENVIRON 1
6772 EOF
6773
6774 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6775 ###   to reduce storage requirements for the terminfo database.
6776
6777 for ac_func in \
6778         remove \
6779         unlink
6780 do
6781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6782 echo "$as_me:6782: checking for $ac_func" >&5
6783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6784 if eval "test \"\${$as_ac_var+set}\" = set"; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787   cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 /* System header to define __stub macros and hopefully few prototypes,
6791     which can conflict with char $ac_func (); below.  */
6792 #include <assert.h>
6793 /* Override any gcc2 internal prototype to avoid an error.  */
6794 #ifdef __cplusplus
6795 extern "C"
6796 #endif
6797 /* We use char because int might match the return type of a gcc2
6798    builtin and then its argument prototype would still apply.  */
6799 char $ac_func ();
6800 char (*f) ();
6801
6802 int
6803 main ()
6804 {
6805 /* The GNU C library defines this for functions which it implements
6806     to always fail with ENOSYS.  Some functions are actually named
6807     something starting with __ and the normal name is an alias.  */
6808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6809 choke me
6810 #else
6811 f = $ac_func;
6812 #endif
6813
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820   (eval $ac_link) 2>&5
6821   ac_status=$?
6822   echo "$as_me:6822: \$? = $ac_status" >&5
6823   (exit $ac_status); } &&
6824          { ac_try='test -s conftest$ac_exeext'
6825   { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6826   (eval $ac_try) 2>&5
6827   ac_status=$?
6828   echo "$as_me:6828: \$? = $ac_status" >&5
6829   (exit $ac_status); }; }; then
6830   eval "$as_ac_var=yes"
6831 else
6832   echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 eval "$as_ac_var=no"
6835 fi
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6837 fi
6838 echo "$as_me:6838: result: `eval echo '${'$as_ac_var'}'`" >&5
6839 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6840 if test `eval echo '${'$as_ac_var'}'` = yes; then
6841   cat >>confdefs.h <<EOF
6842 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6843 EOF
6844
6845 fi
6846 done
6847
6848 if test "$cross_compiling" = yes ; then
6849
6850 for ac_func in \
6851                 link \
6852                 symlink
6853 do
6854 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6855 echo "$as_me:6855: checking for $ac_func" >&5
6856 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6857 if eval "test \"\${$as_ac_var+set}\" = set"; then
6858   echo $ECHO_N "(cached) $ECHO_C" >&6
6859 else
6860   cat >conftest.$ac_ext <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6863 /* System header to define __stub macros and hopefully few prototypes,
6864     which can conflict with char $ac_func (); below.  */
6865 #include <assert.h>
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char $ac_func ();
6873 char (*f) ();
6874
6875 int
6876 main ()
6877 {
6878 /* The GNU C library defines this for functions which it implements
6879     to always fail with ENOSYS.  Some functions are actually named
6880     something starting with __ and the normal name is an alias.  */
6881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6882 choke me
6883 #else
6884 f = $ac_func;
6885 #endif
6886
6887   ;
6888   return 0;
6889 }
6890 _ACEOF
6891 rm -f conftest.$ac_objext conftest$ac_exeext
6892 if { (eval echo "$as_me:6892: \"$ac_link\"") >&5
6893   (eval $ac_link) 2>&5
6894   ac_status=$?
6895   echo "$as_me:6895: \$? = $ac_status" >&5
6896   (exit $ac_status); } &&
6897          { ac_try='test -s conftest$ac_exeext'
6898   { (eval echo "$as_me:6898: \"$ac_try\"") >&5
6899   (eval $ac_try) 2>&5
6900   ac_status=$?
6901   echo "$as_me:6901: \$? = $ac_status" >&5
6902   (exit $ac_status); }; }; then
6903   eval "$as_ac_var=yes"
6904 else
6905   echo "$as_me: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 eval "$as_ac_var=no"
6908 fi
6909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6910 fi
6911 echo "$as_me:6911: result: `eval echo '${'$as_ac_var'}'`" >&5
6912 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6913 if test `eval echo '${'$as_ac_var'}'` = yes; then
6914   cat >>confdefs.h <<EOF
6915 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6916 EOF
6917
6918 fi
6919 done
6920
6921 else
6922         echo "$as_me:6922: checking if link/symlink functions work" >&5
6923 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6924 if test "${cf_cv_link_funcs+set}" = set; then
6925   echo $ECHO_N "(cached) $ECHO_C" >&6
6926 else
6927
6928                 cf_cv_link_funcs=
6929                 for cf_func in link symlink ; do
6930                         if test "$cross_compiling" = yes; then
6931
6932                         eval 'ac_cv_func_'$cf_func'=error'
6933 else
6934   cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937
6938 #include <sys/types.h>
6939 #include <sys/stat.h>
6940 #ifdef HAVE_UNISTD_H
6941 #include <unistd.h>
6942 #endif
6943 int main()
6944 {
6945         int fail = 0;
6946         char *src = "config.log";
6947         char *dst = "conftest.chk";
6948         struct stat src_sb;
6949         struct stat dst_sb;
6950
6951         stat(src, &src_sb);
6952         fail = ($cf_func("config.log", "conftest.chk") < 0)
6953             || (stat(dst, &dst_sb) < 0)
6954             || (dst_sb.st_mtime != src_sb.st_mtime);
6955 #ifdef HAVE_UNLINK
6956         unlink(dst);
6957 #else
6958         remove(dst);
6959 #endif
6960         ${cf_cv_main_return:-return} (fail);
6961 }
6962
6963 _ACEOF
6964 rm -f conftest$ac_exeext
6965 if { (eval echo "$as_me:6965: \"$ac_link\"") >&5
6966   (eval $ac_link) 2>&5
6967   ac_status=$?
6968   echo "$as_me:6968: \$? = $ac_status" >&5
6969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6970   { (eval echo "$as_me:6970: \"$ac_try\"") >&5
6971   (eval $ac_try) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); }; }; then
6975
6976                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6977                         eval 'ac_cv_func_'$cf_func'=yes'
6978 else
6979   echo "$as_me: program exited with status $ac_status" >&5
6980 echo "$as_me: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6982
6983                         eval 'ac_cv_func_'$cf_func'=no'
6984 fi
6985 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6986 fi
6987                 done
6988                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6989
6990 fi
6991 echo "$as_me:6991: result: $cf_cv_link_funcs" >&5
6992 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6993         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6994 #define HAVE_LINK 1
6995 EOF
6996
6997         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6998 #define HAVE_SYMLINK 1
6999 EOF
7000
7001 fi
7002
7003 with_links=no
7004 with_symlinks=no
7005
7006 # soft links (symbolic links) are useful for some systems where hard links do
7007 # not work, or to make it simpler to copy terminfo trees around.
7008 if test "$ac_cv_func_symlink" = yes ; then
7009     echo "$as_me:7009: checking if tic should use symbolic links" >&5
7010 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7011
7012 # Check whether --enable-symlinks or --disable-symlinks was given.
7013 if test "${enable_symlinks+set}" = set; then
7014   enableval="$enable_symlinks"
7015   with_symlinks=$enableval
7016 else
7017   with_symlinks=no
7018 fi;
7019     echo "$as_me:7019: result: $with_symlinks" >&5
7020 echo "${ECHO_T}$with_symlinks" >&6
7021 fi
7022
7023 # If we have hard links and did not choose to use soft links instead, there is
7024 # no reason to make this choice optional - use the hard links.
7025 if test "$with_symlinks" = no ; then
7026     echo "$as_me:7026: checking if tic should use hard links" >&5
7027 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7028     if test "$ac_cv_func_link" = yes ; then
7029         with_links=yes
7030     else
7031         with_links=no
7032     fi
7033     echo "$as_me:7033: result: $with_links" >&5
7034 echo "${ECHO_T}$with_links" >&6
7035 fi
7036
7037 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7038 #define USE_LINKS 1
7039 EOF
7040
7041 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7042 #define USE_SYMLINKS 1
7043 EOF
7044
7045 ###   use option --enable-broken-linker to force on use of broken-linker support
7046 echo "$as_me:7046: checking if you want broken-linker support code" >&5
7047 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7048
7049 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7050 if test "${enable_broken_linker+set}" = set; then
7051   enableval="$enable_broken_linker"
7052   with_broken_linker=$enableval
7053 else
7054   with_broken_linker=${BROKEN_LINKER:-no}
7055 fi;
7056 echo "$as_me:7056: result: $with_broken_linker" >&5
7057 echo "${ECHO_T}$with_broken_linker" >&6
7058
7059 BROKEN_LINKER=0
7060 if test "$with_broken_linker" = yes ; then
7061         cat >>confdefs.h <<\EOF
7062 #define BROKEN_LINKER 1
7063 EOF
7064
7065         BROKEN_LINKER=1
7066 elif test "$DFT_LWR_MODEL" = shared ; then
7067         case $cf_cv_system_name in #(vi
7068         cygwin*)
7069                 cat >>confdefs.h <<\EOF
7070 #define BROKEN_LINKER 1
7071 EOF
7072
7073                 BROKEN_LINKER=1
7074                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7075
7076 echo "${as_me:-configure}:7076: testing cygwin linker is broken anyway ..." 1>&5
7077
7078                 ;;
7079         esac
7080 fi
7081
7082 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7083 echo "$as_me:7083: checking if tputs should process BSD-style prefix padding" >&5
7084 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7085
7086 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7087 if test "${enable_bsdpad+set}" = set; then
7088   enableval="$enable_bsdpad"
7089   with_bsdpad=$enableval
7090 else
7091   with_bsdpad=no
7092 fi;
7093 echo "$as_me:7093: result: $with_bsdpad" >&5
7094 echo "${ECHO_T}$with_bsdpad" >&6
7095 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7096 #define BSD_TPUTS 1
7097 EOF
7098
7099 ###   use option --enable-widec to turn on use of wide-character support
7100 NCURSES_CH_T=chtype
7101 NCURSES_LIBUTF8=0
7102
7103 NEED_WCHAR_H=0
7104 NCURSES_MBSTATE_T=0
7105 NCURSES_WCHAR_T=0
7106 NCURSES_WINT_T=0
7107
7108 # Check to define _XOPEN_SOURCE "automatically"
7109
7110 cf_XOPEN_SOURCE=500
7111 cf_POSIX_C_SOURCE=199506L
7112 cf_xopen_source=
7113
7114 case $host_os in #(vi
7115 aix[4-7]*) #(vi
7116         cf_xopen_source="-D_ALL_SOURCE"
7117         ;;
7118 cygwin) #(vi
7119         cf_XOPEN_SOURCE=600
7120         ;;
7121 darwin[0-8].*) #(vi
7122         cf_xopen_source="-D_APPLE_C_SOURCE"
7123         ;;
7124 darwin*) #(vi
7125         cf_xopen_source="-D_DARWIN_C_SOURCE"
7126         ;;
7127 freebsd*|dragonfly*) #(vi
7128         # 5.x headers associate
7129         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7130         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7131         cf_POSIX_C_SOURCE=200112L
7132         cf_XOPEN_SOURCE=600
7133         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7134         ;;
7135 hpux11*) #(vi
7136         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7137         ;;
7138 hpux*) #(vi
7139         cf_xopen_source="-D_HPUX_SOURCE"
7140         ;;
7141 irix[56].*) #(vi
7142         cf_xopen_source="-D_SGI_SOURCE"
7143         ;;
7144 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7145
7146 echo "$as_me:7146: checking if we must define _GNU_SOURCE" >&5
7147 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7148 if test "${cf_cv_gnu_source+set}" = set; then
7149   echo $ECHO_N "(cached) $ECHO_C" >&6
7150 else
7151
7152 cat >conftest.$ac_ext <<_ACEOF
7153 #line 7153 "configure"
7154 #include "confdefs.h"
7155 #include <sys/types.h>
7156 int
7157 main ()
7158 {
7159
7160 #ifndef _XOPEN_SOURCE
7161 make an error
7162 #endif
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -s conftest.$ac_objext'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179   cf_cv_gnu_source=no
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 cf_save="$CPPFLAGS"
7184          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7185          cat >conftest.$ac_ext <<_ACEOF
7186 #line 7186 "configure"
7187 #include "confdefs.h"
7188 #include <sys/types.h>
7189 int
7190 main ()
7191 {
7192
7193 #ifdef _XOPEN_SOURCE
7194 make an error
7195 #endif
7196   ;
7197   return 0;
7198 }
7199 _ACEOF
7200 rm -f conftest.$ac_objext
7201 if { (eval echo "$as_me:7201: \"$ac_compile\"") >&5
7202   (eval $ac_compile) 2>&5
7203   ac_status=$?
7204   echo "$as_me:7204: \$? = $ac_status" >&5
7205   (exit $ac_status); } &&
7206          { ac_try='test -s conftest.$ac_objext'
7207   { (eval echo "$as_me:7207: \"$ac_try\"") >&5
7208   (eval $ac_try) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); }; }; then
7212   cf_cv_gnu_source=no
7213 else
7214   echo "$as_me: failed program was:" >&5
7215 cat conftest.$ac_ext >&5
7216 cf_cv_gnu_source=yes
7217 fi
7218 rm -f conftest.$ac_objext conftest.$ac_ext
7219         CPPFLAGS="$cf_save"
7220
7221 fi
7222 rm -f conftest.$ac_objext conftest.$ac_ext
7223
7224 fi
7225 echo "$as_me:7225: result: $cf_cv_gnu_source" >&5
7226 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7227 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7228
7229         ;;
7230 mirbsd*) #(vi
7231         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7232         ;;
7233 netbsd*) #(vi
7234         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7235         ;;
7236 openbsd*) #(vi
7237         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7238         ;;
7239 osf[45]*) #(vi
7240         cf_xopen_source="-D_OSF_SOURCE"
7241         ;;
7242 nto-qnx*) #(vi
7243         cf_xopen_source="-D_QNX_SOURCE"
7244         ;;
7245 sco*) #(vi
7246         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7247         ;;
7248 solaris2.1[0-9]) #(vi
7249         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7250         ;;
7251 solaris2.[1-9]) #(vi
7252         cf_xopen_source="-D__EXTENSIONS__"
7253         ;;
7254 *)
7255         echo "$as_me:7255: checking if we should define _XOPEN_SOURCE" >&5
7256 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7257 if test "${cf_cv_xopen_source+set}" = set; then
7258   echo $ECHO_N "(cached) $ECHO_C" >&6
7259 else
7260
7261         cat >conftest.$ac_ext <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7264 #include <sys/types.h>
7265 int
7266 main ()
7267 {
7268
7269 #ifndef _XOPEN_SOURCE
7270 make an error
7271 #endif
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_xopen_source=no
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cf_save="$CPPFLAGS"
7293          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7294          cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7297 #include <sys/types.h>
7298 int
7299 main ()
7300 {
7301
7302 #ifdef _XOPEN_SOURCE
7303 make an error
7304 #endif
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext
7310 if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
7311   (eval $ac_compile) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest.$ac_objext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   cf_cv_xopen_source=no
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7326 fi
7327 rm -f conftest.$ac_objext conftest.$ac_ext
7328         CPPFLAGS="$cf_save"
7329
7330 fi
7331 rm -f conftest.$ac_objext conftest.$ac_ext
7332
7333 fi
7334 echo "$as_me:7334: result: $cf_cv_xopen_source" >&5
7335 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7336         if test "$cf_cv_xopen_source" != no ; then
7337
7338 CFLAGS=`echo "$CFLAGS" | \
7339         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7340                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7341
7342 CPPFLAGS=`echo "$CPPFLAGS" | \
7343         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7344                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7345
7346                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7347
7348 cf_fix_cppflags=no
7349 cf_new_cflags=
7350 cf_new_cppflags=
7351 cf_new_extra_cppflags=
7352
7353 for cf_add_cflags in $cf_temp_xopen_source
7354 do
7355 case $cf_fix_cppflags in
7356 no)
7357         case $cf_add_cflags in #(vi
7358         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7359                 case $cf_add_cflags in
7360                 -D*)
7361                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7362
7363                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7364                                 && test -z "${cf_tst_cflags}" \
7365                                 && cf_fix_cppflags=yes
7366
7367                         if test $cf_fix_cppflags = yes ; then
7368                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7369                                 continue
7370                         elif test "${cf_tst_cflags}" = "\"'" ; then
7371                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7372                                 continue
7373                         fi
7374                         ;;
7375                 esac
7376                 case "$CPPFLAGS" in
7377                 *$cf_add_cflags) #(vi
7378                         ;;
7379                 *) #(vi
7380                         case $cf_add_cflags in #(vi
7381                         -D*)
7382                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7383
7384 CPPFLAGS=`echo "$CPPFLAGS" | \
7385         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7386                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7387
7388                                 ;;
7389                         esac
7390                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7391                         ;;
7392                 esac
7393                 ;;
7394         *)
7395                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7396                 ;;
7397         esac
7398         ;;
7399 yes)
7400         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7401
7402         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7403
7404         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7405                 && test -z "${cf_tst_cflags}" \
7406                 && cf_fix_cppflags=no
7407         ;;
7408 esac
7409 done
7410
7411 if test -n "$cf_new_cflags" ; then
7412
7413         CFLAGS="$CFLAGS $cf_new_cflags"
7414 fi
7415
7416 if test -n "$cf_new_cppflags" ; then
7417
7418         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7419 fi
7420
7421 if test -n "$cf_new_extra_cppflags" ; then
7422
7423         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7424 fi
7425
7426         fi
7427
7428 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7429
7430 cf_save_CFLAGS="$CFLAGS"
7431 cf_save_CPPFLAGS="$CPPFLAGS"
7432
7433 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7436
7437 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7438         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7439                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7440
7441 echo "$as_me:7441: checking if we should define _POSIX_C_SOURCE" >&5
7442 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7443 if test "${cf_cv_posix_c_source+set}" = set; then
7444   echo $ECHO_N "(cached) $ECHO_C" >&6
7445 else
7446
7447 echo "${as_me:-configure}:7447: testing if the symbol is already defined go no further ..." 1>&5
7448
7449         cat >conftest.$ac_ext <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7452 #include <sys/types.h>
7453 int
7454 main ()
7455 {
7456
7457 #ifndef _POSIX_C_SOURCE
7458 make an error
7459 #endif
7460   ;
7461   return 0;
7462 }
7463 _ACEOF
7464 rm -f conftest.$ac_objext
7465 if { (eval echo "$as_me:7465: \"$ac_compile\"") >&5
7466   (eval $ac_compile) 2>&5
7467   ac_status=$?
7468   echo "$as_me:7468: \$? = $ac_status" >&5
7469   (exit $ac_status); } &&
7470          { ac_try='test -s conftest.$ac_objext'
7471   { (eval echo "$as_me:7471: \"$ac_try\"") >&5
7472   (eval $ac_try) 2>&5
7473   ac_status=$?
7474   echo "$as_me:7474: \$? = $ac_status" >&5
7475   (exit $ac_status); }; }; then
7476   cf_cv_posix_c_source=no
7477 else
7478   echo "$as_me: failed program was:" >&5
7479 cat conftest.$ac_ext >&5
7480 cf_want_posix_source=no
7481          case .$cf_POSIX_C_SOURCE in #(vi
7482          .[12]??*) #(vi
7483                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7484                 ;;
7485          .2) #(vi
7486                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7487                 cf_want_posix_source=yes
7488                 ;;
7489          .*)
7490                 cf_want_posix_source=yes
7491                 ;;
7492          esac
7493          if test "$cf_want_posix_source" = yes ; then
7494                 cat >conftest.$ac_ext <<_ACEOF
7495 #line 7495 "configure"
7496 #include "confdefs.h"
7497 #include <sys/types.h>
7498 int
7499 main ()
7500 {
7501
7502 #ifdef _POSIX_SOURCE
7503 make an error
7504 #endif
7505   ;
7506   return 0;
7507 }
7508 _ACEOF
7509 rm -f conftest.$ac_objext
7510 if { (eval echo "$as_me:7510: \"$ac_compile\"") >&5
7511   (eval $ac_compile) 2>&5
7512   ac_status=$?
7513   echo "$as_me:7513: \$? = $ac_status" >&5
7514   (exit $ac_status); } &&
7515          { ac_try='test -s conftest.$ac_objext'
7516   { (eval echo "$as_me:7516: \"$ac_try\"") >&5
7517   (eval $ac_try) 2>&5
7518   ac_status=$?
7519   echo "$as_me:7519: \$? = $ac_status" >&5
7520   (exit $ac_status); }; }; then
7521   :
7522 else
7523   echo "$as_me: failed program was:" >&5
7524 cat conftest.$ac_ext >&5
7525 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7526 fi
7527 rm -f conftest.$ac_objext conftest.$ac_ext
7528          fi
7529
7530 echo "${as_me:-configure}:7530: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7531
7532          CFLAGS="$cf_trim_CFLAGS"
7533          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7534
7535 echo "${as_me:-configure}:7535: testing if the second compile does not leave our definition intact error ..." 1>&5
7536
7537          cat >conftest.$ac_ext <<_ACEOF
7538 #line 7538 "configure"
7539 #include "confdefs.h"
7540 #include <sys/types.h>
7541 int
7542 main ()
7543 {
7544
7545 #ifndef _POSIX_C_SOURCE
7546 make an error
7547 #endif
7548   ;
7549   return 0;
7550 }
7551 _ACEOF
7552 rm -f conftest.$ac_objext
7553 if { (eval echo "$as_me:7553: \"$ac_compile\"") >&5
7554   (eval $ac_compile) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit $ac_status); } &&
7558          { ac_try='test -s conftest.$ac_objext'
7559   { (eval echo "$as_me:7559: \"$ac_try\"") >&5
7560   (eval $ac_try) 2>&5
7561   ac_status=$?
7562   echo "$as_me:7562: \$? = $ac_status" >&5
7563   (exit $ac_status); }; }; then
7564   :
7565 else
7566   echo "$as_me: failed program was:" >&5
7567 cat conftest.$ac_ext >&5
7568 cf_cv_posix_c_source=no
7569 fi
7570 rm -f conftest.$ac_objext conftest.$ac_ext
7571          CFLAGS="$cf_save_CFLAGS"
7572          CPPFLAGS="$cf_save_CPPFLAGS"
7573
7574 fi
7575 rm -f conftest.$ac_objext conftest.$ac_ext
7576
7577 fi
7578 echo "$as_me:7578: result: $cf_cv_posix_c_source" >&5
7579 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7580
7581 if test "$cf_cv_posix_c_source" != no ; then
7582         CFLAGS="$cf_trim_CFLAGS"
7583         CPPFLAGS="$cf_trim_CPPFLAGS"
7584
7585 cf_fix_cppflags=no
7586 cf_new_cflags=
7587 cf_new_cppflags=
7588 cf_new_extra_cppflags=
7589
7590 for cf_add_cflags in $cf_cv_posix_c_source
7591 do
7592 case $cf_fix_cppflags in
7593 no)
7594         case $cf_add_cflags in #(vi
7595         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7596                 case $cf_add_cflags in
7597                 -D*)
7598                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7599
7600                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7601                                 && test -z "${cf_tst_cflags}" \
7602                                 && cf_fix_cppflags=yes
7603
7604                         if test $cf_fix_cppflags = yes ; then
7605                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7606                                 continue
7607                         elif test "${cf_tst_cflags}" = "\"'" ; then
7608                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7609                                 continue
7610                         fi
7611                         ;;
7612                 esac
7613                 case "$CPPFLAGS" in
7614                 *$cf_add_cflags) #(vi
7615                         ;;
7616                 *) #(vi
7617                         case $cf_add_cflags in #(vi
7618                         -D*)
7619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7620
7621 CPPFLAGS=`echo "$CPPFLAGS" | \
7622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7624
7625                                 ;;
7626                         esac
7627                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7628                         ;;
7629                 esac
7630                 ;;
7631         *)
7632                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7633                 ;;
7634         esac
7635         ;;
7636 yes)
7637         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7638
7639         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7640
7641         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7642                 && test -z "${cf_tst_cflags}" \
7643                 && cf_fix_cppflags=no
7644         ;;
7645 esac
7646 done
7647
7648 if test -n "$cf_new_cflags" ; then
7649
7650         CFLAGS="$CFLAGS $cf_new_cflags"
7651 fi
7652
7653 if test -n "$cf_new_cppflags" ; then
7654
7655         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7656 fi
7657
7658 if test -n "$cf_new_extra_cppflags" ; then
7659
7660         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7661 fi
7662
7663 fi
7664
7665         ;;
7666 esac
7667
7668 if test -n "$cf_xopen_source" ; then
7669
7670 cf_fix_cppflags=no
7671 cf_new_cflags=
7672 cf_new_cppflags=
7673 cf_new_extra_cppflags=
7674
7675 for cf_add_cflags in $cf_xopen_source
7676 do
7677 case $cf_fix_cppflags in
7678 no)
7679         case $cf_add_cflags in #(vi
7680         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7681                 case $cf_add_cflags in
7682                 -D*)
7683                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7684
7685                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7686                                 && test -z "${cf_tst_cflags}" \
7687                                 && cf_fix_cppflags=yes
7688
7689                         if test $cf_fix_cppflags = yes ; then
7690                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7691                                 continue
7692                         elif test "${cf_tst_cflags}" = "\"'" ; then
7693                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7694                                 continue
7695                         fi
7696                         ;;
7697                 esac
7698                 case "$CPPFLAGS" in
7699                 *$cf_add_cflags) #(vi
7700                         ;;
7701                 *) #(vi
7702                         case $cf_add_cflags in #(vi
7703                         -D*)
7704                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7705
7706 CPPFLAGS=`echo "$CPPFLAGS" | \
7707         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7708                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7709
7710                                 ;;
7711                         esac
7712                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7713                         ;;
7714                 esac
7715                 ;;
7716         *)
7717                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7718                 ;;
7719         esac
7720         ;;
7721 yes)
7722         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7723
7724         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7725
7726         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7727                 && test -z "${cf_tst_cflags}" \
7728                 && cf_fix_cppflags=no
7729         ;;
7730 esac
7731 done
7732
7733 if test -n "$cf_new_cflags" ; then
7734
7735         CFLAGS="$CFLAGS $cf_new_cflags"
7736 fi
7737
7738 if test -n "$cf_new_cppflags" ; then
7739
7740         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7741 fi
7742
7743 if test -n "$cf_new_extra_cppflags" ; then
7744
7745         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7746 fi
7747
7748 fi
7749
7750 # Work around breakage on OS X
7751
7752 echo "$as_me:7752: checking if SIGWINCH is defined" >&5
7753 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7754 if test "${cf_cv_define_sigwinch+set}" = set; then
7755   echo $ECHO_N "(cached) $ECHO_C" >&6
7756 else
7757
7758         cat >conftest.$ac_ext <<_ACEOF
7759 #line 7759 "configure"
7760 #include "confdefs.h"
7761
7762 #include <sys/types.h>
7763 #include <sys/signal.h>
7764
7765 int
7766 main ()
7767 {
7768 int x = SIGWINCH
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f conftest.$ac_objext
7774 if { (eval echo "$as_me:7774: \"$ac_compile\"") >&5
7775   (eval $ac_compile) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit $ac_status); } &&
7779          { ac_try='test -s conftest.$ac_objext'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit $ac_status); }; }; then
7785   cf_cv_define_sigwinch=yes
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat conftest.$ac_ext >&5
7789 cat >conftest.$ac_ext <<_ACEOF
7790 #line 7790 "configure"
7791 #include "confdefs.h"
7792
7793 #undef _XOPEN_SOURCE
7794 #undef _POSIX_SOURCE
7795 #undef _POSIX_C_SOURCE
7796 #include <sys/types.h>
7797 #include <sys/signal.h>
7798
7799 int
7800 main ()
7801 {
7802 int x = SIGWINCH
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 rm -f conftest.$ac_objext
7808 if { (eval echo "$as_me:7808: \"$ac_compile\"") >&5
7809   (eval $ac_compile) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); } &&
7813          { ac_try='test -s conftest.$ac_objext'
7814   { (eval echo "$as_me:7814: \"$ac_try\"") >&5
7815   (eval $ac_try) 2>&5
7816   ac_status=$?
7817   echo "$as_me:7817: \$? = $ac_status" >&5
7818   (exit $ac_status); }; }; then
7819   cf_cv_define_sigwinch=maybe
7820 else
7821   echo "$as_me: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7823 cf_cv_define_sigwinch=no
7824 fi
7825 rm -f conftest.$ac_objext conftest.$ac_ext
7826
7827 fi
7828 rm -f conftest.$ac_objext conftest.$ac_ext
7829
7830 fi
7831 echo "$as_me:7831: result: $cf_cv_define_sigwinch" >&5
7832 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7833
7834 if test "$cf_cv_define_sigwinch" = maybe ; then
7835 echo "$as_me:7835: checking for actual SIGWINCH definition" >&5
7836 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7837 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7838   echo $ECHO_N "(cached) $ECHO_C" >&6
7839 else
7840
7841 cf_cv_fixup_sigwinch=unknown
7842 cf_sigwinch=32
7843 while test $cf_sigwinch != 1
7844 do
7845         cat >conftest.$ac_ext <<_ACEOF
7846 #line 7846 "configure"
7847 #include "confdefs.h"
7848
7849 #undef _XOPEN_SOURCE
7850 #undef _POSIX_SOURCE
7851 #undef _POSIX_C_SOURCE
7852 #include <sys/types.h>
7853 #include <sys/signal.h>
7854
7855 int
7856 main ()
7857 {
7858
7859 #if SIGWINCH != $cf_sigwinch
7860 make an error
7861 #endif
7862 int x = SIGWINCH
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_fixup_sigwinch=$cf_sigwinch
7880          break
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 fi
7885 rm -f conftest.$ac_objext conftest.$ac_ext
7886
7887 cf_sigwinch=`expr $cf_sigwinch - 1`
7888 done
7889
7890 fi
7891 echo "$as_me:7891: result: $cf_cv_fixup_sigwinch" >&5
7892 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7893
7894         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7895                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7896         fi
7897 fi
7898
7899 # Checks for CODESET support.
7900
7901   echo "$as_me:7901: checking for nl_langinfo and CODESET" >&5
7902 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7903 if test "${am_cv_langinfo_codeset+set}" = set; then
7904   echo $ECHO_N "(cached) $ECHO_C" >&6
7905 else
7906   cat >conftest.$ac_ext <<_ACEOF
7907 #line 7907 "configure"
7908 #include "confdefs.h"
7909 #include <langinfo.h>
7910 int
7911 main ()
7912 {
7913 char* cs = nl_langinfo(CODESET);
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext conftest$ac_exeext
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920   (eval $ac_link) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest$ac_exeext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   am_cv_langinfo_codeset=yes
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 am_cv_langinfo_codeset=no
7935 fi
7936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7937
7938 fi
7939 echo "$as_me:7939: result: $am_cv_langinfo_codeset" >&5
7940 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7941   if test $am_cv_langinfo_codeset = yes; then
7942
7943 cat >>confdefs.h <<\EOF
7944 #define HAVE_LANGINFO_CODESET 1
7945 EOF
7946
7947   fi
7948
7949 # use these variables to work around a defect in gcc's fixincludes.
7950 NCURSES_OK_WCHAR_T=
7951 NCURSES_OK_WINT_T=
7952
7953 echo "$as_me:7953: checking if you want wide-character code" >&5
7954 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7955
7956 # Check whether --enable-widec or --disable-widec was given.
7957 if test "${enable_widec+set}" = set; then
7958   enableval="$enable_widec"
7959   with_widec=$enableval
7960 else
7961   with_widec=no
7962 fi;
7963 echo "$as_me:7963: result: $with_widec" >&5
7964 echo "${ECHO_T}$with_widec" >&6
7965 if test "$with_widec" = yes ; then
7966         LIB_SUFFIX="w${LIB_SUFFIX}"
7967         cat >>confdefs.h <<\EOF
7968 #define USE_WIDEC_SUPPORT 1
7969 EOF
7970
7971         case "$CFLAGS $CPPFLAGS" in #(vi
7972         *-D_XOPEN_SOURCE=500) #(vi
7973                 ;;
7974         *)
7975
7976 echo "$as_me:7976: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7977 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7978 cat >conftest.$ac_ext <<_ACEOF
7979 #line 7979 "configure"
7980 #include "confdefs.h"
7981 #include <sys/types.h>
7982
7983 int
7984 main ()
7985 {
7986
7987 #ifndef _XOPEN_SOURCE_EXTENDED
7988 make an error
7989 #endif
7990   ;
7991   return 0;
7992 }
7993 _ACEOF
7994 rm -f conftest.$ac_objext
7995 if { (eval echo "$as_me:7995: \"$ac_compile\"") >&5
7996   (eval $ac_compile) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); } &&
8000          { ac_try='test -s conftest.$ac_objext'
8001   { (eval echo "$as_me:8001: \"$ac_try\"") >&5
8002   (eval $ac_try) 2>&5
8003   ac_status=$?
8004   echo "$as_me:8004: \$? = $ac_status" >&5
8005   (exit $ac_status); }; }; then
8006   cf_result=no
8007 else
8008   echo "$as_me: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8010 cf_result=yes
8011 fi
8012 rm -f conftest.$ac_objext conftest.$ac_ext
8013 echo "$as_me:8013: result: $cf_result" >&5
8014 echo "${ECHO_T}$cf_result" >&6
8015
8016 if test "$cf_result" = yes ; then
8017         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8018 elif test "x" != "x" ; then
8019         echo "$as_me:8019: checking checking for compatible value versus " >&5
8020 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8021         cat >conftest.$ac_ext <<_ACEOF
8022 #line 8022 "configure"
8023 #include "confdefs.h"
8024 #include <sys/types.h>
8025
8026 int
8027 main ()
8028 {
8029
8030 #if _XOPEN_SOURCE_EXTENDED- < 0
8031 make an error
8032 #endif
8033   ;
8034   return 0;
8035 }
8036 _ACEOF
8037 rm -f conftest.$ac_objext
8038 if { (eval echo "$as_me:8038: \"$ac_compile\"") >&5
8039   (eval $ac_compile) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); } &&
8043          { ac_try='test -s conftest.$ac_objext'
8044   { (eval echo "$as_me:8044: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:8047: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   cf_result=yes
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 cf_result=no
8054 fi
8055 rm -f conftest.$ac_objext conftest.$ac_ext
8056         echo "$as_me:8056: result: $cf_result" >&5
8057 echo "${ECHO_T}$cf_result" >&6
8058         if test "$cf_result" = no ; then
8059                 # perhaps we can override it - try...
8060                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8061         fi
8062 fi
8063
8064                 ;;
8065         esac
8066
8067         # with_overwrite=no
8068         NCURSES_CH_T=cchar_t
8069
8070 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8071 do
8072 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8073 echo "$as_me:8073: checking for $ac_func" >&5
8074 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8075 if eval "test \"\${$as_ac_var+set}\" = set"; then
8076   echo $ECHO_N "(cached) $ECHO_C" >&6
8077 else
8078   cat >conftest.$ac_ext <<_ACEOF
8079 #line 8079 "configure"
8080 #include "confdefs.h"
8081 /* System header to define __stub macros and hopefully few prototypes,
8082     which can conflict with char $ac_func (); below.  */
8083 #include <assert.h>
8084 /* Override any gcc2 internal prototype to avoid an error.  */
8085 #ifdef __cplusplus
8086 extern "C"
8087 #endif
8088 /* We use char because int might match the return type of a gcc2
8089    builtin and then its argument prototype would still apply.  */
8090 char $ac_func ();
8091 char (*f) ();
8092
8093 int
8094 main ()
8095 {
8096 /* The GNU C library defines this for functions which it implements
8097     to always fail with ENOSYS.  Some functions are actually named
8098     something starting with __ and the normal name is an alias.  */
8099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8100 choke me
8101 #else
8102 f = $ac_func;
8103 #endif
8104
8105   ;
8106   return 0;
8107 }
8108 _ACEOF
8109 rm -f conftest.$ac_objext conftest$ac_exeext
8110 if { (eval echo "$as_me:8110: \"$ac_link\"") >&5
8111   (eval $ac_link) 2>&5
8112   ac_status=$?
8113   echo "$as_me:8113: \$? = $ac_status" >&5
8114   (exit $ac_status); } &&
8115          { ac_try='test -s conftest$ac_exeext'
8116   { (eval echo "$as_me:8116: \"$ac_try\"") >&5
8117   (eval $ac_try) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); }; }; then
8121   eval "$as_ac_var=yes"
8122 else
8123   echo "$as_me: failed program was:" >&5
8124 cat conftest.$ac_ext >&5
8125 eval "$as_ac_var=no"
8126 fi
8127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8128 fi
8129 echo "$as_me:8129: result: `eval echo '${'$as_ac_var'}'`" >&5
8130 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8131 if test `eval echo '${'$as_ac_var'}'` = yes; then
8132   cat >>confdefs.h <<EOF
8133 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8134 EOF
8135
8136 fi
8137 done
8138
8139         if test "$ac_cv_func_putwc" != yes ; then
8140
8141 echo "$as_me:8141: checking for multibyte character support" >&5
8142 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8143 if test "${cf_cv_utf8_lib+set}" = set; then
8144   echo $ECHO_N "(cached) $ECHO_C" >&6
8145 else
8146
8147         cf_save_LIBS="$LIBS"
8148         cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151
8152 #include <stdlib.h>
8153 int
8154 main ()
8155 {
8156 putwc(0,0);
8157   ;
8158   return 0;
8159 }
8160 _ACEOF
8161 rm -f conftest.$ac_objext conftest$ac_exeext
8162 if { (eval echo "$as_me:8162: \"$ac_link\"") >&5
8163   (eval $ac_link) 2>&5
8164   ac_status=$?
8165   echo "$as_me:8165: \$? = $ac_status" >&5
8166   (exit $ac_status); } &&
8167          { ac_try='test -s conftest$ac_exeext'
8168   { (eval echo "$as_me:8168: \"$ac_try\"") >&5
8169   (eval $ac_try) 2>&5
8170   ac_status=$?
8171   echo "$as_me:8171: \$? = $ac_status" >&5
8172   (exit $ac_status); }; }; then
8173   cf_cv_utf8_lib=yes
8174 else
8175   echo "$as_me: failed program was:" >&5
8176 cat conftest.$ac_ext >&5
8177
8178 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8179 # will be set on completion of the AC_TRY_LINK below.
8180 cf_cv_header_path_utf8=
8181 cf_cv_library_path_utf8=
8182
8183 echo "${as_me:-configure}:8183: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8184
8185 cf_save_LIBS="$LIBS"
8186
8187 cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8190
8191 #include <libutf8.h>
8192 int
8193 main ()
8194 {
8195 putwc(0,0);
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext conftest$ac_exeext
8201 if { (eval echo "$as_me:8201: \"$ac_link\"") >&5
8202   (eval $ac_link) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest$ac_exeext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212
8213         cf_cv_find_linkage_utf8=yes
8214         cf_cv_header_path_utf8=/usr/include
8215         cf_cv_library_path_utf8=/usr/lib
8216
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220
8221 LIBS="-lutf8  $cf_save_LIBS"
8222
8223 cat >conftest.$ac_ext <<_ACEOF
8224 #line 8224 "configure"
8225 #include "confdefs.h"
8226
8227 #include <libutf8.h>
8228 int
8229 main ()
8230 {
8231 putwc(0,0);
8232   ;
8233   return 0;
8234 }
8235 _ACEOF
8236 rm -f conftest.$ac_objext conftest$ac_exeext
8237 if { (eval echo "$as_me:8237: \"$ac_link\"") >&5
8238   (eval $ac_link) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); } &&
8242          { ac_try='test -s conftest$ac_exeext'
8243   { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8244   (eval $ac_try) 2>&5
8245   ac_status=$?
8246   echo "$as_me:8246: \$? = $ac_status" >&5
8247   (exit $ac_status); }; }; then
8248
8249         cf_cv_find_linkage_utf8=yes
8250         cf_cv_header_path_utf8=/usr/include
8251         cf_cv_library_path_utf8=/usr/lib
8252         cf_cv_library_file_utf8="-lutf8"
8253
8254 else
8255   echo "$as_me: failed program was:" >&5
8256 cat conftest.$ac_ext >&5
8257
8258         cf_cv_find_linkage_utf8=no
8259         LIBS="$cf_save_LIBS"
8260
8261     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8262
8263 echo "${as_me:-configure}:8263: testing find linkage for utf8 library ..." 1>&5
8264
8265 echo "${as_me:-configure}:8265: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8266
8267     cf_save_CPPFLAGS="$CPPFLAGS"
8268     cf_test_CPPFLAGS="$CPPFLAGS"
8269
8270 cf_search=
8271
8272 # collect the current set of include-directories from compiler flags
8273 cf_header_path_list=""
8274 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8275         for cf_header_path in $CPPFLAGS $CFLAGS
8276         do
8277                 case $cf_header_path in #(vi
8278                 -I*)
8279                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280
8281 test "$cf_header_path" != "NONE" && \
8282 test -d "$cf_header_path" && \
8283  {
8284         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8285         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8286         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8287         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8288         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8289         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8290 }
8291
8292                         cf_header_path_list="$cf_header_path_list $cf_search"
8293                         ;;
8294                 esac
8295         done
8296 fi
8297
8298 # add the variations for the package we are looking for
8299
8300 cf_search=
8301
8302 test "/usr" != "$prefix" && \
8303 test -d "/usr" && \
8304 (test $prefix = NONE || test "/usr" != "$prefix") && {
8305         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8306         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8307         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8308         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8309         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8310         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8311 }
8312
8313 test "$prefix" != "NONE" && \
8314 test -d "$prefix" && \
8315  {
8316         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8317         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8318         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8319         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8320         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8321         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8322 }
8323
8324 test "/usr/local" != "$prefix" && \
8325 test -d "/usr/local" && \
8326 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8327         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8328         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8329         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8330         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8331         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8332         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8333 }
8334
8335 test "/opt" != "$prefix" && \
8336 test -d "/opt" && \
8337 (test $prefix = NONE || test "/opt" != "$prefix") && {
8338         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8339         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8340         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8341         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8342         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8343         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8344 }
8345
8346 test "$HOME" != "$prefix" && \
8347 test -d "$HOME" && \
8348 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8349         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8350         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8351         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8352         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8353         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8354         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8355 }
8356
8357 test "$includedir" != NONE && \
8358 test "$includedir" != "/usr/include" && \
8359 test -d "$includedir" && {
8360         test -d $includedir &&    cf_search="$cf_search $includedir"
8361         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8362 }
8363
8364 test "$oldincludedir" != NONE && \
8365 test "$oldincludedir" != "/usr/include" && \
8366 test -d "$oldincludedir" && {
8367         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8368         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8369 }
8370
8371 cf_search="$cf_search $cf_header_path_list"
8372
8373     for cf_cv_header_path_utf8 in $cf_search
8374     do
8375       if test -d $cf_cv_header_path_utf8 ; then
8376         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8377
8378 echo "${as_me:-configure}:8378: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8379
8380         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8381         cat >conftest.$ac_ext <<_ACEOF
8382 #line 8382 "configure"
8383 #include "confdefs.h"
8384
8385 #include <libutf8.h>
8386 int
8387 main ()
8388 {
8389 putwc(0,0);
8390   ;
8391   return 0;
8392 }
8393 _ACEOF
8394 rm -f conftest.$ac_objext
8395 if { (eval echo "$as_me:8395: \"$ac_compile\"") >&5
8396   (eval $ac_compile) 2>&5
8397   ac_status=$?
8398   echo "$as_me:8398: \$? = $ac_status" >&5
8399   (exit $ac_status); } &&
8400          { ac_try='test -s conftest.$ac_objext'
8401   { (eval echo "$as_me:8401: \"$ac_try\"") >&5
8402   (eval $ac_try) 2>&5
8403   ac_status=$?
8404   echo "$as_me:8404: \$? = $ac_status" >&5
8405   (exit $ac_status); }; }; then
8406
8407             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8408
8409 echo "${as_me:-configure}:8409: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8410
8411             cf_cv_find_linkage_utf8=maybe
8412             cf_test_CPPFLAGS="$CPPFLAGS"
8413             break
8414 else
8415   echo "$as_me: failed program was:" >&5
8416 cat conftest.$ac_ext >&5
8417
8418             CPPFLAGS="$cf_save_CPPFLAGS"
8419
8420 fi
8421 rm -f conftest.$ac_objext conftest.$ac_ext
8422       fi
8423     done
8424
8425     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8426
8427 echo "${as_me:-configure}:8427: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8428
8429       cf_save_LIBS="$LIBS"
8430       cf_save_LDFLAGS="$LDFLAGS"
8431
8432       if test "$cf_cv_find_linkage_utf8" != yes ; then
8433
8434 cf_search=
8435 cf_library_path_list=""
8436 if test -n "${LDFLAGS}${LIBS}" ; then
8437         for cf_library_path in $LDFLAGS $LIBS
8438         do
8439                 case $cf_library_path in #(vi
8440                 -L*)
8441                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8442
8443 test "$cf_library_path" != "NONE" && \
8444 test -d "$cf_library_path" && \
8445  {
8446         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8447         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8448         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8449         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8450         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8451         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8452 }
8453
8454                         cf_library_path_list="$cf_library_path_list $cf_search"
8455                         ;;
8456                 esac
8457         done
8458 fi
8459
8460 cf_search=
8461
8462 test "/usr" != "$prefix" && \
8463 test -d "/usr" && \
8464 (test $prefix = NONE || test "/usr" != "$prefix") && {
8465         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8466         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8467         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8468         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8469         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8470         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8471 }
8472
8473 test "$prefix" != "NONE" && \
8474 test -d "$prefix" && \
8475  {
8476         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8477         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8478         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8479         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8480         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8481         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8482 }
8483
8484 test "/usr/local" != "$prefix" && \
8485 test -d "/usr/local" && \
8486 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8487         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8488         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8489         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8490         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8491         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8492         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8493 }
8494
8495 test "/opt" != "$prefix" && \
8496 test -d "/opt" && \
8497 (test $prefix = NONE || test "/opt" != "$prefix") && {
8498         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8499         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8500         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8501         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8502         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8503         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8504 }
8505
8506 test "$HOME" != "$prefix" && \
8507 test -d "$HOME" && \
8508 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8509         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8510         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8511         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8512         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8513         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8514         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8515 }
8516
8517 cf_search="$cf_library_path_list $cf_search"
8518
8519         for cf_cv_library_path_utf8 in $cf_search
8520         do
8521           if test -d $cf_cv_library_path_utf8 ; then
8522             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8523
8524 echo "${as_me:-configure}:8524: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8525
8526             CPPFLAGS="$cf_test_CPPFLAGS"
8527             LIBS="-lutf8  $cf_save_LIBS"
8528             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8529             cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 #include <libutf8.h>
8534 int
8535 main ()
8536 {
8537 putwc(0,0);
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554
8555                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8556
8557 echo "${as_me:-configure}:8557: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8558
8559                 cf_cv_find_linkage_utf8=yes
8560                 cf_cv_library_file_utf8="-lutf8"
8561                 break
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565
8566                 CPPFLAGS="$cf_save_CPPFLAGS"
8567                 LIBS="$cf_save_LIBS"
8568                 LDFLAGS="$cf_save_LDFLAGS"
8569
8570 fi
8571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8572           fi
8573         done
8574         CPPFLAGS="$cf_save_CPPFLAGS"
8575         LDFLAGS="$cf_save_LDFLAGS"
8576       fi
8577
8578     else
8579       cf_cv_find_linkage_utf8=no
8580     fi
8581
8582 fi
8583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8584
8585 fi
8586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8587
8588 LIBS="$cf_save_LIBS"
8589
8590 if test "$cf_cv_find_linkage_utf8" = yes ; then
8591 cf_cv_utf8_lib=add-on
8592 else
8593 cf_cv_utf8_lib=no
8594 fi
8595
8596 fi
8597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8598 fi
8599 echo "$as_me:8599: result: $cf_cv_utf8_lib" >&5
8600 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8601
8602 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8603 # ncurses/ncursesw:
8604 if test "$cf_cv_utf8_lib" = "add-on" ; then
8605         cat >>confdefs.h <<\EOF
8606 #define HAVE_LIBUTF8_H 1
8607 EOF
8608
8609 if test -n "$cf_cv_header_path_utf8" ; then
8610   for cf_add_incdir in $cf_cv_header_path_utf8
8611   do
8612         while test $cf_add_incdir != /usr/include
8613         do
8614           if test -d $cf_add_incdir
8615           then
8616                 cf_have_incdir=no
8617                 if test -n "$CFLAGS$CPPFLAGS" ; then
8618                   # a loop is needed to ensure we can add subdirs of existing dirs
8619                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8620                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8621                           cf_have_incdir=yes; break
8622                         fi
8623                   done
8624                 fi
8625
8626                 if test "$cf_have_incdir" = no ; then
8627                   if test "$cf_add_incdir" = /usr/local/include ; then
8628                         if test "$GCC" = yes
8629                         then
8630                           cf_save_CPPFLAGS=$CPPFLAGS
8631                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8632                           cat >conftest.$ac_ext <<_ACEOF
8633 #line 8633 "configure"
8634 #include "confdefs.h"
8635 #include <stdio.h>
8636 int
8637 main ()
8638 {
8639 printf("Hello")
8640   ;
8641   return 0;
8642 }
8643 _ACEOF
8644 rm -f conftest.$ac_objext
8645 if { (eval echo "$as_me:8645: \"$ac_compile\"") >&5
8646   (eval $ac_compile) 2>&5
8647   ac_status=$?
8648   echo "$as_me:8648: \$? = $ac_status" >&5
8649   (exit $ac_status); } &&
8650          { ac_try='test -s conftest.$ac_objext'
8651   { (eval echo "$as_me:8651: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:8654: \$? = $ac_status" >&5
8655   (exit $ac_status); }; }; then
8656   :
8657 else
8658   echo "$as_me: failed program was:" >&5
8659 cat conftest.$ac_ext >&5
8660 cf_have_incdir=yes
8661 fi
8662 rm -f conftest.$ac_objext conftest.$ac_ext
8663                           CPPFLAGS=$cf_save_CPPFLAGS
8664                         fi
8665                   fi
8666                 fi
8667
8668                 if test "$cf_have_incdir" = no ; then
8669                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8670
8671 echo "${as_me:-configure}:8671: testing adding $cf_add_incdir to include-path ..." 1>&5
8672
8673                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8674
8675                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8676                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8677                   cf_add_incdir="$cf_top_incdir"
8678                 else
8679                   break
8680                 fi
8681           fi
8682         done
8683   done
8684 fi
8685
8686 if test -n "$cf_cv_library_path_utf8" ; then
8687   for cf_add_libdir in $cf_cv_library_path_utf8
8688   do
8689     if test $cf_add_libdir = /usr/lib ; then
8690       :
8691     elif test -d $cf_add_libdir
8692     then
8693       cf_have_libdir=no
8694       if test -n "$LDFLAGS$LIBS" ; then
8695         # a loop is needed to ensure we can add subdirs of existing dirs
8696         for cf_test_libdir in $LDFLAGS $LIBS ; do
8697           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8698             cf_have_libdir=yes; break
8699           fi
8700         done
8701       fi
8702       if test "$cf_have_libdir" = no ; then
8703         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8704
8705 echo "${as_me:-configure}:8705: testing adding $cf_add_libdir to library-path ..." 1>&5
8706
8707         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8708       fi
8709     fi
8710   done
8711 fi
8712
8713         LIBS="$cf_cv_library_file_utf8 $LIBS"
8714 fi
8715
8716                 if test "$cf_cv_utf8_lib" != no ; then
8717                         NCURSES_LIBUTF8=1
8718                 fi
8719         fi
8720
8721 # This is needed on Tru64 5.0 to declare mbstate_t
8722 echo "$as_me:8722: checking if we must include wchar.h to declare mbstate_t" >&5
8723 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8724 if test "${cf_cv_mbstate_t+set}" = set; then
8725   echo $ECHO_N "(cached) $ECHO_C" >&6
8726 else
8727
8728 cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731
8732 #include <stdlib.h>
8733 #include <stdarg.h>
8734 #include <stdio.h>
8735 #ifdef HAVE_LIBUTF8_H
8736 #include <libutf8.h>
8737 #endif
8738 int
8739 main ()
8740 {
8741 mbstate_t state
8742   ;
8743   return 0;
8744 }
8745 _ACEOF
8746 rm -f conftest.$ac_objext
8747 if { (eval echo "$as_me:8747: \"$ac_compile\"") >&5
8748   (eval $ac_compile) 2>&5
8749   ac_status=$?
8750   echo "$as_me:8750: \$? = $ac_status" >&5
8751   (exit $ac_status); } &&
8752          { ac_try='test -s conftest.$ac_objext'
8753   { (eval echo "$as_me:8753: \"$ac_try\"") >&5
8754   (eval $ac_try) 2>&5
8755   ac_status=$?
8756   echo "$as_me:8756: \$? = $ac_status" >&5
8757   (exit $ac_status); }; }; then
8758   cf_cv_mbstate_t=no
8759 else
8760   echo "$as_me: failed program was:" >&5
8761 cat conftest.$ac_ext >&5
8762 cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765
8766 #include <stdlib.h>
8767 #include <stdarg.h>
8768 #include <stdio.h>
8769 #include <wchar.h>
8770 #ifdef HAVE_LIBUTF8_H
8771 #include <libutf8.h>
8772 #endif
8773 int
8774 main ()
8775 {
8776 mbstate_t value
8777   ;
8778   return 0;
8779 }
8780 _ACEOF
8781 rm -f conftest.$ac_objext
8782 if { (eval echo "$as_me:8782: \"$ac_compile\"") >&5
8783   (eval $ac_compile) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); } &&
8787          { ac_try='test -s conftest.$ac_objext'
8788   { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8789   (eval $ac_try) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); }; }; then
8793   cf_cv_mbstate_t=yes
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8797 cf_cv_mbstate_t=unknown
8798 fi
8799 rm -f conftest.$ac_objext conftest.$ac_ext
8800 fi
8801 rm -f conftest.$ac_objext conftest.$ac_ext
8802 fi
8803 echo "$as_me:8803: result: $cf_cv_mbstate_t" >&5
8804 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8805
8806 if test "$cf_cv_mbstate_t" = yes ; then
8807         cat >>confdefs.h <<\EOF
8808 #define NEED_WCHAR_H 1
8809 EOF
8810
8811         NEED_WCHAR_H=1
8812 fi
8813
8814 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8815 if test "$cf_cv_mbstate_t" = unknown ; then
8816         NCURSES_MBSTATE_T=1
8817 fi
8818
8819 # This is needed on Tru64 5.0 to declare wchar_t
8820 echo "$as_me:8820: checking if we must include wchar.h to declare wchar_t" >&5
8821 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8822 if test "${cf_cv_wchar_t+set}" = set; then
8823   echo $ECHO_N "(cached) $ECHO_C" >&6
8824 else
8825
8826 cat >conftest.$ac_ext <<_ACEOF
8827 #line 8827 "configure"
8828 #include "confdefs.h"
8829
8830 #include <stdlib.h>
8831 #include <stdarg.h>
8832 #include <stdio.h>
8833 #ifdef HAVE_LIBUTF8_H
8834 #include <libutf8.h>
8835 #endif
8836 int
8837 main ()
8838 {
8839 wchar_t state
8840   ;
8841   return 0;
8842 }
8843 _ACEOF
8844 rm -f conftest.$ac_objext
8845 if { (eval echo "$as_me:8845: \"$ac_compile\"") >&5
8846   (eval $ac_compile) 2>&5
8847   ac_status=$?
8848   echo "$as_me:8848: \$? = $ac_status" >&5
8849   (exit $ac_status); } &&
8850          { ac_try='test -s conftest.$ac_objext'
8851   { (eval echo "$as_me:8851: \"$ac_try\"") >&5
8852   (eval $ac_try) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); }; }; then
8856   cf_cv_wchar_t=no
8857 else
8858   echo "$as_me: failed program was:" >&5
8859 cat conftest.$ac_ext >&5
8860 cat >conftest.$ac_ext <<_ACEOF
8861 #line 8861 "configure"
8862 #include "confdefs.h"
8863
8864 #include <stdlib.h>
8865 #include <stdarg.h>
8866 #include <stdio.h>
8867 #include <wchar.h>
8868 #ifdef HAVE_LIBUTF8_H
8869 #include <libutf8.h>
8870 #endif
8871 int
8872 main ()
8873 {
8874 wchar_t value
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   cf_cv_wchar_t=yes
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 cat conftest.$ac_ext >&5
8895 cf_cv_wchar_t=unknown
8896 fi
8897 rm -f conftest.$ac_objext conftest.$ac_ext
8898 fi
8899 rm -f conftest.$ac_objext conftest.$ac_ext
8900 fi
8901 echo "$as_me:8901: result: $cf_cv_wchar_t" >&5
8902 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8903
8904 if test "$cf_cv_wchar_t" = yes ; then
8905         cat >>confdefs.h <<\EOF
8906 #define NEED_WCHAR_H 1
8907 EOF
8908
8909         NEED_WCHAR_H=1
8910 fi
8911
8912 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8913 if test "$cf_cv_wchar_t" = unknown ; then
8914         NCURSES_WCHAR_T=1
8915 fi
8916
8917 # if we find wchar_t in either place, use substitution to provide a fallback.
8918 if test "$cf_cv_wchar_t" != unknown ; then
8919         NCURSES_OK_WCHAR_T=1
8920 fi
8921
8922 # This is needed on Tru64 5.0 to declare wint_t
8923 echo "$as_me:8923: checking if we must include wchar.h to declare wint_t" >&5
8924 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8925 if test "${cf_cv_wint_t+set}" = set; then
8926   echo $ECHO_N "(cached) $ECHO_C" >&6
8927 else
8928
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932
8933 #include <stdlib.h>
8934 #include <stdarg.h>
8935 #include <stdio.h>
8936 #ifdef HAVE_LIBUTF8_H
8937 #include <libutf8.h>
8938 #endif
8939 int
8940 main ()
8941 {
8942 wint_t state
8943   ;
8944   return 0;
8945 }
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:8948: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   cf_cv_wint_t=no
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963 cat >conftest.$ac_ext <<_ACEOF
8964 #line 8964 "configure"
8965 #include "confdefs.h"
8966
8967 #include <stdlib.h>
8968 #include <stdarg.h>
8969 #include <stdio.h>
8970 #include <wchar.h>
8971 #ifdef HAVE_LIBUTF8_H
8972 #include <libutf8.h>
8973 #endif
8974 int
8975 main ()
8976 {
8977 wint_t value
8978   ;
8979   return 0;
8980 }
8981 _ACEOF
8982 rm -f conftest.$ac_objext
8983 if { (eval echo "$as_me:8983: \"$ac_compile\"") >&5
8984   (eval $ac_compile) 2>&5
8985   ac_status=$?
8986   echo "$as_me:8986: \$? = $ac_status" >&5
8987   (exit $ac_status); } &&
8988          { ac_try='test -s conftest.$ac_objext'
8989   { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8990   (eval $ac_try) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit $ac_status); }; }; then
8994   cf_cv_wint_t=yes
8995 else
8996   echo "$as_me: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
8998 cf_cv_wint_t=unknown
8999 fi
9000 rm -f conftest.$ac_objext conftest.$ac_ext
9001 fi
9002 rm -f conftest.$ac_objext conftest.$ac_ext
9003 fi
9004 echo "$as_me:9004: result: $cf_cv_wint_t" >&5
9005 echo "${ECHO_T}$cf_cv_wint_t" >&6
9006
9007 if test "$cf_cv_wint_t" = yes ; then
9008         cat >>confdefs.h <<\EOF
9009 #define NEED_WCHAR_H 1
9010 EOF
9011
9012         NEED_WCHAR_H=1
9013 fi
9014
9015 # if we do not find wint_t in either place, use substitution to provide a fallback.
9016 if test "$cf_cv_wint_t" = unknown ; then
9017         NCURSES_WINT_T=1
9018 fi
9019
9020 # if we find wint_t in either place, use substitution to provide a fallback.
9021 if test "$cf_cv_wint_t" != unknown ; then
9022         NCURSES_OK_WINT_T=1
9023 fi
9024
9025         if test "$NCURSES_MBSTATE_T" != 0; then
9026                 cat >>confdefs.h <<\EOF
9027 #define NEED_MBSTATE_T_DEF 1
9028 EOF
9029
9030         fi
9031 fi
9032
9033 ###   use option --disable-lp64 to allow long chtype
9034 case $cf_cv_abi_version in
9035 [345]*)
9036         default_with_lp64=no
9037         ;;
9038 *)
9039         default_with_lp64=yes
9040         ;;
9041 esac
9042
9043 echo "$as_me:9043: checking whether to enable _LP64 definition in curses.h" >&5
9044 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9045
9046 # Check whether --enable-lp64 or --disable-lp64 was given.
9047 if test "${enable_lp64+set}" = set; then
9048   enableval="$enable_lp64"
9049   with_lp64=$enableval
9050 else
9051   with_lp64=$default_with_lp64
9052 fi;
9053 echo "$as_me:9053: result: $with_lp64" >&5
9054 echo "${ECHO_T}$with_lp64" >&6
9055
9056 if test "$with_lp64" = yes ; then
9057         cf_cv_enable_lp64=1
9058 else
9059         cf_cv_enable_lp64=0
9060 fi
9061
9062 # Check whether --enable-largefile or --disable-largefile was given.
9063 if test "${enable_largefile+set}" = set; then
9064   enableval="$enable_largefile"
9065
9066 fi;
9067 if test "$enable_largefile" != no; then
9068
9069   echo "$as_me:9069: checking for special C compiler options needed for large files" >&5
9070 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9071 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9072   echo $ECHO_N "(cached) $ECHO_C" >&6
9073 else
9074   ac_cv_sys_largefile_CC=no
9075      if test "$GCC" != yes; then
9076        ac_save_CC=$CC
9077        while :; do
9078          # IRIX 6.2 and later do not support large files by default,
9079          # so use the C compiler's -n32 option if that helps.
9080          cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083 #include <sys/types.h>
9084  /* Check that off_t can represent 2**63 - 1 correctly.
9085     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9086     since some C++ compilers masquerading as C compilers
9087     incorrectly reject 9223372036854775807.  */
9088 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9089   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9090                        && LARGE_OFF_T % 2147483647 == 1)
9091                       ? 1 : -1];
9092 int
9093 main ()
9094 {
9095
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100          rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102   (eval $ac_compile) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest.$ac_objext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112   break
9113 else
9114   echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9116 fi
9117 rm -f conftest.$ac_objext
9118          CC="$CC -n32"
9119          rm -f conftest.$ac_objext
9120 if { (eval echo "$as_me:9120: \"$ac_compile\"") >&5
9121   (eval $ac_compile) 2>&5
9122   ac_status=$?
9123   echo "$as_me:9123: \$? = $ac_status" >&5
9124   (exit $ac_status); } &&
9125          { ac_try='test -s conftest.$ac_objext'
9126   { (eval echo "$as_me:9126: \"$ac_try\"") >&5
9127   (eval $ac_try) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); }; }; then
9131   ac_cv_sys_largefile_CC=' -n32'; break
9132 else
9133   echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9135 fi
9136 rm -f conftest.$ac_objext
9137          break
9138        done
9139        CC=$ac_save_CC
9140        rm -f conftest.$ac_ext
9141     fi
9142 fi
9143 echo "$as_me:9143: result: $ac_cv_sys_largefile_CC" >&5
9144 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9145   if test "$ac_cv_sys_largefile_CC" != no; then
9146     CC=$CC$ac_cv_sys_largefile_CC
9147   fi
9148
9149   echo "$as_me:9149: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9150 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9151 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9152   echo $ECHO_N "(cached) $ECHO_C" >&6
9153 else
9154   while :; do
9155   ac_cv_sys_file_offset_bits=no
9156   cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159 #include <sys/types.h>
9160  /* Check that off_t can represent 2**63 - 1 correctly.
9161     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9162     since some C++ compilers masquerading as C compilers
9163     incorrectly reject 9223372036854775807.  */
9164 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9165   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9166                        && LARGE_OFF_T % 2147483647 == 1)
9167                       ? 1 : -1];
9168 int
9169 main ()
9170 {
9171
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 rm -f conftest.$ac_objext
9177 if { (eval echo "$as_me:9177: \"$ac_compile\"") >&5
9178   (eval $ac_compile) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit $ac_status); } &&
9182          { ac_try='test -s conftest.$ac_objext'
9183   { (eval echo "$as_me:9183: \"$ac_try\"") >&5
9184   (eval $ac_try) 2>&5
9185   ac_status=$?
9186   echo "$as_me:9186: \$? = $ac_status" >&5
9187   (exit $ac_status); }; }; then
9188   break
9189 else
9190   echo "$as_me: failed program was:" >&5
9191 cat conftest.$ac_ext >&5
9192 fi
9193 rm -f conftest.$ac_objext conftest.$ac_ext
9194   cat >conftest.$ac_ext <<_ACEOF
9195 #line 9195 "configure"
9196 #include "confdefs.h"
9197 #define _FILE_OFFSET_BITS 64
9198 #include <sys/types.h>
9199  /* Check that off_t can represent 2**63 - 1 correctly.
9200     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9201     since some C++ compilers masquerading as C compilers
9202     incorrectly reject 9223372036854775807.  */
9203 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9204   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9205                        && LARGE_OFF_T % 2147483647 == 1)
9206                       ? 1 : -1];
9207 int
9208 main ()
9209 {
9210
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 rm -f conftest.$ac_objext
9216 if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
9217   (eval $ac_compile) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); } &&
9221          { ac_try='test -s conftest.$ac_objext'
9222   { (eval echo "$as_me:9222: \"$ac_try\"") >&5
9223   (eval $ac_try) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); }; }; then
9227   ac_cv_sys_file_offset_bits=64; break
9228 else
9229   echo "$as_me: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233   break
9234 done
9235 fi
9236 echo "$as_me:9236: result: $ac_cv_sys_file_offset_bits" >&5
9237 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9238 if test "$ac_cv_sys_file_offset_bits" != no; then
9239
9240 cat >>confdefs.h <<EOF
9241 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9242 EOF
9243
9244 fi
9245 rm -rf conftest*
9246   echo "$as_me:9246: checking for _LARGE_FILES value needed for large files" >&5
9247 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9248 if test "${ac_cv_sys_large_files+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251   while :; do
9252   ac_cv_sys_large_files=no
9253   cat >conftest.$ac_ext <<_ACEOF
9254 #line 9254 "configure"
9255 #include "confdefs.h"
9256 #include <sys/types.h>
9257  /* Check that off_t can represent 2**63 - 1 correctly.
9258     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9259     since some C++ compilers masquerading as C compilers
9260     incorrectly reject 9223372036854775807.  */
9261 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9262   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9263                        && LARGE_OFF_T % 2147483647 == 1)
9264                       ? 1 : -1];
9265 int
9266 main ()
9267 {
9268
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   break
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 fi
9290 rm -f conftest.$ac_objext conftest.$ac_ext
9291   cat >conftest.$ac_ext <<_ACEOF
9292 #line 9292 "configure"
9293 #include "confdefs.h"
9294 #define _LARGE_FILES 1
9295 #include <sys/types.h>
9296  /* Check that off_t can represent 2**63 - 1 correctly.
9297     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9298     since some C++ compilers masquerading as C compilers
9299     incorrectly reject 9223372036854775807.  */
9300 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9301   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9302                        && LARGE_OFF_T % 2147483647 == 1)
9303                       ? 1 : -1];
9304 int
9305 main ()
9306 {
9307
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   ac_cv_sys_large_files=1; break
9325 else
9326   echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 fi
9329 rm -f conftest.$ac_objext conftest.$ac_ext
9330   break
9331 done
9332 fi
9333 echo "$as_me:9333: result: $ac_cv_sys_large_files" >&5
9334 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9335 if test "$ac_cv_sys_large_files" != no; then
9336
9337 cat >>confdefs.h <<EOF
9338 #define _LARGE_FILES $ac_cv_sys_large_files
9339 EOF
9340
9341 fi
9342 rm -rf conftest*
9343 fi
9344
9345     if test "$enable_largefile" != no ; then
9346         echo "$as_me:9346: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9347 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9348 if test "${ac_cv_sys_largefile_source+set}" = set; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351   while :; do
9352   ac_cv_sys_largefile_source=no
9353   cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356 #include <stdio.h>
9357 int
9358 main ()
9359 {
9360 return !fseeko;
9361   ;
9362   return 0;
9363 }
9364 _ACEOF
9365 rm -f conftest.$ac_objext
9366 if { (eval echo "$as_me:9366: \"$ac_compile\"") >&5
9367   (eval $ac_compile) 2>&5
9368   ac_status=$?
9369   echo "$as_me:9369: \$? = $ac_status" >&5
9370   (exit $ac_status); } &&
9371          { ac_try='test -s conftest.$ac_objext'
9372   { (eval echo "$as_me:9372: \"$ac_try\"") >&5
9373   (eval $ac_try) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); }; }; then
9377   break
9378 else
9379   echo "$as_me: failed program was:" >&5
9380 cat conftest.$ac_ext >&5
9381 fi
9382 rm -f conftest.$ac_objext conftest.$ac_ext
9383   cat >conftest.$ac_ext <<_ACEOF
9384 #line 9384 "configure"
9385 #include "confdefs.h"
9386 #define _LARGEFILE_SOURCE 1
9387 #include <stdio.h>
9388 int
9389 main ()
9390 {
9391 return !fseeko;
9392   ;
9393   return 0;
9394 }
9395 _ACEOF
9396 rm -f conftest.$ac_objext
9397 if { (eval echo "$as_me:9397: \"$ac_compile\"") >&5
9398   (eval $ac_compile) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); } &&
9402          { ac_try='test -s conftest.$ac_objext'
9403   { (eval echo "$as_me:9403: \"$ac_try\"") >&5
9404   (eval $ac_try) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); }; }; then
9408   ac_cv_sys_largefile_source=1; break
9409 else
9410   echo "$as_me: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9412 fi
9413 rm -f conftest.$ac_objext conftest.$ac_ext
9414   break
9415 done
9416 fi
9417 echo "$as_me:9417: result: $ac_cv_sys_largefile_source" >&5
9418 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9419 if test "$ac_cv_sys_largefile_source" != no; then
9420
9421 cat >>confdefs.h <<EOF
9422 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9423 EOF
9424
9425 fi
9426 rm -rf conftest*
9427
9428 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9429 # in glibc 2.1.3, but that breaks too many other things.
9430 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9431 echo "$as_me:9431: checking for fseeko" >&5
9432 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9433 if test "${ac_cv_func_fseeko+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436   cat >conftest.$ac_ext <<_ACEOF
9437 #line 9437 "configure"
9438 #include "confdefs.h"
9439 #include <stdio.h>
9440 int
9441 main ()
9442 {
9443 return fseeko && fseeko (stdin, 0, 0);
9444   ;
9445   return 0;
9446 }
9447 _ACEOF
9448 rm -f conftest.$ac_objext conftest$ac_exeext
9449 if { (eval echo "$as_me:9449: \"$ac_link\"") >&5
9450   (eval $ac_link) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); } &&
9454          { ac_try='test -s conftest$ac_exeext'
9455   { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9456   (eval $ac_try) 2>&5
9457   ac_status=$?
9458   echo "$as_me:9458: \$? = $ac_status" >&5
9459   (exit $ac_status); }; }; then
9460   ac_cv_func_fseeko=yes
9461 else
9462   echo "$as_me: failed program was:" >&5
9463 cat conftest.$ac_ext >&5
9464 ac_cv_func_fseeko=no
9465 fi
9466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9467 fi
9468 echo "$as_me:9468: result: $ac_cv_func_fseeko" >&5
9469 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9470 if test $ac_cv_func_fseeko = yes; then
9471
9472 cat >>confdefs.h <<\EOF
9473 #define HAVE_FSEEKO 1
9474 EOF
9475
9476 fi
9477
9478         # Normally we would collect these definitions in the config.h,
9479         # but (like _XOPEN_SOURCE), some environments rely on having these
9480         # defined before any of the system headers are included.  Another
9481         # case comes up with C++, e.g., on AIX the compiler compiles the
9482         # header files by themselves before looking at the body files it is
9483         # told to compile.  For ncurses, those header files do not include
9484         # the config.h
9485         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9486         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9487         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9488
9489         echo "$as_me:9489: checking whether to use struct dirent64" >&5
9490 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9491 if test "${cf_cv_struct_dirent64+set}" = set; then
9492   echo $ECHO_N "(cached) $ECHO_C" >&6
9493 else
9494
9495                 cat >conftest.$ac_ext <<_ACEOF
9496 #line 9496 "configure"
9497 #include "confdefs.h"
9498
9499 #include <sys/types.h>
9500 #include <dirent.h>
9501
9502 int
9503 main ()
9504 {
9505
9506                 /* if transitional largefile support is setup, this is true */
9507                 extern struct dirent64 * readdir(DIR *);
9508                 struct dirent64 *x = readdir((DIR *)0);
9509                 struct dirent *y = readdir((DIR *)0);
9510                 int z = x - y;
9511
9512   ;
9513   return 0;
9514 }
9515 _ACEOF
9516 rm -f conftest.$ac_objext
9517 if { (eval echo "$as_me:9517: \"$ac_compile\"") >&5
9518   (eval $ac_compile) 2>&5
9519   ac_status=$?
9520   echo "$as_me:9520: \$? = $ac_status" >&5
9521   (exit $ac_status); } &&
9522          { ac_try='test -s conftest.$ac_objext'
9523   { (eval echo "$as_me:9523: \"$ac_try\"") >&5
9524   (eval $ac_try) 2>&5
9525   ac_status=$?
9526   echo "$as_me:9526: \$? = $ac_status" >&5
9527   (exit $ac_status); }; }; then
9528   cf_cv_struct_dirent64=yes
9529 else
9530   echo "$as_me: failed program was:" >&5
9531 cat conftest.$ac_ext >&5
9532 cf_cv_struct_dirent64=no
9533 fi
9534 rm -f conftest.$ac_objext conftest.$ac_ext
9535
9536 fi
9537 echo "$as_me:9537: result: $cf_cv_struct_dirent64" >&5
9538 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9539         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9540 #define HAVE_STRUCT_DIRENT64 1
9541 EOF
9542
9543     fi
9544
9545 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9546 echo "$as_me:9546: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9547 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9548
9549 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9550 if test "${enable_tparm_varargs+set}" = set; then
9551   enableval="$enable_tparm_varargs"
9552   with_tparm_varargs=$enableval
9553 else
9554   with_tparm_varargs=yes
9555 fi;
9556 echo "$as_me:9556: result: $with_tparm_varargs" >&5
9557 echo "${ECHO_T}$with_tparm_varargs" >&6
9558 NCURSES_TPARM_VARARGS=0
9559 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9560
9561 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9562 if test "$with_ticlib" != no ; then
9563 echo "$as_me:9563: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9564 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9565
9566 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9567 if test "${enable_tic_depends+set}" = set; then
9568   enableval="$enable_tic_depends"
9569   with_tic_depends=$enableval
9570 else
9571   with_tic_depends=yes
9572 fi;
9573 echo "$as_me:9573: result: $with_tic_depends" >&5
9574 echo "${ECHO_T}$with_tic_depends" >&6
9575 else
9576         with_tic_depends=no
9577 fi
9578
9579 ###   use option --with-bool to override bool's type
9580 echo "$as_me:9580: checking for type of bool" >&5
9581 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9582
9583 # Check whether --with-bool or --without-bool was given.
9584 if test "${with_bool+set}" = set; then
9585   withval="$with_bool"
9586   NCURSES_BOOL="$withval"
9587 else
9588   NCURSES_BOOL=auto
9589 fi;
9590 echo "$as_me:9590: result: $NCURSES_BOOL" >&5
9591 echo "${ECHO_T}$NCURSES_BOOL" >&6
9592
9593 echo "$as_me:9593: checking for alternate terminal capabilities file" >&5
9594 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9595
9596 # Check whether --with-caps or --without-caps was given.
9597 if test "${with_caps+set}" = set; then
9598   withval="$with_caps"
9599   TERMINFO_CAPS=Caps.$withval
9600 else
9601   TERMINFO_CAPS=Caps
9602 fi;
9603 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9604 echo "$as_me:9604: result: $TERMINFO_CAPS" >&5
9605 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9606
9607 ###   use option --with-chtype to override chtype's type
9608 echo "$as_me:9608: checking for type of chtype" >&5
9609 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9610
9611 # Check whether --with-chtype or --without-chtype was given.
9612 if test "${with_chtype+set}" = set; then
9613   withval="$with_chtype"
9614   NCURSES_CHTYPE="$withval"
9615 else
9616   NCURSES_CHTYPE=auto
9617 fi;
9618 echo "$as_me:9618: result: $NCURSES_CHTYPE" >&5
9619 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9620
9621 ###   use option --with-ospeed to override ospeed's type
9622 echo "$as_me:9622: checking for type of ospeed" >&5
9623 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9624
9625 # Check whether --with-ospeed or --without-ospeed was given.
9626 if test "${with_ospeed+set}" = set; then
9627   withval="$with_ospeed"
9628   NCURSES_OSPEED="$withval"
9629 else
9630   NCURSES_OSPEED=short
9631 fi;
9632 echo "$as_me:9632: result: $NCURSES_OSPEED" >&5
9633 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9634
9635 ###   use option --with-mmask-t to override mmask_t's type
9636 echo "$as_me:9636: checking for type of mmask_t" >&5
9637 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9638
9639 # Check whether --with-mmask-t or --without-mmask-t was given.
9640 if test "${with_mmask_t+set}" = set; then
9641   withval="$with_mmask_t"
9642   NCURSES_MMASK_T="$withval"
9643 else
9644   NCURSES_MMASK_T=auto
9645 fi;
9646 echo "$as_me:9646: result: $NCURSES_MMASK_T" >&5
9647 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9648
9649 ###   use option --with-ccharw-max to override CCHARW_MAX size
9650 echo "$as_me:9650: checking for size CCHARW_MAX" >&5
9651 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9652
9653 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9654 if test "${with_ccharw_max+set}" = set; then
9655   withval="$with_ccharw_max"
9656   NCURSES_CCHARW_MAX="$withval"
9657 else
9658   NCURSES_CCHARW_MAX=5
9659 fi;
9660 echo "$as_me:9660: result: $NCURSES_CCHARW_MAX" >&5
9661 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9662
9663 ### Enable compiling-in rcs id's
9664 echo "$as_me:9664: checking if RCS identifiers should be compiled-in" >&5
9665 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9666
9667 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9668 if test "${with_rcs_ids+set}" = set; then
9669   withval="$with_rcs_ids"
9670   with_rcs_ids=$withval
9671 else
9672   with_rcs_ids=no
9673 fi;
9674 echo "$as_me:9674: result: $with_rcs_ids" >&5
9675 echo "${ECHO_T}$with_rcs_ids" >&6
9676 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9677 #define USE_RCS_IDS 1
9678 EOF
9679
9680 ###############################################################################
9681
9682 echo "$as_me:9682: checking format of man-pages" >&5
9683 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9684
9685 # Check whether --with-manpage-format or --without-manpage-format was given.
9686 if test "${with_manpage_format+set}" = set; then
9687   withval="$with_manpage_format"
9688   MANPAGE_FORMAT=$withval
9689 else
9690   MANPAGE_FORMAT=unknown
9691 fi;
9692
9693 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9694 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9695
9696 cf_unknown=
9697
9698 case $MANPAGE_FORMAT in
9699 unknown)
9700   if test -z "$MANPATH" ; then
9701     MANPATH="/usr/man:/usr/share/man"
9702   fi
9703
9704   # look for the 'date' man-page (it's most likely to be installed!)
9705   MANPAGE_FORMAT=
9706   cf_preform=no
9707   cf_catonly=yes
9708   cf_example=date
9709
9710   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9711   for cf_dir in $MANPATH; do
9712     test -z "$cf_dir" && cf_dir=/usr/man
9713     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
9714     do
9715       cf_test=`echo $cf_name | sed -e 's/*//'`
9716       if test "x$cf_test" = "x$cf_name" ; then
9717
9718         case "$cf_name" in
9719         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9720         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9721         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9722         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9723         esac
9724
9725         case "$cf_name" in
9726         $cf_dir/man*)
9727           cf_catonly=no
9728           ;;
9729         $cf_dir/cat*)
9730           cf_preform=yes
9731           ;;
9732         esac
9733         break
9734       fi
9735
9736       # if we found a match in either man* or cat*, stop looking
9737       if test -n "$MANPAGE_FORMAT" ; then
9738         cf_found=no
9739         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9740         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9741         case "$cf_name" in
9742         $cf_dir/cat*)
9743           cf_found=yes
9744           ;;
9745         esac
9746         test $cf_found=yes && break
9747       fi
9748     done
9749     # only check the first directory in $MANPATH where we find manpages
9750     if test -n "$MANPAGE_FORMAT" ; then
9751        break
9752     fi
9753   done
9754   # if we did not find the example, just assume it is normal
9755   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9756   IFS="$ac_save_ifs"
9757   ;;
9758 *)
9759   for cf_option in $MANPAGE_FORMAT; do
9760      case $cf_option in #(vi
9761      gzip|compress|BSDI|normal|formatted|catonly)
9762        ;;
9763      *)
9764        cf_unknown="$cf_unknown $cf_option"
9765        ;;
9766      esac
9767   done
9768   ;;
9769 esac
9770
9771 echo "$as_me:9771: result: $MANPAGE_FORMAT" >&5
9772 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9773 if test -n "$cf_unknown" ; then
9774   { echo "$as_me:9774: WARNING: Unexpected manpage-format $cf_unknown" >&5
9775 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9776 fi
9777
9778 echo "$as_me:9778: checking for manpage renaming" >&5
9779 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9780
9781 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9782 if test "${with_manpage_renames+set}" = set; then
9783   withval="$with_manpage_renames"
9784   MANPAGE_RENAMES=$withval
9785 else
9786   MANPAGE_RENAMES=yes
9787 fi;
9788
9789 case ".$MANPAGE_RENAMES" in #(vi
9790 .no) #(vi
9791   ;;
9792 .|.yes)
9793   # Debian 'man' program?
9794   if test -f /etc/debian_version ; then
9795     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9796   else
9797     MANPAGE_RENAMES=no
9798   fi
9799   ;;
9800 esac
9801
9802 if test "$MANPAGE_RENAMES" != no ; then
9803   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9804     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9805   elif test ! -f $MANPAGE_RENAMES ; then
9806     { { echo "$as_me:9806: error: not a filename: $MANPAGE_RENAMES" >&5
9807 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9808    { (exit 1); exit 1; }; }
9809   fi
9810
9811   test ! -d man && mkdir man
9812
9813   # Construct a sed-script to perform renaming within man-pages
9814   if test -n "$MANPAGE_RENAMES" ; then
9815     test ! -d man && mkdir man
9816     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9817   fi
9818 fi
9819
9820 echo "$as_me:9820: result: $MANPAGE_RENAMES" >&5
9821 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9822
9823 echo "$as_me:9823: checking if manpage aliases will be installed" >&5
9824 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9825
9826 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9827 if test "${with_manpage_aliases+set}" = set; then
9828   withval="$with_manpage_aliases"
9829   MANPAGE_ALIASES=$withval
9830 else
9831   MANPAGE_ALIASES=yes
9832 fi;
9833
9834 echo "$as_me:9834: result: $MANPAGE_ALIASES" >&5
9835 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9836
9837 case "x$LN_S" in #(vi
9838 xln*) #(vi
9839         cf_use_symlinks=yes
9840         ;;
9841 *)
9842         cf_use_symlinks=no
9843         ;;
9844 esac
9845
9846 MANPAGE_SYMLINKS=no
9847 if test "$MANPAGE_ALIASES" = yes ; then
9848 echo "$as_me:9848: checking if manpage symlinks should be used" >&5
9849 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9850
9851 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9852 if test "${with_manpage_symlinks+set}" = set; then
9853   withval="$with_manpage_symlinks"
9854   MANPAGE_SYMLINKS=$withval
9855 else
9856   MANPAGE_SYMLINKS=$cf_use_symlinks
9857 fi;
9858
9859 if test "$$cf_use_symlinks" = no; then
9860 if test "$MANPAGE_SYMLINKS" = yes ; then
9861         { echo "$as_me:9861: WARNING: cannot make symlinks" >&5
9862 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9863         MANPAGE_SYMLINKS=no
9864 fi
9865 fi
9866
9867 echo "$as_me:9867: result: $MANPAGE_SYMLINKS" >&5
9868 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9869 fi
9870
9871 echo "$as_me:9871: checking for manpage tbl" >&5
9872 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9873
9874 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9875 if test "${with_manpage_tbl+set}" = set; then
9876   withval="$with_manpage_tbl"
9877   MANPAGE_TBL=$withval
9878 else
9879   MANPAGE_TBL=no
9880 fi;
9881
9882 echo "$as_me:9882: result: $MANPAGE_TBL" >&5
9883 echo "${ECHO_T}$MANPAGE_TBL" >&6
9884
9885   if test "$prefix" = "NONE" ; then
9886      cf_prefix="$ac_default_prefix"
9887   else
9888      cf_prefix="$prefix"
9889   fi
9890
9891   case "$MANPAGE_FORMAT" in # (vi
9892   *catonly*) # (vi
9893     cf_format=yes
9894     cf_inboth=no
9895     ;;
9896   *formatted*) # (vi
9897     cf_format=yes
9898     cf_inboth=yes
9899     ;;
9900   *)
9901     cf_format=no
9902     cf_inboth=no
9903     ;;
9904   esac
9905
9906 test ! -d man && mkdir man
9907
9908 cf_so_strip=
9909 cf_compress=
9910 case "$MANPAGE_FORMAT" in #(vi
9911 *compress*) #(vi
9912         cf_so_strip="Z"
9913         cf_compress=compress
9914   ;;
9915 *gzip*)
9916         cf_so_strip="gz"
9917         cf_compress=gzip
9918   ;;
9919 esac
9920
9921 cf_edit_man=./edit_man.sh
9922 cf_man_alias=`pwd`/man_alias.sed
9923
9924 cat >$cf_edit_man <<CF_EOF
9925 #! /bin/sh
9926 # this script is generated by the configure-script CF_MAN_PAGES macro.
9927
9928 prefix="$cf_prefix"
9929 datadir="$datadir"
9930
9931 NCURSES_MAJOR="$NCURSES_MAJOR"
9932 NCURSES_MINOR="$NCURSES_MINOR"
9933 NCURSES_PATCH="$NCURSES_PATCH"
9934
9935 NCURSES_OSPEED="$NCURSES_OSPEED"
9936 TERMINFO="$TERMINFO"
9937
9938 INSTALL="$INSTALL"
9939 INSTALL_DATA="$INSTALL_DATA"
9940
9941 transform="$program_transform_name"
9942
9943 TMP=\${TMPDIR:=/tmp}/man\$\$
9944 trap "rm -f \$TMP" 0 1 2 5 15
9945
9946 form=\$1
9947 shift || exit 1
9948
9949 verb=\$1
9950 shift || exit 1
9951
9952 mandir=\$1
9953 shift || exit 1
9954
9955 srcdir=\$1
9956 top_srcdir=\$srcdir/..
9957 shift || exit 1
9958
9959 if test "\$form" = normal ; then
9960         if test "$cf_format" = yes ; then
9961         if test "$cf_inboth" = no ; then
9962                 sh \$0 format \$verb \$mandir \$srcdir \$*
9963                 exit $?
9964         fi
9965         fi
9966         cf_subdir=\$mandir/man
9967         cf_tables=$MANPAGE_TBL
9968 else
9969         cf_subdir=\$mandir/cat
9970         cf_tables=yes
9971 fi
9972
9973 # process the list of source-files
9974 for i in \$* ; do
9975 case \$i in #(vi
9976 *.orig|*.rej) ;; #(vi
9977 *.[0-9]*)
9978         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9979         if test \$verb = installing ; then
9980         if test ! -d \$cf_subdir\${section} ; then
9981                 mkdir -p \$cf_subdir\$section
9982         fi
9983         fi
9984
9985         # replace variables in man page
9986         if test ! -f $cf_man_alias ; then
9987 cat >>$cf_man_alias <<-CF_EOF2
9988                 s,@DATADIR@,\$datadir,g
9989                 s,@TERMINFO@,\$TERMINFO,g
9990                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9991                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9992                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9993                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9994 CF_EOF
9995
9996         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9997         do
9998                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9999                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10000 cat >>$cf_edit_man <<-CF_EOF
10001                 s,@$cf_NAME@,$cf_name,g
10002 CF_EOF
10003         done
10004
10005 cat >>$cf_edit_man <<CF_EOF
10006 CF_EOF2
10007                 echo "...made $cf_man_alias"
10008         fi
10009
10010         aliases=
10011         cf_source=\`basename \$i\`
10012         inalias=\$cf_source
10013         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10014         if test ! -f \$inalias ; then
10015                 echo .. skipped \$cf_source
10016                 continue
10017         fi
10018 CF_EOF
10019
10020 if test "$MANPAGE_ALIASES" != no ; then
10021 cat >>$cf_edit_man <<CF_EOF
10022         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
10023 CF_EOF
10024 fi
10025
10026 if test "$MANPAGE_RENAMES" = no ; then
10027 cat >>$cf_edit_man <<CF_EOF
10028         # perform program transformations for section 1 man pages
10029         if test \$section = 1 ; then
10030                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10031         else
10032                 cf_target=\$cf_subdir\${section}/\$cf_source
10033         fi
10034 CF_EOF
10035 else
10036 cat >>$cf_edit_man <<CF_EOF
10037         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10038         if test -z "\$cf_target" ; then
10039                 echo '? missing rename for '\$cf_source
10040                 cf_target="\$cf_source"
10041         fi
10042         cf_target="\$cf_subdir\${section}/\${cf_target}"
10043
10044 CF_EOF
10045 fi
10046
10047 cat >>$cf_edit_man <<CF_EOF
10048         sed     -f $cf_man_alias \\
10049 CF_EOF
10050
10051 if test -f $MANPAGE_RENAMES ; then
10052 cat >>$cf_edit_man <<CF_EOF
10053                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10054 CF_EOF
10055 else
10056 cat >>$cf_edit_man <<CF_EOF
10057                 < \$i >\$TMP
10058 CF_EOF
10059 fi
10060
10061 cat >>$cf_edit_man <<CF_EOF
10062 if test \$cf_tables = yes ; then
10063         tbl \$TMP >\$TMP.out
10064         mv \$TMP.out \$TMP
10065 fi
10066 CF_EOF
10067
10068 if test $with_curses_h != yes ; then
10069 cat >>$cf_edit_man <<CF_EOF
10070         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10071         mv \$TMP.out \$TMP
10072 CF_EOF
10073 fi
10074
10075 cat >>$cf_edit_man <<CF_EOF
10076         if test \$form = format ; then
10077                 nroff -man \$TMP >\$TMP.out
10078                 mv \$TMP.out \$TMP
10079         fi
10080 CF_EOF
10081
10082 if test -n "$cf_compress" ; then
10083 cat >>$cf_edit_man <<CF_EOF
10084         if test \$verb = installing ; then
10085         if ( $cf_compress -f \$TMP )
10086         then
10087                 mv \$TMP.$cf_so_strip \$TMP
10088         fi
10089         fi
10090         cf_target="\$cf_target.$cf_so_strip"
10091 CF_EOF
10092 fi
10093
10094 case "$MANPAGE_FORMAT" in #(vi
10095 *BSDI*)
10096 cat >>$cf_edit_man <<CF_EOF
10097         if test \$form = format ; then
10098                 # BSDI installs only .0 suffixes in the cat directories
10099                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10100         fi
10101 CF_EOF
10102   ;;
10103 esac
10104
10105 cat >>$cf_edit_man <<CF_EOF
10106         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10107         if test \$verb = installing ; then
10108                 echo \$verb \$cf_target
10109                 \$INSTALL_DATA \$TMP \$cf_target
10110                 test -d \$cf_subdir\${section} &&
10111                 test -n "\$aliases" && (
10112                         cd \$cf_subdir\${section} && (
10113                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10114                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10115                                 cf_target=\`basename \$cf_target\`
10116                                 for cf_alias in \$aliases
10117                                 do
10118                                         if test \$section = 1 ; then
10119                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10120                                         fi
10121
10122                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10123                                                 if test -f \$cf_alias\${suffix} ; then
10124                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10125                                                         then
10126                                                                 continue
10127                                                         fi
10128                                                 fi
10129                                                 echo .. \$verb alias \$cf_alias\${suffix}
10130 CF_EOF
10131 case "x$LN_S" in #(vi
10132 *-f) #(vi
10133 cat >>$cf_edit_man <<CF_EOF
10134                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10135 CF_EOF
10136         ;;
10137 *)
10138 cat >>$cf_edit_man <<CF_EOF
10139                                                 rm -f \$cf_alias\${suffix}
10140                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10141 CF_EOF
10142         ;;
10143 esac
10144 cat >>$cf_edit_man <<CF_EOF
10145                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10146                                                 echo ".so \$cf_source" >\$TMP
10147 CF_EOF
10148 if test -n "$cf_compress" ; then
10149 cat >>$cf_edit_man <<CF_EOF
10150                                                 if test -n "$cf_so_strip" ; then
10151                                                         $cf_compress -f \$TMP
10152                                                         mv \$TMP.$cf_so_strip \$TMP
10153                                                 fi
10154 CF_EOF
10155 fi
10156 cat >>$cf_edit_man <<CF_EOF
10157                                                 echo .. \$verb alias \$cf_alias\${suffix}
10158                                                 rm -f \$cf_alias\${suffix}
10159                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10160                                         fi
10161                                 done
10162                         )
10163                 )
10164         elif test \$verb = removing ; then
10165                 test -f \$cf_target && (
10166                         echo \$verb \$cf_target
10167                         rm -f \$cf_target
10168                 )
10169                 test -d \$cf_subdir\${section} &&
10170                 test -n "\$aliases" && (
10171                         cd \$cf_subdir\${section} && (
10172                                 for cf_alias in \$aliases
10173                                 do
10174                                         if test \$section = 1 ; then
10175                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10176                                         fi
10177
10178                                         echo .. \$verb alias \$cf_alias\${suffix}
10179                                         rm -f \$cf_alias\${suffix}
10180                                 done
10181                         )
10182                 )
10183         else
10184 #               echo ".hy 0"
10185                 cat \$TMP
10186         fi
10187         ;;
10188 esac
10189 done
10190
10191 if test $cf_inboth = yes ; then
10192 if test \$form != format ; then
10193         sh \$0 format \$verb \$mandir \$srcdir \$*
10194 fi
10195 fi
10196
10197 exit 0
10198 CF_EOF
10199 chmod 755 $cf_edit_man
10200
10201 ###############################################################################
10202
10203 ### Note that some functions (such as const) are normally disabled anyway.
10204 echo "$as_me:10204: checking if you want to build with function extensions" >&5
10205 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10206
10207 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10208 if test "${enable_ext_funcs+set}" = set; then
10209   enableval="$enable_ext_funcs"
10210   with_ext_funcs=$enableval
10211 else
10212   with_ext_funcs=yes
10213 fi;
10214 echo "$as_me:10214: result: $with_ext_funcs" >&5
10215 echo "${ECHO_T}$with_ext_funcs" >&6
10216 if test "$with_ext_funcs" = yes ; then
10217         NCURSES_EXT_FUNCS=1
10218         cat >>confdefs.h <<\EOF
10219 #define HAVE_ASSUME_DEFAULT_COLORS 1
10220 EOF
10221
10222         cat >>confdefs.h <<\EOF
10223 #define HAVE_CURSES_VERSION 1
10224 EOF
10225
10226         cat >>confdefs.h <<\EOF
10227 #define HAVE_HAS_KEY 1
10228 EOF
10229
10230         cat >>confdefs.h <<\EOF
10231 #define HAVE_RESIZETERM 1
10232 EOF
10233
10234         cat >>confdefs.h <<\EOF
10235 #define HAVE_RESIZE_TERM 1
10236 EOF
10237
10238         cat >>confdefs.h <<\EOF
10239 #define HAVE_TERM_ENTRY_H 1
10240 EOF
10241
10242         cat >>confdefs.h <<\EOF
10243 #define HAVE_USE_DEFAULT_COLORS 1
10244 EOF
10245
10246         cat >>confdefs.h <<\EOF
10247 #define HAVE_USE_SCREEN 1
10248 EOF
10249
10250         cat >>confdefs.h <<\EOF
10251 #define HAVE_USE_WINDOW 1
10252 EOF
10253
10254         cat >>confdefs.h <<\EOF
10255 #define HAVE_WRESIZE 1
10256 EOF
10257
10258         cat >>confdefs.h <<\EOF
10259 #define NCURSES_EXT_FUNCS 1
10260 EOF
10261
10262         GENERATED_EXT_FUNCS=generated
10263 else
10264         NCURSES_EXT_FUNCS=0
10265         GENERATED_EXT_FUNCS=
10266 fi
10267
10268 echo "$as_me:10268: checking if you want to build with experimental SCREEN extensions" >&5
10269 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10270
10271 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10272 if test "${enable_sp_funcs+set}" = set; then
10273   enableval="$enable_sp_funcs"
10274   with_sp_funcs=$enableval
10275 else
10276   with_sp_funcs=no
10277 fi;
10278 echo "$as_me:10278: result: $with_sp_funcs" >&5
10279 echo "${ECHO_T}$with_sp_funcs" >&6
10280 if test "$with_sp_funcs" = yes ; then
10281         NCURSES_SP_FUNCS=1
10282         cat >>confdefs.h <<\EOF
10283 #define NCURSES_SP_FUNCS 1
10284 EOF
10285
10286         GENERATED_SP_FUNCS=generated
10287 else
10288         NCURSES_SP_FUNCS=0
10289         GENERATED_SP_FUNCS=
10290 fi
10291
10292 echo "$as_me:10292: checking if you want to build with experimental terminal-driver" >&5
10293 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10294
10295 # Check whether --enable-term-driver or --disable-term-driver was given.
10296 if test "${enable_term_driver+set}" = set; then
10297   enableval="$enable_term_driver"
10298   with_term_driver=$enableval
10299 else
10300   with_term_driver=no
10301 fi;
10302 echo "$as_me:10302: result: $with_term_driver" >&5
10303 echo "${ECHO_T}$with_term_driver" >&6
10304 if test "$with_term_driver" = yes ; then
10305         cat >>confdefs.h <<\EOF
10306 #define USE_TERM_DRIVER 1
10307 EOF
10308
10309         if test "$with_sp_funcs" != yes ; then
10310                 { { echo "$as_me:10310: error: The term-driver option relies upon sp-funcs" >&5
10311 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10312    { (exit 1); exit 1; }; }
10313         fi
10314 fi
10315
10316 ###   use option --enable-const to turn on use of const beyond that in XSI.
10317 echo "$as_me:10317: checking for extended use of const keyword" >&5
10318 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10319
10320 # Check whether --enable-const or --disable-const was given.
10321 if test "${enable_const+set}" = set; then
10322   enableval="$enable_const"
10323   with_ext_const=$enableval
10324 else
10325   with_ext_const=no
10326 fi;
10327 echo "$as_me:10327: result: $with_ext_const" >&5
10328 echo "${ECHO_T}$with_ext_const" >&6
10329 NCURSES_CONST='/*nothing*/'
10330 if test "$with_ext_const" = yes ; then
10331         NCURSES_CONST=const
10332 fi
10333
10334 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10335 echo "$as_me:10335: checking if you want to use extended colors" >&5
10336 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10337
10338 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10339 if test "${enable_ext_colors+set}" = set; then
10340   enableval="$enable_ext_colors"
10341   with_ext_colors=$enableval
10342 else
10343   with_ext_colors=no
10344 fi;
10345 echo "$as_me:10345: result: $with_ext_colors" >&5
10346 echo "${ECHO_T}$with_ext_colors" >&6
10347 NCURSES_EXT_COLORS=0
10348 if test "$with_ext_colors" = yes ; then
10349         if test "$with_widec" != yes ; then
10350                 { { echo "$as_me:10350: error: This option applies only to wide-character library" >&5
10351 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10352    { (exit 1); exit 1; }; }
10353         else
10354                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10355
10356 if test "${with_abi_version+set}" != set; then
10357         case $cf_cv_rel_version in
10358         5.*)
10359                 cf_cv_rel_version=6.0
10360                 cf_cv_abi_version=6
10361                 { echo "$as_me:10361: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10362 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10363                 ;;
10364         esac
10365 fi
10366
10367         fi
10368         NCURSES_EXT_COLORS=1
10369         cat >>confdefs.h <<\EOF
10370 #define NCURSES_EXT_COLORS 1
10371 EOF
10372
10373 fi
10374
10375 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10376 echo "$as_me:10376: checking if you want to use extended mouse encoding" >&5
10377 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10378
10379 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10380 if test "${enable_ext_mouse+set}" = set; then
10381   enableval="$enable_ext_mouse"
10382   with_ext_mouse=$enableval
10383 else
10384   with_ext_mouse=no
10385 fi;
10386 echo "$as_me:10386: result: $with_ext_mouse" >&5
10387 echo "${ECHO_T}$with_ext_mouse" >&6
10388 NCURSES_MOUSE_VERSION=1
10389 if test "$with_ext_mouse" = yes ; then
10390         NCURSES_MOUSE_VERSION=2
10391
10392 if test "${with_abi_version+set}" != set; then
10393         case $cf_cv_rel_version in
10394         5.*)
10395                 cf_cv_rel_version=6.0
10396                 cf_cv_abi_version=6
10397                 { echo "$as_me:10397: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10398 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10399                 ;;
10400         esac
10401 fi
10402
10403 fi
10404
10405 echo "$as_me:10405: checking if you want \$NCURSES_NO_PADDING code" >&5
10406 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10407
10408 # Check whether --enable-no-padding or --disable-no-padding was given.
10409 if test "${enable_no_padding+set}" = set; then
10410   enableval="$enable_no_padding"
10411   with_no_padding=$enableval
10412 else
10413   with_no_padding=$with_ext_funcs
10414 fi;
10415 echo "$as_me:10415: result: $with_no_padding" >&5
10416 echo "${ECHO_T}$with_no_padding" >&6
10417 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10418 #define NCURSES_NO_PADDING 1
10419 EOF
10420
10421 echo "$as_me:10421: checking for ANSI C header files" >&5
10422 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10423 if test "${ac_cv_header_stdc+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426   cat >conftest.$ac_ext <<_ACEOF
10427 #line 10427 "configure"
10428 #include "confdefs.h"
10429 #include <stdlib.h>
10430 #include <stdarg.h>
10431 #include <string.h>
10432 #include <float.h>
10433
10434 _ACEOF
10435 if { (eval echo "$as_me:10435: \"$ac_cpp conftest.$ac_ext\"") >&5
10436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10437   ac_status=$?
10438   egrep -v '^ *\+' conftest.er1 >conftest.err
10439   rm -f conftest.er1
10440   cat conftest.err >&5
10441   echo "$as_me:10441: \$? = $ac_status" >&5
10442   (exit $ac_status); } >/dev/null; then
10443   if test -s conftest.err; then
10444     ac_cpp_err=$ac_c_preproc_warn_flag
10445   else
10446     ac_cpp_err=
10447   fi
10448 else
10449   ac_cpp_err=yes
10450 fi
10451 if test -z "$ac_cpp_err"; then
10452   ac_cv_header_stdc=yes
10453 else
10454   echo "$as_me: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   ac_cv_header_stdc=no
10457 fi
10458 rm -f conftest.err conftest.$ac_ext
10459
10460 if test $ac_cv_header_stdc = yes; then
10461   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10462   cat >conftest.$ac_ext <<_ACEOF
10463 #line 10463 "configure"
10464 #include "confdefs.h"
10465 #include <string.h>
10466
10467 _ACEOF
10468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10469   egrep "memchr" >/dev/null 2>&1; then
10470   :
10471 else
10472   ac_cv_header_stdc=no
10473 fi
10474 rm -rf conftest*
10475
10476 fi
10477
10478 if test $ac_cv_header_stdc = yes; then
10479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10480   cat >conftest.$ac_ext <<_ACEOF
10481 #line 10481 "configure"
10482 #include "confdefs.h"
10483 #include <stdlib.h>
10484
10485 _ACEOF
10486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10487   egrep "free" >/dev/null 2>&1; then
10488   :
10489 else
10490   ac_cv_header_stdc=no
10491 fi
10492 rm -rf conftest*
10493
10494 fi
10495
10496 if test $ac_cv_header_stdc = yes; then
10497   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10498   if test "$cross_compiling" = yes; then
10499   :
10500 else
10501   cat >conftest.$ac_ext <<_ACEOF
10502 #line 10502 "configure"
10503 #include "confdefs.h"
10504 #include <ctype.h>
10505 #if ((' ' & 0x0FF) == 0x020)
10506 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10507 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10508 #else
10509 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10510                      || ('j' <= (c) && (c) <= 'r') \
10511                      || ('s' <= (c) && (c) <= 'z'))
10512 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10513 #endif
10514
10515 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10516 int
10517 main ()
10518 {
10519   int i;
10520   for (i = 0; i < 256; i++)
10521     if (XOR (islower (i), ISLOWER (i))
10522         || toupper (i) != TOUPPER (i))
10523       $ac_main_return(2);
10524   $ac_main_return (0);
10525 }
10526 _ACEOF
10527 rm -f conftest$ac_exeext
10528 if { (eval echo "$as_me:10528: \"$ac_link\"") >&5
10529   (eval $ac_link) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10533   { (eval echo "$as_me:10533: \"$ac_try\"") >&5
10534   (eval $ac_try) 2>&5
10535   ac_status=$?
10536   echo "$as_me:10536: \$? = $ac_status" >&5
10537   (exit $ac_status); }; }; then
10538   :
10539 else
10540   echo "$as_me: program exited with status $ac_status" >&5
10541 echo "$as_me: failed program was:" >&5
10542 cat conftest.$ac_ext >&5
10543 ac_cv_header_stdc=no
10544 fi
10545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10546 fi
10547 fi
10548 fi
10549 echo "$as_me:10549: result: $ac_cv_header_stdc" >&5
10550 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10551 if test $ac_cv_header_stdc = yes; then
10552
10553 cat >>confdefs.h <<\EOF
10554 #define STDC_HEADERS 1
10555 EOF
10556
10557 fi
10558
10559 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10560
10561 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10562                   inttypes.h stdint.h unistd.h
10563 do
10564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10565 echo "$as_me:10565: checking for $ac_header" >&5
10566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10568   echo $ECHO_N "(cached) $ECHO_C" >&6
10569 else
10570   cat >conftest.$ac_ext <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573 $ac_includes_default
10574 #include <$ac_header>
10575 _ACEOF
10576 rm -f conftest.$ac_objext
10577 if { (eval echo "$as_me:10577: \"$ac_compile\"") >&5
10578   (eval $ac_compile) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); } &&
10582          { ac_try='test -s conftest.$ac_objext'
10583   { (eval echo "$as_me:10583: \"$ac_try\"") >&5
10584   (eval $ac_try) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); }; }; then
10588   eval "$as_ac_Header=yes"
10589 else
10590   echo "$as_me: failed program was:" >&5
10591 cat conftest.$ac_ext >&5
10592 eval "$as_ac_Header=no"
10593 fi
10594 rm -f conftest.$ac_objext conftest.$ac_ext
10595 fi
10596 echo "$as_me:10596: result: `eval echo '${'$as_ac_Header'}'`" >&5
10597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10598 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10599   cat >>confdefs.h <<EOF
10600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10601 EOF
10602
10603 fi
10604 done
10605
10606 echo "$as_me:10606: checking for signed char" >&5
10607 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10608 if test "${ac_cv_type_signed_char+set}" = set; then
10609   echo $ECHO_N "(cached) $ECHO_C" >&6
10610 else
10611   cat >conftest.$ac_ext <<_ACEOF
10612 #line 10612 "configure"
10613 #include "confdefs.h"
10614 $ac_includes_default
10615 int
10616 main ()
10617 {
10618 if ((signed char *) 0)
10619   return 0;
10620 if (sizeof (signed char))
10621   return 0;
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 rm -f conftest.$ac_objext
10627 if { (eval echo "$as_me:10627: \"$ac_compile\"") >&5
10628   (eval $ac_compile) 2>&5
10629   ac_status=$?
10630   echo "$as_me:10630: \$? = $ac_status" >&5
10631   (exit $ac_status); } &&
10632          { ac_try='test -s conftest.$ac_objext'
10633   { (eval echo "$as_me:10633: \"$ac_try\"") >&5
10634   (eval $ac_try) 2>&5
10635   ac_status=$?
10636   echo "$as_me:10636: \$? = $ac_status" >&5
10637   (exit $ac_status); }; }; then
10638   ac_cv_type_signed_char=yes
10639 else
10640   echo "$as_me: failed program was:" >&5
10641 cat conftest.$ac_ext >&5
10642 ac_cv_type_signed_char=no
10643 fi
10644 rm -f conftest.$ac_objext conftest.$ac_ext
10645 fi
10646 echo "$as_me:10646: result: $ac_cv_type_signed_char" >&5
10647 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10648
10649 echo "$as_me:10649: checking size of signed char" >&5
10650 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10651 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10652   echo $ECHO_N "(cached) $ECHO_C" >&6
10653 else
10654   if test "$ac_cv_type_signed_char" = yes; then
10655   if test "$cross_compiling" = yes; then
10656   # Depending upon the size, compute the lo and hi bounds.
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660 $ac_includes_default
10661 int
10662 main ()
10663 {
10664 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 rm -f conftest.$ac_objext
10670 if { (eval echo "$as_me:10670: \"$ac_compile\"") >&5
10671   (eval $ac_compile) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); } &&
10675          { ac_try='test -s conftest.$ac_objext'
10676   { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677   (eval $ac_try) 2>&5
10678   ac_status=$?
10679   echo "$as_me:10679: \$? = $ac_status" >&5
10680   (exit $ac_status); }; }; then
10681   ac_lo=0 ac_mid=0
10682   while :; do
10683     cat >conftest.$ac_ext <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 $ac_includes_default
10687 int
10688 main ()
10689 {
10690 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext
10696 if { (eval echo "$as_me:10696: \"$ac_compile\"") >&5
10697   (eval $ac_compile) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest.$ac_objext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   ac_hi=$ac_mid; break
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10712 fi
10713 rm -f conftest.$ac_objext conftest.$ac_ext
10714   done
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 ac_hi=-1 ac_mid=-1
10719   while :; do
10720     cat >conftest.$ac_ext <<_ACEOF
10721 #line 10721 "configure"
10722 #include "confdefs.h"
10723 $ac_includes_default
10724 int
10725 main ()
10726 {
10727 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10728   ;
10729   return 0;
10730 }
10731 _ACEOF
10732 rm -f conftest.$ac_objext
10733 if { (eval echo "$as_me:10733: \"$ac_compile\"") >&5
10734   (eval $ac_compile) 2>&5
10735   ac_status=$?
10736   echo "$as_me:10736: \$? = $ac_status" >&5
10737   (exit $ac_status); } &&
10738          { ac_try='test -s conftest.$ac_objext'
10739   { (eval echo "$as_me:10739: \"$ac_try\"") >&5
10740   (eval $ac_try) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit $ac_status); }; }; then
10744   ac_lo=$ac_mid; break
10745 else
10746   echo "$as_me: failed program was:" >&5
10747 cat conftest.$ac_ext >&5
10748 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10749 fi
10750 rm -f conftest.$ac_objext conftest.$ac_ext
10751   done
10752 fi
10753 rm -f conftest.$ac_objext conftest.$ac_ext
10754 # Binary search between lo and hi bounds.
10755 while test "x$ac_lo" != "x$ac_hi"; do
10756   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10757   cat >conftest.$ac_ext <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10760 $ac_includes_default
10761 int
10762 main ()
10763 {
10764 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10765   ;
10766   return 0;
10767 }
10768 _ACEOF
10769 rm -f conftest.$ac_objext
10770 if { (eval echo "$as_me:10770: \"$ac_compile\"") >&5
10771   (eval $ac_compile) 2>&5
10772   ac_status=$?
10773   echo "$as_me:10773: \$? = $ac_status" >&5
10774   (exit $ac_status); } &&
10775          { ac_try='test -s conftest.$ac_objext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   ac_hi=$ac_mid
10782 else
10783   echo "$as_me: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10785 ac_lo=`expr $ac_mid + 1`
10786 fi
10787 rm -f conftest.$ac_objext conftest.$ac_ext
10788 done
10789 ac_cv_sizeof_signed_char=$ac_lo
10790 else
10791   if test "$cross_compiling" = yes; then
10792   { { echo "$as_me:10792: error: cannot run test program while cross compiling" >&5
10793 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10794    { (exit 1); exit 1; }; }
10795 else
10796   cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 $ac_includes_default
10800 int
10801 main ()
10802 {
10803 FILE *f = fopen ("conftest.val", "w");
10804 if (!f)
10805   $ac_main_return (1);
10806 fprintf (f, "%d", (sizeof (signed char)));
10807 fclose (f);
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f conftest$ac_exeext
10813 if { (eval echo "$as_me:10813: \"$ac_link\"") >&5
10814   (eval $ac_link) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10818   { (eval echo "$as_me:10818: \"$ac_try\"") >&5
10819   (eval $ac_try) 2>&5
10820   ac_status=$?
10821   echo "$as_me:10821: \$? = $ac_status" >&5
10822   (exit $ac_status); }; }; then
10823   ac_cv_sizeof_signed_char=`cat conftest.val`
10824 else
10825   echo "$as_me: program exited with status $ac_status" >&5
10826 echo "$as_me: failed program was:" >&5
10827 cat conftest.$ac_ext >&5
10828 fi
10829 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10830 fi
10831 fi
10832 rm -f conftest.val
10833 else
10834   ac_cv_sizeof_signed_char=0
10835 fi
10836 fi
10837 echo "$as_me:10837: result: $ac_cv_sizeof_signed_char" >&5
10838 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10839 cat >>confdefs.h <<EOF
10840 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10841 EOF
10842
10843 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10844         NCURSES_SBOOL="signed char"
10845 else
10846         NCURSES_SBOOL="char"
10847 fi
10848 echo "$as_me:10848: checking if you want to use signed Boolean array in term.h" >&5
10849 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10850
10851 # Check whether --enable-signed-char or --disable-signed-char was given.
10852 if test "${enable_signed_char+set}" = set; then
10853   enableval="$enable_signed_char"
10854   with_signed_char=$enableval
10855 else
10856   with_signed_char=no
10857 fi;
10858 echo "$as_me:10858: result: $with_signed_char" >&5
10859 echo "${ECHO_T}$with_signed_char" >&6
10860 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10861
10862 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10863 echo "$as_me:10863: checking if you want SIGWINCH handler" >&5
10864 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10865
10866 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10867 if test "${enable_sigwinch+set}" = set; then
10868   enableval="$enable_sigwinch"
10869   with_sigwinch=$enableval
10870 else
10871   with_sigwinch=$with_ext_funcs
10872 fi;
10873 echo "$as_me:10873: result: $with_sigwinch" >&5
10874 echo "${ECHO_T}$with_sigwinch" >&6
10875 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10876 #define USE_SIGWINCH 1
10877 EOF
10878
10879 ###   use option --enable-tcap-names to allow user to define new capabilities
10880 echo "$as_me:10880: checking if you want user-definable terminal capabilities like termcap" >&5
10881 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10882
10883 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10884 if test "${enable_tcap_names+set}" = set; then
10885   enableval="$enable_tcap_names"
10886   with_tcap_names=$enableval
10887 else
10888   with_tcap_names=$with_ext_funcs
10889 fi;
10890 echo "$as_me:10890: result: $with_tcap_names" >&5
10891 echo "${ECHO_T}$with_tcap_names" >&6
10892 NCURSES_XNAMES=0
10893 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10894
10895 ###############################################################################
10896 # These options are relatively safe to experiment with.
10897
10898 echo "$as_me:10898: checking if you want all development code" >&5
10899 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10900
10901 # Check whether --with-develop or --without-develop was given.
10902 if test "${with_develop+set}" = set; then
10903   withval="$with_develop"
10904   with_develop=$withval
10905 else
10906   with_develop=no
10907 fi;
10908 echo "$as_me:10908: result: $with_develop" >&5
10909 echo "${ECHO_T}$with_develop" >&6
10910
10911 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10912 echo "$as_me:10912: checking if you want hard-tabs code" >&5
10913 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10914
10915 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10916 if test "${enable_hard_tabs+set}" = set; then
10917   enableval="$enable_hard_tabs"
10918
10919 else
10920   enable_hard_tabs=$with_develop
10921 fi;
10922 echo "$as_me:10922: result: $enable_hard_tabs" >&5
10923 echo "${ECHO_T}$enable_hard_tabs" >&6
10924 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10925 #define USE_HARD_TABS 1
10926 EOF
10927
10928 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10929 echo "$as_me:10929: checking if you want limited support for xmc" >&5
10930 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10931
10932 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10933 if test "${enable_xmc_glitch+set}" = set; then
10934   enableval="$enable_xmc_glitch"
10935
10936 else
10937   enable_xmc_glitch=$with_develop
10938 fi;
10939 echo "$as_me:10939: result: $enable_xmc_glitch" >&5
10940 echo "${ECHO_T}$enable_xmc_glitch" >&6
10941 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10942 #define USE_XMC_SUPPORT 1
10943 EOF
10944
10945 ###############################################################################
10946 # These are just experimental, probably should not be in a package:
10947
10948 echo "$as_me:10948: checking if you do not want to assume colors are white-on-black" >&5
10949 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10950
10951 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10952 if test "${enable_assumed_color+set}" = set; then
10953   enableval="$enable_assumed_color"
10954   with_assumed_color=$enableval
10955 else
10956   with_assumed_color=yes
10957 fi;
10958 echo "$as_me:10958: result: $with_assumed_color" >&5
10959 echo "${ECHO_T}$with_assumed_color" >&6
10960 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10961 #define USE_ASSUMED_COLOR 1
10962 EOF
10963
10964 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10965 echo "$as_me:10965: checking if you want hashmap scrolling-optimization code" >&5
10966 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10967
10968 # Check whether --enable-hashmap or --disable-hashmap was given.
10969 if test "${enable_hashmap+set}" = set; then
10970   enableval="$enable_hashmap"
10971   with_hashmap=$enableval
10972 else
10973   with_hashmap=yes
10974 fi;
10975 echo "$as_me:10975: result: $with_hashmap" >&5
10976 echo "${ECHO_T}$with_hashmap" >&6
10977 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10978 #define USE_HASHMAP 1
10979 EOF
10980
10981 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10982 echo "$as_me:10982: checking if you want colorfgbg code" >&5
10983 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10984
10985 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10986 if test "${enable_colorfgbg+set}" = set; then
10987   enableval="$enable_colorfgbg"
10988   with_colorfgbg=$enableval
10989 else
10990   with_colorfgbg=no
10991 fi;
10992 echo "$as_me:10992: result: $with_colorfgbg" >&5
10993 echo "${ECHO_T}$with_colorfgbg" >&6
10994 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10995 #define USE_COLORFGBG 1
10996 EOF
10997
10998 ###   use option --enable-interop to turn on use of bindings used for interop
10999 echo "$as_me:10999: checking if you want interop bindings" >&5
11000 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11001
11002 # Check whether --enable-interop or --disable-interop was given.
11003 if test "${enable_interop+set}" = set; then
11004   enableval="$enable_interop"
11005   with_exp_interop=$enableval
11006 else
11007   with_exp_interop=no
11008 fi;
11009 echo "$as_me:11009: result: $with_exp_interop" >&5
11010 echo "${ECHO_T}$with_exp_interop" >&6
11011
11012 NCURSES_INTEROP_FUNCS=0
11013 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11014
11015 # This is still experimental (20080329), but should ultimately be moved to
11016 # the script-block --with-normal, etc.
11017
11018 echo "$as_me:11018: checking if you want to link with the pthread library" >&5
11019 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11020
11021 # Check whether --with-pthread or --without-pthread was given.
11022 if test "${with_pthread+set}" = set; then
11023   withval="$with_pthread"
11024   with_pthread=$withval
11025 else
11026   with_pthread=no
11027 fi;
11028 echo "$as_me:11028: result: $with_pthread" >&5
11029 echo "${ECHO_T}$with_pthread" >&6
11030
11031 if test "$with_pthread" != no ; then
11032     echo "$as_me:11032: checking for pthread.h" >&5
11033 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11034 if test "${ac_cv_header_pthread_h+set}" = set; then
11035   echo $ECHO_N "(cached) $ECHO_C" >&6
11036 else
11037   cat >conftest.$ac_ext <<_ACEOF
11038 #line 11038 "configure"
11039 #include "confdefs.h"
11040 #include <pthread.h>
11041 _ACEOF
11042 if { (eval echo "$as_me:11042: \"$ac_cpp conftest.$ac_ext\"") >&5
11043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11044   ac_status=$?
11045   egrep -v '^ *\+' conftest.er1 >conftest.err
11046   rm -f conftest.er1
11047   cat conftest.err >&5
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); } >/dev/null; then
11050   if test -s conftest.err; then
11051     ac_cpp_err=$ac_c_preproc_warn_flag
11052   else
11053     ac_cpp_err=
11054   fi
11055 else
11056   ac_cpp_err=yes
11057 fi
11058 if test -z "$ac_cpp_err"; then
11059   ac_cv_header_pthread_h=yes
11060 else
11061   echo "$as_me: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   ac_cv_header_pthread_h=no
11064 fi
11065 rm -f conftest.err conftest.$ac_ext
11066 fi
11067 echo "$as_me:11067: result: $ac_cv_header_pthread_h" >&5
11068 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11069 if test $ac_cv_header_pthread_h = yes; then
11070
11071         cat >>confdefs.h <<\EOF
11072 #define HAVE_PTHREADS_H 1
11073 EOF
11074
11075         echo "$as_me:11075: checking if we can link with the pthread library" >&5
11076 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
11077         cf_save_LIBS="$LIBS"
11078         LIBS="-lpthread $LIBS"
11079         cat >conftest.$ac_ext <<_ACEOF
11080 #line 11080 "configure"
11081 #include "confdefs.h"
11082
11083 #include <pthread.h>
11084
11085 int
11086 main ()
11087 {
11088
11089         int rc = pthread_create(0,0,0,0);
11090
11091   ;
11092   return 0;
11093 }
11094 _ACEOF
11095 rm -f conftest.$ac_objext conftest$ac_exeext
11096 if { (eval echo "$as_me:11096: \"$ac_link\"") >&5
11097   (eval $ac_link) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit $ac_status); } &&
11101          { ac_try='test -s conftest$ac_exeext'
11102   { (eval echo "$as_me:11102: \"$ac_try\"") >&5
11103   (eval $ac_try) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit $ac_status); }; }; then
11107   with_pthread=yes
11108 else
11109   echo "$as_me: failed program was:" >&5
11110 cat conftest.$ac_ext >&5
11111 with_pthread=no
11112 fi
11113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11114         LIBS="$cf_save_LIBS"
11115         echo "$as_me:11115: result: $with_pthread" >&5
11116 echo "${ECHO_T}$with_pthread" >&6
11117
11118         if test "$with_pthread" = yes ; then
11119             LIBS="-lpthread $LIBS"
11120             cat >>confdefs.h <<\EOF
11121 #define HAVE_LIBPTHREADS 1
11122 EOF
11123
11124         else
11125             { { echo "$as_me:11125: error: Cannot link with pthread library" >&5
11126 echo "$as_me: error: Cannot link with pthread library" >&2;}
11127    { (exit 1); exit 1; }; }
11128         fi
11129
11130 fi
11131
11132 fi
11133
11134 if test "x$with_pthread" != xno; then
11135         echo "$as_me:11135: checking for pthread_kill" >&5
11136 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11137 if test "${ac_cv_func_pthread_kill+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140   cat >conftest.$ac_ext <<_ACEOF
11141 #line 11141 "configure"
11142 #include "confdefs.h"
11143 /* System header to define __stub macros and hopefully few prototypes,
11144     which can conflict with char pthread_kill (); below.  */
11145 #include <assert.h>
11146 /* Override any gcc2 internal prototype to avoid an error.  */
11147 #ifdef __cplusplus
11148 extern "C"
11149 #endif
11150 /* We use char because int might match the return type of a gcc2
11151    builtin and then its argument prototype would still apply.  */
11152 char pthread_kill ();
11153 char (*f) ();
11154
11155 int
11156 main ()
11157 {
11158 /* The GNU C library defines this for functions which it implements
11159     to always fail with ENOSYS.  Some functions are actually named
11160     something starting with __ and the normal name is an alias.  */
11161 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11162 choke me
11163 #else
11164 f = pthread_kill;
11165 #endif
11166
11167   ;
11168   return 0;
11169 }
11170 _ACEOF
11171 rm -f conftest.$ac_objext conftest$ac_exeext
11172 if { (eval echo "$as_me:11172: \"$ac_link\"") >&5
11173   (eval $ac_link) 2>&5
11174   ac_status=$?
11175   echo "$as_me:11175: \$? = $ac_status" >&5
11176   (exit $ac_status); } &&
11177          { ac_try='test -s conftest$ac_exeext'
11178   { (eval echo "$as_me:11178: \"$ac_try\"") >&5
11179   (eval $ac_try) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); }; }; then
11183   ac_cv_func_pthread_kill=yes
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187 ac_cv_func_pthread_kill=no
11188 fi
11189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11190 fi
11191 echo "$as_me:11191: result: $ac_cv_func_pthread_kill" >&5
11192 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11193 if test $ac_cv_func_pthread_kill = yes; then
11194
11195                 echo "$as_me:11195: checking if you want to allow EINTR in wgetch with pthreads" >&5
11196 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11197
11198 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11199 if test "${enable_pthreads_eintr+set}" = set; then
11200   enableval="$enable_pthreads_eintr"
11201   use_pthreads_eintr=$enableval
11202 else
11203   use_pthreads_eintr=no
11204 fi;
11205                 echo "$as_me:11205: result: $use_pthreads_eintr" >&5
11206 echo "${ECHO_T}$use_pthreads_eintr" >&6
11207                 if test $use_pthreads_eintr = yes ; then
11208                         cat >>confdefs.h <<\EOF
11209 #define USE_PTHREADS_EINTR 1
11210 EOF
11211
11212                 fi
11213 fi
11214
11215         echo "$as_me:11215: checking if you want to use weak-symbols for pthreads" >&5
11216 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11217
11218 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11219 if test "${enable_weak_symbols+set}" = set; then
11220   enableval="$enable_weak_symbols"
11221   use_weak_symbols=$enableval
11222 else
11223   use_weak_symbols=no
11224 fi;
11225         echo "$as_me:11225: result: $use_weak_symbols" >&5
11226 echo "${ECHO_T}$use_weak_symbols" >&6
11227         if test "$use_weak_symbols" = yes ; then
11228
11229 echo "$as_me:11229: checking if $CC supports weak symbols" >&5
11230 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11231 if test "${cf_cv_weak_symbols+set}" = set; then
11232   echo $ECHO_N "(cached) $ECHO_C" >&6
11233 else
11234
11235 cat >conftest.$ac_ext <<_ACEOF
11236 #line 11236 "configure"
11237 #include "confdefs.h"
11238
11239 #include <stdio.h>
11240 int
11241 main ()
11242 {
11243
11244 #if defined(__GNUC__)
11245 #  if defined __USE_ISOC99
11246 #    define _cat_pragma(exp)    _Pragma(#exp)
11247 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11248 #  else
11249 #    define _weak_pragma(exp)
11250 #  endif
11251 #  define _declare(name)        __extension__ extern __typeof__(name) name
11252 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11253 #endif
11254
11255 weak_symbol(fopen);
11256
11257   ;
11258   return 0;
11259 }
11260 _ACEOF
11261 rm -f conftest.$ac_objext
11262 if { (eval echo "$as_me:11262: \"$ac_compile\"") >&5
11263   (eval $ac_compile) 2>&5
11264   ac_status=$?
11265   echo "$as_me:11265: \$? = $ac_status" >&5
11266   (exit $ac_status); } &&
11267          { ac_try='test -s conftest.$ac_objext'
11268   { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269   (eval $ac_try) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit $ac_status); }; }; then
11273   cf_cv_weak_symbols=yes
11274 else
11275   echo "$as_me: failed program was:" >&5
11276 cat conftest.$ac_ext >&5
11277 cf_cv_weak_symbols=no
11278 fi
11279 rm -f conftest.$ac_objext conftest.$ac_ext
11280
11281 fi
11282 echo "$as_me:11282: result: $cf_cv_weak_symbols" >&5
11283 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11284
11285         else
11286                 cf_cv_weak_symbols=no
11287         fi
11288
11289         if test $cf_cv_weak_symbols = yes ; then
11290                 cat >>confdefs.h <<\EOF
11291 #define USE_WEAK_SYMBOLS 1
11292 EOF
11293
11294         fi
11295 fi
11296
11297 PTHREAD=
11298 if test "$with_pthread" = "yes" ; then
11299     cat >>confdefs.h <<\EOF
11300 #define USE_PTHREADS 1
11301 EOF
11302
11303     enable_reentrant=yes
11304     if test $cf_cv_weak_symbols = yes ; then
11305         PTHREAD=-lpthread
11306     fi
11307 fi
11308
11309 # Reentrant code has to be opaque; there's little advantage to making ncurses
11310 # opaque outside of that, so there is no --enable-opaque option.  We can use
11311 # this option without --with-pthreads, but this will be always set for
11312 # pthreads.
11313 echo "$as_me:11313: checking if you want experimental reentrant code" >&5
11314 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11315
11316 # Check whether --enable-reentrant or --disable-reentrant was given.
11317 if test "${enable_reentrant+set}" = set; then
11318   enableval="$enable_reentrant"
11319   with_reentrant=$enableval
11320 else
11321   with_reentrant=no
11322 fi;
11323 echo "$as_me:11323: result: $with_reentrant" >&5
11324 echo "${ECHO_T}$with_reentrant" >&6
11325 if test "$with_reentrant" = yes ; then
11326         cf_cv_enable_reentrant=1
11327         cf_cv_enable_opaque="NCURSES_INTERNALS"
11328         NCURSES_OPAQUE=1
11329         NCURSES_SIZE_T=int
11330         if test $cf_cv_weak_symbols = yes ; then
11331
11332 # remove pthread library from $LIBS
11333 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11334
11335                 TEST_LIBS="-lpthread $TEST_LIBS"
11336                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11337         else
11338                 LIB_SUFFIX="t${LIB_SUFFIX}"
11339         fi
11340         cat >>confdefs.h <<\EOF
11341 #define USE_REENTRANT 1
11342 EOF
11343
11344 if test "${with_abi_version+set}" != set; then
11345         case $cf_cv_rel_version in
11346         5.*)
11347                 cf_cv_rel_version=6.0
11348                 cf_cv_abi_version=6
11349                 { echo "$as_me:11349: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11350 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11351                 ;;
11352         esac
11353 fi
11354
11355 else
11356         cf_cv_enable_reentrant=0
11357         cf_cv_enable_opaque="NCURSES_OPAQUE"
11358         NCURSES_OPAQUE=0
11359         NCURSES_SIZE_T=short
11360 fi
11361
11362 ### Allow using a different wrap-prefix
11363 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11364         echo "$as_me:11364: checking for prefix used to wrap public variables" >&5
11365 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11366
11367 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11368 if test "${with_wrap_prefix+set}" = set; then
11369   withval="$with_wrap_prefix"
11370   NCURSES_WRAP_PREFIX=$withval
11371 else
11372   NCURSES_WRAP_PREFIX=_nc_
11373 fi;
11374         echo "$as_me:11374: result: $NCURSES_WRAP_PREFIX" >&5
11375 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11376 else
11377         NCURSES_WRAP_PREFIX=_nc_
11378 fi
11379
11380 cat >>confdefs.h <<EOF
11381 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11382 EOF
11383
11384 echo "$as_me:11384: checking if you want experimental safe-sprintf code" >&5
11385 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11386
11387 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11388 if test "${enable_safe_sprintf+set}" = set; then
11389   enableval="$enable_safe_sprintf"
11390   with_safe_sprintf=$enableval
11391 else
11392   with_safe_sprintf=no
11393 fi;
11394 echo "$as_me:11394: result: $with_safe_sprintf" >&5
11395 echo "${ECHO_T}$with_safe_sprintf" >&6
11396 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11397 #define USE_SAFE_SPRINTF 1
11398 EOF
11399
11400 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11401 # when hashmap is used scroll hints are useless
11402 if test "$with_hashmap" = no ; then
11403 echo "$as_me:11403: checking if you want to experiment without scrolling-hints code" >&5
11404 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11405
11406 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11407 if test "${enable_scroll_hints+set}" = set; then
11408   enableval="$enable_scroll_hints"
11409   with_scroll_hints=$enableval
11410 else
11411   with_scroll_hints=yes
11412 fi;
11413 echo "$as_me:11413: result: $with_scroll_hints" >&5
11414 echo "${ECHO_T}$with_scroll_hints" >&6
11415 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11416 #define USE_SCROLL_HINTS 1
11417 EOF
11418
11419 fi
11420
11421 echo "$as_me:11421: checking if you want experimental wgetch-events code" >&5
11422 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11423
11424 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11425 if test "${enable_wgetch_events+set}" = set; then
11426   enableval="$enable_wgetch_events"
11427   with_wgetch_events=$enableval
11428 else
11429   with_wgetch_events=no
11430 fi;
11431 echo "$as_me:11431: result: $with_wgetch_events" >&5
11432 echo "${ECHO_T}$with_wgetch_events" >&6
11433 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11434 #define NCURSES_WGETCH_EVENTS 1
11435 EOF
11436
11437 ###############################################################################
11438
11439 ###     use option --disable-echo to suppress full display compiling commands
11440 echo "$as_me:11440: checking if you want to display full commands during build" >&5
11441 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11442
11443 # Check whether --enable-echo or --disable-echo was given.
11444 if test "${enable_echo+set}" = set; then
11445   enableval="$enable_echo"
11446   with_echo=$enableval
11447 else
11448   with_echo=yes
11449 fi;
11450 if test "$with_echo" = yes; then
11451         ECHO_LINK=
11452 else
11453         ECHO_LINK='@ echo linking $@ ... ;'
11454         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11455         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11456 fi
11457 echo "$as_me:11457: result: $with_echo" >&5
11458 echo "${ECHO_T}$with_echo" >&6
11459
11460 ###     use option --enable-warnings to turn on all gcc warnings
11461 echo "$as_me:11461: checking if you want to see compiler warnings" >&5
11462 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11463
11464 # Check whether --enable-warnings or --disable-warnings was given.
11465 if test "${enable_warnings+set}" = set; then
11466   enableval="$enable_warnings"
11467   with_warnings=$enableval
11468 fi;
11469 echo "$as_me:11469: result: $with_warnings" >&5
11470 echo "${ECHO_T}$with_warnings" >&6
11471
11472 if test "x$with_warnings" = "xyes"; then
11473
11474         ADAFLAGS="$ADAFLAGS -gnatg"
11475
11476 INTEL_COMPILER=no
11477
11478 if test "$GCC" = yes ; then
11479         case $host_os in
11480         linux*|gnu*)
11481                 echo "$as_me:11481: checking if this is really Intel C compiler" >&5
11482 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11483                 cf_save_CFLAGS="$CFLAGS"
11484                 CFLAGS="$CFLAGS -no-gcc"
11485                 cat >conftest.$ac_ext <<_ACEOF
11486 #line 11486 "configure"
11487 #include "confdefs.h"
11488
11489 int
11490 main ()
11491 {
11492
11493 #ifdef __INTEL_COMPILER
11494 #else
11495 make an error
11496 #endif
11497
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f conftest.$ac_objext
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit $ac_status); } &&
11508          { ac_try='test -s conftest.$ac_objext'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); }; }; then
11514   INTEL_COMPILER=yes
11515 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11516
11517 else
11518   echo "$as_me: failed program was:" >&5
11519 cat conftest.$ac_ext >&5
11520 fi
11521 rm -f conftest.$ac_objext conftest.$ac_ext
11522                 CFLAGS="$cf_save_CFLAGS"
11523                 echo "$as_me:11523: result: $INTEL_COMPILER" >&5
11524 echo "${ECHO_T}$INTEL_COMPILER" >&6
11525                 ;;
11526         esac
11527 fi
11528
11529 cat > conftest.$ac_ext <<EOF
11530 #line 11530 "${as_me:-configure}"
11531 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11532 EOF
11533
11534 if test "$INTEL_COMPILER" = yes
11535 then
11536 # The "-wdXXX" options suppress warnings:
11537 # remark #1419: external declaration in primary source file
11538 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11539 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11540 # remark #193: zero used for undefined preprocessing identifier
11541 # remark #593: variable "curs_sb_left_arrow" was set but never used
11542 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11543 # remark #869: parameter "tw" was never referenced
11544 # remark #981: operands are evaluated in unspecified order
11545 # warning #279: controlling expression is constant
11546
11547         { echo "$as_me:11547: checking for $CC warning options..." >&5
11548 echo "$as_me: checking for $CC warning options..." >&6;}
11549         cf_save_CFLAGS="$CFLAGS"
11550         EXTRA_CFLAGS="-Wall"
11551         for cf_opt in \
11552                 wd1419 \
11553                 wd1683 \
11554                 wd1684 \
11555                 wd193 \
11556                 wd593 \
11557                 wd279 \
11558                 wd810 \
11559                 wd869 \
11560                 wd981
11561         do
11562                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11563                 if { (eval echo "$as_me:11563: \"$ac_compile\"") >&5
11564   (eval $ac_compile) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); }; then
11568                         test -n "$verbose" && echo "$as_me:11568: result: ... -$cf_opt" >&5
11569 echo "${ECHO_T}... -$cf_opt" >&6
11570                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11571                 fi
11572         done
11573         CFLAGS="$cf_save_CFLAGS"
11574
11575 elif test "$GCC" = yes
11576 then
11577         { echo "$as_me:11577: checking for $CC warning options..." >&5
11578 echo "$as_me: checking for $CC warning options..." >&6;}
11579         cf_save_CFLAGS="$CFLAGS"
11580         EXTRA_CFLAGS=
11581         cf_warn_CONST=""
11582         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11583         for cf_opt in W Wall \
11584                 Wbad-function-cast \
11585                 Wcast-align \
11586                 Wcast-qual \
11587                 Winline \
11588                 Wmissing-declarations \
11589                 Wmissing-prototypes \
11590                 Wnested-externs \
11591                 Wpointer-arith \
11592                 Wshadow \
11593                 Wstrict-prototypes \
11594                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11595         do
11596                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11597                 if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
11598   (eval $ac_compile) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; then
11602                         test -n "$verbose" && echo "$as_me:11602: result: ... -$cf_opt" >&5
11603 echo "${ECHO_T}... -$cf_opt" >&6
11604                         case $cf_opt in #(vi
11605                         Wcast-qual) #(vi
11606                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11607                                 ;;
11608                         Winline) #(vi
11609                                 case $GCC_VERSION in
11610                                 [34].*)
11611                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11612
11613 echo "${as_me:-configure}:11613: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11614
11615                                         continue;;
11616                                 esac
11617                                 ;;
11618                         esac
11619                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11620                 fi
11621         done
11622         CFLAGS="$cf_save_CFLAGS"
11623 fi
11624 rm -rf conftest*
11625
11626         if test "$cf_with_cxx" = yes ; then
11627
11628 INTEL_CPLUSPLUS=no
11629
11630 if test "$GCC" = yes ; then
11631         case $host_os in
11632         linux*|gnu*)
11633                 echo "$as_me:11633: checking if this is really Intel C++ compiler" >&5
11634 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11635                 cf_save_CFLAGS="$CXXFLAGS"
11636                 CXXFLAGS="$CXXFLAGS -no-gcc"
11637                 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640
11641 int
11642 main ()
11643 {
11644
11645 #ifdef __INTEL_COMPILER
11646 #else
11647 make an error
11648 #endif
11649
11650   ;
11651   return 0;
11652 }
11653 _ACEOF
11654 rm -f conftest.$ac_objext
11655 if { (eval echo "$as_me:11655: \"$ac_compile\"") >&5
11656   (eval $ac_compile) 2>&5
11657   ac_status=$?
11658   echo "$as_me:11658: \$? = $ac_status" >&5
11659   (exit $ac_status); } &&
11660          { ac_try='test -s conftest.$ac_objext'
11661   { (eval echo "$as_me:11661: \"$ac_try\"") >&5
11662   (eval $ac_try) 2>&5
11663   ac_status=$?
11664   echo "$as_me:11664: \$? = $ac_status" >&5
11665   (exit $ac_status); }; }; then
11666   INTEL_CPLUSPLUS=yes
11667 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11668
11669 else
11670   echo "$as_me: failed program was:" >&5
11671 cat conftest.$ac_ext >&5
11672 fi
11673 rm -f conftest.$ac_objext conftest.$ac_ext
11674                 CXXFLAGS="$cf_save_CFLAGS"
11675                 echo "$as_me:11675: result: $INTEL_CPLUSPLUS" >&5
11676 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11677                 ;;
11678         esac
11679 fi
11680
11681 ac_ext=cc
11682 ac_cpp='$CXXCPP $CPPFLAGS'
11683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11686 ac_main_return=return
11687
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11689 "configure"
11690 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11691 EOF
11692
11693 if test "$INTEL_CPLUSPLUS" = yes
11694 then
11695 # The "-wdXXX" options suppress warnings:
11696 # remark #1419: external declaration in primary source file
11697 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11698 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11699 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11700 # remark #193: zero used for undefined preprocessing identifier
11701 # remark #593: variable "curs_sb_left_arrow" was set but never used
11702 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11703 # remark #869: parameter "tw" was never referenced
11704 # remark #981: operands are evaluated in unspecified order
11705 # warning #269: invalid format string conversion
11706
11707         { echo "$as_me:11707: checking for $CC warning options..." >&5
11708 echo "$as_me: checking for $CC warning options..." >&6;}
11709         cf_save_CXXFLAGS="$CXXFLAGS"
11710         EXTRA_CXXFLAGS="-Wall"
11711         for cf_opt in \
11712                 wd1419 \
11713                 wd1682 \
11714                 wd1683 \
11715                 wd1684 \
11716                 wd193 \
11717                 wd279 \
11718                 wd593 \
11719                 wd810 \
11720                 wd869 \
11721                 wd981
11722         do
11723                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11724                 if { (eval echo "$as_me:11724: \"$ac_compile\"") >&5
11725   (eval $ac_compile) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); }; then
11729                         test -n "$verbose" && echo "$as_me:11729: result: ... -$cf_opt" >&5
11730 echo "${ECHO_T}... -$cf_opt" >&6
11731                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11732                 fi
11733         done
11734         CXXFLAGS="$cf_save_CXXFLAGS"
11735
11736 elif test "$GXX" = yes
11737 then
11738         { echo "$as_me:11738: checking for $CXX warning options..." >&5
11739 echo "$as_me: checking for $CXX warning options..." >&6;}
11740         cf_save_CXXFLAGS="$CXXFLAGS"
11741         EXTRA_CXXFLAGS="-W -Wall"
11742         cf_gxx_extra_warnings=""
11743         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11744         case "$GCC_VERSION" in
11745         [1-2].*)
11746                 ;;
11747         *)
11748                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11749                 ;;
11750         esac
11751         for cf_opt in \
11752                 Wabi \
11753                 fabi-version=0 \
11754                 Woverloaded-virtual \
11755                 Wsign-promo \
11756                 Wsynth \
11757                 Wold-style-cast \
11758                 Wcast-align \
11759                 Wcast-qual \
11760                 Wmissing-prototypes \
11761                 Wpointer-arith \
11762                 Wshadow \
11763                 Wstrict-prototypes \
11764                 Wundef $cf_gxx_extra_warnings Wno-unused
11765         do
11766                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11767                 if { (eval echo "$as_me:11767: \"$ac_compile\"") >&5
11768   (eval $ac_compile) 2>&5
11769   ac_status=$?
11770   echo "$as_me:11770: \$? = $ac_status" >&5
11771   (exit $ac_status); }; then
11772                         test -n "$verbose" && echo "$as_me:11772: result: ... -$cf_opt" >&5
11773 echo "${ECHO_T}... -$cf_opt" >&6
11774                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11775                 else
11776                         test -n "$verbose" && echo "$as_me:11776: result: ... no -$cf_opt" >&5
11777 echo "${ECHO_T}... no -$cf_opt" >&6
11778                 fi
11779         done
11780         CXXFLAGS="$cf_save_CXXFLAGS"
11781 fi
11782
11783 rm -rf conftest*
11784 ac_ext=c
11785 ac_cpp='$CPP $CPPFLAGS'
11786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11789 ac_main_return=return
11790
11791         fi
11792 fi
11793
11794 if test "$GCC" = yes
11795 then
11796 cat > conftest.i <<EOF
11797 #ifndef GCC_PRINTF
11798 #define GCC_PRINTF 0
11799 #endif
11800 #ifndef GCC_SCANF
11801 #define GCC_SCANF 0
11802 #endif
11803 #ifndef GCC_NORETURN
11804 #define GCC_NORETURN /* nothing */
11805 #endif
11806 #ifndef GCC_UNUSED
11807 #define GCC_UNUSED /* nothing */
11808 #endif
11809 EOF
11810 if test "$GCC" = yes
11811 then
11812         { echo "$as_me:11812: checking for $CC __attribute__ directives..." >&5
11813 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11814 cat > conftest.$ac_ext <<EOF
11815 #line 11815 "${as_me:-configure}"
11816 #include "confdefs.h"
11817 #include "conftest.h"
11818 #include "conftest.i"
11819 #if     GCC_PRINTF
11820 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11821 #else
11822 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11823 #endif
11824 #if     GCC_SCANF
11825 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11826 #else
11827 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11828 #endif
11829 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11830 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11831 extern void foo(void) GCC_NORETURN;
11832 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11833 EOF
11834         cf_printf_attribute=no
11835         cf_scanf_attribute=no
11836         for cf_attribute in scanf printf unused noreturn
11837         do
11838
11839 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11840
11841                 cf_directive="__attribute__(($cf_attribute))"
11842                 echo "checking for $CC $cf_directive" 1>&5
11843
11844                 case $cf_attribute in #(vi
11845                 printf) #(vi
11846                         cf_printf_attribute=yes
11847                         cat >conftest.h <<EOF
11848 #define GCC_$cf_ATTRIBUTE 1
11849 EOF
11850                         ;;
11851                 scanf) #(vi
11852                         cf_scanf_attribute=yes
11853                         cat >conftest.h <<EOF
11854 #define GCC_$cf_ATTRIBUTE 1
11855 EOF
11856                         ;;
11857                 *) #(vi
11858                         cat >conftest.h <<EOF
11859 #define GCC_$cf_ATTRIBUTE $cf_directive
11860 EOF
11861                         ;;
11862                 esac
11863
11864                 if { (eval echo "$as_me:11864: \"$ac_compile\"") >&5
11865   (eval $ac_compile) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); }; then
11869                         test -n "$verbose" && echo "$as_me:11869: result: ... $cf_attribute" >&5
11870 echo "${ECHO_T}... $cf_attribute" >&6
11871                         cat conftest.h >>confdefs.h
11872                         case $cf_attribute in #(vi
11873                         printf) #(vi
11874                                 if test "$cf_printf_attribute" = no ; then
11875                                         cat >>confdefs.h <<EOF
11876 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11877 EOF
11878                                 else
11879                                         cat >>confdefs.h <<EOF
11880 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11881 EOF
11882                                 fi
11883                                 ;;
11884                         scanf) #(vi
11885                                 if test "$cf_scanf_attribute" = no ; then
11886                                         cat >>confdefs.h <<EOF
11887 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11888 EOF
11889                                 else
11890                                         cat >>confdefs.h <<EOF
11891 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11892 EOF
11893                                 fi
11894                                 ;;
11895                         esac
11896                 fi
11897         done
11898 else
11899         fgrep define conftest.i >>confdefs.h
11900 fi
11901 rm -rf conftest*
11902 fi
11903
11904 ###     use option --enable-assertions to turn on generation of assertion code
11905 echo "$as_me:11905: checking if you want to enable runtime assertions" >&5
11906 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11907
11908 # Check whether --enable-assertions or --disable-assertions was given.
11909 if test "${enable_assertions+set}" = set; then
11910   enableval="$enable_assertions"
11911   with_assertions=$enableval
11912 else
11913   with_assertions=no
11914 fi;
11915 echo "$as_me:11915: result: $with_assertions" >&5
11916 echo "${ECHO_T}$with_assertions" >&6
11917 if test -n "$GCC"
11918 then
11919         if test "$with_assertions" = no
11920         then
11921                 cat >>confdefs.h <<\EOF
11922 #define NDEBUG 1
11923 EOF
11924
11925                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11926         else
11927
11928         ADAFLAGS="$ADAFLAGS -gnata"
11929
11930         fi
11931 fi
11932
11933 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11934
11935 echo "$as_me:11935: checking if you want to use dmalloc for testing" >&5
11936 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11937
11938 # Check whether --with-dmalloc or --without-dmalloc was given.
11939 if test "${with_dmalloc+set}" = set; then
11940   withval="$with_dmalloc"
11941   cat >>confdefs.h <<\EOF
11942 #define USE_DMALLOC 1
11943 EOF
11944
11945         : ${with_cflags:=-g}
11946         : ${with_no_leaks:=yes}
11947          with_dmalloc=yes
11948 else
11949   with_dmalloc=
11950 fi;
11951 echo "$as_me:11951: result: ${with_dmalloc:-no}" >&5
11952 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11953
11954 case .$with_cflags in #(vi
11955 .*-g*)
11956         case .$CFLAGS in #(vi
11957         .*-g*) #(vi
11958                 ;;
11959         *)
11960
11961 cf_fix_cppflags=no
11962 cf_new_cflags=
11963 cf_new_cppflags=
11964 cf_new_extra_cppflags=
11965
11966 for cf_add_cflags in -g
11967 do
11968 case $cf_fix_cppflags in
11969 no)
11970         case $cf_add_cflags in #(vi
11971         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11972                 case $cf_add_cflags in
11973                 -D*)
11974                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11975
11976                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11977                                 && test -z "${cf_tst_cflags}" \
11978                                 && cf_fix_cppflags=yes
11979
11980                         if test $cf_fix_cppflags = yes ; then
11981                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11982                                 continue
11983                         elif test "${cf_tst_cflags}" = "\"'" ; then
11984                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11985                                 continue
11986                         fi
11987                         ;;
11988                 esac
11989                 case "$CPPFLAGS" in
11990                 *$cf_add_cflags) #(vi
11991                         ;;
11992                 *) #(vi
11993                         case $cf_add_cflags in #(vi
11994                         -D*)
11995                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11996
11997 CPPFLAGS=`echo "$CPPFLAGS" | \
11998         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11999                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12000
12001                                 ;;
12002                         esac
12003                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12004                         ;;
12005                 esac
12006                 ;;
12007         *)
12008                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12009                 ;;
12010         esac
12011         ;;
12012 yes)
12013         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12014
12015         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12016
12017         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12018                 && test -z "${cf_tst_cflags}" \
12019                 && cf_fix_cppflags=no
12020         ;;
12021 esac
12022 done
12023
12024 if test -n "$cf_new_cflags" ; then
12025
12026         CFLAGS="$CFLAGS $cf_new_cflags"
12027 fi
12028
12029 if test -n "$cf_new_cppflags" ; then
12030
12031         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12032 fi
12033
12034 if test -n "$cf_new_extra_cppflags" ; then
12035
12036         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12037 fi
12038
12039                 ;;
12040         esac
12041         ;;
12042 esac
12043
12044 if test "$with_dmalloc" = yes ; then
12045         echo "$as_me:12045: checking for dmalloc.h" >&5
12046 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12047 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12048   echo $ECHO_N "(cached) $ECHO_C" >&6
12049 else
12050   cat >conftest.$ac_ext <<_ACEOF
12051 #line 12051 "configure"
12052 #include "confdefs.h"
12053 #include <dmalloc.h>
12054 _ACEOF
12055 if { (eval echo "$as_me:12055: \"$ac_cpp conftest.$ac_ext\"") >&5
12056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12057   ac_status=$?
12058   egrep -v '^ *\+' conftest.er1 >conftest.err
12059   rm -f conftest.er1
12060   cat conftest.err >&5
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); } >/dev/null; then
12063   if test -s conftest.err; then
12064     ac_cpp_err=$ac_c_preproc_warn_flag
12065   else
12066     ac_cpp_err=
12067   fi
12068 else
12069   ac_cpp_err=yes
12070 fi
12071 if test -z "$ac_cpp_err"; then
12072   ac_cv_header_dmalloc_h=yes
12073 else
12074   echo "$as_me: failed program was:" >&5
12075   cat conftest.$ac_ext >&5
12076   ac_cv_header_dmalloc_h=no
12077 fi
12078 rm -f conftest.err conftest.$ac_ext
12079 fi
12080 echo "$as_me:12080: result: $ac_cv_header_dmalloc_h" >&5
12081 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12082 if test $ac_cv_header_dmalloc_h = yes; then
12083
12084 echo "$as_me:12084: checking for dmalloc_debug in -ldmalloc" >&5
12085 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12086 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12087   echo $ECHO_N "(cached) $ECHO_C" >&6
12088 else
12089   ac_check_lib_save_LIBS=$LIBS
12090 LIBS="-ldmalloc  $LIBS"
12091 cat >conftest.$ac_ext <<_ACEOF
12092 #line 12092 "configure"
12093 #include "confdefs.h"
12094
12095 /* Override any gcc2 internal prototype to avoid an error.  */
12096 #ifdef __cplusplus
12097 extern "C"
12098 #endif
12099 /* We use char because int might match the return type of a gcc2
12100    builtin and then its argument prototype would still apply.  */
12101 char dmalloc_debug ();
12102 int
12103 main ()
12104 {
12105 dmalloc_debug ();
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f conftest.$ac_objext conftest$ac_exeext
12111 if { (eval echo "$as_me:12111: \"$ac_link\"") >&5
12112   (eval $ac_link) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit $ac_status); } &&
12116          { ac_try='test -s conftest$ac_exeext'
12117   { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118   (eval $ac_try) 2>&5
12119   ac_status=$?
12120   echo "$as_me:12120: \$? = $ac_status" >&5
12121   (exit $ac_status); }; }; then
12122   ac_cv_lib_dmalloc_dmalloc_debug=yes
12123 else
12124   echo "$as_me: failed program was:" >&5
12125 cat conftest.$ac_ext >&5
12126 ac_cv_lib_dmalloc_dmalloc_debug=no
12127 fi
12128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12129 LIBS=$ac_check_lib_save_LIBS
12130 fi
12131 echo "$as_me:12131: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12132 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12133 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12134   cat >>confdefs.h <<EOF
12135 #define HAVE_LIBDMALLOC 1
12136 EOF
12137
12138   LIBS="-ldmalloc $LIBS"
12139
12140 fi
12141
12142 fi
12143
12144 fi
12145
12146 echo "$as_me:12146: checking if you want to use dbmalloc for testing" >&5
12147 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12148
12149 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12150 if test "${with_dbmalloc+set}" = set; then
12151   withval="$with_dbmalloc"
12152   cat >>confdefs.h <<\EOF
12153 #define USE_DBMALLOC 1
12154 EOF
12155
12156         : ${with_cflags:=-g}
12157         : ${with_no_leaks:=yes}
12158          with_dbmalloc=yes
12159 else
12160   with_dbmalloc=
12161 fi;
12162 echo "$as_me:12162: result: ${with_dbmalloc:-no}" >&5
12163 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12164
12165 case .$with_cflags in #(vi
12166 .*-g*)
12167         case .$CFLAGS in #(vi
12168         .*-g*) #(vi
12169                 ;;
12170         *)
12171
12172 cf_fix_cppflags=no
12173 cf_new_cflags=
12174 cf_new_cppflags=
12175 cf_new_extra_cppflags=
12176
12177 for cf_add_cflags in -g
12178 do
12179 case $cf_fix_cppflags in
12180 no)
12181         case $cf_add_cflags in #(vi
12182         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12183                 case $cf_add_cflags in
12184                 -D*)
12185                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12186
12187                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12188                                 && test -z "${cf_tst_cflags}" \
12189                                 && cf_fix_cppflags=yes
12190
12191                         if test $cf_fix_cppflags = yes ; then
12192                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12193                                 continue
12194                         elif test "${cf_tst_cflags}" = "\"'" ; then
12195                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12196                                 continue
12197                         fi
12198                         ;;
12199                 esac
12200                 case "$CPPFLAGS" in
12201                 *$cf_add_cflags) #(vi
12202                         ;;
12203                 *) #(vi
12204                         case $cf_add_cflags in #(vi
12205                         -D*)
12206                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12207
12208 CPPFLAGS=`echo "$CPPFLAGS" | \
12209         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12210                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12211
12212                                 ;;
12213                         esac
12214                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12215                         ;;
12216                 esac
12217                 ;;
12218         *)
12219                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12220                 ;;
12221         esac
12222         ;;
12223 yes)
12224         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12225
12226         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12227
12228         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12229                 && test -z "${cf_tst_cflags}" \
12230                 && cf_fix_cppflags=no
12231         ;;
12232 esac
12233 done
12234
12235 if test -n "$cf_new_cflags" ; then
12236
12237         CFLAGS="$CFLAGS $cf_new_cflags"
12238 fi
12239
12240 if test -n "$cf_new_cppflags" ; then
12241
12242         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12243 fi
12244
12245 if test -n "$cf_new_extra_cppflags" ; then
12246
12247         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12248 fi
12249
12250                 ;;
12251         esac
12252         ;;
12253 esac
12254
12255 if test "$with_dbmalloc" = yes ; then
12256         echo "$as_me:12256: checking for dbmalloc.h" >&5
12257 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12258 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12259   echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261   cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264 #include <dbmalloc.h>
12265 _ACEOF
12266 if { (eval echo "$as_me:12266: \"$ac_cpp conftest.$ac_ext\"") >&5
12267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12268   ac_status=$?
12269   egrep -v '^ *\+' conftest.er1 >conftest.err
12270   rm -f conftest.er1
12271   cat conftest.err >&5
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); } >/dev/null; then
12274   if test -s conftest.err; then
12275     ac_cpp_err=$ac_c_preproc_warn_flag
12276   else
12277     ac_cpp_err=
12278   fi
12279 else
12280   ac_cpp_err=yes
12281 fi
12282 if test -z "$ac_cpp_err"; then
12283   ac_cv_header_dbmalloc_h=yes
12284 else
12285   echo "$as_me: failed program was:" >&5
12286   cat conftest.$ac_ext >&5
12287   ac_cv_header_dbmalloc_h=no
12288 fi
12289 rm -f conftest.err conftest.$ac_ext
12290 fi
12291 echo "$as_me:12291: result: $ac_cv_header_dbmalloc_h" >&5
12292 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12293 if test $ac_cv_header_dbmalloc_h = yes; then
12294
12295 echo "$as_me:12295: checking for debug_malloc in -ldbmalloc" >&5
12296 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12297 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12298   echo $ECHO_N "(cached) $ECHO_C" >&6
12299 else
12300   ac_check_lib_save_LIBS=$LIBS
12301 LIBS="-ldbmalloc  $LIBS"
12302 cat >conftest.$ac_ext <<_ACEOF
12303 #line 12303 "configure"
12304 #include "confdefs.h"
12305
12306 /* Override any gcc2 internal prototype to avoid an error.  */
12307 #ifdef __cplusplus
12308 extern "C"
12309 #endif
12310 /* We use char because int might match the return type of a gcc2
12311    builtin and then its argument prototype would still apply.  */
12312 char debug_malloc ();
12313 int
12314 main ()
12315 {
12316 debug_malloc ();
12317   ;
12318   return 0;
12319 }
12320 _ACEOF
12321 rm -f conftest.$ac_objext conftest$ac_exeext
12322 if { (eval echo "$as_me:12322: \"$ac_link\"") >&5
12323   (eval $ac_link) 2>&5
12324   ac_status=$?
12325   echo "$as_me:12325: \$? = $ac_status" >&5
12326   (exit $ac_status); } &&
12327          { ac_try='test -s conftest$ac_exeext'
12328   { (eval echo "$as_me:12328: \"$ac_try\"") >&5
12329   (eval $ac_try) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); }; }; then
12333   ac_cv_lib_dbmalloc_debug_malloc=yes
12334 else
12335   echo "$as_me: failed program was:" >&5
12336 cat conftest.$ac_ext >&5
12337 ac_cv_lib_dbmalloc_debug_malloc=no
12338 fi
12339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12340 LIBS=$ac_check_lib_save_LIBS
12341 fi
12342 echo "$as_me:12342: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12343 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12344 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12345   cat >>confdefs.h <<EOF
12346 #define HAVE_LIBDBMALLOC 1
12347 EOF
12348
12349   LIBS="-ldbmalloc $LIBS"
12350
12351 fi
12352
12353 fi
12354
12355 fi
12356
12357 echo "$as_me:12357: checking if you want to use valgrind for testing" >&5
12358 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12359
12360 # Check whether --with-valgrind or --without-valgrind was given.
12361 if test "${with_valgrind+set}" = set; then
12362   withval="$with_valgrind"
12363   cat >>confdefs.h <<\EOF
12364 #define USE_VALGRIND 1
12365 EOF
12366
12367         : ${with_cflags:=-g}
12368         : ${with_no_leaks:=yes}
12369          with_valgrind=yes
12370 else
12371   with_valgrind=
12372 fi;
12373 echo "$as_me:12373: result: ${with_valgrind:-no}" >&5
12374 echo "${ECHO_T}${with_valgrind:-no}" >&6
12375
12376 case .$with_cflags in #(vi
12377 .*-g*)
12378         case .$CFLAGS in #(vi
12379         .*-g*) #(vi
12380                 ;;
12381         *)
12382
12383 cf_fix_cppflags=no
12384 cf_new_cflags=
12385 cf_new_cppflags=
12386 cf_new_extra_cppflags=
12387
12388 for cf_add_cflags in -g
12389 do
12390 case $cf_fix_cppflags in
12391 no)
12392         case $cf_add_cflags in #(vi
12393         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12394                 case $cf_add_cflags in
12395                 -D*)
12396                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12397
12398                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12399                                 && test -z "${cf_tst_cflags}" \
12400                                 && cf_fix_cppflags=yes
12401
12402                         if test $cf_fix_cppflags = yes ; then
12403                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12404                                 continue
12405                         elif test "${cf_tst_cflags}" = "\"'" ; then
12406                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12407                                 continue
12408                         fi
12409                         ;;
12410                 esac
12411                 case "$CPPFLAGS" in
12412                 *$cf_add_cflags) #(vi
12413                         ;;
12414                 *) #(vi
12415                         case $cf_add_cflags in #(vi
12416                         -D*)
12417                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12418
12419 CPPFLAGS=`echo "$CPPFLAGS" | \
12420         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12421                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12422
12423                                 ;;
12424                         esac
12425                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12426                         ;;
12427                 esac
12428                 ;;
12429         *)
12430                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12431                 ;;
12432         esac
12433         ;;
12434 yes)
12435         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12436
12437         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12438
12439         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12440                 && test -z "${cf_tst_cflags}" \
12441                 && cf_fix_cppflags=no
12442         ;;
12443 esac
12444 done
12445
12446 if test -n "$cf_new_cflags" ; then
12447
12448         CFLAGS="$CFLAGS $cf_new_cflags"
12449 fi
12450
12451 if test -n "$cf_new_cppflags" ; then
12452
12453         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12454 fi
12455
12456 if test -n "$cf_new_extra_cppflags" ; then
12457
12458         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12459 fi
12460
12461                 ;;
12462         esac
12463         ;;
12464 esac
12465
12466 echo "$as_me:12466: checking if you want to perform memory-leak testing" >&5
12467 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12468
12469 # Check whether --enable-leaks or --disable-leaks was given.
12470 if test "${enable_leaks+set}" = set; then
12471   enableval="$enable_leaks"
12472   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12473 else
12474   : ${with_no_leaks:=no}
12475 fi;
12476 echo "$as_me:12476: result: $with_no_leaks" >&5
12477 echo "${ECHO_T}$with_no_leaks" >&6
12478
12479 if test "$with_no_leaks" = yes ; then
12480         cat >>confdefs.h <<\EOF
12481 #define NO_LEAKS 1
12482 EOF
12483
12484         cat >>confdefs.h <<\EOF
12485 #define YY_NO_LEAKS 1
12486 EOF
12487
12488 fi
12489
12490 cat >>confdefs.h <<\EOF
12491 #define HAVE_NC_ALLOC_H 1
12492 EOF
12493
12494 ###     use option --enable-expanded to generate certain macros as functions
12495
12496 # Check whether --enable-expanded or --disable-expanded was given.
12497 if test "${enable_expanded+set}" = set; then
12498   enableval="$enable_expanded"
12499   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12500 #define NCURSES_EXPANDED 1
12501 EOF
12502
12503 fi;
12504
12505 ###     use option --disable-macros to suppress macros in favor of functions
12506
12507 # Check whether --enable-macros or --disable-macros was given.
12508 if test "${enable_macros+set}" = set; then
12509   enableval="$enable_macros"
12510   test "$enableval" = no && cat >>confdefs.h <<\EOF
12511 #define NCURSES_NOMACROS 1
12512 EOF
12513
12514 fi;
12515
12516 # Normally we only add trace() to the debug-library.  Allow this to be
12517 # extended to all models of the ncurses library:
12518 cf_all_traces=no
12519 case "$CFLAGS $CPPFLAGS" in
12520 *-DTRACE*)
12521         cf_all_traces=yes
12522         ;;
12523 esac
12524
12525 echo "$as_me:12525: checking whether to add trace feature to all models" >&5
12526 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12527
12528 # Check whether --with-trace or --without-trace was given.
12529 if test "${with_trace+set}" = set; then
12530   withval="$with_trace"
12531   cf_with_trace=$withval
12532 else
12533   cf_with_trace=$cf_all_traces
12534 fi;
12535 echo "$as_me:12535: result: $cf_with_trace" >&5
12536 echo "${ECHO_T}$cf_with_trace" >&6
12537
12538 if test "$cf_with_trace" = yes ; then
12539         LIB_TRACING=all
12540         ADA_TRACE=TRUE
12541
12542 cf_fix_cppflags=no
12543 cf_new_cflags=
12544 cf_new_cppflags=
12545 cf_new_extra_cppflags=
12546
12547 for cf_add_cflags in -DTRACE
12548 do
12549 case $cf_fix_cppflags in
12550 no)
12551         case $cf_add_cflags in #(vi
12552         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12553                 case $cf_add_cflags in
12554                 -D*)
12555                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12556
12557                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12558                                 && test -z "${cf_tst_cflags}" \
12559                                 && cf_fix_cppflags=yes
12560
12561                         if test $cf_fix_cppflags = yes ; then
12562                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12563                                 continue
12564                         elif test "${cf_tst_cflags}" = "\"'" ; then
12565                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12566                                 continue
12567                         fi
12568                         ;;
12569                 esac
12570                 case "$CPPFLAGS" in
12571                 *$cf_add_cflags) #(vi
12572                         ;;
12573                 *) #(vi
12574                         case $cf_add_cflags in #(vi
12575                         -D*)
12576                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12577
12578 CPPFLAGS=`echo "$CPPFLAGS" | \
12579         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12580                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12581
12582                                 ;;
12583                         esac
12584                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12585                         ;;
12586                 esac
12587                 ;;
12588         *)
12589                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12590                 ;;
12591         esac
12592         ;;
12593 yes)
12594         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12595
12596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12597
12598         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12599                 && test -z "${cf_tst_cflags}" \
12600                 && cf_fix_cppflags=no
12601         ;;
12602 esac
12603 done
12604
12605 if test -n "$cf_new_cflags" ; then
12606
12607         CFLAGS="$CFLAGS $cf_new_cflags"
12608 fi
12609
12610 if test -n "$cf_new_cppflags" ; then
12611
12612         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12613 fi
12614
12615 if test -n "$cf_new_extra_cppflags" ; then
12616
12617         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12618 fi
12619
12620 else
12621         LIB_TRACING=DEBUG
12622         ADA_TRACE=FALSE
12623 fi
12624
12625 ###     Checks for libraries.
12626 case $cf_cv_system_name in #(vi
12627 *mingw32*) #(vi
12628         ;;
12629 *)
12630 echo "$as_me:12630: checking for gettimeofday" >&5
12631 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12632 if test "${ac_cv_func_gettimeofday+set}" = set; then
12633   echo $ECHO_N "(cached) $ECHO_C" >&6
12634 else
12635   cat >conftest.$ac_ext <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12638 /* System header to define __stub macros and hopefully few prototypes,
12639     which can conflict with char gettimeofday (); below.  */
12640 #include <assert.h>
12641 /* Override any gcc2 internal prototype to avoid an error.  */
12642 #ifdef __cplusplus
12643 extern "C"
12644 #endif
12645 /* We use char because int might match the return type of a gcc2
12646    builtin and then its argument prototype would still apply.  */
12647 char gettimeofday ();
12648 char (*f) ();
12649
12650 int
12651 main ()
12652 {
12653 /* The GNU C library defines this for functions which it implements
12654     to always fail with ENOSYS.  Some functions are actually named
12655     something starting with __ and the normal name is an alias.  */
12656 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12657 choke me
12658 #else
12659 f = gettimeofday;
12660 #endif
12661
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext conftest$ac_exeext
12667 if { (eval echo "$as_me:12667: \"$ac_link\"") >&5
12668   (eval $ac_link) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); } &&
12672          { ac_try='test -s conftest$ac_exeext'
12673   { (eval echo "$as_me:12673: \"$ac_try\"") >&5
12674   (eval $ac_try) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); }; }; then
12678   ac_cv_func_gettimeofday=yes
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 cat conftest.$ac_ext >&5
12682 ac_cv_func_gettimeofday=no
12683 fi
12684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12685 fi
12686 echo "$as_me:12686: result: $ac_cv_func_gettimeofday" >&5
12687 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12688 if test $ac_cv_func_gettimeofday = yes; then
12689   cat >>confdefs.h <<\EOF
12690 #define HAVE_GETTIMEOFDAY 1
12691 EOF
12692
12693 else
12694
12695 echo "$as_me:12695: checking for gettimeofday in -lbsd" >&5
12696 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12697 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12698   echo $ECHO_N "(cached) $ECHO_C" >&6
12699 else
12700   ac_check_lib_save_LIBS=$LIBS
12701 LIBS="-lbsd  $LIBS"
12702 cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705
12706 /* Override any gcc2 internal prototype to avoid an error.  */
12707 #ifdef __cplusplus
12708 extern "C"
12709 #endif
12710 /* We use char because int might match the return type of a gcc2
12711    builtin and then its argument prototype would still apply.  */
12712 char gettimeofday ();
12713 int
12714 main ()
12715 {
12716 gettimeofday ();
12717   ;
12718   return 0;
12719 }
12720 _ACEOF
12721 rm -f conftest.$ac_objext conftest$ac_exeext
12722 if { (eval echo "$as_me:12722: \"$ac_link\"") >&5
12723   (eval $ac_link) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit $ac_status); } &&
12727          { ac_try='test -s conftest$ac_exeext'
12728   { (eval echo "$as_me:12728: \"$ac_try\"") >&5
12729   (eval $ac_try) 2>&5
12730   ac_status=$?
12731   echo "$as_me:12731: \$? = $ac_status" >&5
12732   (exit $ac_status); }; }; then
12733   ac_cv_lib_bsd_gettimeofday=yes
12734 else
12735   echo "$as_me: failed program was:" >&5
12736 cat conftest.$ac_ext >&5
12737 ac_cv_lib_bsd_gettimeofday=no
12738 fi
12739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12740 LIBS=$ac_check_lib_save_LIBS
12741 fi
12742 echo "$as_me:12742: result: $ac_cv_lib_bsd_gettimeofday" >&5
12743 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12744 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12745   cat >>confdefs.h <<\EOF
12746 #define HAVE_GETTIMEOFDAY 1
12747 EOF
12748
12749         LIBS="-lbsd $LIBS"
12750 fi
12751
12752 fi
12753         ;;
12754 esac
12755
12756 echo "$as_me:12756: checking if -lm needed for math functions" >&5
12757 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12758 if test "${cf_cv_need_libm+set}" = set; then
12759   echo $ECHO_N "(cached) $ECHO_C" >&6
12760 else
12761
12762         cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765
12766         #include <stdio.h>
12767         #include <math.h>
12768
12769 int
12770 main ()
12771 {
12772 double x = rand(); printf("result = %g\n", sin(x))
12773   ;
12774   return 0;
12775 }
12776 _ACEOF
12777 rm -f conftest.$ac_objext conftest$ac_exeext
12778 if { (eval echo "$as_me:12778: \"$ac_link\"") >&5
12779   (eval $ac_link) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); } &&
12783          { ac_try='test -s conftest$ac_exeext'
12784   { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); }; }; then
12789   cf_cv_need_libm=no
12790 else
12791   echo "$as_me: failed program was:" >&5
12792 cat conftest.$ac_ext >&5
12793 cf_cv_need_libm=yes
12794 fi
12795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12796 fi
12797 echo "$as_me:12797: result: $cf_cv_need_libm" >&5
12798 echo "${ECHO_T}$cf_cv_need_libm" >&6
12799 if test "$cf_cv_need_libm" = yes
12800 then
12801 MATH_LIB=-lm
12802 fi
12803
12804 ###     Checks for header files.
12805 echo "$as_me:12805: checking for ANSI C header files" >&5
12806 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12807 if test "${ac_cv_header_stdc+set}" = set; then
12808   echo $ECHO_N "(cached) $ECHO_C" >&6
12809 else
12810   cat >conftest.$ac_ext <<_ACEOF
12811 #line 12811 "configure"
12812 #include "confdefs.h"
12813 #include <stdlib.h>
12814 #include <stdarg.h>
12815 #include <string.h>
12816 #include <float.h>
12817
12818 _ACEOF
12819 if { (eval echo "$as_me:12819: \"$ac_cpp conftest.$ac_ext\"") >&5
12820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12821   ac_status=$?
12822   egrep -v '^ *\+' conftest.er1 >conftest.err
12823   rm -f conftest.er1
12824   cat conftest.err >&5
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); } >/dev/null; then
12827   if test -s conftest.err; then
12828     ac_cpp_err=$ac_c_preproc_warn_flag
12829   else
12830     ac_cpp_err=
12831   fi
12832 else
12833   ac_cpp_err=yes
12834 fi
12835 if test -z "$ac_cpp_err"; then
12836   ac_cv_header_stdc=yes
12837 else
12838   echo "$as_me: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   ac_cv_header_stdc=no
12841 fi
12842 rm -f conftest.err conftest.$ac_ext
12843
12844 if test $ac_cv_header_stdc = yes; then
12845   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12846   cat >conftest.$ac_ext <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 #include <string.h>
12850
12851 _ACEOF
12852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12853   egrep "memchr" >/dev/null 2>&1; then
12854   :
12855 else
12856   ac_cv_header_stdc=no
12857 fi
12858 rm -rf conftest*
12859
12860 fi
12861
12862 if test $ac_cv_header_stdc = yes; then
12863   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12864   cat >conftest.$ac_ext <<_ACEOF
12865 #line 12865 "configure"
12866 #include "confdefs.h"
12867 #include <stdlib.h>
12868
12869 _ACEOF
12870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12871   egrep "free" >/dev/null 2>&1; then
12872   :
12873 else
12874   ac_cv_header_stdc=no
12875 fi
12876 rm -rf conftest*
12877
12878 fi
12879
12880 if test $ac_cv_header_stdc = yes; then
12881   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12882   if test "$cross_compiling" = yes; then
12883   :
12884 else
12885   cat >conftest.$ac_ext <<_ACEOF
12886 #line 12886 "configure"
12887 #include "confdefs.h"
12888 #include <ctype.h>
12889 #if ((' ' & 0x0FF) == 0x020)
12890 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12891 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12892 #else
12893 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12894                      || ('j' <= (c) && (c) <= 'r') \
12895                      || ('s' <= (c) && (c) <= 'z'))
12896 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12897 #endif
12898
12899 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12900 int
12901 main ()
12902 {
12903   int i;
12904   for (i = 0; i < 256; i++)
12905     if (XOR (islower (i), ISLOWER (i))
12906         || toupper (i) != TOUPPER (i))
12907       $ac_main_return(2);
12908   $ac_main_return (0);
12909 }
12910 _ACEOF
12911 rm -f conftest$ac_exeext
12912 if { (eval echo "$as_me:12912: \"$ac_link\"") >&5
12913   (eval $ac_link) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   :
12923 else
12924   echo "$as_me: program exited with status $ac_status" >&5
12925 echo "$as_me: failed program was:" >&5
12926 cat conftest.$ac_ext >&5
12927 ac_cv_header_stdc=no
12928 fi
12929 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12930 fi
12931 fi
12932 fi
12933 echo "$as_me:12933: result: $ac_cv_header_stdc" >&5
12934 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12935 if test $ac_cv_header_stdc = yes; then
12936
12937 cat >>confdefs.h <<\EOF
12938 #define STDC_HEADERS 1
12939 EOF
12940
12941 fi
12942
12943 ac_header_dirent=no
12944 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12945   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12946 echo "$as_me:12946: checking for $ac_hdr that defines DIR" >&5
12947 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <sys/types.h>
12955 #include <$ac_hdr>
12956
12957 int
12958 main ()
12959 {
12960 if ((DIR *) 0)
12961 return 0;
12962   ;
12963   return 0;
12964 }
12965 _ACEOF
12966 rm -f conftest.$ac_objext
12967 if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5
12968   (eval $ac_compile) 2>&5
12969   ac_status=$?
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit $ac_status); } &&
12972          { ac_try='test -s conftest.$ac_objext'
12973   { (eval echo "$as_me:12973: \"$ac_try\"") >&5
12974   (eval $ac_try) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit $ac_status); }; }; then
12978   eval "$as_ac_Header=yes"
12979 else
12980   echo "$as_me: failed program was:" >&5
12981 cat conftest.$ac_ext >&5
12982 eval "$as_ac_Header=no"
12983 fi
12984 rm -f conftest.$ac_objext conftest.$ac_ext
12985 fi
12986 echo "$as_me:12986: result: `eval echo '${'$as_ac_Header'}'`" >&5
12987 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12988 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12989   cat >>confdefs.h <<EOF
12990 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12991 EOF
12992
12993 ac_header_dirent=$ac_hdr; break
12994 fi
12995
12996 done
12997 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12998 if test $ac_header_dirent = dirent.h; then
12999   echo "$as_me:12999: checking for opendir in -ldir" >&5
13000 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13001 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13002   echo $ECHO_N "(cached) $ECHO_C" >&6
13003 else
13004   ac_check_lib_save_LIBS=$LIBS
13005 LIBS="-ldir  $LIBS"
13006 cat >conftest.$ac_ext <<_ACEOF
13007 #line 13007 "configure"
13008 #include "confdefs.h"
13009
13010 /* Override any gcc2 internal prototype to avoid an error.  */
13011 #ifdef __cplusplus
13012 extern "C"
13013 #endif
13014 /* We use char because int might match the return type of a gcc2
13015    builtin and then its argument prototype would still apply.  */
13016 char opendir ();
13017 int
13018 main ()
13019 {
13020 opendir ();
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext conftest$ac_exeext
13026 if { (eval echo "$as_me:13026: \"$ac_link\"") >&5
13027   (eval $ac_link) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest$ac_exeext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   ac_cv_lib_dir_opendir=yes
13038 else
13039   echo "$as_me: failed program was:" >&5
13040 cat conftest.$ac_ext >&5
13041 ac_cv_lib_dir_opendir=no
13042 fi
13043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 echo "$as_me:13046: result: $ac_cv_lib_dir_opendir" >&5
13047 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13048 if test $ac_cv_lib_dir_opendir = yes; then
13049   LIBS="$LIBS -ldir"
13050 fi
13051
13052 else
13053   echo "$as_me:13053: checking for opendir in -lx" >&5
13054 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13055 if test "${ac_cv_lib_x_opendir+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058   ac_check_lib_save_LIBS=$LIBS
13059 LIBS="-lx  $LIBS"
13060 cat >conftest.$ac_ext <<_ACEOF
13061 #line 13061 "configure"
13062 #include "confdefs.h"
13063
13064 /* Override any gcc2 internal prototype to avoid an error.  */
13065 #ifdef __cplusplus
13066 extern "C"
13067 #endif
13068 /* We use char because int might match the return type of a gcc2
13069    builtin and then its argument prototype would still apply.  */
13070 char opendir ();
13071 int
13072 main ()
13073 {
13074 opendir ();
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext conftest$ac_exeext
13080 if { (eval echo "$as_me:13080: \"$ac_link\"") >&5
13081   (eval $ac_link) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } &&
13085          { ac_try='test -s conftest$ac_exeext'
13086   { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091   ac_cv_lib_x_opendir=yes
13092 else
13093   echo "$as_me: failed program was:" >&5
13094 cat conftest.$ac_ext >&5
13095 ac_cv_lib_x_opendir=no
13096 fi
13097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13098 LIBS=$ac_check_lib_save_LIBS
13099 fi
13100 echo "$as_me:13100: result: $ac_cv_lib_x_opendir" >&5
13101 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13102 if test $ac_cv_lib_x_opendir = yes; then
13103   LIBS="$LIBS -lx"
13104 fi
13105
13106 fi
13107
13108 echo "$as_me:13108: checking whether time.h and sys/time.h may both be included" >&5
13109 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13110 if test "${ac_cv_header_time+set}" = set; then
13111   echo $ECHO_N "(cached) $ECHO_C" >&6
13112 else
13113   cat >conftest.$ac_ext <<_ACEOF
13114 #line 13114 "configure"
13115 #include "confdefs.h"
13116 #include <sys/types.h>
13117 #include <sys/time.h>
13118 #include <time.h>
13119
13120 int
13121 main ()
13122 {
13123 if ((struct tm *) 0)
13124 return 0;
13125   ;
13126   return 0;
13127 }
13128 _ACEOF
13129 rm -f conftest.$ac_objext
13130 if { (eval echo "$as_me:13130: \"$ac_compile\"") >&5
13131   (eval $ac_compile) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); } &&
13135          { ac_try='test -s conftest.$ac_objext'
13136   { (eval echo "$as_me:13136: \"$ac_try\"") >&5
13137   (eval $ac_try) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); }; }; then
13141   ac_cv_header_time=yes
13142 else
13143   echo "$as_me: failed program was:" >&5
13144 cat conftest.$ac_ext >&5
13145 ac_cv_header_time=no
13146 fi
13147 rm -f conftest.$ac_objext conftest.$ac_ext
13148 fi
13149 echo "$as_me:13149: result: $ac_cv_header_time" >&5
13150 echo "${ECHO_T}$ac_cv_header_time" >&6
13151 if test $ac_cv_header_time = yes; then
13152
13153 cat >>confdefs.h <<\EOF
13154 #define TIME_WITH_SYS_TIME 1
13155 EOF
13156
13157 fi
13158
13159 cf_regex_func=no
13160
13161 cf_regex_libs="regex re"
13162 case $host_os in #(vi
13163 mingw*)
13164         cf_regex_libs="regex.dll $cf_regex_libs"
13165         ;;
13166 esac
13167
13168 echo "$as_me:13168: checking for regcomp" >&5
13169 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13170 if test "${ac_cv_func_regcomp+set}" = set; then
13171   echo $ECHO_N "(cached) $ECHO_C" >&6
13172 else
13173   cat >conftest.$ac_ext <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176 /* System header to define __stub macros and hopefully few prototypes,
13177     which can conflict with char regcomp (); below.  */
13178 #include <assert.h>
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 #ifdef __cplusplus
13181 extern "C"
13182 #endif
13183 /* We use char because int might match the return type of a gcc2
13184    builtin and then its argument prototype would still apply.  */
13185 char regcomp ();
13186 char (*f) ();
13187
13188 int
13189 main ()
13190 {
13191 /* The GNU C library defines this for functions which it implements
13192     to always fail with ENOSYS.  Some functions are actually named
13193     something starting with __ and the normal name is an alias.  */
13194 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13195 choke me
13196 #else
13197 f = regcomp;
13198 #endif
13199
13200   ;
13201   return 0;
13202 }
13203 _ACEOF
13204 rm -f conftest.$ac_objext conftest$ac_exeext
13205 if { (eval echo "$as_me:13205: \"$ac_link\"") >&5
13206   (eval $ac_link) 2>&5
13207   ac_status=$?
13208   echo "$as_me:13208: \$? = $ac_status" >&5
13209   (exit $ac_status); } &&
13210          { ac_try='test -s conftest$ac_exeext'
13211   { (eval echo "$as_me:13211: \"$ac_try\"") >&5
13212   (eval $ac_try) 2>&5
13213   ac_status=$?
13214   echo "$as_me:13214: \$? = $ac_status" >&5
13215   (exit $ac_status); }; }; then
13216   ac_cv_func_regcomp=yes
13217 else
13218   echo "$as_me: failed program was:" >&5
13219 cat conftest.$ac_ext >&5
13220 ac_cv_func_regcomp=no
13221 fi
13222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13223 fi
13224 echo "$as_me:13224: result: $ac_cv_func_regcomp" >&5
13225 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13226 if test $ac_cv_func_regcomp = yes; then
13227   cf_regex_func=regcomp
13228 else
13229
13230         for cf_regex_lib in $cf_regex_libs
13231         do
13232                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13233 echo "$as_me:13233: checking for regcomp in -l$cf_regex_lib" >&5
13234 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13235 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13236   echo $ECHO_N "(cached) $ECHO_C" >&6
13237 else
13238   ac_check_lib_save_LIBS=$LIBS
13239 LIBS="-l$cf_regex_lib  $LIBS"
13240 cat >conftest.$ac_ext <<_ACEOF
13241 #line 13241 "configure"
13242 #include "confdefs.h"
13243
13244 /* Override any gcc2 internal prototype to avoid an error.  */
13245 #ifdef __cplusplus
13246 extern "C"
13247 #endif
13248 /* We use char because int might match the return type of a gcc2
13249    builtin and then its argument prototype would still apply.  */
13250 char regcomp ();
13251 int
13252 main ()
13253 {
13254 regcomp ();
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 rm -f conftest.$ac_objext conftest$ac_exeext
13260 if { (eval echo "$as_me:13260: \"$ac_link\"") >&5
13261   (eval $ac_link) 2>&5
13262   ac_status=$?
13263   echo "$as_me:13263: \$? = $ac_status" >&5
13264   (exit $ac_status); } &&
13265          { ac_try='test -s conftest$ac_exeext'
13266   { (eval echo "$as_me:13266: \"$ac_try\"") >&5
13267   (eval $ac_try) 2>&5
13268   ac_status=$?
13269   echo "$as_me:13269: \$? = $ac_status" >&5
13270   (exit $ac_status); }; }; then
13271   eval "$as_ac_Lib=yes"
13272 else
13273   echo "$as_me: failed program was:" >&5
13274 cat conftest.$ac_ext >&5
13275 eval "$as_ac_Lib=no"
13276 fi
13277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13278 LIBS=$ac_check_lib_save_LIBS
13279 fi
13280 echo "$as_me:13280: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13281 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13282 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13283
13284                                 LIBS="-l$cf_regex_lib $LIBS"
13285                                 cf_regex_func=regcomp
13286                                 break
13287 fi
13288
13289         done
13290
13291 fi
13292
13293 if test "$cf_regex_func" = no ; then
13294         echo "$as_me:13294: checking for compile" >&5
13295 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13296 if test "${ac_cv_func_compile+set}" = set; then
13297   echo $ECHO_N "(cached) $ECHO_C" >&6
13298 else
13299   cat >conftest.$ac_ext <<_ACEOF
13300 #line 13300 "configure"
13301 #include "confdefs.h"
13302 /* System header to define __stub macros and hopefully few prototypes,
13303     which can conflict with char compile (); below.  */
13304 #include <assert.h>
13305 /* Override any gcc2 internal prototype to avoid an error.  */
13306 #ifdef __cplusplus
13307 extern "C"
13308 #endif
13309 /* We use char because int might match the return type of a gcc2
13310    builtin and then its argument prototype would still apply.  */
13311 char compile ();
13312 char (*f) ();
13313
13314 int
13315 main ()
13316 {
13317 /* The GNU C library defines this for functions which it implements
13318     to always fail with ENOSYS.  Some functions are actually named
13319     something starting with __ and the normal name is an alias.  */
13320 #if defined (__stub_compile) || defined (__stub___compile)
13321 choke me
13322 #else
13323 f = compile;
13324 #endif
13325
13326   ;
13327   return 0;
13328 }
13329 _ACEOF
13330 rm -f conftest.$ac_objext conftest$ac_exeext
13331 if { (eval echo "$as_me:13331: \"$ac_link\"") >&5
13332   (eval $ac_link) 2>&5
13333   ac_status=$?
13334   echo "$as_me:13334: \$? = $ac_status" >&5
13335   (exit $ac_status); } &&
13336          { ac_try='test -s conftest$ac_exeext'
13337   { (eval echo "$as_me:13337: \"$ac_try\"") >&5
13338   (eval $ac_try) 2>&5
13339   ac_status=$?
13340   echo "$as_me:13340: \$? = $ac_status" >&5
13341   (exit $ac_status); }; }; then
13342   ac_cv_func_compile=yes
13343 else
13344   echo "$as_me: failed program was:" >&5
13345 cat conftest.$ac_ext >&5
13346 ac_cv_func_compile=no
13347 fi
13348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13349 fi
13350 echo "$as_me:13350: result: $ac_cv_func_compile" >&5
13351 echo "${ECHO_T}$ac_cv_func_compile" >&6
13352 if test $ac_cv_func_compile = yes; then
13353   cf_regex_func=compile
13354 else
13355
13356                 echo "$as_me:13356: checking for compile in -lgen" >&5
13357 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13358 if test "${ac_cv_lib_gen_compile+set}" = set; then
13359   echo $ECHO_N "(cached) $ECHO_C" >&6
13360 else
13361   ac_check_lib_save_LIBS=$LIBS
13362 LIBS="-lgen  $LIBS"
13363 cat >conftest.$ac_ext <<_ACEOF
13364 #line 13364 "configure"
13365 #include "confdefs.h"
13366
13367 /* Override any gcc2 internal prototype to avoid an error.  */
13368 #ifdef __cplusplus
13369 extern "C"
13370 #endif
13371 /* We use char because int might match the return type of a gcc2
13372    builtin and then its argument prototype would still apply.  */
13373 char compile ();
13374 int
13375 main ()
13376 {
13377 compile ();
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f conftest.$ac_objext conftest$ac_exeext
13383 if { (eval echo "$as_me:13383: \"$ac_link\"") >&5
13384   (eval $ac_link) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit $ac_status); } &&
13388          { ac_try='test -s conftest$ac_exeext'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit $ac_status); }; }; then
13394   ac_cv_lib_gen_compile=yes
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat conftest.$ac_ext >&5
13398 ac_cv_lib_gen_compile=no
13399 fi
13400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13401 LIBS=$ac_check_lib_save_LIBS
13402 fi
13403 echo "$as_me:13403: result: $ac_cv_lib_gen_compile" >&5
13404 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13405 if test $ac_cv_lib_gen_compile = yes; then
13406
13407                                 LIBS="-lgen $LIBS"
13408                                 cf_regex_func=compile
13409 fi
13410
13411 fi
13412
13413 fi
13414
13415 if test "$cf_regex_func" = no ; then
13416         { echo "$as_me:13416: WARNING: cannot find regular expression library" >&5
13417 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13418 fi
13419
13420 echo "$as_me:13420: checking for regular-expression headers" >&5
13421 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13422 if test "${cf_cv_regex_hdrs+set}" = set; then
13423   echo $ECHO_N "(cached) $ECHO_C" >&6
13424 else
13425
13426 cf_cv_regex_hdrs=no
13427 case $cf_regex_func in #(vi
13428 compile) #(vi
13429         for cf_regex_hdr in regexp.h regexpr.h
13430         do
13431                 cat >conftest.$ac_ext <<_ACEOF
13432 #line 13432 "configure"
13433 #include "confdefs.h"
13434 #include <$cf_regex_hdr>
13435 int
13436 main ()
13437 {
13438
13439                         char *p = compile("", "", "", 0);
13440                         int x = step("", "");
13441
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 rm -f conftest.$ac_objext conftest$ac_exeext
13447 if { (eval echo "$as_me:13447: \"$ac_link\"") >&5
13448   (eval $ac_link) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); } &&
13452          { ac_try='test -s conftest$ac_exeext'
13453   { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454   (eval $ac_try) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); }; }; then
13458
13459                         cf_cv_regex_hdrs=$cf_regex_hdr
13460                         break
13461
13462 else
13463   echo "$as_me: failed program was:" >&5
13464 cat conftest.$ac_ext >&5
13465 fi
13466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13467         done
13468         ;;
13469 *)
13470         for cf_regex_hdr in regex.h
13471         do
13472                 cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475 #include <sys/types.h>
13476 #include <$cf_regex_hdr>
13477 int
13478 main ()
13479 {
13480
13481                         regex_t *p;
13482                         int x = regcomp(p, "", 0);
13483                         int y = regexec(p, "", 0, 0, 0);
13484                         regfree(p);
13485
13486   ;
13487   return 0;
13488 }
13489 _ACEOF
13490 rm -f conftest.$ac_objext conftest$ac_exeext
13491 if { (eval echo "$as_me:13491: \"$ac_link\"") >&5
13492   (eval $ac_link) 2>&5
13493   ac_status=$?
13494   echo "$as_me:13494: \$? = $ac_status" >&5
13495   (exit $ac_status); } &&
13496          { ac_try='test -s conftest$ac_exeext'
13497   { (eval echo "$as_me:13497: \"$ac_try\"") >&5
13498   (eval $ac_try) 2>&5
13499   ac_status=$?
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); }; }; then
13502
13503                         cf_cv_regex_hdrs=$cf_regex_hdr
13504                         break
13505
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 cat conftest.$ac_ext >&5
13509 fi
13510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13511         done
13512         ;;
13513 esac
13514
13515 fi
13516 echo "$as_me:13516: result: $cf_cv_regex_hdrs" >&5
13517 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13518
13519 case $cf_cv_regex_hdrs in #(vi
13520     no)        { echo "$as_me:13520: WARNING: no regular expression header found" >&5
13521 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13522     regex.h)   cat >>confdefs.h <<\EOF
13523 #define HAVE_REGEX_H_FUNCS 1
13524 EOF
13525  ;; #(vi
13526     regexp.h)  cat >>confdefs.h <<\EOF
13527 #define HAVE_REGEXP_H_FUNCS 1
13528 EOF
13529  ;; #(vi
13530     regexpr.h) cat >>confdefs.h <<\EOF
13531 #define HAVE_REGEXPR_H_FUNCS 1
13532 EOF
13533  ;;
13534 esac
13535
13536 for ac_header in \
13537 fcntl.h \
13538 getopt.h \
13539 limits.h \
13540 locale.h \
13541 math.h \
13542 poll.h \
13543 sys/bsdtypes.h \
13544 sys/ioctl.h \
13545 sys/param.h \
13546 sys/poll.h \
13547 sys/select.h \
13548 sys/time.h \
13549 sys/times.h \
13550 ttyent.h \
13551 unistd.h \
13552 wctype.h \
13553
13554 do
13555 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13556 echo "$as_me:13556: checking for $ac_header" >&5
13557 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13559   echo $ECHO_N "(cached) $ECHO_C" >&6
13560 else
13561   cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564 #include <$ac_header>
13565 _ACEOF
13566 if { (eval echo "$as_me:13566: \"$ac_cpp conftest.$ac_ext\"") >&5
13567   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13568   ac_status=$?
13569   egrep -v '^ *\+' conftest.er1 >conftest.err
13570   rm -f conftest.er1
13571   cat conftest.err >&5
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit $ac_status); } >/dev/null; then
13574   if test -s conftest.err; then
13575     ac_cpp_err=$ac_c_preproc_warn_flag
13576   else
13577     ac_cpp_err=
13578   fi
13579 else
13580   ac_cpp_err=yes
13581 fi
13582 if test -z "$ac_cpp_err"; then
13583   eval "$as_ac_Header=yes"
13584 else
13585   echo "$as_me: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   eval "$as_ac_Header=no"
13588 fi
13589 rm -f conftest.err conftest.$ac_ext
13590 fi
13591 echo "$as_me:13591: result: `eval echo '${'$as_ac_Header'}'`" >&5
13592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13593 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13594   cat >>confdefs.h <<EOF
13595 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13596 EOF
13597
13598 fi
13599 done
13600
13601 for ac_header in unistd.h getopt.h
13602 do
13603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13604 echo "$as_me:13604: checking for $ac_header" >&5
13605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13607   echo $ECHO_N "(cached) $ECHO_C" >&6
13608 else
13609   cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612 #include <$ac_header>
13613 _ACEOF
13614 if { (eval echo "$as_me:13614: \"$ac_cpp conftest.$ac_ext\"") >&5
13615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13616   ac_status=$?
13617   egrep -v '^ *\+' conftest.er1 >conftest.err
13618   rm -f conftest.er1
13619   cat conftest.err >&5
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); } >/dev/null; then
13622   if test -s conftest.err; then
13623     ac_cpp_err=$ac_c_preproc_warn_flag
13624   else
13625     ac_cpp_err=
13626   fi
13627 else
13628   ac_cpp_err=yes
13629 fi
13630 if test -z "$ac_cpp_err"; then
13631   eval "$as_ac_Header=yes"
13632 else
13633   echo "$as_me: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   eval "$as_ac_Header=no"
13636 fi
13637 rm -f conftest.err conftest.$ac_ext
13638 fi
13639 echo "$as_me:13639: result: `eval echo '${'$as_ac_Header'}'`" >&5
13640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13642   cat >>confdefs.h <<EOF
13643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13644 EOF
13645
13646 fi
13647 done
13648
13649 echo "$as_me:13649: checking for header declaring getopt variables" >&5
13650 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13651 if test "${cf_cv_getopt_header+set}" = set; then
13652   echo $ECHO_N "(cached) $ECHO_C" >&6
13653 else
13654
13655 cf_cv_getopt_header=none
13656 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13657 do
13658 cat >conftest.$ac_ext <<_ACEOF
13659 #line 13659 "configure"
13660 #include "confdefs.h"
13661
13662 #include <$cf_header>
13663 int
13664 main ()
13665 {
13666 int x = optind; char *y = optarg
13667   ;
13668   return 0;
13669 }
13670 _ACEOF
13671 rm -f conftest.$ac_objext
13672 if { (eval echo "$as_me:13672: \"$ac_compile\"") >&5
13673   (eval $ac_compile) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); } &&
13677          { ac_try='test -s conftest.$ac_objext'
13678   { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679   (eval $ac_try) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit $ac_status); }; }; then
13683   cf_cv_getopt_header=$cf_header
13684  break
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 fi
13689 rm -f conftest.$ac_objext conftest.$ac_ext
13690 done
13691
13692 fi
13693 echo "$as_me:13693: result: $cf_cv_getopt_header" >&5
13694 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13695 if test $cf_cv_getopt_header != none ; then
13696         cat >>confdefs.h <<\EOF
13697 #define HAVE_GETOPT_HEADER 1
13698 EOF
13699
13700 fi
13701
13702 # check for ISC (this may also define _POSIX_SOURCE)
13703 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13704 if test "$ISC" = yes ; then
13705
13706 echo "$as_me:13706: checking for main in -lcposix" >&5
13707 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13708 if test "${ac_cv_lib_cposix_main+set}" = set; then
13709   echo $ECHO_N "(cached) $ECHO_C" >&6
13710 else
13711   ac_check_lib_save_LIBS=$LIBS
13712 LIBS="-lcposix  $LIBS"
13713 cat >conftest.$ac_ext <<_ACEOF
13714 #line 13714 "configure"
13715 #include "confdefs.h"
13716
13717 int
13718 main ()
13719 {
13720 main ();
13721   ;
13722   return 0;
13723 }
13724 _ACEOF
13725 rm -f conftest.$ac_objext conftest$ac_exeext
13726 if { (eval echo "$as_me:13726: \"$ac_link\"") >&5
13727   (eval $ac_link) 2>&5
13728   ac_status=$?
13729   echo "$as_me:13729: \$? = $ac_status" >&5
13730   (exit $ac_status); } &&
13731          { ac_try='test -s conftest$ac_exeext'
13732   { (eval echo "$as_me:13732: \"$ac_try\"") >&5
13733   (eval $ac_try) 2>&5
13734   ac_status=$?
13735   echo "$as_me:13735: \$? = $ac_status" >&5
13736   (exit $ac_status); }; }; then
13737   ac_cv_lib_cposix_main=yes
13738 else
13739   echo "$as_me: failed program was:" >&5
13740 cat conftest.$ac_ext >&5
13741 ac_cv_lib_cposix_main=no
13742 fi
13743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13744 LIBS=$ac_check_lib_save_LIBS
13745 fi
13746 echo "$as_me:13746: result: $ac_cv_lib_cposix_main" >&5
13747 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13748 if test $ac_cv_lib_cposix_main = yes; then
13749   cat >>confdefs.h <<EOF
13750 #define HAVE_LIBCPOSIX 1
13751 EOF
13752
13753   LIBS="-lcposix $LIBS"
13754
13755 fi
13756
13757         echo "$as_me:13757: checking for bzero in -linet" >&5
13758 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13759 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13760   echo $ECHO_N "(cached) $ECHO_C" >&6
13761 else
13762   ac_check_lib_save_LIBS=$LIBS
13763 LIBS="-linet  $LIBS"
13764 cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767
13768 /* Override any gcc2 internal prototype to avoid an error.  */
13769 #ifdef __cplusplus
13770 extern "C"
13771 #endif
13772 /* We use char because int might match the return type of a gcc2
13773    builtin and then its argument prototype would still apply.  */
13774 char bzero ();
13775 int
13776 main ()
13777 {
13778 bzero ();
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f conftest.$ac_objext conftest$ac_exeext
13784 if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
13785   (eval $ac_link) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); } &&
13789          { ac_try='test -s conftest$ac_exeext'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   ac_cv_lib_inet_bzero=yes
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 cat conftest.$ac_ext >&5
13799 ac_cv_lib_inet_bzero=no
13800 fi
13801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13802 LIBS=$ac_check_lib_save_LIBS
13803 fi
13804 echo "$as_me:13804: result: $ac_cv_lib_inet_bzero" >&5
13805 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13806 if test $ac_cv_lib_inet_bzero = yes; then
13807   LIBS="-linet $LIBS"
13808 fi
13809 fi
13810
13811 echo "$as_me:13811: checking if sys/time.h works with sys/select.h" >&5
13812 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13813 if test "${cf_cv_sys_time_select+set}" = set; then
13814   echo $ECHO_N "(cached) $ECHO_C" >&6
13815 else
13816
13817 cat >conftest.$ac_ext <<_ACEOF
13818 #line 13818 "configure"
13819 #include "confdefs.h"
13820
13821 #include <sys/types.h>
13822 #ifdef HAVE_SYS_TIME_H
13823 #include <sys/time.h>
13824 #endif
13825 #ifdef HAVE_SYS_SELECT_H
13826 #include <sys/select.h>
13827 #endif
13828
13829 int
13830 main ()
13831 {
13832
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 rm -f conftest.$ac_objext
13838 if { (eval echo "$as_me:13838: \"$ac_compile\"") >&5
13839   (eval $ac_compile) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); } &&
13843          { ac_try='test -s conftest.$ac_objext'
13844   { (eval echo "$as_me:13844: \"$ac_try\"") >&5
13845   (eval $ac_try) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit $ac_status); }; }; then
13849   cf_cv_sys_time_select=yes
13850 else
13851   echo "$as_me: failed program was:" >&5
13852 cat conftest.$ac_ext >&5
13853 cf_cv_sys_time_select=no
13854 fi
13855 rm -f conftest.$ac_objext conftest.$ac_ext
13856
13857 fi
13858
13859 echo "$as_me:13859: result: $cf_cv_sys_time_select" >&5
13860 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13861 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13862 #define HAVE_SYS_TIME_SELECT 1
13863 EOF
13864
13865 ###     checks for compiler characteristics
13866 ac_ext=c
13867 ac_cpp='$CPP $CPPFLAGS'
13868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13871 ac_main_return=return
13872
13873 echo "$as_me:13873: checking for $CC option to accept ANSI C" >&5
13874 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13875 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878   ac_cv_prog_cc_stdc=no
13879 ac_save_CC=$CC
13880 cat >conftest.$ac_ext <<_ACEOF
13881 #line 13881 "configure"
13882 #include "confdefs.h"
13883 #include <stdarg.h>
13884 #include <stdio.h>
13885 #include <sys/types.h>
13886 #include <sys/stat.h>
13887 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13888 struct buf { int x; };
13889 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13890 static char *e (p, i)
13891      char **p;
13892      int i;
13893 {
13894   return p[i];
13895 }
13896 static char *f (char * (*g) (char **, int), char **p, ...)
13897 {
13898   char *s;
13899   va_list v;
13900   va_start (v,p);
13901   s = g (p, va_arg (v,int));
13902   va_end (v);
13903   return s;
13904 }
13905 int test (int i, double x);
13906 struct s1 {int (*f) (int a);};
13907 struct s2 {int (*f) (double a);};
13908 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13909 int argc;
13910 char **argv;
13911 int
13912 main ()
13913 {
13914 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13915   ;
13916   return 0;
13917 }
13918 _ACEOF
13919 # Don't try gcc -ansi; that turns off useful extensions and
13920 # breaks some systems' header files.
13921 # AIX                   -qlanglvl=ansi
13922 # Ultrix and OSF/1      -std1
13923 # HP-UX 10.20 and later -Ae
13924 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13925 # SVR4                  -Xc -D__EXTENSIONS__
13926 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13927 do
13928   CC="$ac_save_CC $ac_arg"
13929   rm -f conftest.$ac_objext
13930 if { (eval echo "$as_me:13930: \"$ac_compile\"") >&5
13931   (eval $ac_compile) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); } &&
13935          { ac_try='test -s conftest.$ac_objext'
13936   { (eval echo "$as_me:13936: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); }; }; then
13941   ac_cv_prog_cc_stdc=$ac_arg
13942 break
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 fi
13947 rm -f conftest.$ac_objext
13948 done
13949 rm -f conftest.$ac_ext conftest.$ac_objext
13950 CC=$ac_save_CC
13951
13952 fi
13953
13954 case "x$ac_cv_prog_cc_stdc" in
13955   x|xno)
13956     echo "$as_me:13956: result: none needed" >&5
13957 echo "${ECHO_T}none needed" >&6 ;;
13958   *)
13959     echo "$as_me:13959: result: $ac_cv_prog_cc_stdc" >&5
13960 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13961     CC="$CC $ac_cv_prog_cc_stdc" ;;
13962 esac
13963
13964 echo "$as_me:13964: checking for an ANSI C-conforming const" >&5
13965 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13966 if test "${ac_cv_c_const+set}" = set; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   cat >conftest.$ac_ext <<_ACEOF
13970 #line 13970 "configure"
13971 #include "confdefs.h"
13972
13973 int
13974 main ()
13975 {
13976 /* FIXME: Include the comments suggested by Paul. */
13977 #ifndef __cplusplus
13978   /* Ultrix mips cc rejects this.  */
13979   typedef int charset[2];
13980   const charset x;
13981   /* SunOS 4.1.1 cc rejects this.  */
13982   char const *const *ccp;
13983   char **p;
13984   /* NEC SVR4.0.2 mips cc rejects this.  */
13985   struct point {int x, y;};
13986   static struct point const zero = {0,0};
13987   /* AIX XL C 1.02.0.0 rejects this.
13988      It does not let you subtract one const X* pointer from another in
13989      an arm of an if-expression whose if-part is not a constant
13990      expression */
13991   const char *g = "string";
13992   ccp = &g + (g ? g-g : 0);
13993   /* HPUX 7.0 cc rejects these. */
13994   ++ccp;
13995   p = (char**) ccp;
13996   ccp = (char const *const *) p;
13997   { /* SCO 3.2v4 cc rejects this.  */
13998     char *t;
13999     char const *s = 0 ? (char *) 0 : (char const *) 0;
14000
14001     *t++ = 0;
14002   }
14003   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14004     int x[] = {25, 17};
14005     const int *foo = &x[0];
14006     ++foo;
14007   }
14008   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14009     typedef const int *iptr;
14010     iptr p = 0;
14011     ++p;
14012   }
14013   { /* AIX XL C 1.02.0.0 rejects this saying
14014        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14015     struct s { int j; const int *ap[3]; };
14016     struct s *b; b->j = 5;
14017   }
14018   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14019     const int foo = 10;
14020   }
14021 #endif
14022
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f conftest.$ac_objext
14028 if { (eval echo "$as_me:14028: \"$ac_compile\"") >&5
14029   (eval $ac_compile) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); } &&
14033          { ac_try='test -s conftest.$ac_objext'
14034   { (eval echo "$as_me:14034: \"$ac_try\"") >&5
14035   (eval $ac_try) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); }; }; then
14039   ac_cv_c_const=yes
14040 else
14041   echo "$as_me: failed program was:" >&5
14042 cat conftest.$ac_ext >&5
14043 ac_cv_c_const=no
14044 fi
14045 rm -f conftest.$ac_objext conftest.$ac_ext
14046 fi
14047 echo "$as_me:14047: result: $ac_cv_c_const" >&5
14048 echo "${ECHO_T}$ac_cv_c_const" >&6
14049 if test $ac_cv_c_const = no; then
14050
14051 cat >>confdefs.h <<\EOF
14052 #define const
14053 EOF
14054
14055 fi
14056
14057 echo "$as_me:14057: checking for inline" >&5
14058 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14059 if test "${ac_cv_c_inline+set}" = set; then
14060   echo $ECHO_N "(cached) $ECHO_C" >&6
14061 else
14062   ac_cv_c_inline=no
14063 for ac_kw in inline __inline__ __inline; do
14064   cat >conftest.$ac_ext <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067 #ifndef __cplusplus
14068 static $ac_kw int static_foo () {return 0; }
14069 $ac_kw int foo () {return 0; }
14070 #endif
14071
14072 _ACEOF
14073 rm -f conftest.$ac_objext
14074 if { (eval echo "$as_me:14074: \"$ac_compile\"") >&5
14075   (eval $ac_compile) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest.$ac_objext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085   ac_cv_c_inline=$ac_kw; break
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat conftest.$ac_ext >&5
14089 fi
14090 rm -f conftest.$ac_objext conftest.$ac_ext
14091 done
14092
14093 fi
14094 echo "$as_me:14094: result: $ac_cv_c_inline" >&5
14095 echo "${ECHO_T}$ac_cv_c_inline" >&6
14096 case $ac_cv_c_inline in
14097   inline | yes) ;;
14098   no)
14099 cat >>confdefs.h <<\EOF
14100 #define inline
14101 EOF
14102  ;;
14103   *)  cat >>confdefs.h <<EOF
14104 #define inline $ac_cv_c_inline
14105 EOF
14106  ;;
14107 esac
14108
14109 NCURSES_INLINE=
14110 if test "$ac_cv_c_inline" != no ; then
14111   NCURSES_INLINE=inline
14112   if test "$INTEL_COMPILER" = yes
14113   then
14114     :
14115   elif test "$GCC" = yes
14116   then
14117     echo "$as_me:14117: checking if $CC supports options to tune inlining" >&5
14118 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14119 if test "${cf_cv_gcc_inline+set}" = set; then
14120   echo $ECHO_N "(cached) $ECHO_C" >&6
14121 else
14122
14123       cf_save_CFLAGS=$CFLAGS
14124       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14125       cat >conftest.$ac_ext <<_ACEOF
14126 #line 14126 "configure"
14127 #include "confdefs.h"
14128 inline int foo(void) { return 1; }
14129 int
14130 main ()
14131 {
14132 ${cf_cv_main_return:-return} foo()
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 rm -f conftest.$ac_objext
14138 if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139   (eval $ac_compile) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit $ac_status); } &&
14143          { ac_try='test -s conftest.$ac_objext'
14144   { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145   (eval $ac_try) 2>&5
14146   ac_status=$?
14147   echo "$as_me:14147: \$? = $ac_status" >&5
14148   (exit $ac_status); }; }; then
14149   cf_cv_gcc_inline=yes
14150 else
14151   echo "$as_me: failed program was:" >&5
14152 cat conftest.$ac_ext >&5
14153 cf_cv_gcc_inline=no
14154 fi
14155 rm -f conftest.$ac_objext conftest.$ac_ext
14156       CFLAGS=$cf_save_CFLAGS
14157
14158 fi
14159 echo "$as_me:14159: result: $cf_cv_gcc_inline" >&5
14160 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14161     if test "$cf_cv_gcc_inline" = yes ; then
14162
14163 cf_fix_cppflags=no
14164 cf_new_cflags=
14165 cf_new_cppflags=
14166 cf_new_extra_cppflags=
14167
14168 for cf_add_cflags in --param max-inline-insns-single=1200
14169 do
14170 case $cf_fix_cppflags in
14171 no)
14172         case $cf_add_cflags in #(vi
14173         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14174                 case $cf_add_cflags in
14175                 -D*)
14176                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14177
14178                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14179                                 && test -z "${cf_tst_cflags}" \
14180                                 && cf_fix_cppflags=yes
14181
14182                         if test $cf_fix_cppflags = yes ; then
14183                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14184                                 continue
14185                         elif test "${cf_tst_cflags}" = "\"'" ; then
14186                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14187                                 continue
14188                         fi
14189                         ;;
14190                 esac
14191                 case "$CPPFLAGS" in
14192                 *$cf_add_cflags) #(vi
14193                         ;;
14194                 *) #(vi
14195                         case $cf_add_cflags in #(vi
14196                         -D*)
14197                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14198
14199 CPPFLAGS=`echo "$CPPFLAGS" | \
14200         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14201                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14202
14203                                 ;;
14204                         esac
14205                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14206                         ;;
14207                 esac
14208                 ;;
14209         *)
14210                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14211                 ;;
14212         esac
14213         ;;
14214 yes)
14215         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14216
14217         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14218
14219         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14220                 && test -z "${cf_tst_cflags}" \
14221                 && cf_fix_cppflags=no
14222         ;;
14223 esac
14224 done
14225
14226 if test -n "$cf_new_cflags" ; then
14227
14228         CFLAGS="$CFLAGS $cf_new_cflags"
14229 fi
14230
14231 if test -n "$cf_new_cppflags" ; then
14232
14233         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14234 fi
14235
14236 if test -n "$cf_new_extra_cppflags" ; then
14237
14238         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14239 fi
14240
14241     fi
14242   fi
14243 fi
14244
14245 echo "$as_me:14245: checking for signal global datatype" >&5
14246 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14247 if test "${cf_cv_sig_atomic_t+set}" = set; then
14248   echo $ECHO_N "(cached) $ECHO_C" >&6
14249 else
14250
14251         for cf_type in \
14252                 "volatile sig_atomic_t" \
14253                 "sig_atomic_t" \
14254                 "int"
14255         do
14256         cat >conftest.$ac_ext <<_ACEOF
14257 #line 14257 "configure"
14258 #include "confdefs.h"
14259
14260 #include <sys/types.h>
14261 #include <signal.h>
14262 #include <stdio.h>
14263
14264 extern $cf_type x;
14265 $cf_type x;
14266 static void handler(int sig)
14267 {
14268         x = 5;
14269 }
14270 int
14271 main ()
14272 {
14273 signal(SIGINT, handler);
14274                  x = 1
14275   ;
14276   return 0;
14277 }
14278 _ACEOF
14279 rm -f conftest.$ac_objext
14280 if { (eval echo "$as_me:14280: \"$ac_compile\"") >&5
14281   (eval $ac_compile) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } &&
14285          { ac_try='test -s conftest.$ac_objext'
14286   { (eval echo "$as_me:14286: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   cf_cv_sig_atomic_t=$cf_type
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 cf_cv_sig_atomic_t=no
14296 fi
14297 rm -f conftest.$ac_objext conftest.$ac_ext
14298                 test "$cf_cv_sig_atomic_t" != no && break
14299         done
14300
14301 fi
14302
14303 echo "$as_me:14303: result: $cf_cv_sig_atomic_t" >&5
14304 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14305 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14306 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14307 EOF
14308
14309 if test $NCURSES_CHTYPE = auto ; then
14310
14311 echo "$as_me:14311: checking for type of chtype" >&5
14312 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14313 if test "${cf_cv_typeof_chtype+set}" = set; then
14314   echo $ECHO_N "(cached) $ECHO_C" >&6
14315 else
14316
14317                 if test "$cross_compiling" = yes; then
14318   cf_cv_typeof_chtype=long
14319 else
14320   cat >conftest.$ac_ext <<_ACEOF
14321 #line 14321 "configure"
14322 #include "confdefs.h"
14323
14324 #define WANT_BITS 31
14325 #include <stdio.h>
14326 int main()
14327 {
14328         FILE *fp = fopen("cf_test.out", "w");
14329         if (fp != 0) {
14330                 char *result = "long";
14331                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14332                         int n;
14333                         unsigned int x, y;
14334                         for (n = 0; n < WANT_BITS; n++) {
14335                                 x = (1 << n);
14336                                 y = (x >> n);
14337                                 if (y != 1 || x == 0) {
14338                                         x = 0;
14339                                         break;
14340                                 }
14341                         }
14342                         /*
14343                          * If x is nonzero, an int is big enough for the bits
14344                          * that we want.
14345                          */
14346                         result = (x != 0) ? "int" : "long";
14347                 }
14348                 fputs(result, fp);
14349                 fclose(fp);
14350         }
14351         ${cf_cv_main_return:-return}(0);
14352 }
14353
14354 _ACEOF
14355 rm -f conftest$ac_exeext
14356 if { (eval echo "$as_me:14356: \"$ac_link\"") >&5
14357   (eval $ac_link) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14361   { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); }; }; then
14366   cf_cv_typeof_chtype=`cat cf_test.out`
14367 else
14368   echo "$as_me: program exited with status $ac_status" >&5
14369 echo "$as_me: failed program was:" >&5
14370 cat conftest.$ac_ext >&5
14371 cf_cv_typeof_chtype=long
14372 fi
14373 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14374 fi
14375                 rm -f cf_test.out
14376
14377 fi
14378
14379 echo "$as_me:14379: result: $cf_cv_typeof_chtype" >&5
14380 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14381
14382 cat >>confdefs.h <<EOF
14383 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14384 EOF
14385
14386 else
14387         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14388 fi
14389 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14390
14391 echo "$as_me:14391: checking if unsigned literals are legal" >&5
14392 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14393 if test "${cf_cv_unsigned_literals+set}" = set; then
14394   echo $ECHO_N "(cached) $ECHO_C" >&6
14395 else
14396
14397         cat >conftest.$ac_ext <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 int
14402 main ()
14403 {
14404 long x = 1L + 1UL + 1U + 1
14405   ;
14406   return 0;
14407 }
14408 _ACEOF
14409 rm -f conftest.$ac_objext
14410 if { (eval echo "$as_me:14410: \"$ac_compile\"") >&5
14411   (eval $ac_compile) 2>&5
14412   ac_status=$?
14413   echo "$as_me:14413: \$? = $ac_status" >&5
14414   (exit $ac_status); } &&
14415          { ac_try='test -s conftest.$ac_objext'
14416   { (eval echo "$as_me:14416: \"$ac_try\"") >&5
14417   (eval $ac_try) 2>&5
14418   ac_status=$?
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); }; }; then
14421   cf_cv_unsigned_literals=yes
14422 else
14423   echo "$as_me: failed program was:" >&5
14424 cat conftest.$ac_ext >&5
14425 cf_cv_unsigned_literals=no
14426 fi
14427 rm -f conftest.$ac_objext conftest.$ac_ext
14428
14429 fi
14430
14431 echo "$as_me:14431: result: $cf_cv_unsigned_literals" >&5
14432 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14433
14434 cf_cv_1UL="1"
14435 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14436 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14437
14438 if test $NCURSES_MMASK_T = auto ; then
14439         cf_cv_typeof_mmask_t=long
14440 else
14441         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14442 fi
14443 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14444
14445 ###     Checks for external-data
14446
14447 echo "$as_me:14447: checking if external errno is declared" >&5
14448 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14449 if test "${cf_cv_dcl_errno+set}" = set; then
14450   echo $ECHO_N "(cached) $ECHO_C" >&6
14451 else
14452
14453     cat >conftest.$ac_ext <<_ACEOF
14454 #line 14454 "configure"
14455 #include "confdefs.h"
14456
14457 #ifdef HAVE_STDLIB_H
14458 #include <stdlib.h>
14459 #endif
14460 #include <stdio.h>
14461 #include <sys/types.h>
14462 #include <errno.h>
14463 int
14464 main ()
14465 {
14466 int x = (int) errno
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 rm -f conftest.$ac_objext
14472 if { (eval echo "$as_me:14472: \"$ac_compile\"") >&5
14473   (eval $ac_compile) 2>&5
14474   ac_status=$?
14475   echo "$as_me:14475: \$? = $ac_status" >&5
14476   (exit $ac_status); } &&
14477          { ac_try='test -s conftest.$ac_objext'
14478   { (eval echo "$as_me:14478: \"$ac_try\"") >&5
14479   (eval $ac_try) 2>&5
14480   ac_status=$?
14481   echo "$as_me:14481: \$? = $ac_status" >&5
14482   (exit $ac_status); }; }; then
14483   cf_cv_dcl_errno=yes
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 cf_cv_dcl_errno=no
14488 fi
14489 rm -f conftest.$ac_objext conftest.$ac_ext
14490
14491 fi
14492 echo "$as_me:14492: result: $cf_cv_dcl_errno" >&5
14493 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14494
14495 if test "$cf_cv_dcl_errno" = no ; then
14496
14497 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14498
14499     cat >>confdefs.h <<EOF
14500 #define $cf_result 1
14501 EOF
14502
14503 fi
14504
14505 # It's possible (for near-UNIX clones) that the data doesn't exist
14506
14507 echo "$as_me:14507: checking if external errno exists" >&5
14508 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14509 if test "${cf_cv_have_errno+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512
14513     cat >conftest.$ac_ext <<_ACEOF
14514 #line 14514 "configure"
14515 #include "confdefs.h"
14516
14517 #undef errno
14518 extern int errno;
14519
14520 int
14521 main ()
14522 {
14523 errno = 2
14524   ;
14525   return 0;
14526 }
14527 _ACEOF
14528 rm -f conftest.$ac_objext conftest$ac_exeext
14529 if { (eval echo "$as_me:14529: \"$ac_link\"") >&5
14530   (eval $ac_link) 2>&5
14531   ac_status=$?
14532   echo "$as_me:14532: \$? = $ac_status" >&5
14533   (exit $ac_status); } &&
14534          { ac_try='test -s conftest$ac_exeext'
14535   { (eval echo "$as_me:14535: \"$ac_try\"") >&5
14536   (eval $ac_try) 2>&5
14537   ac_status=$?
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); }; }; then
14540   cf_cv_have_errno=yes
14541 else
14542   echo "$as_me: failed program was:" >&5
14543 cat conftest.$ac_ext >&5
14544 cf_cv_have_errno=no
14545 fi
14546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14547
14548 fi
14549 echo "$as_me:14549: result: $cf_cv_have_errno" >&5
14550 echo "${ECHO_T}$cf_cv_have_errno" >&6
14551
14552 if test "$cf_cv_have_errno" = yes ; then
14553
14554 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14555
14556     cat >>confdefs.h <<EOF
14557 #define $cf_result 1
14558 EOF
14559
14560 fi
14561
14562 echo "$as_me:14562: checking if data-only library module links" >&5
14563 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14564 if test "${cf_cv_link_dataonly+set}" = set; then
14565   echo $ECHO_N "(cached) $ECHO_C" >&6
14566 else
14567
14568         rm -f conftest.a
14569         cat >conftest.$ac_ext <<EOF
14570 #line 14570 "configure"
14571 int     testdata[3] = { 123, 456, 789 };
14572 EOF
14573         if { (eval echo "$as_me:14573: \"$ac_compile\"") >&5
14574   (eval $ac_compile) 2>&5
14575   ac_status=$?
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); } ; then
14578                 mv conftest.o data.o && \
14579                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14580         fi
14581         rm -f conftest.$ac_ext data.o
14582         cat >conftest.$ac_ext <<EOF
14583 #line 14583 "configure"
14584 int     testfunc()
14585 {
14586 #if defined(NeXT)
14587         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14588 #else
14589         extern int testdata[3];
14590         return testdata[0] == 123
14591            &&  testdata[1] == 456
14592            &&  testdata[2] == 789;
14593 #endif
14594 }
14595 EOF
14596         if { (eval echo "$as_me:14596: \"$ac_compile\"") >&5
14597   (eval $ac_compile) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); }; then
14601                 mv conftest.o func.o && \
14602                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14603         fi
14604         rm -f conftest.$ac_ext func.o
14605         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14606         cf_saveLIBS="$LIBS"
14607         LIBS="conftest.a $LIBS"
14608         if test "$cross_compiling" = yes; then
14609   cf_cv_link_dataonly=unknown
14610 else
14611   cat >conftest.$ac_ext <<_ACEOF
14612 #line 14612 "configure"
14613 #include "confdefs.h"
14614
14615         int main()
14616         {
14617                 extern int testfunc();
14618                 ${cf_cv_main_return:-return} (!testfunc());
14619         }
14620
14621 _ACEOF
14622 rm -f conftest$ac_exeext
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624   (eval $ac_link) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   cf_cv_link_dataonly=yes
14634 else
14635   echo "$as_me: program exited with status $ac_status" >&5
14636 echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14638 cf_cv_link_dataonly=no
14639 fi
14640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14641 fi
14642         LIBS="$cf_saveLIBS"
14643
14644 fi
14645
14646 echo "$as_me:14646: result: $cf_cv_link_dataonly" >&5
14647 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14648
14649 if test "$cf_cv_link_dataonly" = no ; then
14650         cat >>confdefs.h <<\EOF
14651 #define BROKEN_LINKER 1
14652 EOF
14653
14654         BROKEN_LINKER=1
14655 fi
14656
14657 ###     Checks for library functions.
14658
14659 for ac_func in \
14660 getcwd \
14661 getegid \
14662 geteuid \
14663 getttynam \
14664 issetugid \
14665 poll \
14666 remove \
14667 select \
14668 setbuf \
14669 setbuffer \
14670 setvbuf \
14671 sigaction \
14672 sigvec \
14673 strdup \
14674 strstr \
14675 tcgetpgrp \
14676 times \
14677 vsnprintf \
14678
14679 do
14680 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14681 echo "$as_me:14681: checking for $ac_func" >&5
14682 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14683 if eval "test \"\${$as_ac_var+set}\" = set"; then
14684   echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686   cat >conftest.$ac_ext <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689 /* System header to define __stub macros and hopefully few prototypes,
14690     which can conflict with char $ac_func (); below.  */
14691 #include <assert.h>
14692 /* Override any gcc2 internal prototype to avoid an error.  */
14693 #ifdef __cplusplus
14694 extern "C"
14695 #endif
14696 /* We use char because int might match the return type of a gcc2
14697    builtin and then its argument prototype would still apply.  */
14698 char $ac_func ();
14699 char (*f) ();
14700
14701 int
14702 main ()
14703 {
14704 /* The GNU C library defines this for functions which it implements
14705     to always fail with ENOSYS.  Some functions are actually named
14706     something starting with __ and the normal name is an alias.  */
14707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14708 choke me
14709 #else
14710 f = $ac_func;
14711 #endif
14712
14713   ;
14714   return 0;
14715 }
14716 _ACEOF
14717 rm -f conftest.$ac_objext conftest$ac_exeext
14718 if { (eval echo "$as_me:14718: \"$ac_link\"") >&5
14719   (eval $ac_link) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit $ac_status); } &&
14723          { ac_try='test -s conftest$ac_exeext'
14724   { (eval echo "$as_me:14724: \"$ac_try\"") >&5
14725   (eval $ac_try) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit $ac_status); }; }; then
14729   eval "$as_ac_var=yes"
14730 else
14731   echo "$as_me: failed program was:" >&5
14732 cat conftest.$ac_ext >&5
14733 eval "$as_ac_var=no"
14734 fi
14735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14736 fi
14737 echo "$as_me:14737: result: `eval echo '${'$as_ac_var'}'`" >&5
14738 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14739 if test `eval echo '${'$as_ac_var'}'` = yes; then
14740   cat >>confdefs.h <<EOF
14741 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14742 EOF
14743
14744 fi
14745 done
14746
14747 if test "$with_getcap" = "yes" ; then
14748
14749 echo "$as_me:14749: checking for terminal-capability database functions" >&5
14750 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14751 if test "${cf_cv_cgetent+set}" = set; then
14752   echo $ECHO_N "(cached) $ECHO_C" >&6
14753 else
14754
14755 cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758
14759 #include <stdlib.h>
14760 int
14761 main ()
14762 {
14763
14764         char temp[128];
14765         char *buf = temp;
14766         char *db_array = temp;
14767         cgetent(&buf, &db_array, "vt100");
14768         cgetcap(buf, "tc", '=');
14769         cgetmatch(buf, "tc");
14770
14771   ;
14772   return 0;
14773 }
14774 _ACEOF
14775 rm -f conftest.$ac_objext conftest$ac_exeext
14776 if { (eval echo "$as_me:14776: \"$ac_link\"") >&5
14777   (eval $ac_link) 2>&5
14778   ac_status=$?
14779   echo "$as_me:14779: \$? = $ac_status" >&5
14780   (exit $ac_status); } &&
14781          { ac_try='test -s conftest$ac_exeext'
14782   { (eval echo "$as_me:14782: \"$ac_try\"") >&5
14783   (eval $ac_try) 2>&5
14784   ac_status=$?
14785   echo "$as_me:14785: \$? = $ac_status" >&5
14786   (exit $ac_status); }; }; then
14787   cf_cv_cgetent=yes
14788 else
14789   echo "$as_me: failed program was:" >&5
14790 cat conftest.$ac_ext >&5
14791 cf_cv_cgetent=no
14792 fi
14793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14794
14795 fi
14796 echo "$as_me:14796: result: $cf_cv_cgetent" >&5
14797 echo "${ECHO_T}$cf_cv_cgetent" >&6
14798
14799 if test "$cf_cv_cgetent" = yes
14800 then
14801         cat >>confdefs.h <<\EOF
14802 #define HAVE_BSD_CGETENT 1
14803 EOF
14804
14805 echo "$as_me:14805: checking if cgetent uses const parameter" >&5
14806 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
14807 if test "${cf_cv_cgetent_const+set}" = set; then
14808   echo $ECHO_N "(cached) $ECHO_C" >&6
14809 else
14810
14811 cat >conftest.$ac_ext <<_ACEOF
14812 #line 14812 "configure"
14813 #include "confdefs.h"
14814
14815 #include <stdlib.h>
14816 int
14817 main ()
14818 {
14819
14820         char temp[128];
14821         char *buf = temp;
14822 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
14823         const char *db_array = temp;
14824         cgetent(&buf, &db_array, "vt100");
14825 #endif
14826         cgetcap(buf, "tc", '=');
14827         cgetmatch(buf, "tc");
14828
14829   ;
14830   return 0;
14831 }
14832 _ACEOF
14833 rm -f conftest.$ac_objext conftest$ac_exeext
14834 if { (eval echo "$as_me:14834: \"$ac_link\"") >&5
14835   (eval $ac_link) 2>&5
14836   ac_status=$?
14837   echo "$as_me:14837: \$? = $ac_status" >&5
14838   (exit $ac_status); } &&
14839          { ac_try='test -s conftest$ac_exeext'
14840   { (eval echo "$as_me:14840: \"$ac_try\"") >&5
14841   (eval $ac_try) 2>&5
14842   ac_status=$?
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); }; }; then
14845   cf_cv_cgetent_const=yes
14846 else
14847   echo "$as_me: failed program was:" >&5
14848 cat conftest.$ac_ext >&5
14849 cf_cv_cgetent_const=no
14850 fi
14851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14852
14853 fi
14854 echo "$as_me:14854: result: $cf_cv_cgetent_const" >&5
14855 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
14856         if test "$cf_cv_cgetent_const" = yes
14857         then
14858                 cat >>confdefs.h <<EOF
14859 #define CGETENT_CONST const
14860 EOF
14861
14862         fi
14863 fi
14864
14865 fi
14866
14867 echo "$as_me:14867: checking for isascii" >&5
14868 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14869 if test "${cf_cv_have_isascii+set}" = set; then
14870   echo $ECHO_N "(cached) $ECHO_C" >&6
14871 else
14872
14873         cat >conftest.$ac_ext <<_ACEOF
14874 #line 14874 "configure"
14875 #include "confdefs.h"
14876 #include <ctype.h>
14877 int
14878 main ()
14879 {
14880 int x = isascii(' ')
14881   ;
14882   return 0;
14883 }
14884 _ACEOF
14885 rm -f conftest.$ac_objext conftest$ac_exeext
14886 if { (eval echo "$as_me:14886: \"$ac_link\"") >&5
14887   (eval $ac_link) 2>&5
14888   ac_status=$?
14889   echo "$as_me:14889: \$? = $ac_status" >&5
14890   (exit $ac_status); } &&
14891          { ac_try='test -s conftest$ac_exeext'
14892   { (eval echo "$as_me:14892: \"$ac_try\"") >&5
14893   (eval $ac_try) 2>&5
14894   ac_status=$?
14895   echo "$as_me:14895: \$? = $ac_status" >&5
14896   (exit $ac_status); }; }; then
14897   cf_cv_have_isascii=yes
14898 else
14899   echo "$as_me: failed program was:" >&5
14900 cat conftest.$ac_ext >&5
14901 cf_cv_have_isascii=no
14902 fi
14903 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14904
14905 fi
14906 echo "$as_me:14906: result: $cf_cv_have_isascii" >&5
14907 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14908 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14909 #define HAVE_ISASCII 1
14910 EOF
14911
14912 if test "$ac_cv_func_sigaction" = yes; then
14913 echo "$as_me:14913: checking whether sigaction needs _POSIX_SOURCE" >&5
14914 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14915 cat >conftest.$ac_ext <<_ACEOF
14916 #line 14916 "configure"
14917 #include "confdefs.h"
14918
14919 #include <sys/types.h>
14920 #include <signal.h>
14921 int
14922 main ()
14923 {
14924 struct sigaction act
14925   ;
14926   return 0;
14927 }
14928 _ACEOF
14929 rm -f conftest.$ac_objext
14930 if { (eval echo "$as_me:14930: \"$ac_compile\"") >&5
14931   (eval $ac_compile) 2>&5
14932   ac_status=$?
14933   echo "$as_me:14933: \$? = $ac_status" >&5
14934   (exit $ac_status); } &&
14935          { ac_try='test -s conftest.$ac_objext'
14936   { (eval echo "$as_me:14936: \"$ac_try\"") >&5
14937   (eval $ac_try) 2>&5
14938   ac_status=$?
14939   echo "$as_me:14939: \$? = $ac_status" >&5
14940   (exit $ac_status); }; }; then
14941   sigact_bad=no
14942 else
14943   echo "$as_me: failed program was:" >&5
14944 cat conftest.$ac_ext >&5
14945
14946 cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14949
14950 #define _POSIX_SOURCE
14951 #include <sys/types.h>
14952 #include <signal.h>
14953 int
14954 main ()
14955 {
14956 struct sigaction act
14957   ;
14958   return 0;
14959 }
14960 _ACEOF
14961 rm -f conftest.$ac_objext
14962 if { (eval echo "$as_me:14962: \"$ac_compile\"") >&5
14963   (eval $ac_compile) 2>&5
14964   ac_status=$?
14965   echo "$as_me:14965: \$? = $ac_status" >&5
14966   (exit $ac_status); } &&
14967          { ac_try='test -s conftest.$ac_objext'
14968   { (eval echo "$as_me:14968: \"$ac_try\"") >&5
14969   (eval $ac_try) 2>&5
14970   ac_status=$?
14971   echo "$as_me:14971: \$? = $ac_status" >&5
14972   (exit $ac_status); }; }; then
14973   sigact_bad=yes
14974          cat >>confdefs.h <<\EOF
14975 #define _POSIX_SOURCE 1
14976 EOF
14977
14978 else
14979   echo "$as_me: failed program was:" >&5
14980 cat conftest.$ac_ext >&5
14981 sigact_bad=unknown
14982 fi
14983 rm -f conftest.$ac_objext conftest.$ac_ext
14984 fi
14985 rm -f conftest.$ac_objext conftest.$ac_ext
14986 echo "$as_me:14986: result: $sigact_bad" >&5
14987 echo "${ECHO_T}$sigact_bad" >&6
14988 fi
14989
14990 echo "$as_me:14990: checking if nanosleep really works" >&5
14991 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14992 if test "${cf_cv_func_nanosleep+set}" = set; then
14993   echo $ECHO_N "(cached) $ECHO_C" >&6
14994 else
14995
14996 if test "$cross_compiling" = yes; then
14997   cf_cv_func_nanosleep=unknown
14998 else
14999   cat >conftest.$ac_ext <<_ACEOF
15000 #line 15000 "configure"
15001 #include "confdefs.h"
15002
15003 #include <stdio.h>
15004 #include <errno.h>
15005 #include <time.h>
15006
15007 #ifdef HAVE_SYS_TIME_H
15008 #include <sys/time.h>
15009 #endif
15010
15011 int main() {
15012         struct timespec ts1, ts2;
15013         int code;
15014         ts1.tv_sec  = 0;
15015         ts1.tv_nsec = 750000000;
15016         ts2.tv_sec  = 0;
15017         ts2.tv_nsec = 0;
15018         errno = 0;
15019         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15020         ${cf_cv_main_return:-return}(code != 0);
15021 }
15022
15023 _ACEOF
15024 rm -f conftest$ac_exeext
15025 if { (eval echo "$as_me:15025: \"$ac_link\"") >&5
15026   (eval $ac_link) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15030   { (eval echo "$as_me:15030: \"$ac_try\"") >&5
15031   (eval $ac_try) 2>&5
15032   ac_status=$?
15033   echo "$as_me:15033: \$? = $ac_status" >&5
15034   (exit $ac_status); }; }; then
15035   cf_cv_func_nanosleep=yes
15036 else
15037   echo "$as_me: program exited with status $ac_status" >&5
15038 echo "$as_me: failed program was:" >&5
15039 cat conftest.$ac_ext >&5
15040 cf_cv_func_nanosleep=no
15041 fi
15042 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15043 fi
15044 fi
15045 echo "$as_me:15045: result: $cf_cv_func_nanosleep" >&5
15046 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15047
15048 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15049 #define HAVE_NANOSLEEP 1
15050 EOF
15051
15052 for ac_header in \
15053 termio.h \
15054 termios.h \
15055 unistd.h \
15056
15057 do
15058 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15059 echo "$as_me:15059: checking for $ac_header" >&5
15060 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15061 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15062   echo $ECHO_N "(cached) $ECHO_C" >&6
15063 else
15064   cat >conftest.$ac_ext <<_ACEOF
15065 #line 15065 "configure"
15066 #include "confdefs.h"
15067 #include <$ac_header>
15068 _ACEOF
15069 if { (eval echo "$as_me:15069: \"$ac_cpp conftest.$ac_ext\"") >&5
15070   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15071   ac_status=$?
15072   egrep -v '^ *\+' conftest.er1 >conftest.err
15073   rm -f conftest.er1
15074   cat conftest.err >&5
15075   echo "$as_me:15075: \$? = $ac_status" >&5
15076   (exit $ac_status); } >/dev/null; then
15077   if test -s conftest.err; then
15078     ac_cpp_err=$ac_c_preproc_warn_flag
15079   else
15080     ac_cpp_err=
15081   fi
15082 else
15083   ac_cpp_err=yes
15084 fi
15085 if test -z "$ac_cpp_err"; then
15086   eval "$as_ac_Header=yes"
15087 else
15088   echo "$as_me: failed program was:" >&5
15089   cat conftest.$ac_ext >&5
15090   eval "$as_ac_Header=no"
15091 fi
15092 rm -f conftest.err conftest.$ac_ext
15093 fi
15094 echo "$as_me:15094: result: `eval echo '${'$as_ac_Header'}'`" >&5
15095 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15096 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15097   cat >>confdefs.h <<EOF
15098 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15099 EOF
15100
15101 fi
15102 done
15103
15104 if test "$ISC" = yes ; then
15105
15106 for ac_header in sys/termio.h
15107 do
15108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15109 echo "$as_me:15109: checking for $ac_header" >&5
15110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15112   echo $ECHO_N "(cached) $ECHO_C" >&6
15113 else
15114   cat >conftest.$ac_ext <<_ACEOF
15115 #line 15115 "configure"
15116 #include "confdefs.h"
15117 #include <$ac_header>
15118 _ACEOF
15119 if { (eval echo "$as_me:15119: \"$ac_cpp conftest.$ac_ext\"") >&5
15120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15121   ac_status=$?
15122   egrep -v '^ *\+' conftest.er1 >conftest.err
15123   rm -f conftest.er1
15124   cat conftest.err >&5
15125   echo "$as_me:15125: \$? = $ac_status" >&5
15126   (exit $ac_status); } >/dev/null; then
15127   if test -s conftest.err; then
15128     ac_cpp_err=$ac_c_preproc_warn_flag
15129   else
15130     ac_cpp_err=
15131   fi
15132 else
15133   ac_cpp_err=yes
15134 fi
15135 if test -z "$ac_cpp_err"; then
15136   eval "$as_ac_Header=yes"
15137 else
15138   echo "$as_me: failed program was:" >&5
15139   cat conftest.$ac_ext >&5
15140   eval "$as_ac_Header=no"
15141 fi
15142 rm -f conftest.err conftest.$ac_ext
15143 fi
15144 echo "$as_me:15144: result: `eval echo '${'$as_ac_Header'}'`" >&5
15145 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15146 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15147   cat >>confdefs.h <<EOF
15148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15149 EOF
15150
15151 fi
15152 done
15153
15154 fi
15155 if test "$ac_cv_header_termios_h" = yes ; then
15156         case "$CFLAGS $CPPFLAGS" in
15157         *-D_POSIX_SOURCE*)
15158                 termios_bad=dunno ;;
15159         *)      termios_bad=maybe ;;
15160         esac
15161         if test "$termios_bad" = maybe ; then
15162         echo "$as_me:15162: checking whether termios.h needs _POSIX_SOURCE" >&5
15163 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15164         cat >conftest.$ac_ext <<_ACEOF
15165 #line 15165 "configure"
15166 #include "confdefs.h"
15167 #include <termios.h>
15168 int
15169 main ()
15170 {
15171 struct termios foo; int x = foo.c_iflag
15172   ;
15173   return 0;
15174 }
15175 _ACEOF
15176 rm -f conftest.$ac_objext
15177 if { (eval echo "$as_me:15177: \"$ac_compile\"") >&5
15178   (eval $ac_compile) 2>&5
15179   ac_status=$?
15180   echo "$as_me:15180: \$? = $ac_status" >&5
15181   (exit $ac_status); } &&
15182          { ac_try='test -s conftest.$ac_objext'
15183   { (eval echo "$as_me:15183: \"$ac_try\"") >&5
15184   (eval $ac_try) 2>&5
15185   ac_status=$?
15186   echo "$as_me:15186: \$? = $ac_status" >&5
15187   (exit $ac_status); }; }; then
15188   termios_bad=no
15189 else
15190   echo "$as_me: failed program was:" >&5
15191 cat conftest.$ac_ext >&5
15192
15193                 cat >conftest.$ac_ext <<_ACEOF
15194 #line 15194 "configure"
15195 #include "confdefs.h"
15196
15197 #define _POSIX_SOURCE
15198 #include <termios.h>
15199 int
15200 main ()
15201 {
15202 struct termios foo; int x = foo.c_iflag
15203   ;
15204   return 0;
15205 }
15206 _ACEOF
15207 rm -f conftest.$ac_objext
15208 if { (eval echo "$as_me:15208: \"$ac_compile\"") >&5
15209   (eval $ac_compile) 2>&5
15210   ac_status=$?
15211   echo "$as_me:15211: \$? = $ac_status" >&5
15212   (exit $ac_status); } &&
15213          { ac_try='test -s conftest.$ac_objext'
15214   { (eval echo "$as_me:15214: \"$ac_try\"") >&5
15215   (eval $ac_try) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); }; }; then
15219   termios_bad=unknown
15220 else
15221   echo "$as_me: failed program was:" >&5
15222 cat conftest.$ac_ext >&5
15223 termios_bad=yes cat >>confdefs.h <<\EOF
15224 #define _POSIX_SOURCE 1
15225 EOF
15226
15227 fi
15228 rm -f conftest.$ac_objext conftest.$ac_ext
15229
15230 fi
15231 rm -f conftest.$ac_objext conftest.$ac_ext
15232         echo "$as_me:15232: result: $termios_bad" >&5
15233 echo "${ECHO_T}$termios_bad" >&6
15234         fi
15235 fi
15236
15237 echo "$as_me:15237: checking for tcgetattr" >&5
15238 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15239 if test "${cf_cv_have_tcgetattr+set}" = set; then
15240   echo $ECHO_N "(cached) $ECHO_C" >&6
15241 else
15242
15243 cat >conftest.$ac_ext <<_ACEOF
15244 #line 15244 "configure"
15245 #include "confdefs.h"
15246
15247 #include <sys/types.h>
15248 #ifdef HAVE_UNISTD_H
15249 #include <unistd.h>
15250 #endif
15251 #ifdef HAVE_TERMIOS_H
15252 #include <termios.h>
15253 #define TTY struct termios
15254 #else
15255 #ifdef HAVE_TERMIO_H
15256 #include <termio.h>
15257 #define TTY struct termio
15258 #endif
15259 #endif
15260
15261 int
15262 main ()
15263 {
15264
15265 TTY foo;
15266 tcgetattr(1, &foo);
15267   ;
15268   return 0;
15269 }
15270 _ACEOF
15271 rm -f conftest.$ac_objext conftest$ac_exeext
15272 if { (eval echo "$as_me:15272: \"$ac_link\"") >&5
15273   (eval $ac_link) 2>&5
15274   ac_status=$?
15275   echo "$as_me:15275: \$? = $ac_status" >&5
15276   (exit $ac_status); } &&
15277          { ac_try='test -s conftest$ac_exeext'
15278   { (eval echo "$as_me:15278: \"$ac_try\"") >&5
15279   (eval $ac_try) 2>&5
15280   ac_status=$?
15281   echo "$as_me:15281: \$? = $ac_status" >&5
15282   (exit $ac_status); }; }; then
15283   cf_cv_have_tcgetattr=yes
15284 else
15285   echo "$as_me: failed program was:" >&5
15286 cat conftest.$ac_ext >&5
15287 cf_cv_have_tcgetattr=no
15288 fi
15289 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15290 fi
15291 echo "$as_me:15291: result: $cf_cv_have_tcgetattr" >&5
15292 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15293 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15294 #define HAVE_TCGETATTR 1
15295 EOF
15296
15297 echo "$as_me:15297: checking for vsscanf function or workaround" >&5
15298 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15299 if test "${cf_cv_func_vsscanf+set}" = set; then
15300   echo $ECHO_N "(cached) $ECHO_C" >&6
15301 else
15302
15303 cat >conftest.$ac_ext <<_ACEOF
15304 #line 15304 "configure"
15305 #include "confdefs.h"
15306
15307 #include <stdarg.h>
15308 #include <stdio.h>
15309 int
15310 main ()
15311 {
15312
15313         va_list ap;
15314         vsscanf("from", "%d", ap)
15315   ;
15316   return 0;
15317 }
15318 _ACEOF
15319 rm -f conftest.$ac_objext conftest$ac_exeext
15320 if { (eval echo "$as_me:15320: \"$ac_link\"") >&5
15321   (eval $ac_link) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); } &&
15325          { ac_try='test -s conftest$ac_exeext'
15326   { (eval echo "$as_me:15326: \"$ac_try\"") >&5
15327   (eval $ac_try) 2>&5
15328   ac_status=$?
15329   echo "$as_me:15329: \$? = $ac_status" >&5
15330   (exit $ac_status); }; }; then
15331   cf_cv_func_vsscanf=vsscanf
15332 else
15333   echo "$as_me: failed program was:" >&5
15334 cat conftest.$ac_ext >&5
15335
15336 cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339
15340 #include <stdarg.h>
15341 #include <stdio.h>
15342 int
15343 main ()
15344 {
15345
15346     FILE strbuf;
15347     char *str = "from";
15348
15349     strbuf._flag = _IOREAD;
15350     strbuf._ptr = strbuf._base = (unsigned char *) str;
15351     strbuf._cnt = strlen(str);
15352     strbuf._file = _NFILE;
15353     return (vfscanf(&strbuf, "%d", ap))
15354   ;
15355   return 0;
15356 }
15357 _ACEOF
15358 rm -f conftest.$ac_objext conftest$ac_exeext
15359 if { (eval echo "$as_me:15359: \"$ac_link\"") >&5
15360   (eval $ac_link) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); } &&
15364          { ac_try='test -s conftest$ac_exeext'
15365   { (eval echo "$as_me:15365: \"$ac_try\"") >&5
15366   (eval $ac_try) 2>&5
15367   ac_status=$?
15368   echo "$as_me:15368: \$? = $ac_status" >&5
15369   (exit $ac_status); }; }; then
15370   cf_cv_func_vsscanf=vfscanf
15371 else
15372   echo "$as_me: failed program was:" >&5
15373 cat conftest.$ac_ext >&5
15374
15375 cat >conftest.$ac_ext <<_ACEOF
15376 #line 15376 "configure"
15377 #include "confdefs.h"
15378
15379 #include <stdarg.h>
15380 #include <stdio.h>
15381 int
15382 main ()
15383 {
15384
15385     FILE strbuf;
15386     char *str = "from";
15387
15388     strbuf._flag = _IOREAD;
15389     strbuf._ptr = strbuf._base = (unsigned char *) str;
15390     strbuf._cnt = strlen(str);
15391     strbuf._file = _NFILE;
15392     return (_doscan(&strbuf, "%d", ap))
15393   ;
15394   return 0;
15395 }
15396 _ACEOF
15397 rm -f conftest.$ac_objext conftest$ac_exeext
15398 if { (eval echo "$as_me:15398: \"$ac_link\"") >&5
15399   (eval $ac_link) 2>&5
15400   ac_status=$?
15401   echo "$as_me:15401: \$? = $ac_status" >&5
15402   (exit $ac_status); } &&
15403          { ac_try='test -s conftest$ac_exeext'
15404   { (eval echo "$as_me:15404: \"$ac_try\"") >&5
15405   (eval $ac_try) 2>&5
15406   ac_status=$?
15407   echo "$as_me:15407: \$? = $ac_status" >&5
15408   (exit $ac_status); }; }; then
15409   cf_cv_func_vsscanf=_doscan
15410 else
15411   echo "$as_me: failed program was:" >&5
15412 cat conftest.$ac_ext >&5
15413
15414 cf_cv_func_vsscanf=no
15415 fi
15416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15417 fi
15418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15419 fi
15420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15421 fi
15422 echo "$as_me:15422: result: $cf_cv_func_vsscanf" >&5
15423 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15424
15425 case $cf_cv_func_vsscanf in #(vi
15426 vsscanf) cat >>confdefs.h <<\EOF
15427 #define HAVE_VSSCANF 1
15428 EOF
15429 ;; #(vi
15430 vfscanf) cat >>confdefs.h <<\EOF
15431 #define HAVE_VFSCANF 1
15432 EOF
15433 ;; #(vi
15434 _doscan) cat >>confdefs.h <<\EOF
15435 #define HAVE__DOSCAN 1
15436 EOF
15437 ;;
15438 esac
15439
15440 echo "$as_me:15440: checking for working mkstemp" >&5
15441 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15442 if test "${cf_cv_func_mkstemp+set}" = set; then
15443   echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445
15446 rm -rf conftest*
15447 if test "$cross_compiling" = yes; then
15448   echo "$as_me:15448: checking for mkstemp" >&5
15449 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15450 if test "${ac_cv_func_mkstemp+set}" = set; then
15451   echo $ECHO_N "(cached) $ECHO_C" >&6
15452 else
15453   cat >conftest.$ac_ext <<_ACEOF
15454 #line 15454 "configure"
15455 #include "confdefs.h"
15456 /* System header to define __stub macros and hopefully few prototypes,
15457     which can conflict with char mkstemp (); below.  */
15458 #include <assert.h>
15459 /* Override any gcc2 internal prototype to avoid an error.  */
15460 #ifdef __cplusplus
15461 extern "C"
15462 #endif
15463 /* We use char because int might match the return type of a gcc2
15464    builtin and then its argument prototype would still apply.  */
15465 char mkstemp ();
15466 char (*f) ();
15467
15468 int
15469 main ()
15470 {
15471 /* The GNU C library defines this for functions which it implements
15472     to always fail with ENOSYS.  Some functions are actually named
15473     something starting with __ and the normal name is an alias.  */
15474 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15475 choke me
15476 #else
15477 f = mkstemp;
15478 #endif
15479
15480   ;
15481   return 0;
15482 }
15483 _ACEOF
15484 rm -f conftest.$ac_objext conftest$ac_exeext
15485 if { (eval echo "$as_me:15485: \"$ac_link\"") >&5
15486   (eval $ac_link) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } &&
15490          { ac_try='test -s conftest$ac_exeext'
15491   { (eval echo "$as_me:15491: \"$ac_try\"") >&5
15492   (eval $ac_try) 2>&5
15493   ac_status=$?
15494   echo "$as_me:15494: \$? = $ac_status" >&5
15495   (exit $ac_status); }; }; then
15496   ac_cv_func_mkstemp=yes
15497 else
15498   echo "$as_me: failed program was:" >&5
15499 cat conftest.$ac_ext >&5
15500 ac_cv_func_mkstemp=no
15501 fi
15502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15503 fi
15504 echo "$as_me:15504: result: $ac_cv_func_mkstemp" >&5
15505 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15506
15507 else
15508   cat >conftest.$ac_ext <<_ACEOF
15509 #line 15509 "configure"
15510 #include "confdefs.h"
15511
15512 #include <sys/types.h>
15513 #include <stdlib.h>
15514 #include <stdio.h>
15515 #include <string.h>
15516 #include <sys/stat.h>
15517 int main()
15518 {
15519         char *tmpl = "conftestXXXXXX";
15520         char name[2][80];
15521         int n;
15522         int result = 0;
15523         int fd;
15524         struct stat sb;
15525
15526         umask(077);
15527         for (n = 0; n < 2; ++n) {
15528                 strcpy(name[n], tmpl);
15529                 if ((fd = mkstemp(name[n])) >= 0) {
15530                         if (!strcmp(name[n], tmpl)
15531                          || stat(name[n], &sb) != 0
15532                          || (sb.st_mode & S_IFMT) != S_IFREG
15533                          || (sb.st_mode & 077) != 0) {
15534                                 result = 1;
15535                         }
15536                         close(fd);
15537                 }
15538         }
15539         if (result == 0
15540          && !strcmp(name[0], name[1]))
15541                 result = 1;
15542         ${cf_cv_main_return:-return}(result);
15543 }
15544
15545 _ACEOF
15546 rm -f conftest$ac_exeext
15547 if { (eval echo "$as_me:15547: \"$ac_link\"") >&5
15548   (eval $ac_link) 2>&5
15549   ac_status=$?
15550   echo "$as_me:15550: \$? = $ac_status" >&5
15551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15552   { (eval echo "$as_me:15552: \"$ac_try\"") >&5
15553   (eval $ac_try) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); }; }; then
15557   cf_cv_func_mkstemp=yes
15558
15559 else
15560   echo "$as_me: program exited with status $ac_status" >&5
15561 echo "$as_me: failed program was:" >&5
15562 cat conftest.$ac_ext >&5
15563 cf_cv_func_mkstemp=no
15564
15565 fi
15566 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15567 fi
15568
15569 fi
15570 echo "$as_me:15570: result: $cf_cv_func_mkstemp" >&5
15571 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15572 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15573         cat >>confdefs.h <<\EOF
15574 #define HAVE_MKSTEMP 1
15575 EOF
15576
15577 fi
15578
15579 # setup for prototype of fallback for vsscanf()
15580
15581 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15582         HAVE_VSSCANF=1
15583 else
15584         HAVE_VSSCANF=0
15585 fi
15586
15587 if test "$cross_compiling" = yes ; then
15588         { echo "$as_me:15588: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15589 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15590 else
15591         echo "$as_me:15591: checking whether setvbuf arguments are reversed" >&5
15592 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15593 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15594   echo $ECHO_N "(cached) $ECHO_C" >&6
15595 else
15596   if test "$cross_compiling" = yes; then
15597   { { echo "$as_me:15597: error: cannot run test program while cross compiling" >&5
15598 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15599    { (exit 1); exit 1; }; }
15600 else
15601   cat >conftest.$ac_ext <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15604 #include <stdio.h>
15605 /* If setvbuf has the reversed format, exit 0. */
15606 int
15607 main ()
15608 {
15609   /* This call has the arguments reversed.
15610      A reversed system may check and see that the address of main
15611      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15612   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15613     $ac_main_return(1);
15614   putc('\r', stdout);
15615   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15616 }
15617 _ACEOF
15618 rm -f conftest$ac_exeext
15619 if { (eval echo "$as_me:15619: \"$ac_link\"") >&5
15620   (eval $ac_link) 2>&5
15621   ac_status=$?
15622   echo "$as_me:15622: \$? = $ac_status" >&5
15623   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15624   { (eval echo "$as_me:15624: \"$ac_try\"") >&5
15625   (eval $ac_try) 2>&5
15626   ac_status=$?
15627   echo "$as_me:15627: \$? = $ac_status" >&5
15628   (exit $ac_status); }; }; then
15629   ac_cv_func_setvbuf_reversed=yes
15630 else
15631   echo "$as_me: program exited with status $ac_status" >&5
15632 echo "$as_me: failed program was:" >&5
15633 cat conftest.$ac_ext >&5
15634 ac_cv_func_setvbuf_reversed=no
15635 fi
15636 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15637 fi
15638 rm -f core core.* *.core
15639 fi
15640 echo "$as_me:15640: result: $ac_cv_func_setvbuf_reversed" >&5
15641 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15642 if test $ac_cv_func_setvbuf_reversed = yes; then
15643
15644 cat >>confdefs.h <<\EOF
15645 #define SETVBUF_REVERSED 1
15646 EOF
15647
15648 fi
15649
15650 fi
15651 echo "$as_me:15651: checking return type of signal handlers" >&5
15652 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15653 if test "${ac_cv_type_signal+set}" = set; then
15654   echo $ECHO_N "(cached) $ECHO_C" >&6
15655 else
15656   cat >conftest.$ac_ext <<_ACEOF
15657 #line 15657 "configure"
15658 #include "confdefs.h"
15659 #include <sys/types.h>
15660 #include <signal.h>
15661 #ifdef signal
15662 # undef signal
15663 #endif
15664 #ifdef __cplusplus
15665 extern "C" void (*signal (int, void (*)(int)))(int);
15666 #else
15667 void (*signal ()) ();
15668 #endif
15669
15670 int
15671 main ()
15672 {
15673 int i;
15674   ;
15675   return 0;
15676 }
15677 _ACEOF
15678 rm -f conftest.$ac_objext
15679 if { (eval echo "$as_me:15679: \"$ac_compile\"") >&5
15680   (eval $ac_compile) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); } &&
15684          { ac_try='test -s conftest.$ac_objext'
15685   { (eval echo "$as_me:15685: \"$ac_try\"") >&5
15686   (eval $ac_try) 2>&5
15687   ac_status=$?
15688   echo "$as_me:15688: \$? = $ac_status" >&5
15689   (exit $ac_status); }; }; then
15690   ac_cv_type_signal=void
15691 else
15692   echo "$as_me: failed program was:" >&5
15693 cat conftest.$ac_ext >&5
15694 ac_cv_type_signal=int
15695 fi
15696 rm -f conftest.$ac_objext conftest.$ac_ext
15697 fi
15698 echo "$as_me:15698: result: $ac_cv_type_signal" >&5
15699 echo "${ECHO_T}$ac_cv_type_signal" >&6
15700
15701 cat >>confdefs.h <<EOF
15702 #define RETSIGTYPE $ac_cv_type_signal
15703 EOF
15704
15705 echo "$as_me:15705: checking for type sigaction_t" >&5
15706 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15707 if test "${cf_cv_type_sigaction+set}" = set; then
15708   echo $ECHO_N "(cached) $ECHO_C" >&6
15709 else
15710
15711         cat >conftest.$ac_ext <<_ACEOF
15712 #line 15712 "configure"
15713 #include "confdefs.h"
15714
15715 #include <signal.h>
15716 int
15717 main ()
15718 {
15719 sigaction_t x
15720   ;
15721   return 0;
15722 }
15723 _ACEOF
15724 rm -f conftest.$ac_objext
15725 if { (eval echo "$as_me:15725: \"$ac_compile\"") >&5
15726   (eval $ac_compile) 2>&5
15727   ac_status=$?
15728   echo "$as_me:15728: \$? = $ac_status" >&5
15729   (exit $ac_status); } &&
15730          { ac_try='test -s conftest.$ac_objext'
15731   { (eval echo "$as_me:15731: \"$ac_try\"") >&5
15732   (eval $ac_try) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); }; }; then
15736   cf_cv_type_sigaction=yes
15737 else
15738   echo "$as_me: failed program was:" >&5
15739 cat conftest.$ac_ext >&5
15740 cf_cv_type_sigaction=no
15741 fi
15742 rm -f conftest.$ac_objext conftest.$ac_ext
15743 fi
15744
15745 echo "$as_me:15745: result: $cf_cv_type_sigaction" >&5
15746 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15747 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15748 #define HAVE_TYPE_SIGACTION 1
15749 EOF
15750
15751 echo "$as_me:15751: checking declaration of size-change" >&5
15752 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15753 if test "${cf_cv_sizechange+set}" = set; then
15754   echo $ECHO_N "(cached) $ECHO_C" >&6
15755 else
15756
15757     cf_cv_sizechange=unknown
15758     cf_save_CPPFLAGS="$CPPFLAGS"
15759
15760 for cf_opts in "" "NEED_PTEM_H"
15761 do
15762
15763     CPPFLAGS="$cf_save_CPPFLAGS"
15764     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15765     cat >conftest.$ac_ext <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768 #include <sys/types.h>
15769 #ifdef HAVE_TERMIOS_H
15770 #include <termios.h>
15771 #else
15772 #ifdef HAVE_TERMIO_H
15773 #include <termio.h>
15774 #endif
15775 #endif
15776 #ifdef NEED_PTEM_H
15777 /* This is a workaround for SCO:  they neglected to define struct winsize in
15778  * termios.h -- it's only in termio.h and ptem.h
15779  */
15780 #include        <sys/stream.h>
15781 #include        <sys/ptem.h>
15782 #endif
15783 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15784 #include <sys/ioctl.h>
15785 #endif
15786
15787 int
15788 main ()
15789 {
15790
15791 #ifdef TIOCGSIZE
15792         struct ttysize win;     /* FIXME: what system is this? */
15793         int y = win.ts_lines;
15794         int x = win.ts_cols;
15795 #else
15796 #ifdef TIOCGWINSZ
15797         struct winsize win;
15798         int y = win.ws_row;
15799         int x = win.ws_col;
15800 #else
15801         no TIOCGSIZE or TIOCGWINSZ
15802 #endif /* TIOCGWINSZ */
15803 #endif /* TIOCGSIZE */
15804
15805   ;
15806   return 0;
15807 }
15808 _ACEOF
15809 rm -f conftest.$ac_objext
15810 if { (eval echo "$as_me:15810: \"$ac_compile\"") >&5
15811   (eval $ac_compile) 2>&5
15812   ac_status=$?
15813   echo "$as_me:15813: \$? = $ac_status" >&5
15814   (exit $ac_status); } &&
15815          { ac_try='test -s conftest.$ac_objext'
15816   { (eval echo "$as_me:15816: \"$ac_try\"") >&5
15817   (eval $ac_try) 2>&5
15818   ac_status=$?
15819   echo "$as_me:15819: \$? = $ac_status" >&5
15820   (exit $ac_status); }; }; then
15821   cf_cv_sizechange=yes
15822 else
15823   echo "$as_me: failed program was:" >&5
15824 cat conftest.$ac_ext >&5
15825 cf_cv_sizechange=no
15826 fi
15827 rm -f conftest.$ac_objext conftest.$ac_ext
15828
15829         CPPFLAGS="$cf_save_CPPFLAGS"
15830         if test "$cf_cv_sizechange" = yes ; then
15831                 echo "size-change succeeded ($cf_opts)" >&5
15832                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15833                 break
15834         fi
15835 done
15836
15837 fi
15838 echo "$as_me:15838: result: $cf_cv_sizechange" >&5
15839 echo "${ECHO_T}$cf_cv_sizechange" >&6
15840 if test "$cf_cv_sizechange" != no ; then
15841         cat >>confdefs.h <<\EOF
15842 #define HAVE_SIZECHANGE 1
15843 EOF
15844
15845         case $cf_cv_sizechange in #(vi
15846         NEED*)
15847                 cat >>confdefs.h <<EOF
15848 #define $cf_cv_sizechange  1
15849 EOF
15850
15851                 ;;
15852         esac
15853 fi
15854
15855 echo "$as_me:15855: checking for memmove" >&5
15856 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15857 if test "${ac_cv_func_memmove+set}" = set; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860   cat >conftest.$ac_ext <<_ACEOF
15861 #line 15861 "configure"
15862 #include "confdefs.h"
15863 /* System header to define __stub macros and hopefully few prototypes,
15864     which can conflict with char memmove (); below.  */
15865 #include <assert.h>
15866 /* Override any gcc2 internal prototype to avoid an error.  */
15867 #ifdef __cplusplus
15868 extern "C"
15869 #endif
15870 /* We use char because int might match the return type of a gcc2
15871    builtin and then its argument prototype would still apply.  */
15872 char memmove ();
15873 char (*f) ();
15874
15875 int
15876 main ()
15877 {
15878 /* The GNU C library defines this for functions which it implements
15879     to always fail with ENOSYS.  Some functions are actually named
15880     something starting with __ and the normal name is an alias.  */
15881 #if defined (__stub_memmove) || defined (__stub___memmove)
15882 choke me
15883 #else
15884 f = memmove;
15885 #endif
15886
15887   ;
15888   return 0;
15889 }
15890 _ACEOF
15891 rm -f conftest.$ac_objext conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } &&
15897          { ac_try='test -s conftest$ac_exeext'
15898   { (eval echo "$as_me:15898: \"$ac_try\"") >&5
15899   (eval $ac_try) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); }; }; then
15903   ac_cv_func_memmove=yes
15904 else
15905   echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907 ac_cv_func_memmove=no
15908 fi
15909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15910 fi
15911 echo "$as_me:15911: result: $ac_cv_func_memmove" >&5
15912 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15913 if test $ac_cv_func_memmove = yes; then
15914   :
15915 else
15916
15917 echo "$as_me:15917: checking for bcopy" >&5
15918 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15919 if test "${ac_cv_func_bcopy+set}" = set; then
15920   echo $ECHO_N "(cached) $ECHO_C" >&6
15921 else
15922   cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925 /* System header to define __stub macros and hopefully few prototypes,
15926     which can conflict with char bcopy (); below.  */
15927 #include <assert.h>
15928 /* Override any gcc2 internal prototype to avoid an error.  */
15929 #ifdef __cplusplus
15930 extern "C"
15931 #endif
15932 /* We use char because int might match the return type of a gcc2
15933    builtin and then its argument prototype would still apply.  */
15934 char bcopy ();
15935 char (*f) ();
15936
15937 int
15938 main ()
15939 {
15940 /* The GNU C library defines this for functions which it implements
15941     to always fail with ENOSYS.  Some functions are actually named
15942     something starting with __ and the normal name is an alias.  */
15943 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15944 choke me
15945 #else
15946 f = bcopy;
15947 #endif
15948
15949   ;
15950   return 0;
15951 }
15952 _ACEOF
15953 rm -f conftest.$ac_objext conftest$ac_exeext
15954 if { (eval echo "$as_me:15954: \"$ac_link\"") >&5
15955   (eval $ac_link) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); } &&
15959          { ac_try='test -s conftest$ac_exeext'
15960   { (eval echo "$as_me:15960: \"$ac_try\"") >&5
15961   (eval $ac_try) 2>&5
15962   ac_status=$?
15963   echo "$as_me:15963: \$? = $ac_status" >&5
15964   (exit $ac_status); }; }; then
15965   ac_cv_func_bcopy=yes
15966 else
15967   echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969 ac_cv_func_bcopy=no
15970 fi
15971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15972 fi
15973 echo "$as_me:15973: result: $ac_cv_func_bcopy" >&5
15974 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15975 if test $ac_cv_func_bcopy = yes; then
15976
15977         echo "$as_me:15977: checking if bcopy does overlapping moves" >&5
15978 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15979 if test "${cf_cv_good_bcopy+set}" = set; then
15980   echo $ECHO_N "(cached) $ECHO_C" >&6
15981 else
15982
15983                 if test "$cross_compiling" = yes; then
15984   cf_cv_good_bcopy=unknown
15985 else
15986   cat >conftest.$ac_ext <<_ACEOF
15987 #line 15987 "configure"
15988 #include "confdefs.h"
15989
15990 int main() {
15991         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15992         char temp[40];
15993         bcopy(data, temp, sizeof(data));
15994         bcopy(temp+10, temp, 15);
15995         bcopy(temp+5, temp+15, 10);
15996         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15997 }
15998
15999 _ACEOF
16000 rm -f conftest$ac_exeext
16001 if { (eval echo "$as_me:16001: \"$ac_link\"") >&5
16002   (eval $ac_link) 2>&5
16003   ac_status=$?
16004   echo "$as_me:16004: \$? = $ac_status" >&5
16005   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16006   { (eval echo "$as_me:16006: \"$ac_try\"") >&5
16007   (eval $ac_try) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); }; }; then
16011   cf_cv_good_bcopy=yes
16012 else
16013   echo "$as_me: program exited with status $ac_status" >&5
16014 echo "$as_me: failed program was:" >&5
16015 cat conftest.$ac_ext >&5
16016 cf_cv_good_bcopy=no
16017 fi
16018 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16019 fi
16020
16021 fi
16022 echo "$as_me:16022: result: $cf_cv_good_bcopy" >&5
16023 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16024
16025 else
16026   cf_cv_good_bcopy=no
16027 fi
16028
16029         if test "$cf_cv_good_bcopy" = yes ; then
16030                 cat >>confdefs.h <<\EOF
16031 #define USE_OK_BCOPY 1
16032 EOF
16033
16034         else
16035                 cat >>confdefs.h <<\EOF
16036 #define USE_MY_MEMMOVE 1
16037 EOF
16038
16039         fi
16040
16041 fi
16042
16043 echo "$as_me:16043: checking if poll really works" >&5
16044 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16045 if test "${cf_cv_working_poll+set}" = set; then
16046   echo $ECHO_N "(cached) $ECHO_C" >&6
16047 else
16048
16049 if test "$cross_compiling" = yes; then
16050   cf_cv_working_poll=unknown
16051 else
16052   cat >conftest.$ac_ext <<_ACEOF
16053 #line 16053 "configure"
16054 #include "confdefs.h"
16055
16056 #include <stdio.h>
16057 #ifdef HAVE_POLL_H
16058 #include <poll.h>
16059 #else
16060 #include <sys/poll.h>
16061 #endif
16062 int main() {
16063         struct pollfd myfds;
16064         int ret;
16065
16066         myfds.fd = 0;
16067         myfds.events = POLLIN;
16068
16069         ret = poll(&myfds, 1, 100);
16070         ${cf_cv_main_return:-return}(ret != 0);
16071 }
16072 _ACEOF
16073 rm -f conftest$ac_exeext
16074 if { (eval echo "$as_me:16074: \"$ac_link\"") >&5
16075   (eval $ac_link) 2>&5
16076   ac_status=$?
16077   echo "$as_me:16077: \$? = $ac_status" >&5
16078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16079   { (eval echo "$as_me:16079: \"$ac_try\"") >&5
16080   (eval $ac_try) 2>&5
16081   ac_status=$?
16082   echo "$as_me:16082: \$? = $ac_status" >&5
16083   (exit $ac_status); }; }; then
16084   cf_cv_working_poll=yes
16085 else
16086   echo "$as_me: program exited with status $ac_status" >&5
16087 echo "$as_me: failed program was:" >&5
16088 cat conftest.$ac_ext >&5
16089 cf_cv_working_poll=no
16090 fi
16091 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16092 fi
16093 fi
16094 echo "$as_me:16094: result: $cf_cv_working_poll" >&5
16095 echo "${ECHO_T}$cf_cv_working_poll" >&6
16096 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16097 #define HAVE_WORKING_POLL 1
16098 EOF
16099
16100 echo "$as_me:16100: checking for va_copy" >&5
16101 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16102 if test "${cf_cv_have_va_copy+set}" = set; then
16103   echo $ECHO_N "(cached) $ECHO_C" >&6
16104 else
16105
16106 cat >conftest.$ac_ext <<_ACEOF
16107 #line 16107 "configure"
16108 #include "confdefs.h"
16109
16110 #include <stdarg.h>
16111
16112 int
16113 main ()
16114 {
16115
16116         static va_list dst;
16117         static va_list src;
16118         va_copy(dst, src)
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext conftest$ac_exeext
16124 if { (eval echo "$as_me:16124: \"$ac_link\"") >&5
16125   (eval $ac_link) 2>&5
16126   ac_status=$?
16127   echo "$as_me:16127: \$? = $ac_status" >&5
16128   (exit $ac_status); } &&
16129          { ac_try='test -s conftest$ac_exeext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   cf_cv_have_va_copy=yes
16136 else
16137   echo "$as_me: failed program was:" >&5
16138 cat conftest.$ac_ext >&5
16139 cf_cv_have_va_copy=no
16140 fi
16141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16142 fi
16143 echo "$as_me:16143: result: $cf_cv_have_va_copy" >&5
16144 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16145
16146 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16147 #define HAVE_VA_COPY 1
16148 EOF
16149
16150 echo "$as_me:16150: checking for __va_copy" >&5
16151 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16152 if test "${cf_cv_have___va_copy+set}" = set; then
16153   echo $ECHO_N "(cached) $ECHO_C" >&6
16154 else
16155
16156 cat >conftest.$ac_ext <<_ACEOF
16157 #line 16157 "configure"
16158 #include "confdefs.h"
16159
16160 #include <stdarg.h>
16161
16162 int
16163 main ()
16164 {
16165
16166         static va_list dst;
16167         static va_list src;
16168         __va_copy(dst, src)
16169   ;
16170   return 0;
16171 }
16172 _ACEOF
16173 rm -f conftest.$ac_objext conftest$ac_exeext
16174 if { (eval echo "$as_me:16174: \"$ac_link\"") >&5
16175   (eval $ac_link) 2>&5
16176   ac_status=$?
16177   echo "$as_me:16177: \$? = $ac_status" >&5
16178   (exit $ac_status); } &&
16179          { ac_try='test -s conftest$ac_exeext'
16180   { (eval echo "$as_me:16180: \"$ac_try\"") >&5
16181   (eval $ac_try) 2>&5
16182   ac_status=$?
16183   echo "$as_me:16183: \$? = $ac_status" >&5
16184   (exit $ac_status); }; }; then
16185   cf_cv_have___va_copy=yes
16186 else
16187   echo "$as_me: failed program was:" >&5
16188 cat conftest.$ac_ext >&5
16189 cf_cv_have___va_copy=no
16190 fi
16191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16192 fi
16193 echo "$as_me:16193: result: $cf_cv_have___va_copy" >&5
16194 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16195
16196 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16197 #define HAVE___VA_COPY 1
16198 EOF
16199
16200 echo "$as_me:16200: checking for pid_t" >&5
16201 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16202 if test "${ac_cv_type_pid_t+set}" = set; then
16203   echo $ECHO_N "(cached) $ECHO_C" >&6
16204 else
16205   cat >conftest.$ac_ext <<_ACEOF
16206 #line 16206 "configure"
16207 #include "confdefs.h"
16208 $ac_includes_default
16209 int
16210 main ()
16211 {
16212 if ((pid_t *) 0)
16213   return 0;
16214 if (sizeof (pid_t))
16215   return 0;
16216   ;
16217   return 0;
16218 }
16219 _ACEOF
16220 rm -f conftest.$ac_objext
16221 if { (eval echo "$as_me:16221: \"$ac_compile\"") >&5
16222   (eval $ac_compile) 2>&5
16223   ac_status=$?
16224   echo "$as_me:16224: \$? = $ac_status" >&5
16225   (exit $ac_status); } &&
16226          { ac_try='test -s conftest.$ac_objext'
16227   { (eval echo "$as_me:16227: \"$ac_try\"") >&5
16228   (eval $ac_try) 2>&5
16229   ac_status=$?
16230   echo "$as_me:16230: \$? = $ac_status" >&5
16231   (exit $ac_status); }; }; then
16232   ac_cv_type_pid_t=yes
16233 else
16234   echo "$as_me: failed program was:" >&5
16235 cat conftest.$ac_ext >&5
16236 ac_cv_type_pid_t=no
16237 fi
16238 rm -f conftest.$ac_objext conftest.$ac_ext
16239 fi
16240 echo "$as_me:16240: result: $ac_cv_type_pid_t" >&5
16241 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16242 if test $ac_cv_type_pid_t = yes; then
16243   :
16244 else
16245
16246 cat >>confdefs.h <<EOF
16247 #define pid_t int
16248 EOF
16249
16250 fi
16251
16252 for ac_header in unistd.h vfork.h
16253 do
16254 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16255 echo "$as_me:16255: checking for $ac_header" >&5
16256 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16257 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16258   echo $ECHO_N "(cached) $ECHO_C" >&6
16259 else
16260   cat >conftest.$ac_ext <<_ACEOF
16261 #line 16261 "configure"
16262 #include "confdefs.h"
16263 #include <$ac_header>
16264 _ACEOF
16265 if { (eval echo "$as_me:16265: \"$ac_cpp conftest.$ac_ext\"") >&5
16266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16267   ac_status=$?
16268   egrep -v '^ *\+' conftest.er1 >conftest.err
16269   rm -f conftest.er1
16270   cat conftest.err >&5
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); } >/dev/null; then
16273   if test -s conftest.err; then
16274     ac_cpp_err=$ac_c_preproc_warn_flag
16275   else
16276     ac_cpp_err=
16277   fi
16278 else
16279   ac_cpp_err=yes
16280 fi
16281 if test -z "$ac_cpp_err"; then
16282   eval "$as_ac_Header=yes"
16283 else
16284   echo "$as_me: failed program was:" >&5
16285   cat conftest.$ac_ext >&5
16286   eval "$as_ac_Header=no"
16287 fi
16288 rm -f conftest.err conftest.$ac_ext
16289 fi
16290 echo "$as_me:16290: result: `eval echo '${'$as_ac_Header'}'`" >&5
16291 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16292 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16293   cat >>confdefs.h <<EOF
16294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16295 EOF
16296
16297 fi
16298 done
16299
16300 for ac_func in fork vfork
16301 do
16302 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16303 echo "$as_me:16303: checking for $ac_func" >&5
16304 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16305 if eval "test \"\${$as_ac_var+set}\" = set"; then
16306   echo $ECHO_N "(cached) $ECHO_C" >&6
16307 else
16308   cat >conftest.$ac_ext <<_ACEOF
16309 #line 16309 "configure"
16310 #include "confdefs.h"
16311 /* System header to define __stub macros and hopefully few prototypes,
16312     which can conflict with char $ac_func (); below.  */
16313 #include <assert.h>
16314 /* Override any gcc2 internal prototype to avoid an error.  */
16315 #ifdef __cplusplus
16316 extern "C"
16317 #endif
16318 /* We use char because int might match the return type of a gcc2
16319    builtin and then its argument prototype would still apply.  */
16320 char $ac_func ();
16321 char (*f) ();
16322
16323 int
16324 main ()
16325 {
16326 /* The GNU C library defines this for functions which it implements
16327     to always fail with ENOSYS.  Some functions are actually named
16328     something starting with __ and the normal name is an alias.  */
16329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16330 choke me
16331 #else
16332 f = $ac_func;
16333 #endif
16334
16335   ;
16336   return 0;
16337 }
16338 _ACEOF
16339 rm -f conftest.$ac_objext conftest$ac_exeext
16340 if { (eval echo "$as_me:16340: \"$ac_link\"") >&5
16341   (eval $ac_link) 2>&5
16342   ac_status=$?
16343   echo "$as_me:16343: \$? = $ac_status" >&5
16344   (exit $ac_status); } &&
16345          { ac_try='test -s conftest$ac_exeext'
16346   { (eval echo "$as_me:16346: \"$ac_try\"") >&5
16347   (eval $ac_try) 2>&5
16348   ac_status=$?
16349   echo "$as_me:16349: \$? = $ac_status" >&5
16350   (exit $ac_status); }; }; then
16351   eval "$as_ac_var=yes"
16352 else
16353   echo "$as_me: failed program was:" >&5
16354 cat conftest.$ac_ext >&5
16355 eval "$as_ac_var=no"
16356 fi
16357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16358 fi
16359 echo "$as_me:16359: result: `eval echo '${'$as_ac_var'}'`" >&5
16360 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16361 if test `eval echo '${'$as_ac_var'}'` = yes; then
16362   cat >>confdefs.h <<EOF
16363 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16364 EOF
16365
16366 fi
16367 done
16368
16369 ac_cv_func_fork_works=$ac_cv_func_fork
16370 if test "x$ac_cv_func_fork" = xyes; then
16371   echo "$as_me:16371: checking for working fork" >&5
16372 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16373 if test "${ac_cv_func_fork_works+set}" = set; then
16374   echo $ECHO_N "(cached) $ECHO_C" >&6
16375 else
16376   if test "$cross_compiling" = yes; then
16377   ac_cv_func_fork_works=cross
16378 else
16379   cat >conftest.$ac_ext <<_ACEOF
16380 /* By Rüdiger Kuhlmann. */
16381       #include <sys/types.h>
16382       #if HAVE_UNISTD_H
16383       # include <unistd.h>
16384       #endif
16385       /* Some systems only have a dummy stub for fork() */
16386       int main ()
16387       {
16388         if (fork() < 0)
16389           $ac_main_return (1);
16390         $ac_main_return (0);
16391       }
16392 _ACEOF
16393 rm -f conftest$ac_exeext
16394 if { (eval echo "$as_me:16394: \"$ac_link\"") >&5
16395   (eval $ac_link) 2>&5
16396   ac_status=$?
16397   echo "$as_me:16397: \$? = $ac_status" >&5
16398   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16399   { (eval echo "$as_me:16399: \"$ac_try\"") >&5
16400   (eval $ac_try) 2>&5
16401   ac_status=$?
16402   echo "$as_me:16402: \$? = $ac_status" >&5
16403   (exit $ac_status); }; }; then
16404   ac_cv_func_fork_works=yes
16405 else
16406   echo "$as_me: program exited with status $ac_status" >&5
16407 echo "$as_me: failed program was:" >&5
16408 cat conftest.$ac_ext >&5
16409 ac_cv_func_fork_works=no
16410 fi
16411 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16412 fi
16413 fi
16414 echo "$as_me:16414: result: $ac_cv_func_fork_works" >&5
16415 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16416
16417 fi
16418 if test "x$ac_cv_func_fork_works" = xcross; then
16419   case $host in
16420     *-*-amigaos* | *-*-msdosdjgpp*)
16421       # Override, as these systems have only a dummy fork() stub
16422       ac_cv_func_fork_works=no
16423       ;;
16424     *)
16425       ac_cv_func_fork_works=yes
16426       ;;
16427   esac
16428   { echo "$as_me:16428: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16429 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16430 fi
16431 ac_cv_func_vfork_works=$ac_cv_func_vfork
16432 if test "x$ac_cv_func_vfork" = xyes; then
16433   echo "$as_me:16433: checking for working vfork" >&5
16434 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16435 if test "${ac_cv_func_vfork_works+set}" = set; then
16436   echo $ECHO_N "(cached) $ECHO_C" >&6
16437 else
16438   if test "$cross_compiling" = yes; then
16439   ac_cv_func_vfork_works=cross
16440 else
16441   cat >conftest.$ac_ext <<_ACEOF
16442 #line 16442 "configure"
16443 #include "confdefs.h"
16444 /* Thanks to Paul Eggert for this test.  */
16445 #include <stdio.h>
16446 #include <sys/types.h>
16447 #include <sys/stat.h>
16448 #if HAVE_UNISTD_H
16449 # include <unistd.h>
16450 #endif
16451 #if HAVE_VFORK_H
16452 # include <vfork.h>
16453 #endif
16454 /* On some sparc systems, changes by the child to local and incoming
16455    argument registers are propagated back to the parent.  The compiler
16456    is told about this with #include <vfork.h>, but some compilers
16457    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16458    static variable whose address is put into a register that is
16459    clobbered by the vfork.  */
16460 static
16461 #ifdef __cplusplus
16462 sparc_address_test (int arg)
16463 # else
16464 sparc_address_test (arg) int arg;
16465 #endif
16466 {
16467   static pid_t child;
16468   if (!child) {
16469     child = vfork ();
16470     if (child < 0) {
16471       perror ("vfork");
16472       _exit(2);
16473     }
16474     if (!child) {
16475       arg = getpid();
16476       write(-1, "", 0);
16477       _exit (arg);
16478     }
16479   }
16480 }
16481
16482 int
16483 main ()
16484 {
16485   pid_t parent = getpid ();
16486   pid_t child;
16487
16488   sparc_address_test ();
16489
16490   child = vfork ();
16491
16492   if (child == 0) {
16493     /* Here is another test for sparc vfork register problems.  This
16494        test uses lots of local variables, at least as many local
16495        variables as main has allocated so far including compiler
16496        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16497        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16498        reuse the register of parent for one of the local variables,
16499        since it will think that parent can't possibly be used any more
16500        in this routine.  Assigning to the local variable will thus
16501        munge parent in the parent process.  */
16502     pid_t
16503       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16504       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16505     /* Convince the compiler that p..p7 are live; otherwise, it might
16506        use the same hardware register for all 8 local variables.  */
16507     if (p != p1 || p != p2 || p != p3 || p != p4
16508         || p != p5 || p != p6 || p != p7)
16509       _exit(1);
16510
16511     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16512        from child file descriptors.  If the child closes a descriptor
16513        before it execs or exits, this munges the parent's descriptor
16514        as well.  Test for this by closing stdout in the child.  */
16515     _exit(close(fileno(stdout)) != 0);
16516   } else {
16517     int status;
16518     struct stat st;
16519
16520     while (wait(&status) != child)
16521       ;
16522     $ac_main_return(
16523          /* Was there some problem with vforking?  */
16524          child < 0
16525
16526          /* Did the child fail?  (This shouldn't happen.)  */
16527          || status
16528
16529          /* Did the vfork/compiler bug occur?  */
16530          || parent != getpid()
16531
16532          /* Did the file descriptor bug occur?  */
16533          || fstat(fileno(stdout), &st) != 0
16534          );
16535   }
16536 }
16537 _ACEOF
16538 rm -f conftest$ac_exeext
16539 if { (eval echo "$as_me:16539: \"$ac_link\"") >&5
16540   (eval $ac_link) 2>&5
16541   ac_status=$?
16542   echo "$as_me:16542: \$? = $ac_status" >&5
16543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16544   { (eval echo "$as_me:16544: \"$ac_try\"") >&5
16545   (eval $ac_try) 2>&5
16546   ac_status=$?
16547   echo "$as_me:16547: \$? = $ac_status" >&5
16548   (exit $ac_status); }; }; then
16549   ac_cv_func_vfork_works=yes
16550 else
16551   echo "$as_me: program exited with status $ac_status" >&5
16552 echo "$as_me: failed program was:" >&5
16553 cat conftest.$ac_ext >&5
16554 ac_cv_func_vfork_works=no
16555 fi
16556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16557 fi
16558 fi
16559 echo "$as_me:16559: result: $ac_cv_func_vfork_works" >&5
16560 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16561
16562 fi;
16563 if test "x$ac_cv_func_fork_works" = xcross; then
16564   ac_cv_func_vfork_works=ac_cv_func_vfork
16565   { echo "$as_me:16565: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16566 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16567 fi
16568
16569 if test "x$ac_cv_func_vfork_works" = xyes; then
16570
16571 cat >>confdefs.h <<\EOF
16572 #define HAVE_WORKING_VFORK 1
16573 EOF
16574
16575 else
16576
16577 cat >>confdefs.h <<\EOF
16578 #define vfork fork
16579 EOF
16580
16581 fi
16582 if test "x$ac_cv_func_fork_works" = xyes; then
16583
16584 cat >>confdefs.h <<\EOF
16585 #define HAVE_WORKING_FORK 1
16586 EOF
16587
16588 fi
16589
16590 # special check for test/ditto.c
16591
16592 echo "$as_me:16592: checking for openpty in -lutil" >&5
16593 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16594 if test "${ac_cv_lib_util_openpty+set}" = set; then
16595   echo $ECHO_N "(cached) $ECHO_C" >&6
16596 else
16597   ac_check_lib_save_LIBS=$LIBS
16598 LIBS="-lutil  $LIBS"
16599 cat >conftest.$ac_ext <<_ACEOF
16600 #line 16600 "configure"
16601 #include "confdefs.h"
16602
16603 /* Override any gcc2 internal prototype to avoid an error.  */
16604 #ifdef __cplusplus
16605 extern "C"
16606 #endif
16607 /* We use char because int might match the return type of a gcc2
16608    builtin and then its argument prototype would still apply.  */
16609 char openpty ();
16610 int
16611 main ()
16612 {
16613 openpty ();
16614   ;
16615   return 0;
16616 }
16617 _ACEOF
16618 rm -f conftest.$ac_objext conftest$ac_exeext
16619 if { (eval echo "$as_me:16619: \"$ac_link\"") >&5
16620   (eval $ac_link) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); } &&
16624          { ac_try='test -s conftest$ac_exeext'
16625   { (eval echo "$as_me:16625: \"$ac_try\"") >&5
16626   (eval $ac_try) 2>&5
16627   ac_status=$?
16628   echo "$as_me:16628: \$? = $ac_status" >&5
16629   (exit $ac_status); }; }; then
16630   ac_cv_lib_util_openpty=yes
16631 else
16632   echo "$as_me: failed program was:" >&5
16633 cat conftest.$ac_ext >&5
16634 ac_cv_lib_util_openpty=no
16635 fi
16636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16637 LIBS=$ac_check_lib_save_LIBS
16638 fi
16639 echo "$as_me:16639: result: $ac_cv_lib_util_openpty" >&5
16640 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16641 if test $ac_cv_lib_util_openpty = yes; then
16642   cf_cv_lib_util=yes
16643 else
16644   cf_cv_lib_util=no
16645 fi
16646
16647 echo "$as_me:16647: checking for openpty header" >&5
16648 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16649 if test "${cf_cv_func_openpty+set}" = set; then
16650   echo $ECHO_N "(cached) $ECHO_C" >&6
16651 else
16652
16653     cf_save_LIBS="$LIBS"
16654     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16655     for cf_header in pty.h libutil.h util.h
16656     do
16657     cat >conftest.$ac_ext <<_ACEOF
16658 #line 16658 "configure"
16659 #include "confdefs.h"
16660
16661 #include <$cf_header>
16662
16663 int
16664 main ()
16665 {
16666
16667     int x = openpty((int *)0, (int *)0, (char *)0,
16668                    (struct termios *)0, (struct winsize *)0);
16669
16670   ;
16671   return 0;
16672 }
16673 _ACEOF
16674 rm -f conftest.$ac_objext conftest$ac_exeext
16675 if { (eval echo "$as_me:16675: \"$ac_link\"") >&5
16676   (eval $ac_link) 2>&5
16677   ac_status=$?
16678   echo "$as_me:16678: \$? = $ac_status" >&5
16679   (exit $ac_status); } &&
16680          { ac_try='test -s conftest$ac_exeext'
16681   { (eval echo "$as_me:16681: \"$ac_try\"") >&5
16682   (eval $ac_try) 2>&5
16683   ac_status=$?
16684   echo "$as_me:16684: \$? = $ac_status" >&5
16685   (exit $ac_status); }; }; then
16686
16687         cf_cv_func_openpty=$cf_header
16688         break
16689
16690 else
16691   echo "$as_me: failed program was:" >&5
16692 cat conftest.$ac_ext >&5
16693
16694         cf_cv_func_openpty=no
16695
16696 fi
16697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16698     done
16699     LIBS="$cf_save_LIBS"
16700
16701 fi
16702 echo "$as_me:16702: result: $cf_cv_func_openpty" >&5
16703 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16704
16705 if test "$cf_cv_func_openpty" != no ; then
16706     cat >>confdefs.h <<EOF
16707 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16708 EOF
16709
16710     cat >>confdefs.h <<\EOF
16711 #define USE_XTERM_PTY 1
16712 EOF
16713
16714     if test "$cf_cv_lib_util" = yes ; then
16715         TEST_LIBS="-lutil $TEST_LIBS"
16716     fi
16717 fi
16718
16719 if test "$with_hashed_db" != no ; then
16720         cat >>confdefs.h <<\EOF
16721 #define USE_HASHED_DB 1
16722 EOF
16723
16724 case $with_hashed_db in #(vi
16725 yes|*able*) #(vi
16726     ;;
16727 *)
16728     if test -d "$with_hashed_db" ; then
16729
16730 if test -n "$with_hashed_db/include" ; then
16731   for cf_add_incdir in $with_hashed_db/include
16732   do
16733         while test $cf_add_incdir != /usr/include
16734         do
16735           if test -d $cf_add_incdir
16736           then
16737                 cf_have_incdir=no
16738                 if test -n "$CFLAGS$CPPFLAGS" ; then
16739                   # a loop is needed to ensure we can add subdirs of existing dirs
16740                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16741                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16742                           cf_have_incdir=yes; break
16743                         fi
16744                   done
16745                 fi
16746
16747                 if test "$cf_have_incdir" = no ; then
16748                   if test "$cf_add_incdir" = /usr/local/include ; then
16749                         if test "$GCC" = yes
16750                         then
16751                           cf_save_CPPFLAGS=$CPPFLAGS
16752                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16753                           cat >conftest.$ac_ext <<_ACEOF
16754 #line 16754 "configure"
16755 #include "confdefs.h"
16756 #include <stdio.h>
16757 int
16758 main ()
16759 {
16760 printf("Hello")
16761   ;
16762   return 0;
16763 }
16764 _ACEOF
16765 rm -f conftest.$ac_objext
16766 if { (eval echo "$as_me:16766: \"$ac_compile\"") >&5
16767   (eval $ac_compile) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit $ac_status); } &&
16771          { ac_try='test -s conftest.$ac_objext'
16772   { (eval echo "$as_me:16772: \"$ac_try\"") >&5
16773   (eval $ac_try) 2>&5
16774   ac_status=$?
16775   echo "$as_me:16775: \$? = $ac_status" >&5
16776   (exit $ac_status); }; }; then
16777   :
16778 else
16779   echo "$as_me: failed program was:" >&5
16780 cat conftest.$ac_ext >&5
16781 cf_have_incdir=yes
16782 fi
16783 rm -f conftest.$ac_objext conftest.$ac_ext
16784                           CPPFLAGS=$cf_save_CPPFLAGS
16785                         fi
16786                   fi
16787                 fi
16788
16789                 if test "$cf_have_incdir" = no ; then
16790                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16791
16792 echo "${as_me:-configure}:16792: testing adding $cf_add_incdir to include-path ..." 1>&5
16793
16794                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16795
16796                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16797                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16798                   cf_add_incdir="$cf_top_incdir"
16799                 else
16800                   break
16801                 fi
16802           fi
16803         done
16804   done
16805 fi
16806
16807 if test -n "$with_hashed_db/lib" ; then
16808   for cf_add_libdir in $with_hashed_db/lib
16809   do
16810     if test $cf_add_libdir = /usr/lib ; then
16811       :
16812     elif test -d $cf_add_libdir
16813     then
16814       cf_have_libdir=no
16815       if test -n "$LDFLAGS$LIBS" ; then
16816         # a loop is needed to ensure we can add subdirs of existing dirs
16817         for cf_test_libdir in $LDFLAGS $LIBS ; do
16818           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16819             cf_have_libdir=yes; break
16820           fi
16821         done
16822       fi
16823       if test "$cf_have_libdir" = no ; then
16824         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16825
16826 echo "${as_me:-configure}:16826: testing adding $cf_add_libdir to library-path ..." 1>&5
16827
16828         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16829       fi
16830     fi
16831   done
16832 fi
16833
16834     fi
16835 esac
16836
16837 echo "$as_me:16837: checking for db.h" >&5
16838 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16839 if test "${ac_cv_header_db_h+set}" = set; then
16840   echo $ECHO_N "(cached) $ECHO_C" >&6
16841 else
16842   cat >conftest.$ac_ext <<_ACEOF
16843 #line 16843 "configure"
16844 #include "confdefs.h"
16845 #include <db.h>
16846 _ACEOF
16847 if { (eval echo "$as_me:16847: \"$ac_cpp conftest.$ac_ext\"") >&5
16848   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16849   ac_status=$?
16850   egrep -v '^ *\+' conftest.er1 >conftest.err
16851   rm -f conftest.er1
16852   cat conftest.err >&5
16853   echo "$as_me:16853: \$? = $ac_status" >&5
16854   (exit $ac_status); } >/dev/null; then
16855   if test -s conftest.err; then
16856     ac_cpp_err=$ac_c_preproc_warn_flag
16857   else
16858     ac_cpp_err=
16859   fi
16860 else
16861   ac_cpp_err=yes
16862 fi
16863 if test -z "$ac_cpp_err"; then
16864   ac_cv_header_db_h=yes
16865 else
16866   echo "$as_me: failed program was:" >&5
16867   cat conftest.$ac_ext >&5
16868   ac_cv_header_db_h=no
16869 fi
16870 rm -f conftest.err conftest.$ac_ext
16871 fi
16872 echo "$as_me:16872: result: $ac_cv_header_db_h" >&5
16873 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16874 if test $ac_cv_header_db_h = yes; then
16875
16876 echo "$as_me:16876: checking for version of db" >&5
16877 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16878 if test "${cf_cv_hashed_db_version+set}" = set; then
16879   echo $ECHO_N "(cached) $ECHO_C" >&6
16880 else
16881
16882 cf_cv_hashed_db_version=unknown
16883
16884 for cf_db_version in 1 2 3 4 5
16885 do
16886
16887 echo "${as_me:-configure}:16887: testing checking for db version $cf_db_version ..." 1>&5
16888
16889         cat >conftest.$ac_ext <<_ACEOF
16890 #line 16890 "configure"
16891 #include "confdefs.h"
16892
16893 $ac_includes_default
16894 #include <db.h>
16895
16896 #ifdef DB_VERSION_MAJOR
16897         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16898 #if $cf_db_version == DB_VERSION_MAJOR
16899         /* ok */
16900 #else
16901         make an error
16902 #endif
16903 #else
16904 #if $cf_db_version == 1
16905         /* ok: assuming this is DB 1.8.5 */
16906 #else
16907         make an error
16908 #endif
16909 #endif
16910
16911 int
16912 main ()
16913 {
16914 DBT *foo = 0
16915   ;
16916   return 0;
16917 }
16918 _ACEOF
16919 rm -f conftest.$ac_objext
16920 if { (eval echo "$as_me:16920: \"$ac_compile\"") >&5
16921   (eval $ac_compile) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit $ac_status); } &&
16925          { ac_try='test -s conftest.$ac_objext'
16926   { (eval echo "$as_me:16926: \"$ac_try\"") >&5
16927   (eval $ac_try) 2>&5
16928   ac_status=$?
16929   echo "$as_me:16929: \$? = $ac_status" >&5
16930   (exit $ac_status); }; }; then
16931
16932         cf_cv_hashed_db_version=$cf_db_version
16933         break
16934
16935 else
16936   echo "$as_me: failed program was:" >&5
16937 cat conftest.$ac_ext >&5
16938 fi
16939 rm -f conftest.$ac_objext conftest.$ac_ext
16940 done
16941
16942 fi
16943 echo "$as_me:16943: result: $cf_cv_hashed_db_version" >&5
16944 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16945
16946 if test "$cf_cv_hashed_db_version" = unknown ; then
16947         { { echo "$as_me:16947: error: Cannot determine version of db" >&5
16948 echo "$as_me: error: Cannot determine version of db" >&2;}
16949    { (exit 1); exit 1; }; }
16950 else
16951
16952 echo "$as_me:16952: checking for db libraries" >&5
16953 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16954 if test "${cf_cv_hashed_db_libs+set}" = set; then
16955   echo $ECHO_N "(cached) $ECHO_C" >&6
16956 else
16957
16958 cf_cv_hashed_db_libs=unknown
16959 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16960 do
16961         cf_save_libs="$LIBS"
16962         if test -n "$cf_db_libs"; then
16963                 LIBS="-l$cf_db_libs $LIBS"
16964         fi
16965
16966 echo "${as_me:-configure}:16966: testing checking for library "$cf_db_libs" ..." 1>&5
16967
16968         cat >conftest.$ac_ext <<_ACEOF
16969 #line 16969 "configure"
16970 #include "confdefs.h"
16971
16972 $ac_includes_default
16973 #include <db.h>
16974
16975 int
16976 main ()
16977 {
16978
16979         char *path = "/tmp/foo";
16980 #ifdef DB_VERSION_MAJOR
16981 #if DB_VERSION_MAJOR >= 4
16982         DB *result = 0;
16983         db_create(&result, NULL, 0);
16984         result->open(result,
16985                 NULL,
16986                 path,
16987                 path,
16988                 DB_HASH,
16989                 DB_CREATE,
16990                 0644);
16991 #elif DB_VERSION_MAJOR >= 3
16992         DB *result = 0;
16993         db_create(&result, NULL, 0);
16994         result->open(result,
16995                 path,
16996                 path,
16997                 DB_HASH,
16998                 DB_CREATE,
16999                 0644);
17000 #elif DB_VERSION_MAJOR >= 2
17001         DB *result = 0;
17002         db_open(path,
17003                 DB_HASH,
17004                 DB_CREATE,
17005                 0644,
17006                 (DB_ENV *) 0,
17007                 (DB_INFO *) 0,
17008                 &result);
17009 #endif /* DB_VERSION_MAJOR */
17010 #else
17011         DB *result = dbopen(path,
17012                      2,
17013                      0644,
17014                      DB_HASH,
17015                      0);
17016 #endif
17017         ${cf_cv_main_return:-return}(result != 0)
17018
17019   ;
17020   return 0;
17021 }
17022 _ACEOF
17023 rm -f conftest.$ac_objext conftest$ac_exeext
17024 if { (eval echo "$as_me:17024: \"$ac_link\"") >&5
17025   (eval $ac_link) 2>&5
17026   ac_status=$?
17027   echo "$as_me:17027: \$? = $ac_status" >&5
17028   (exit $ac_status); } &&
17029          { ac_try='test -s conftest$ac_exeext'
17030   { (eval echo "$as_me:17030: \"$ac_try\"") >&5
17031   (eval $ac_try) 2>&5
17032   ac_status=$?
17033   echo "$as_me:17033: \$? = $ac_status" >&5
17034   (exit $ac_status); }; }; then
17035
17036         if test -n "$cf_db_libs" ; then
17037                 cf_cv_hashed_db_libs=$cf_db_libs
17038         else
17039                 cf_cv_hashed_db_libs=default
17040         fi
17041         LIBS="$cf_save_libs"
17042         break
17043
17044 else
17045   echo "$as_me: failed program was:" >&5
17046 cat conftest.$ac_ext >&5
17047 fi
17048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17049         LIBS="$cf_save_libs"
17050 done
17051
17052 fi
17053 echo "$as_me:17053: result: $cf_cv_hashed_db_libs" >&5
17054 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17055
17056         if test "$cf_cv_hashed_db_libs" = unknown ; then
17057                 { { echo "$as_me:17057: error: Cannot determine library for db" >&5
17058 echo "$as_me: error: Cannot determine library for db" >&2;}
17059    { (exit 1); exit 1; }; }
17060         elif test "$cf_cv_hashed_db_libs" != default ; then
17061                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17062         fi
17063 fi
17064
17065 else
17066
17067         { { echo "$as_me:17067: error: Cannot find db.h" >&5
17068 echo "$as_me: error: Cannot find db.h" >&2;}
17069    { (exit 1); exit 1; }; }
17070
17071 fi
17072
17073 fi
17074
17075 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17076         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17077         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17078 fi
17079
17080 # Just in case, check if the C compiler has a bool type.
17081
17082 echo "$as_me:17082: checking if we should include stdbool.h" >&5
17083 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17084
17085 if test "${cf_cv_header_stdbool_h+set}" = set; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088
17089         cat >conftest.$ac_ext <<_ACEOF
17090 #line 17090 "configure"
17091 #include "confdefs.h"
17092
17093 int
17094 main ()
17095 {
17096 bool foo = false
17097   ;
17098   return 0;
17099 }
17100 _ACEOF
17101 rm -f conftest.$ac_objext
17102 if { (eval echo "$as_me:17102: \"$ac_compile\"") >&5
17103   (eval $ac_compile) 2>&5
17104   ac_status=$?
17105   echo "$as_me:17105: \$? = $ac_status" >&5
17106   (exit $ac_status); } &&
17107          { ac_try='test -s conftest.$ac_objext'
17108   { (eval echo "$as_me:17108: \"$ac_try\"") >&5
17109   (eval $ac_try) 2>&5
17110   ac_status=$?
17111   echo "$as_me:17111: \$? = $ac_status" >&5
17112   (exit $ac_status); }; }; then
17113   cf_cv_header_stdbool_h=0
17114 else
17115   echo "$as_me: failed program was:" >&5
17116 cat conftest.$ac_ext >&5
17117 cat >conftest.$ac_ext <<_ACEOF
17118 #line 17118 "configure"
17119 #include "confdefs.h"
17120
17121 #ifndef __BEOS__
17122 #include <stdbool.h>
17123 #endif
17124
17125 int
17126 main ()
17127 {
17128 bool foo = false
17129   ;
17130   return 0;
17131 }
17132 _ACEOF
17133 rm -f conftest.$ac_objext
17134 if { (eval echo "$as_me:17134: \"$ac_compile\"") >&5
17135   (eval $ac_compile) 2>&5
17136   ac_status=$?
17137   echo "$as_me:17137: \$? = $ac_status" >&5
17138   (exit $ac_status); } &&
17139          { ac_try='test -s conftest.$ac_objext'
17140   { (eval echo "$as_me:17140: \"$ac_try\"") >&5
17141   (eval $ac_try) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit $ac_status); }; }; then
17145   cf_cv_header_stdbool_h=1
17146 else
17147   echo "$as_me: failed program was:" >&5
17148 cat conftest.$ac_ext >&5
17149 cf_cv_header_stdbool_h=0
17150 fi
17151 rm -f conftest.$ac_objext conftest.$ac_ext
17152 fi
17153 rm -f conftest.$ac_objext conftest.$ac_ext
17154 fi
17155
17156 if test "$cf_cv_header_stdbool_h" = 1
17157 then    echo "$as_me:17157: result: yes" >&5
17158 echo "${ECHO_T}yes" >&6
17159 else    echo "$as_me:17159: result: no" >&5
17160 echo "${ECHO_T}no" >&6
17161 fi
17162
17163 echo "$as_me:17163: checking for builtin bool type" >&5
17164 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17165
17166 if test "${cf_cv_cc_bool_type+set}" = set; then
17167   echo $ECHO_N "(cached) $ECHO_C" >&6
17168 else
17169
17170         cat >conftest.$ac_ext <<_ACEOF
17171 #line 17171 "configure"
17172 #include "confdefs.h"
17173
17174 #include <stdio.h>
17175 #include <sys/types.h>
17176
17177 int
17178 main ()
17179 {
17180 bool x = false
17181   ;
17182   return 0;
17183 }
17184 _ACEOF
17185 rm -f conftest.$ac_objext
17186 if { (eval echo "$as_me:17186: \"$ac_compile\"") >&5
17187   (eval $ac_compile) 2>&5
17188   ac_status=$?
17189   echo "$as_me:17189: \$? = $ac_status" >&5
17190   (exit $ac_status); } &&
17191          { ac_try='test -s conftest.$ac_objext'
17192   { (eval echo "$as_me:17192: \"$ac_try\"") >&5
17193   (eval $ac_try) 2>&5
17194   ac_status=$?
17195   echo "$as_me:17195: \$? = $ac_status" >&5
17196   (exit $ac_status); }; }; then
17197   cf_cv_cc_bool_type=1
17198 else
17199   echo "$as_me: failed program was:" >&5
17200 cat conftest.$ac_ext >&5
17201 cf_cv_cc_bool_type=0
17202 fi
17203 rm -f conftest.$ac_objext conftest.$ac_ext
17204
17205 fi
17206
17207 if test "$cf_cv_cc_bool_type" = 1
17208 then    echo "$as_me:17208: result: yes" >&5
17209 echo "${ECHO_T}yes" >&6
17210 else    echo "$as_me:17210: result: no" >&5
17211 echo "${ECHO_T}no" >&6
17212 fi
17213
17214 # Check for C++ compiler characteristics (and ensure that it's there!)
17215 if test -n "$CXX" ; then
17216         ac_ext=cc
17217 ac_cpp='$CXXCPP $CPPFLAGS'
17218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17221 ac_main_return=return
17222
17223 if test -n "$GXX" ; then
17224 case $cf_cv_system_name in #(vi
17225 os2*) #(vi
17226         cf_stdcpp_libname=stdcpp
17227         ;;
17228 *)
17229         cf_stdcpp_libname=stdc++
17230         ;;
17231 esac
17232 echo "$as_me:17232: checking for library $cf_stdcpp_libname" >&5
17233 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17234 if test "${cf_cv_libstdcpp+set}" = set; then
17235   echo $ECHO_N "(cached) $ECHO_C" >&6
17236 else
17237
17238         cf_save="$LIBS"
17239         LIBS="-l$cf_stdcpp_libname $LIBS"
17240 cat >conftest.$ac_ext <<_ACEOF
17241 #line 17241 "configure"
17242 #include "confdefs.h"
17243
17244 #include <strstream.h>
17245 int
17246 main ()
17247 {
17248
17249 char buf[80];
17250 strstreambuf foo(buf, sizeof(buf))
17251
17252   ;
17253   return 0;
17254 }
17255 _ACEOF
17256 rm -f conftest.$ac_objext conftest$ac_exeext
17257 if { (eval echo "$as_me:17257: \"$ac_link\"") >&5
17258   (eval $ac_link) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); } &&
17262          { ac_try='test -s conftest$ac_exeext'
17263   { (eval echo "$as_me:17263: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); }; }; then
17268   cf_cv_libstdcpp=yes
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 cat conftest.$ac_ext >&5
17272 cf_cv_libstdcpp=no
17273 fi
17274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17275         LIBS="$cf_save"
17276
17277 fi
17278 echo "$as_me:17278: result: $cf_cv_libstdcpp" >&5
17279 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17280 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17281 fi
17282
17283         echo "$as_me:17283: checking whether $CXX understands -c and -o together" >&5
17284 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17285 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17286   echo $ECHO_N "(cached) $ECHO_C" >&6
17287 else
17288
17289 cat > conftest.$ac_ext <<CF_EOF
17290 #include <stdio.h>
17291 int main()
17292 {
17293         ${cf_cv_main_return:-return}(0);
17294 }
17295 CF_EOF
17296 # We do the test twice because some compilers refuse to overwrite an
17297 # existing .o file with -o, though they will create one.
17298 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17299 if { (eval echo "$as_me:17299: \"$ac_try\"") >&5
17300   (eval $ac_try) 2>&5
17301   ac_status=$?
17302   echo "$as_me:17302: \$? = $ac_status" >&5
17303   (exit $ac_status); } &&
17304   test -f conftest2.$ac_objext && { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); };
17309 then
17310   eval cf_cv_prog_CXX_c_o=yes
17311 else
17312   eval cf_cv_prog_CXX_c_o=no
17313 fi
17314 rm -rf conftest*
17315
17316 fi
17317 if test $cf_cv_prog_CXX_c_o = yes; then
17318   echo "$as_me:17318: result: yes" >&5
17319 echo "${ECHO_T}yes" >&6
17320 else
17321   echo "$as_me:17321: result: no" >&5
17322 echo "${ECHO_T}no" >&6
17323 fi
17324
17325         case $GXX_VERSION in
17326         1*|2.0-6*)
17327                 cf_cxx_library=yes
17328                 ;;
17329         *-2.7*|2.7*)
17330
17331 cf_cxx_library=unknown
17332 case $cf_cv_system_name in #(vi
17333 os2*) #(vi
17334         cf_gpp_libname=gpp
17335         ;;
17336 *)
17337         cf_gpp_libname=g++
17338         ;;
17339 esac
17340 if test "$GXX" = yes; then
17341         echo "$as_me:17341: checking for lib$cf_gpp_libname" >&5
17342 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17343         cf_save="$LIBS"
17344         LIBS="-l$cf_gpp_libname $LIBS"
17345         cat >conftest.$ac_ext <<_ACEOF
17346 #line 17346 "configure"
17347 #include "confdefs.h"
17348
17349 #include <$cf_gpp_libname/builtin.h>
17350
17351 int
17352 main ()
17353 {
17354 two_arg_error_handler_t foo2 = lib_error_handler
17355   ;
17356   return 0;
17357 }
17358 _ACEOF
17359 rm -f conftest.$ac_objext conftest$ac_exeext
17360 if { (eval echo "$as_me:17360: \"$ac_link\"") >&5
17361   (eval $ac_link) 2>&5
17362   ac_status=$?
17363   echo "$as_me:17363: \$? = $ac_status" >&5
17364   (exit $ac_status); } &&
17365          { ac_try='test -s conftest$ac_exeext'
17366   { (eval echo "$as_me:17366: \"$ac_try\"") >&5
17367   (eval $ac_try) 2>&5
17368   ac_status=$?
17369   echo "$as_me:17369: \$? = $ac_status" >&5
17370   (exit $ac_status); }; }; then
17371   cf_cxx_library=yes
17372          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17373          if test "$cf_gpp_libname" = cpp ; then
17374             cat >>confdefs.h <<\EOF
17375 #define HAVE_GPP_BUILTIN_H 1
17376 EOF
17377
17378          else
17379             cat >>confdefs.h <<\EOF
17380 #define HAVE_GXX_BUILTIN_H 1
17381 EOF
17382
17383          fi
17384 else
17385   echo "$as_me: failed program was:" >&5
17386 cat conftest.$ac_ext >&5
17387 cat >conftest.$ac_ext <<_ACEOF
17388 #line 17388 "configure"
17389 #include "confdefs.h"
17390
17391 #include <builtin.h>
17392
17393 int
17394 main ()
17395 {
17396 two_arg_error_handler_t foo2 = lib_error_handler
17397   ;
17398   return 0;
17399 }
17400 _ACEOF
17401 rm -f conftest.$ac_objext conftest$ac_exeext
17402 if { (eval echo "$as_me:17402: \"$ac_link\"") >&5
17403   (eval $ac_link) 2>&5
17404   ac_status=$?
17405   echo "$as_me:17405: \$? = $ac_status" >&5
17406   (exit $ac_status); } &&
17407          { ac_try='test -s conftest$ac_exeext'
17408   { (eval echo "$as_me:17408: \"$ac_try\"") >&5
17409   (eval $ac_try) 2>&5
17410   ac_status=$?
17411   echo "$as_me:17411: \$? = $ac_status" >&5
17412   (exit $ac_status); }; }; then
17413   cf_cxx_library=yes
17414          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17415          cat >>confdefs.h <<\EOF
17416 #define HAVE_BUILTIN_H 1
17417 EOF
17418
17419 else
17420   echo "$as_me: failed program was:" >&5
17421 cat conftest.$ac_ext >&5
17422 cf_cxx_library=no
17423 fi
17424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17425 fi
17426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17427         LIBS="$cf_save"
17428         echo "$as_me:17428: result: $cf_cxx_library" >&5
17429 echo "${ECHO_T}$cf_cxx_library" >&6
17430 fi
17431
17432                 ;;
17433         *)
17434                 cf_cxx_library=no
17435                 ;;
17436         esac
17437
17438         ac_ext=cc
17439 ac_cpp='$CXXCPP $CPPFLAGS'
17440 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17441 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17443 ac_main_return=return
17444 echo "$as_me:17444: checking how to run the C++ preprocessor" >&5
17445 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17446 if test -z "$CXXCPP"; then
17447   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17448   echo $ECHO_N "(cached) $ECHO_C" >&6
17449 else
17450       # Double quotes because CXXCPP needs to be expanded
17451     for CXXCPP in "$CXX -E" "/lib/cpp"
17452     do
17453       ac_preproc_ok=false
17454 for ac_cxx_preproc_warn_flag in '' yes
17455 do
17456   # Use a header file that comes with gcc, so configuring glibc
17457   # with a fresh cross-compiler works.
17458   # On the NeXT, cc -E runs the code through the compiler's parser,
17459   # not just through cpp. "Syntax error" is here to catch this case.
17460   cat >conftest.$ac_ext <<_ACEOF
17461 #line 17461 "configure"
17462 #include "confdefs.h"
17463 #include <assert.h>
17464                      Syntax error
17465 _ACEOF
17466 if { (eval echo "$as_me:17466: \"$ac_cpp conftest.$ac_ext\"") >&5
17467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17468   ac_status=$?
17469   egrep -v '^ *\+' conftest.er1 >conftest.err
17470   rm -f conftest.er1
17471   cat conftest.err >&5
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); } >/dev/null; then
17474   if test -s conftest.err; then
17475     ac_cpp_err=$ac_cxx_preproc_warn_flag
17476   else
17477     ac_cpp_err=
17478   fi
17479 else
17480   ac_cpp_err=yes
17481 fi
17482 if test -z "$ac_cpp_err"; then
17483   :
17484 else
17485   echo "$as_me: failed program was:" >&5
17486   cat conftest.$ac_ext >&5
17487   # Broken: fails on valid input.
17488 continue
17489 fi
17490 rm -f conftest.err conftest.$ac_ext
17491
17492   # OK, works on sane cases.  Now check whether non-existent headers
17493   # can be detected and how.
17494   cat >conftest.$ac_ext <<_ACEOF
17495 #line 17495 "configure"
17496 #include "confdefs.h"
17497 #include <ac_nonexistent.h>
17498 _ACEOF
17499 if { (eval echo "$as_me:17499: \"$ac_cpp conftest.$ac_ext\"") >&5
17500   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17501   ac_status=$?
17502   egrep -v '^ *\+' conftest.er1 >conftest.err
17503   rm -f conftest.er1
17504   cat conftest.err >&5
17505   echo "$as_me:17505: \$? = $ac_status" >&5
17506   (exit $ac_status); } >/dev/null; then
17507   if test -s conftest.err; then
17508     ac_cpp_err=$ac_cxx_preproc_warn_flag
17509   else
17510     ac_cpp_err=
17511   fi
17512 else
17513   ac_cpp_err=yes
17514 fi
17515 if test -z "$ac_cpp_err"; then
17516   # Broken: success on invalid input.
17517 continue
17518 else
17519   echo "$as_me: failed program was:" >&5
17520   cat conftest.$ac_ext >&5
17521   # Passes both tests.
17522 ac_preproc_ok=:
17523 break
17524 fi
17525 rm -f conftest.err conftest.$ac_ext
17526
17527 done
17528 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17529 rm -f conftest.err conftest.$ac_ext
17530 if $ac_preproc_ok; then
17531   break
17532 fi
17533
17534     done
17535     ac_cv_prog_CXXCPP=$CXXCPP
17536
17537 fi
17538   CXXCPP=$ac_cv_prog_CXXCPP
17539 else
17540   ac_cv_prog_CXXCPP=$CXXCPP
17541 fi
17542 echo "$as_me:17542: result: $CXXCPP" >&5
17543 echo "${ECHO_T}$CXXCPP" >&6
17544 ac_preproc_ok=false
17545 for ac_cxx_preproc_warn_flag in '' yes
17546 do
17547   # Use a header file that comes with gcc, so configuring glibc
17548   # with a fresh cross-compiler works.
17549   # On the NeXT, cc -E runs the code through the compiler's parser,
17550   # not just through cpp. "Syntax error" is here to catch this case.
17551   cat >conftest.$ac_ext <<_ACEOF
17552 #line 17552 "configure"
17553 #include "confdefs.h"
17554 #include <assert.h>
17555                      Syntax error
17556 _ACEOF
17557 if { (eval echo "$as_me:17557: \"$ac_cpp conftest.$ac_ext\"") >&5
17558   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17559   ac_status=$?
17560   egrep -v '^ *\+' conftest.er1 >conftest.err
17561   rm -f conftest.er1
17562   cat conftest.err >&5
17563   echo "$as_me:17563: \$? = $ac_status" >&5
17564   (exit $ac_status); } >/dev/null; then
17565   if test -s conftest.err; then
17566     ac_cpp_err=$ac_cxx_preproc_warn_flag
17567   else
17568     ac_cpp_err=
17569   fi
17570 else
17571   ac_cpp_err=yes
17572 fi
17573 if test -z "$ac_cpp_err"; then
17574   :
17575 else
17576   echo "$as_me: failed program was:" >&5
17577   cat conftest.$ac_ext >&5
17578   # Broken: fails on valid input.
17579 continue
17580 fi
17581 rm -f conftest.err conftest.$ac_ext
17582
17583   # OK, works on sane cases.  Now check whether non-existent headers
17584   # can be detected and how.
17585   cat >conftest.$ac_ext <<_ACEOF
17586 #line 17586 "configure"
17587 #include "confdefs.h"
17588 #include <ac_nonexistent.h>
17589 _ACEOF
17590 if { (eval echo "$as_me:17590: \"$ac_cpp conftest.$ac_ext\"") >&5
17591   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17592   ac_status=$?
17593   egrep -v '^ *\+' conftest.er1 >conftest.err
17594   rm -f conftest.er1
17595   cat conftest.err >&5
17596   echo "$as_me:17596: \$? = $ac_status" >&5
17597   (exit $ac_status); } >/dev/null; then
17598   if test -s conftest.err; then
17599     ac_cpp_err=$ac_cxx_preproc_warn_flag
17600   else
17601     ac_cpp_err=
17602   fi
17603 else
17604   ac_cpp_err=yes
17605 fi
17606 if test -z "$ac_cpp_err"; then
17607   # Broken: success on invalid input.
17608 continue
17609 else
17610   echo "$as_me: failed program was:" >&5
17611   cat conftest.$ac_ext >&5
17612   # Passes both tests.
17613 ac_preproc_ok=:
17614 break
17615 fi
17616 rm -f conftest.err conftest.$ac_ext
17617
17618 done
17619 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17620 rm -f conftest.err conftest.$ac_ext
17621 if $ac_preproc_ok; then
17622   :
17623 else
17624   { { echo "$as_me:17624: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17625 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17626    { (exit 1); exit 1; }; }
17627 fi
17628
17629 ac_ext=cc
17630 ac_cpp='$CXXCPP $CPPFLAGS'
17631 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17632 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17633 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17634 ac_main_return=return
17635
17636 for ac_header in iostream typeinfo
17637 do
17638 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17639 echo "$as_me:17639: checking for $ac_header" >&5
17640 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17641 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17642   echo $ECHO_N "(cached) $ECHO_C" >&6
17643 else
17644   cat >conftest.$ac_ext <<_ACEOF
17645 #line 17645 "configure"
17646 #include "confdefs.h"
17647 #include <$ac_header>
17648 _ACEOF
17649 if { (eval echo "$as_me:17649: \"$ac_cpp conftest.$ac_ext\"") >&5
17650   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17651   ac_status=$?
17652   egrep -v '^ *\+' conftest.er1 >conftest.err
17653   rm -f conftest.er1
17654   cat conftest.err >&5
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit $ac_status); } >/dev/null; then
17657   if test -s conftest.err; then
17658     ac_cpp_err=$ac_cxx_preproc_warn_flag
17659   else
17660     ac_cpp_err=
17661   fi
17662 else
17663   ac_cpp_err=yes
17664 fi
17665 if test -z "$ac_cpp_err"; then
17666   eval "$as_ac_Header=yes"
17667 else
17668   echo "$as_me: failed program was:" >&5
17669   cat conftest.$ac_ext >&5
17670   eval "$as_ac_Header=no"
17671 fi
17672 rm -f conftest.err conftest.$ac_ext
17673 fi
17674 echo "$as_me:17674: result: `eval echo '${'$as_ac_Header'}'`" >&5
17675 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17676 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17677   cat >>confdefs.h <<EOF
17678 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17679 EOF
17680
17681 fi
17682 done
17683
17684     if test x"$ac_cv_header_iostream" = xyes ; then
17685         echo "$as_me:17685: checking if iostream uses std-namespace" >&5
17686 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17687         cat >conftest.$ac_ext <<_ACEOF
17688 #line 17688 "configure"
17689 #include "confdefs.h"
17690
17691 #include <iostream>
17692 using std::endl;
17693 using std::cerr;
17694 int
17695 main ()
17696 {
17697
17698 cerr << "testing" << endl;
17699
17700   ;
17701   return 0;
17702 }
17703 _ACEOF
17704 rm -f conftest.$ac_objext
17705 if { (eval echo "$as_me:17705: \"$ac_compile\"") >&5
17706   (eval $ac_compile) 2>&5
17707   ac_status=$?
17708   echo "$as_me:17708: \$? = $ac_status" >&5
17709   (exit $ac_status); } &&
17710          { ac_try='test -s conftest.$ac_objext'
17711   { (eval echo "$as_me:17711: \"$ac_try\"") >&5
17712   (eval $ac_try) 2>&5
17713   ac_status=$?
17714   echo "$as_me:17714: \$? = $ac_status" >&5
17715   (exit $ac_status); }; }; then
17716   cf_iostream_namespace=yes
17717 else
17718   echo "$as_me: failed program was:" >&5
17719 cat conftest.$ac_ext >&5
17720 cf_iostream_namespace=no
17721 fi
17722 rm -f conftest.$ac_objext conftest.$ac_ext
17723         echo "$as_me:17723: result: $cf_iostream_namespace" >&5
17724 echo "${ECHO_T}$cf_iostream_namespace" >&6
17725         if test "$cf_iostream_namespace" = yes ; then
17726             cat >>confdefs.h <<\EOF
17727 #define IOSTREAM_NAMESPACE 1
17728 EOF
17729
17730         fi
17731     fi
17732
17733 echo "$as_me:17733: checking if we should include stdbool.h" >&5
17734 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17735
17736 if test "${cf_cv_header_stdbool_h+set}" = set; then
17737   echo $ECHO_N "(cached) $ECHO_C" >&6
17738 else
17739
17740         cat >conftest.$ac_ext <<_ACEOF
17741 #line 17741 "configure"
17742 #include "confdefs.h"
17743
17744 int
17745 main ()
17746 {
17747 bool foo = false
17748   ;
17749   return 0;
17750 }
17751 _ACEOF
17752 rm -f conftest.$ac_objext
17753 if { (eval echo "$as_me:17753: \"$ac_compile\"") >&5
17754   (eval $ac_compile) 2>&5
17755   ac_status=$?
17756   echo "$as_me:17756: \$? = $ac_status" >&5
17757   (exit $ac_status); } &&
17758          { ac_try='test -s conftest.$ac_objext'
17759   { (eval echo "$as_me:17759: \"$ac_try\"") >&5
17760   (eval $ac_try) 2>&5
17761   ac_status=$?
17762   echo "$as_me:17762: \$? = $ac_status" >&5
17763   (exit $ac_status); }; }; then
17764   cf_cv_header_stdbool_h=0
17765 else
17766   echo "$as_me: failed program was:" >&5
17767 cat conftest.$ac_ext >&5
17768 cat >conftest.$ac_ext <<_ACEOF
17769 #line 17769 "configure"
17770 #include "confdefs.h"
17771
17772 #ifndef __BEOS__
17773 #include <stdbool.h>
17774 #endif
17775
17776 int
17777 main ()
17778 {
17779 bool foo = false
17780   ;
17781   return 0;
17782 }
17783 _ACEOF
17784 rm -f conftest.$ac_objext
17785 if { (eval echo "$as_me:17785: \"$ac_compile\"") >&5
17786   (eval $ac_compile) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); } &&
17790          { ac_try='test -s conftest.$ac_objext'
17791   { (eval echo "$as_me:17791: \"$ac_try\"") >&5
17792   (eval $ac_try) 2>&5
17793   ac_status=$?
17794   echo "$as_me:17794: \$? = $ac_status" >&5
17795   (exit $ac_status); }; }; then
17796   cf_cv_header_stdbool_h=1
17797 else
17798   echo "$as_me: failed program was:" >&5
17799 cat conftest.$ac_ext >&5
17800 cf_cv_header_stdbool_h=0
17801 fi
17802 rm -f conftest.$ac_objext conftest.$ac_ext
17803 fi
17804 rm -f conftest.$ac_objext conftest.$ac_ext
17805 fi
17806
17807 if test "$cf_cv_header_stdbool_h" = 1
17808 then    echo "$as_me:17808: result: yes" >&5
17809 echo "${ECHO_T}yes" >&6
17810 else    echo "$as_me:17810: result: no" >&5
17811 echo "${ECHO_T}no" >&6
17812 fi
17813
17814 echo "$as_me:17814: checking for builtin bool type" >&5
17815 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17816
17817 if test "${cf_cv_builtin_bool+set}" = set; then
17818   echo $ECHO_N "(cached) $ECHO_C" >&6
17819 else
17820
17821         cat >conftest.$ac_ext <<_ACEOF
17822 #line 17822 "configure"
17823 #include "confdefs.h"
17824
17825 #include <stdio.h>
17826 #include <sys/types.h>
17827
17828 int
17829 main ()
17830 {
17831 bool x = false
17832   ;
17833   return 0;
17834 }
17835 _ACEOF
17836 rm -f conftest.$ac_objext
17837 if { (eval echo "$as_me:17837: \"$ac_compile\"") >&5
17838   (eval $ac_compile) 2>&5
17839   ac_status=$?
17840   echo "$as_me:17840: \$? = $ac_status" >&5
17841   (exit $ac_status); } &&
17842          { ac_try='test -s conftest.$ac_objext'
17843   { (eval echo "$as_me:17843: \"$ac_try\"") >&5
17844   (eval $ac_try) 2>&5
17845   ac_status=$?
17846   echo "$as_me:17846: \$? = $ac_status" >&5
17847   (exit $ac_status); }; }; then
17848   cf_cv_builtin_bool=1
17849 else
17850   echo "$as_me: failed program was:" >&5
17851 cat conftest.$ac_ext >&5
17852 cf_cv_builtin_bool=0
17853 fi
17854 rm -f conftest.$ac_objext conftest.$ac_ext
17855
17856 fi
17857
17858 if test "$cf_cv_builtin_bool" = 1
17859 then    echo "$as_me:17859: result: yes" >&5
17860 echo "${ECHO_T}yes" >&6
17861 else    echo "$as_me:17861: result: no" >&5
17862 echo "${ECHO_T}no" >&6
17863 fi
17864
17865 echo "$as_me:17865: checking for size of bool" >&5
17866 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17867 if test "${cf_cv_type_of_bool+set}" = set; then
17868   echo $ECHO_N "(cached) $ECHO_C" >&6
17869 else
17870
17871         rm -f cf_test.out
17872         if test "$cross_compiling" = yes; then
17873   cf_cv_type_of_bool=unknown
17874 else
17875   cat >conftest.$ac_ext <<_ACEOF
17876 #line 17876 "configure"
17877 #include "confdefs.h"
17878
17879 #include <stdlib.h>
17880 #include <stdio.h>
17881
17882 #if defined(__cplusplus)
17883
17884 #ifdef HAVE_GXX_BUILTIN_H
17885 #include <g++/builtin.h>
17886 #elif HAVE_GPP_BUILTIN_H
17887 #include <gpp/builtin.h>
17888 #elif HAVE_BUILTIN_H
17889 #include <builtin.h>
17890 #endif
17891
17892 #else
17893
17894 #if $cf_cv_header_stdbool_h
17895 #include <stdbool.h>
17896 #endif
17897
17898 #endif
17899
17900 main()
17901 {
17902         FILE *fp = fopen("cf_test.out", "w");
17903         if (fp != 0) {
17904                 bool x = true;
17905                 if ((bool)(-x) >= 0)
17906                         fputs("unsigned ", fp);
17907                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17908                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17909                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17910                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17911                 fclose(fp);
17912         }
17913         ${cf_cv_main_return:-return}(0);
17914 }
17915
17916 _ACEOF
17917 rm -f conftest$ac_exeext
17918 if { (eval echo "$as_me:17918: \"$ac_link\"") >&5
17919   (eval $ac_link) 2>&5
17920   ac_status=$?
17921   echo "$as_me:17921: \$? = $ac_status" >&5
17922   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17923   { (eval echo "$as_me:17923: \"$ac_try\"") >&5
17924   (eval $ac_try) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); }; }; then
17928   cf_cv_type_of_bool=`cat cf_test.out`
17929                  if test -z "$cf_cv_type_of_bool"; then
17930                    cf_cv_type_of_bool=unknown
17931                  fi
17932 else
17933   echo "$as_me: program exited with status $ac_status" >&5
17934 echo "$as_me: failed program was:" >&5
17935 cat conftest.$ac_ext >&5
17936 cf_cv_type_of_bool=unknown
17937 fi
17938 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17939 fi
17940
17941 fi
17942
17943         rm -f cf_test.out
17944 echo "$as_me:17944: result: $cf_cv_type_of_bool" >&5
17945 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17946 if test "$cf_cv_type_of_bool" = unknown ; then
17947         case .$NCURSES_BOOL in #(vi
17948         .auto|.) NCURSES_BOOL=unsigned;;
17949         esac
17950         { echo "$as_me:17950: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17951 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17952         cf_cv_type_of_bool=$NCURSES_BOOL
17953 fi
17954
17955 echo "$as_me:17955: checking for special defines needed for etip.h" >&5
17956 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17957 cf_save_CXXFLAGS="$CXXFLAGS"
17958 cf_result="none"
17959 for cf_math in "" MATH_H
17960 do
17961 for cf_excp in "" MATH_EXCEPTION
17962 do
17963         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17964         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17965         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17966 cat >conftest.$ac_ext <<_ACEOF
17967 #line 17967 "configure"
17968 #include "confdefs.h"
17969
17970 #include <etip.h.in>
17971
17972 int
17973 main ()
17974 {
17975
17976   ;
17977   return 0;
17978 }
17979 _ACEOF
17980 rm -f conftest.$ac_objext
17981 if { (eval echo "$as_me:17981: \"$ac_compile\"") >&5
17982   (eval $ac_compile) 2>&5
17983   ac_status=$?
17984   echo "$as_me:17984: \$? = $ac_status" >&5
17985   (exit $ac_status); } &&
17986          { ac_try='test -s conftest.$ac_objext'
17987   { (eval echo "$as_me:17987: \"$ac_try\"") >&5
17988   (eval $ac_try) 2>&5
17989   ac_status=$?
17990   echo "$as_me:17990: \$? = $ac_status" >&5
17991   (exit $ac_status); }; }; then
17992
17993         test -n "$cf_math" && cat >>confdefs.h <<EOF
17994 #define ETIP_NEEDS_${cf_math} 1
17995 EOF
17996
17997         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17998 #define ETIP_NEEDS_${cf_excp} 1
17999 EOF
18000
18001         cf_result="$cf_math $cf_excp"
18002         break
18003
18004 else
18005   echo "$as_me: failed program was:" >&5
18006 cat conftest.$ac_ext >&5
18007 fi
18008 rm -f conftest.$ac_objext conftest.$ac_ext
18009 done
18010 done
18011 echo "$as_me:18011: result: $cf_result" >&5
18012 echo "${ECHO_T}$cf_result" >&6
18013 CXXFLAGS="$cf_save_CXXFLAGS"
18014
18015 if test -n "$CXX"; then
18016 echo "$as_me:18016: checking if $CXX accepts parameter initialization" >&5
18017 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18018 if test "${cf_cv_cpp_param_init+set}" = set; then
18019   echo $ECHO_N "(cached) $ECHO_C" >&6
18020 else
18021
18022         ac_ext=cc
18023 ac_cpp='$CXXCPP $CPPFLAGS'
18024 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18025 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18026 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18027 ac_main_return=return
18028
18029         if test "$cross_compiling" = yes; then
18030   cf_cv_cpp_param_init=unknown
18031 else
18032   cat >conftest.$ac_ext <<_ACEOF
18033 #line 18033 "configure"
18034 #include "confdefs.h"
18035
18036 class TEST {
18037 private:
18038         int value;
18039 public:
18040         TEST(int x = 1);
18041         ~TEST();
18042 };
18043
18044 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18045 {
18046         value = x;
18047 }
18048 void main() { }
18049
18050 _ACEOF
18051 rm -f conftest$ac_exeext
18052 if { (eval echo "$as_me:18052: \"$ac_link\"") >&5
18053   (eval $ac_link) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18057   { (eval echo "$as_me:18057: \"$ac_try\"") >&5
18058   (eval $ac_try) 2>&5
18059   ac_status=$?
18060   echo "$as_me:18060: \$? = $ac_status" >&5
18061   (exit $ac_status); }; }; then
18062   cf_cv_cpp_param_init=yes
18063 else
18064   echo "$as_me: program exited with status $ac_status" >&5
18065 echo "$as_me: failed program was:" >&5
18066 cat conftest.$ac_ext >&5
18067 cf_cv_cpp_param_init=no
18068 fi
18069 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18070 fi
18071         ac_ext=cc
18072 ac_cpp='$CXXCPP $CPPFLAGS'
18073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18076 ac_main_return=return
18077
18078 fi
18079 echo "$as_me:18079: result: $cf_cv_cpp_param_init" >&5
18080 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18081 fi
18082 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18083 #define CPP_HAS_PARAM_INIT 1
18084 EOF
18085
18086 if test -n "$CXX"; then
18087
18088 echo "$as_me:18088: checking if $CXX accepts static_cast" >&5
18089 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18090 if test "${cf_cv_cpp_static_cast+set}" = set; then
18091   echo $ECHO_N "(cached) $ECHO_C" >&6
18092 else
18093
18094         ac_ext=cc
18095 ac_cpp='$CXXCPP $CPPFLAGS'
18096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18099 ac_main_return=return
18100
18101         cat >conftest.$ac_ext <<_ACEOF
18102 #line 18102 "configure"
18103 #include "confdefs.h"
18104
18105 class NCursesPanel
18106 {
18107 public:
18108   NCursesPanel(int nlines,
18109                int ncols,
18110                int begin_y = 0,
18111                int begin_x = 0)
18112   {
18113   }
18114
18115   ~NCursesPanel();
18116 };
18117
18118 template<class T> class NCursesUserPanel : public NCursesPanel
18119 {
18120 public:
18121   NCursesUserPanel (int nlines,
18122                     int ncols,
18123                     int begin_y = 0,
18124                     int begin_x = 0,
18125                     const T* p_UserData = static_cast<T*>(0))
18126     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18127   {
18128   };
18129   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18130   {
18131   };
18132
18133   virtual ~NCursesUserPanel() {};
18134 };
18135
18136 int
18137 main ()
18138 {
18139
18140         const char* p_UserData = static_cast<char*>(0)
18141   ;
18142   return 0;
18143 }
18144 _ACEOF
18145 rm -f conftest.$ac_objext
18146 if { (eval echo "$as_me:18146: \"$ac_compile\"") >&5
18147   (eval $ac_compile) 2>&5
18148   ac_status=$?
18149   echo "$as_me:18149: \$? = $ac_status" >&5
18150   (exit $ac_status); } &&
18151          { ac_try='test -s conftest.$ac_objext'
18152   { (eval echo "$as_me:18152: \"$ac_try\"") >&5
18153   (eval $ac_try) 2>&5
18154   ac_status=$?
18155   echo "$as_me:18155: \$? = $ac_status" >&5
18156   (exit $ac_status); }; }; then
18157   cf_cv_cpp_static_cast=yes
18158 else
18159   echo "$as_me: failed program was:" >&5
18160 cat conftest.$ac_ext >&5
18161 cf_cv_cpp_static_cast=no
18162 fi
18163 rm -f conftest.$ac_objext conftest.$ac_ext
18164
18165         ac_ext=cc
18166 ac_cpp='$CXXCPP $CPPFLAGS'
18167 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18168 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18169 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18170 ac_main_return=return
18171
18172 fi
18173 echo "$as_me:18173: result: $cf_cv_cpp_static_cast" >&5
18174 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18175
18176 fi
18177
18178 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18179 #define CPP_HAS_STATIC_CAST 1
18180 EOF
18181
18182         CXX_AR='$(AR)'
18183         CXX_ARFLAGS='$(ARFLAGS)'
18184         case $cf_cv_system_name in #(vi
18185         irix*) #(vi
18186             if test "$GXX" != yes ; then
18187                 CXX_AR='$(CXX)'
18188                 CXX_ARFLAGS='-ar -o'
18189             fi
18190             ;;
18191         sco3.2v5*) #(vi
18192             CXXLDFLAGS="-u main"
18193             ;;
18194         solaris2*)
18195             if test "$GXX" != yes ; then
18196                 CXX_AR='$(CXX)'
18197                 CXX_ARFLAGS='-xar -o'
18198             fi
18199             ;;
18200         esac
18201
18202 else
18203         cf_cxx_library=no
18204         cf_cv_builtin_bool=1
18205
18206         # Just because we are not configuring against C++ right now does not
18207         # mean that a user will not want to use C++.  Some distributors disable
18208         # the C++ portion of this configuration as a shortcut (or just to avoid
18209         # compiling the demo in the c++ directory).  So we need a reasonable
18210         # default for the 'bool' type.
18211         #
18212         # Caveat: since the storage of the bool type is not standardized, it
18213         # may change.
18214
18215         if test "$NCURSES_BOOL" != auto ; then
18216                 cf_cv_type_of_bool=$NCURSES_BOOL
18217                 cf_cv_header_stdbool_h=0
18218         else
18219                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18220
18221 echo "$as_me:18221: checking for size of bool" >&5
18222 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18223 if test "${cf_cv_type_of_bool+set}" = set; then
18224   echo $ECHO_N "(cached) $ECHO_C" >&6
18225 else
18226
18227         rm -f cf_test.out
18228         if test "$cross_compiling" = yes; then
18229   cf_cv_type_of_bool=unknown
18230 else
18231   cat >conftest.$ac_ext <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234
18235 #include <stdlib.h>
18236 #include <stdio.h>
18237
18238 #if defined(__cplusplus)
18239
18240 #ifdef HAVE_GXX_BUILTIN_H
18241 #include <g++/builtin.h>
18242 #elif HAVE_GPP_BUILTIN_H
18243 #include <gpp/builtin.h>
18244 #elif HAVE_BUILTIN_H
18245 #include <builtin.h>
18246 #endif
18247
18248 #else
18249
18250 #if $cf_cv_header_stdbool_h
18251 #include <stdbool.h>
18252 #endif
18253
18254 #endif
18255
18256 main()
18257 {
18258         FILE *fp = fopen("cf_test.out", "w");
18259         if (fp != 0) {
18260                 bool x = true;
18261                 if ((bool)(-x) >= 0)
18262                         fputs("unsigned ", fp);
18263                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18264                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18265                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18266                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18267                 fclose(fp);
18268         }
18269         ${cf_cv_main_return:-return}(0);
18270 }
18271
18272 _ACEOF
18273 rm -f conftest$ac_exeext
18274 if { (eval echo "$as_me:18274: \"$ac_link\"") >&5
18275   (eval $ac_link) 2>&5
18276   ac_status=$?
18277   echo "$as_me:18277: \$? = $ac_status" >&5
18278   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18279   { (eval echo "$as_me:18279: \"$ac_try\"") >&5
18280   (eval $ac_try) 2>&5
18281   ac_status=$?
18282   echo "$as_me:18282: \$? = $ac_status" >&5
18283   (exit $ac_status); }; }; then
18284   cf_cv_type_of_bool=`cat cf_test.out`
18285                  if test -z "$cf_cv_type_of_bool"; then
18286                    cf_cv_type_of_bool=unknown
18287                  fi
18288 else
18289   echo "$as_me: program exited with status $ac_status" >&5
18290 echo "$as_me: failed program was:" >&5
18291 cat conftest.$ac_ext >&5
18292 cf_cv_type_of_bool=unknown
18293 fi
18294 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18295 fi
18296
18297 fi
18298
18299         rm -f cf_test.out
18300 echo "$as_me:18300: result: $cf_cv_type_of_bool" >&5
18301 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18302 if test "$cf_cv_type_of_bool" = unknown ; then
18303         case .$NCURSES_BOOL in #(vi
18304         .auto|.) NCURSES_BOOL=unsigned;;
18305         esac
18306         { echo "$as_me:18306: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18307 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18308         cf_cv_type_of_bool=$NCURSES_BOOL
18309 fi
18310
18311                 else
18312                         echo "$as_me:18312: checking for fallback type of bool" >&5
18313 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18314                         case "$host_cpu" in #(vi
18315                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18316                         *)      cf_cv_type_of_bool=int  ;;
18317                         esac
18318                         echo "$as_me:18318: result: $cf_cv_type_of_bool" >&5
18319 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18320                 fi
18321         fi
18322 fi
18323
18324 # If the C compiler did not declare bool, and we did not determine that the C++
18325 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18326 # ncurses library use the same type as C++ bool.  Note that this allows one to
18327 # specify the type of bool in a configure-script option and postpone
18328 # integration with the C++ compiler provided that the types are compatible.
18329 USE_CXX_BOOL=1
18330 if test $cf_cv_cc_bool_type = 1
18331 then
18332         # oops: C has a bool.  Unlikely, but C++ could differ.
18333         USE_CXX_BOOL=0
18334 elif test $cf_cv_builtin_bool = 0
18335 then
18336         # C++ has no bool
18337         USE_CXX_BOOL=0
18338 else
18339         # this is the normal case
18340         USE_CXX_BOOL='defined(__cplusplus)'
18341 fi
18342
18343 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18344
18345         if test "$cf_with_ada" != "no" ; then
18346                 if test "$with_libtool" != "no"; then
18347                         { echo "$as_me:18347: WARNING: libtool does not support Ada - disabling feature" >&5
18348 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18349                         cf_with_ada=no
18350                 fi
18351         fi
18352
18353         if test "$cf_with_ada" != "no" ; then
18354
18355 cf_ada_make=gnatmake
18356 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18357 set dummy $cf_ada_make; ac_word=$2
18358 echo "$as_me:18358: checking for $ac_word" >&5
18359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18360 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18361   echo $ECHO_N "(cached) $ECHO_C" >&6
18362 else
18363   if test -n "$gnat_exists"; then
18364   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18365 else
18366   ac_save_IFS=$IFS; IFS=$ac_path_separator
18367 ac_dummy="$PATH"
18368 for ac_dir in $ac_dummy; do
18369   IFS=$ac_save_IFS
18370   test -z "$ac_dir" && ac_dir=.
18371   $as_executable_p "$ac_dir/$ac_word" || continue
18372 ac_cv_prog_gnat_exists="yes"
18373 echo "$as_me:18373: found $ac_dir/$ac_word" >&5
18374 break
18375 done
18376
18377   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18378 fi
18379 fi
18380 gnat_exists=$ac_cv_prog_gnat_exists
18381 if test -n "$gnat_exists"; then
18382   echo "$as_me:18382: result: $gnat_exists" >&5
18383 echo "${ECHO_T}$gnat_exists" >&6
18384 else
18385   echo "$as_me:18385: result: no" >&5
18386 echo "${ECHO_T}no" >&6
18387 fi
18388
18389 if test "$ac_cv_prog_gnat_exists" = no; then
18390    cf_ada_make=
18391 else
18392
18393 echo "$as_me:18393: checking for gnat version" >&5
18394 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18395 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18396         grep '[0-9].[0-9][0-9]*' |\
18397     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18398 echo "$as_me:18398: result: $cf_gnat_version" >&5
18399 echo "${ECHO_T}$cf_gnat_version" >&6
18400
18401 case $cf_gnat_version in #(vi
18402 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18403         cf_cv_prog_gnat_correct=yes
18404         ;;
18405 *)
18406         { echo "$as_me:18406: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18407 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18408         cf_cv_prog_gnat_correct=no
18409         ;;
18410 esac
18411
18412    # Extract the first word of "m4", so it can be a program name with args.
18413 set dummy m4; ac_word=$2
18414 echo "$as_me:18414: checking for $ac_word" >&5
18415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18416 if test "${ac_cv_prog_M4_exists+set}" = set; then
18417   echo $ECHO_N "(cached) $ECHO_C" >&6
18418 else
18419   if test -n "$M4_exists"; then
18420   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18421 else
18422   ac_save_IFS=$IFS; IFS=$ac_path_separator
18423 ac_dummy="$PATH"
18424 for ac_dir in $ac_dummy; do
18425   IFS=$ac_save_IFS
18426   test -z "$ac_dir" && ac_dir=.
18427   $as_executable_p "$ac_dir/$ac_word" || continue
18428 ac_cv_prog_M4_exists="yes"
18429 echo "$as_me:18429: found $ac_dir/$ac_word" >&5
18430 break
18431 done
18432
18433   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18434 fi
18435 fi
18436 M4_exists=$ac_cv_prog_M4_exists
18437 if test -n "$M4_exists"; then
18438   echo "$as_me:18438: result: $M4_exists" >&5
18439 echo "${ECHO_T}$M4_exists" >&6
18440 else
18441   echo "$as_me:18441: result: no" >&5
18442 echo "${ECHO_T}no" >&6
18443 fi
18444
18445    if test "$ac_cv_prog_M4_exists" = no; then
18446       cf_cv_prog_gnat_correct=no
18447       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18448    fi
18449    if test "$cf_cv_prog_gnat_correct" = yes; then
18450       echo "$as_me:18450: checking if GNAT works" >&5
18451 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18452
18453 rm -rf conftest* *~conftest*
18454 cat >>conftest.ads <<CF_EOF
18455 procedure conftest;
18456 CF_EOF
18457 cat >>conftest.adb <<CF_EOF
18458 with Text_IO;
18459 with GNAT.OS_Lib;
18460 procedure conftest is
18461 begin
18462    Text_IO.Put ("Hello World");
18463    Text_IO.New_Line;
18464    GNAT.OS_Lib.OS_Exit (0);
18465 end conftest;
18466 CF_EOF
18467 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18468    if ( ./conftest 1>&5 2>&1 ) ; then
18469       cf_cv_prog_gnat_correct=yes
18470    else
18471       cf_cv_prog_gnat_correct=no
18472    fi
18473 else
18474    cf_cv_prog_gnat_correct=no
18475 fi
18476 rm -rf conftest* *~conftest*
18477
18478       echo "$as_me:18478: result: $cf_cv_prog_gnat_correct" >&5
18479 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18480    fi
18481 fi
18482
18483                 if test "$cf_cv_prog_gnat_correct" = yes; then
18484
18485         ADAFLAGS="$ADAFLAGS -gnatpn"
18486
18487                         # make ADAFLAGS consistent with CFLAGS
18488                         case "$CFLAGS" in
18489                         *-g*)
18490
18491         ADAFLAGS="$ADAFLAGS -g"
18492
18493                                 ;;
18494                         esac
18495                         case "$CFLAGS" in
18496                         *-O*)
18497
18498         ADAFLAGS="$ADAFLAGS -O3"
18499
18500                                 ;;
18501                         esac
18502
18503 echo "$as_me:18503: checking if GNAT supports generics" >&5
18504 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18505 case $cf_gnat_version in #(vi
18506 3.[1-9]*|[4-9].*) #(vi
18507         cf_gnat_generics=yes
18508         ;;
18509 *)
18510         cf_gnat_generics=no
18511         ;;
18512 esac
18513 echo "$as_me:18513: result: $cf_gnat_generics" >&5
18514 echo "${ECHO_T}$cf_gnat_generics" >&6
18515
18516 if test "$cf_gnat_generics" = yes
18517 then
18518         cf_compile_generics=generics
18519         cf_generic_objects="\${GENOBJS}"
18520 else
18521         cf_compile_generics=
18522         cf_generic_objects=
18523 fi
18524
18525 echo "$as_me:18525: checking if GNAT supports SIGINT" >&5
18526 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18527 if test "${cf_cv_gnat_sigint+set}" = set; then
18528   echo $ECHO_N "(cached) $ECHO_C" >&6
18529 else
18530
18531 rm -rf conftest* *~conftest*
18532 cat >>conftest.ads <<CF_EOF
18533 with Ada.Interrupts.Names;
18534
18535 package ConfTest is
18536
18537    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18538    pragma Unreserve_All_Interrupts;
18539    pragma Warnings (On);
18540
18541    protected Process is
18542       procedure Stop;
18543       function Continue return Boolean;
18544       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18545    private
18546       Done : Boolean := False;
18547    end Process;
18548
18549 end ConfTest;
18550 CF_EOF
18551 cat >>conftest.adb <<CF_EOF
18552 package body ConfTest is
18553    protected body Process is
18554       procedure Stop is
18555       begin
18556          Done := True;
18557       end Stop;
18558       function Continue return Boolean is
18559       begin
18560          return not Done;
18561       end Continue;
18562    end Process;
18563 end ConfTest;
18564 CF_EOF
18565 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18566       cf_cv_gnat_sigint=yes
18567 else
18568    cf_cv_gnat_sigint=no
18569 fi
18570 rm -rf conftest* *~conftest*
18571
18572 fi
18573 echo "$as_me:18573: result: $cf_cv_gnat_sigint" >&5
18574 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18575
18576 if test $cf_cv_gnat_sigint = yes ; then
18577         USE_GNAT_SIGINT=""
18578 else
18579         USE_GNAT_SIGINT="#"
18580 fi
18581
18582 echo "$as_me:18582: checking if GNAT pragma Unreferenced works" >&5
18583 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18584 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18585   echo $ECHO_N "(cached) $ECHO_C" >&6
18586 else
18587
18588 rm -rf conftest* *~conftest*
18589 cat >>conftest.ads <<CF_EOF
18590 procedure conftest;
18591 CF_EOF
18592 cat >>conftest.adb <<CF_EOF
18593 with Text_IO;
18594 with GNAT.OS_Lib;
18595 procedure conftest is
18596    test : Integer;
18597    pragma Unreferenced (test);
18598 begin
18599    test := 1;
18600    Text_IO.Put ("Hello World");
18601    Text_IO.New_Line;
18602    GNAT.OS_Lib.OS_Exit (0);
18603 end conftest;
18604 CF_EOF
18605 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18606       cf_cv_pragma_unreferenced=yes
18607 else
18608    cf_cv_pragma_unreferenced=no
18609 fi
18610 rm -rf conftest* *~conftest*
18611
18612 fi
18613 echo "$as_me:18613: result: $cf_cv_pragma_unreferenced" >&5
18614 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18615
18616 # if the pragma is supported, use it (needed in the Trace code).
18617 if test $cf_cv_pragma_unreferenced = yes ; then
18618         PRAGMA_UNREF=TRUE
18619 else
18620         PRAGMA_UNREF=FALSE
18621 fi
18622
18623 cf_gnat_libraries=no
18624 cf_gnat_projects=no
18625
18626 echo "$as_me:18626: checking if GNAT supports project files" >&5
18627 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18628 case $cf_gnat_version in #(vi
18629 3.[0-9]*) #(vi
18630         ;;
18631 *)
18632         case $cf_cv_system_name in #(vi
18633         cygwin*) #(vi
18634                 ;;
18635         *)
18636                 mkdir conftest.src conftest.bin conftest.lib
18637                 cd conftest.src
18638                 rm -rf conftest* *~conftest*
18639                 cat >>library.gpr <<CF_EOF
18640 project Library is
18641   Kind := External ("LIB_KIND");
18642   for Library_Name use "ConfTest";
18643   for Object_Dir use ".";
18644   for Library_ALI_Dir use External("LIBRARY_DIR");
18645   for Library_Version use External ("SONAME");
18646   for Library_Kind use Kind;
18647   for Library_Dir use External("BUILD_DIR");
18648   Source_Dir := External ("SOURCE_DIR");
18649   for Source_Dirs use (Source_Dir);
18650   package Compiler is
18651      for Default_Switches ("Ada") use
18652        ("-g",
18653         "-O2",
18654         "-gnatafno",
18655         "-gnatVa",   -- All validity checks
18656         "-gnatwa");  -- Activate all optional errors
18657   end Compiler;
18658 end Library;
18659 CF_EOF
18660                 cat >>confpackage.ads <<CF_EOF
18661 package ConfPackage is
18662    procedure conftest;
18663 end ConfPackage;
18664 CF_EOF
18665                 cat >>confpackage.adb <<CF_EOF
18666 with Text_IO;
18667 package body ConfPackage is
18668    procedure conftest is
18669    begin
18670       Text_IO.Put ("Hello World");
18671       Text_IO.New_Line;
18672    end conftest;
18673 end ConfPackage;
18674 CF_EOF
18675                 if ( $cf_ada_make $ADAFLAGS \
18676                                 -Plibrary.gpr \
18677                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18678                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18679                                 -XSOURCE_DIR=`pwd` \
18680                                 -XSONAME=libConfTest.so.1 \
18681                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18682                         cf_gnat_projects=yes
18683                 fi
18684                 cd ..
18685                 if test -f conftest.lib/confpackage.ali
18686                 then
18687                         cf_gnat_libraries=yes
18688                 fi
18689                 rm -rf conftest* *~conftest*
18690                 ;;
18691         esac
18692         ;;
18693 esac
18694 echo "$as_me:18694: result: $cf_gnat_projects" >&5
18695 echo "${ECHO_T}$cf_gnat_projects" >&6
18696
18697 if test $cf_gnat_projects = yes
18698 then
18699         echo "$as_me:18699: checking if GNAT supports libraries" >&5
18700 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18701         echo "$as_me:18701: result: $cf_gnat_libraries" >&5
18702 echo "${ECHO_T}$cf_gnat_libraries" >&6
18703 fi
18704
18705 if test "$cf_gnat_projects" = yes
18706 then
18707         USE_OLD_MAKERULES="#"
18708         USE_GNAT_PROJECTS=""
18709 else
18710         USE_OLD_MAKERULES=""
18711         USE_GNAT_PROJECTS="#"
18712 fi
18713
18714 if test "$cf_gnat_libraries" = yes
18715 then
18716         USE_GNAT_LIBRARIES=""
18717 else
18718         USE_GNAT_LIBRARIES="#"
18719 fi
18720
18721 echo "$as_me:18721: checking for ada-compiler" >&5
18722 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18723
18724 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18725 if test "${with_ada_compiler+set}" = set; then
18726   withval="$with_ada_compiler"
18727   cf_ada_compiler=$withval
18728 else
18729   cf_ada_compiler=gnatmake
18730 fi;
18731
18732 echo "$as_me:18732: result: $cf_ada_compiler" >&5
18733 echo "${ECHO_T}$cf_ada_compiler" >&6
18734
18735                         cf_ada_package=terminal_interface
18736
18737 echo "$as_me:18737: checking for ada-include" >&5
18738 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18739
18740 # Check whether --with-ada-include or --without-ada-include was given.
18741 if test "${with_ada_include+set}" = set; then
18742   withval="$with_ada_include"
18743
18744 else
18745   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18746 fi; if test -n "$prefix/share/ada/adainclude" ; then
18747
18748 if test "x$prefix" != xNONE; then
18749   cf_path_syntax="$prefix"
18750 else
18751   cf_path_syntax="$ac_default_prefix"
18752 fi
18753
18754 case ".$withval" in #(vi
18755 .\$\(*\)*|.\'*\'*) #(vi
18756   ;;
18757 ..|./*|.\\*) #(vi
18758   ;;
18759 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18760   ;;
18761 .\${*prefix}*) #(vi
18762   eval withval="$withval"
18763   case ".$withval" in #(vi
18764   .NONE/*)
18765     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18766     ;;
18767   esac
18768   ;; #(vi
18769 .no|.NONE/*)
18770   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18771   ;;
18772 *)
18773   { { echo "$as_me:18773: error: expected a pathname, not \"$withval\"" >&5
18774 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18775    { (exit 1); exit 1; }; }
18776   ;;
18777 esac
18778
18779 fi
18780 ADA_INCLUDE="$withval"
18781
18782 echo "$as_me:18782: result: $ADA_INCLUDE" >&5
18783 echo "${ECHO_T}$ADA_INCLUDE" >&6
18784
18785 echo "$as_me:18785: checking for ada-objects" >&5
18786 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18787
18788 # Check whether --with-ada-objects or --without-ada-objects was given.
18789 if test "${with_ada_objects+set}" = set; then
18790   withval="$with_ada_objects"
18791
18792 else
18793   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18794 fi; if test -n "$prefix/lib/ada/adalib" ; then
18795
18796 if test "x$prefix" != xNONE; then
18797   cf_path_syntax="$prefix"
18798 else
18799   cf_path_syntax="$ac_default_prefix"
18800 fi
18801
18802 case ".$withval" in #(vi
18803 .\$\(*\)*|.\'*\'*) #(vi
18804   ;;
18805 ..|./*|.\\*) #(vi
18806   ;;
18807 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18808   ;;
18809 .\${*prefix}*) #(vi
18810   eval withval="$withval"
18811   case ".$withval" in #(vi
18812   .NONE/*)
18813     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18814     ;;
18815   esac
18816   ;; #(vi
18817 .no|.NONE/*)
18818   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18819   ;;
18820 *)
18821   { { echo "$as_me:18821: error: expected a pathname, not \"$withval\"" >&5
18822 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18823    { (exit 1); exit 1; }; }
18824   ;;
18825 esac
18826
18827 fi
18828 ADA_OBJECTS="$withval"
18829
18830 echo "$as_me:18830: result: $ADA_OBJECTS" >&5
18831 echo "${ECHO_T}$ADA_OBJECTS" >&6
18832
18833 echo "$as_me:18833: checking if an Ada95 shared-library should be built" >&5
18834 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18835
18836 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18837 if test "${with_ada_sharedlib+set}" = set; then
18838   withval="$with_ada_sharedlib"
18839   with_ada_sharedlib=$withval
18840 else
18841   with_ada_sharedlib=no
18842 fi;
18843 echo "$as_me:18843: result: $with_ada_sharedlib" >&5
18844 echo "${ECHO_T}$with_ada_sharedlib" >&6
18845
18846 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18847 MAKE_ADA_SHAREDLIB="#"
18848
18849 if test "x$with_ada_sharedlib" != xno
18850 then
18851         MAKE_ADA_SHAREDLIB=
18852         if test "x$with_ada_sharedlib" != xyes
18853         then
18854                 ADA_SHAREDLIB="$with_ada_sharedlib"
18855         fi
18856 fi
18857
18858                 fi
18859         fi
18860 else
18861         cf_with_ada=no
18862 fi
18863
18864 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18865 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18866 ###
18867 ### ticlib modules may be a separate library, otherwise contained in termlib.
18868 ### termlib modules may be a separate library, otherwise contained in ncurses.
18869 ###
18870 ### The of "+" or " " between the tokens controls the way the script
18871 ### chooses to split module lists into libraries.
18872 ###
18873 ### (see CF_LIB_RULES).
18874 echo "$as_me:18874: checking for library subsets" >&5
18875 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18876 LIB_SUBSETS=
18877
18878 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18879         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18880         if test "$with_ticlib" != no ; then
18881                 LIB_SUBSETS="${LIB_SUBSETS} "
18882         else
18883                 LIB_SUBSETS="${LIB_SUBSETS}+"
18884         fi
18885 fi
18886
18887 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18888 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18889
18890 if test "$with_termlib" != no ; then
18891         LIB_SUBSETS="${LIB_SUBSETS} "
18892 else
18893         LIB_SUBSETS="${LIB_SUBSETS}+"
18894 fi
18895
18896 LIB_SUBSETS="${LIB_SUBSETS}base"
18897
18898 # Most term-driver calls are to tinfo, but some like init_pair are to the
18899 # base library (so it resides in base).
18900 if test "$with_term_driver" != no ; then
18901         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18902         case $cf_cv_system_name in #(vi
18903         *mingw32*) #(vi
18904                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18905                 ;;
18906         *) #(vi
18907                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18908                 ;;
18909         esac
18910 fi
18911
18912 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18913 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18914
18915 echo "$as_me:18915: result: $LIB_SUBSETS" >&5
18916 echo "${ECHO_T}$LIB_SUBSETS" >&6
18917
18918 ### Construct the list of include-directories to be generated
18919
18920 CPPFLAGS="$CPPFLAGS -I. -I../include"
18921 if test "$srcdir" != "."; then
18922         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18923 fi
18924 if test "$GCC" != yes; then
18925         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18926 elif test "$includedir" != "/usr/include"; then
18927         if test "$includedir" = '${prefix}/include' ; then
18928                 if test $prefix != /usr ; then
18929                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18930                 fi
18931         else
18932                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18933         fi
18934 fi
18935
18936 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18937 if test "$srcdir" != "."; then
18938         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18939 fi
18940 if test "$GCC" != yes; then
18941         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18942 elif test "$includedir" != "/usr/include"; then
18943         if test "$includedir" = '${prefix}/include' ; then
18944                 if test $prefix != /usr ; then
18945                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18946                 fi
18947         else
18948                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18949         fi
18950 fi
18951
18952 ### Build up pieces for makefile rules
18953 echo "$as_me:18953: checking default library suffix" >&5
18954 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18955
18956         case $DFT_LWR_MODEL in
18957         libtool) DFT_ARG_SUFFIX=''   ;;
18958         normal)  DFT_ARG_SUFFIX=''   ;;
18959         debug)   DFT_ARG_SUFFIX='_g' ;;
18960         profile) DFT_ARG_SUFFIX='_p' ;;
18961         shared)  DFT_ARG_SUFFIX=''   ;;
18962         esac
18963         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18964 echo "$as_me:18964: result: $DFT_ARG_SUFFIX" >&5
18965 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18966
18967 echo "$as_me:18967: checking default library-dependency suffix" >&5
18968 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18969
18970         case $DFT_LWR_MODEL in #(vi
18971         libtool) #(vi
18972                 DFT_LIB_SUFFIX='.la'
18973                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18974                 ;;
18975         normal) #(vi
18976                 DFT_LIB_SUFFIX='.a'
18977                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18978                 ;;
18979         debug) #(vi
18980                 DFT_LIB_SUFFIX='_g.a'
18981                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18982                 ;;
18983         profile) #(vi
18984                 DFT_LIB_SUFFIX='_p.a'
18985                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18986                 ;;
18987         shared) #(vi
18988                 case $cf_cv_system_name in
18989                 aix[5-7]*) #(vi
18990                         DFT_LIB_SUFFIX='.a'
18991                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18992                         ;;
18993                 cygwin*) #(vi
18994                         DFT_LIB_SUFFIX='.dll'
18995                         DFT_DEP_SUFFIX='.dll.a'
18996                         ;;
18997                 darwin*) #(vi
18998                         DFT_LIB_SUFFIX='.dylib'
18999                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19000                         ;;
19001                 hpux*) #(vi
19002                         case $target in
19003                         ia64*) #(vi
19004                                 DFT_LIB_SUFFIX='.so'
19005                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19006                                 ;;
19007                         *) #(vi
19008                                 DFT_LIB_SUFFIX='.sl'
19009                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19010                                 ;;
19011                         esac
19012                         ;;
19013                 *)      DFT_LIB_SUFFIX='.so'
19014                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19015                         ;;
19016                 esac
19017         esac
19018         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19019         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19020 echo "$as_me:19020: result: $DFT_DEP_SUFFIX" >&5
19021 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19022
19023 echo "$as_me:19023: checking default object directory" >&5
19024 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19025
19026         case $DFT_LWR_MODEL in
19027         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19028         normal)  DFT_OBJ_SUBDIR='objects' ;;
19029         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19030         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19031         shared)
19032                 case $cf_cv_system_name in #(vi
19033                 cygwin) #(vi
19034                         DFT_OBJ_SUBDIR='objects' ;;
19035                 *)
19036                         DFT_OBJ_SUBDIR='obj_s' ;;
19037                 esac
19038         esac
19039 echo "$as_me:19039: result: $DFT_OBJ_SUBDIR" >&5
19040 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19041
19042 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19043 if test "$cf_with_cxx" = yes ; then
19044 echo "$as_me:19044: checking c++ library-dependency suffix" >&5
19045 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19046 if test "$with_libtool" != "no"; then
19047         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19048 else
19049
19050         case normal in #(vi
19051         libtool) #(vi
19052                 CXX_LIB_SUFFIX='.la'
19053                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19054                 ;;
19055         normal) #(vi
19056                 CXX_LIB_SUFFIX='.a'
19057                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19058                 ;;
19059         debug) #(vi
19060                 CXX_LIB_SUFFIX='_g.a'
19061                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19062                 ;;
19063         profile) #(vi
19064                 CXX_LIB_SUFFIX='_p.a'
19065                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19066                 ;;
19067         shared) #(vi
19068                 case $cf_cv_system_name in
19069                 aix[5-7]*) #(vi
19070                         CXX_LIB_SUFFIX='.a'
19071                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19072                         ;;
19073                 cygwin*) #(vi
19074                         CXX_LIB_SUFFIX='.dll'
19075                         CXX_DEP_SUFFIX='.dll.a'
19076                         ;;
19077                 darwin*) #(vi
19078                         CXX_LIB_SUFFIX='.dylib'
19079                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19080                         ;;
19081                 hpux*) #(vi
19082                         case $target in
19083                         ia64*) #(vi
19084                                 CXX_LIB_SUFFIX='.so'
19085                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19086                                 ;;
19087                         *) #(vi
19088                                 CXX_LIB_SUFFIX='.sl'
19089                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19090                                 ;;
19091                         esac
19092                         ;;
19093                 *)      CXX_LIB_SUFFIX='.so'
19094                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19095                         ;;
19096                 esac
19097         esac
19098         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19099         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19100 fi
19101 echo "$as_me:19101: result: $CXX_LIB_SUFFIX" >&5
19102 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19103
19104 fi
19105
19106 # do not want -ldl in build except as needed for -lncurses dependency
19107 if test "$with_dlsym" = yes ; then
19108 if test $DFT_LWR_MODEL = shared || \
19109    test $DFT_LWR_MODEL = libtool ; then
19110
19111 # remove dl library from $LIBS
19112 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19113
19114 fi
19115 fi
19116 ### Set up low-level terminfo dependencies for makefiles.
19117
19118 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19119 # do not need libdl
19120 TICS_LIST=
19121 if test "$with_dlsym" = yes ; then
19122
19123 # remove dl library from $SHLIB_LIST
19124 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19125
19126 fi
19127
19128 if test "$with_ticlib" != no ; then
19129
19130         if test "$with_ticlib" != yes ; then
19131                 TICS_NAME=$with_ticlib
19132                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19133                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19134                 TICS_LIB_SUFFIX="${with_ticlib}"
19135         else
19136                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19137                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19138                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19139         fi
19140         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
19141 else
19142         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19143 fi
19144
19145 if test "$with_termlib" != no ; then
19146
19147         if test "$with_termlib" != yes ; then
19148                 TINFO_NAME=$with_termlib
19149                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19150                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19151                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19152                 TINFO_LIB_SUFFIX="${with_termlib}"
19153         else
19154                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19155                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19156                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19157                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19158         fi
19159
19160         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19161         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19162         if test "$DFT_LWR_MODEL" = "libtool"; then
19163                 TEST_ARGS="${TEST_DEPS}"
19164                 TEST_ARG2="${TEST_DEP2}"
19165                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19166                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19167                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19168         else
19169                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19170                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19171                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19172                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19173                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19174         fi
19175 else
19176         # the next lines are needed for linking libtic over libncurses
19177         TINFO_NAME=${LIB_NAME}
19178         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19179         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19180         if test "$with_tic_depends" = yes ; then
19181                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19182         else
19183                 TICS_LIST="$SHLIB_LIST"
19184         fi
19185
19186         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19187 fi
19188
19189 if test "$DFT_LWR_MODEL" = shared ; then
19190         case $cf_cv_system_name in #(vi
19191         cygwin*)
19192                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19193                 TINFO_SUFFIX=.dll
19194                 ;;
19195         esac
19196 fi
19197
19198 if test "$with_dlsym" = yes ; then
19199
19200 # remove dl library from $TICS_LIST
19201 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19202
19203 fi
19204
19205 if test "$DFT_LWR_MODEL" = "libtool"; then
19206     OBJEXT=lo
19207 fi
19208
19209 # needed for Ada95
19210 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
19211
19212 case $DFT_LWR_MODEL in
19213 normal|debug|profile)
19214
19215 if test "$GCC" = yes ; then
19216         case $cf_cv_system_name in #(
19217         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19218                 LDFLAGS_STATIC=
19219                 LDFLAGS_SHARED=
19220                 ;;
19221     *)  #( normally, except when broken
19222         LDFLAGS_STATIC=-static
19223         LDFLAGS_SHARED=-dynamic
19224         ;;
19225     esac
19226 else
19227         case $cf_cv_system_name in #(
19228         aix[4-7]*)      #( from ld manpage
19229                 LDFLAGS_STATIC=-bstatic
19230                 LDFLAGS_SHARED=-bdynamic
19231                 ;;
19232         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19233                 # We could also use just "archive" and "shared".
19234                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19235                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19236                 ;;
19237         irix*)          #( from ld manpage IRIX64
19238                 LDFLAGS_STATIC=-Bstatic
19239                 LDFLAGS_SHARED=-Bdynamic
19240                 ;;
19241         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19242                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19243                 LDFLAGS_STATIC=-noso
19244                 LDFLAGS_SHARED=-so_archive
19245                 ;;
19246         solaris2*)
19247                 LDFLAGS_STATIC=-Bstatic
19248                 LDFLAGS_SHARED=-Bdynamic
19249                 ;;
19250         esac
19251 fi
19252
19253 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19254 then
19255         echo "$as_me:19255: checking if linker supports switching between static/dynamic" >&5
19256 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19257
19258         rm -f libconftest.a
19259         cat >conftest.$ac_ext <<EOF
19260 #line 19260 "configure"
19261 #include <stdio.h>
19262 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19263 EOF
19264         if { (eval echo "$as_me:19264: \"$ac_compile\"") >&5
19265   (eval $ac_compile) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); } ; then
19269                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19270                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19271         fi
19272         rm -f conftest.*
19273
19274         cf_save_LIBS="$LIBS"
19275
19276         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19277         cat >conftest.$ac_ext <<_ACEOF
19278 #line 19278 "configure"
19279 #include "confdefs.h"
19280
19281 #line 19281 "configure"
19282 #include <stdio.h>
19283 int cf_ldflags_static(FILE *fp);
19284
19285 int
19286 main ()
19287 {
19288
19289         return cf_ldflags_static(stdin);
19290
19291   ;
19292   return 0;
19293 }
19294 _ACEOF
19295 rm -f conftest.$ac_objext conftest$ac_exeext
19296 if { (eval echo "$as_me:19296: \"$ac_link\"") >&5
19297   (eval $ac_link) 2>&5
19298   ac_status=$?
19299   echo "$as_me:19299: \$? = $ac_status" >&5
19300   (exit $ac_status); } &&
19301          { ac_try='test -s conftest$ac_exeext'
19302   { (eval echo "$as_me:19302: \"$ac_try\"") >&5
19303   (eval $ac_try) 2>&5
19304   ac_status=$?
19305   echo "$as_me:19305: \$? = $ac_status" >&5
19306   (exit $ac_status); }; }; then
19307   cf_ldflags_static=yes
19308 else
19309   echo "$as_me: failed program was:" >&5
19310 cat conftest.$ac_ext >&5
19311 cf_ldflags_static=no
19312 fi
19313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19314
19315         rm -f libconftest.*
19316         LIBS="$cf_save_LIBS"
19317
19318         echo "$as_me:19318: result: $cf_ldflags_static" >&5
19319 echo "${ECHO_T}$cf_ldflags_static" >&6
19320
19321         if test $cf_ldflags_static != yes
19322         then
19323                 LDFLAGS_STATIC=
19324                 LDFLAGS_SHARED=
19325         fi
19326 else
19327         LDFLAGS_STATIC=
19328         LDFLAGS_SHARED=
19329 fi
19330
19331         ;;
19332 esac
19333
19334 echo "$as_me:19334: checking where we will install curses.h" >&5
19335 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19336 test "$with_overwrite" = no && \
19337 test "x$includedir" = 'x${prefix}/include' && \
19338         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19339 echo "$as_me:19339: result: $includedir" >&5
19340 echo "${ECHO_T}$includedir" >&6
19341
19342 ### Resolve a conflict between normal and wide-curses by forcing applications
19343 ### that will need libutf8 to add it to their configure script.
19344 if test "$with_overwrite" != no ; then
19345 if test "$NCURSES_LIBUTF8" = 1 ; then
19346         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19347         { echo "$as_me:19347: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19348 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19349 fi
19350 fi
19351 WITH_OVERWRITE=$with_overwrite
19352
19353 # used to separate tack out of the tree
19354 NCURSES_TREE=
19355
19356 ### predefined stuff for the test programs
19357 cat >>confdefs.h <<\EOF
19358 #define HAVE_SLK_COLOR 1
19359 EOF
19360
19361 ### Construct the list of subdirectories for which we'll customize makefiles
19362 ### with the appropriate compile-rules.
19363
19364 echo "$as_me:19364: checking for src modules" >&5
19365 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19366
19367 # dependencies and linker-arguments for test-programs
19368 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19369 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19370 if test "$DFT_LWR_MODEL" = "libtool"; then
19371         TEST_ARGS="${TEST_DEPS}"
19372         TEST_ARG2="${TEST_DEP2}"
19373 else
19374         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19375         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19376 fi
19377
19378 cf_cv_src_modules=
19379 for cf_dir in $modules_to_build
19380 do
19381         if test -f $srcdir/$cf_dir/modules; then
19382
19383                 # We may/may not have tack in the distribution, though the
19384                 # makefile is.
19385                 if test $cf_dir = tack ; then
19386                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19387                                 continue
19388                         fi
19389                 fi
19390
19391                 if test -z "$cf_cv_src_modules"; then
19392                         cf_cv_src_modules=$cf_dir
19393                 else
19394                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19395                 fi
19396
19397                 # Make the ncurses_cfg.h file record the library interface files as
19398                 # well.  These are header files that are the same name as their
19399                 # directory.  Ncurses is the only library that does not follow
19400                 # that pattern.
19401                 if test $cf_dir = tack ; then
19402                         continue
19403                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19404
19405 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19406
19407                         cat >>confdefs.h <<EOF
19408 #define HAVE_${cf_have_include}_H 1
19409 EOF
19410
19411                         cat >>confdefs.h <<EOF
19412 #define HAVE_LIB${cf_have_include} 1
19413 EOF
19414
19415                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19416                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19417                         if test "$DFT_LWR_MODEL" = "libtool"; then
19418                                 TEST_ARGS="${TEST_DEPS}"
19419                                 TEST_ARG2="${TEST_DEP2}"
19420                         else
19421                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19422                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19423                         fi
19424                 fi
19425         fi
19426 done
19427 echo "$as_me:19427: result: $cf_cv_src_modules" >&5
19428 echo "${ECHO_T}$cf_cv_src_modules" >&6
19429
19430 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19431 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19432
19433 SRC_SUBDIRS=
19434 if test "x$cf_with_manpages" != xno ; then
19435         SRC_SUBDIRS="$SRC_SUBDIRS man"
19436 fi
19437 SRC_SUBDIRS="$SRC_SUBDIRS include"
19438 for cf_dir in $cf_cv_src_modules
19439 do
19440         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19441 done
19442 if test "x$cf_with_tests" != "xno" ; then
19443         SRC_SUBDIRS="$SRC_SUBDIRS test"
19444 fi
19445 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19446 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19447
19448 ADA_SUBDIRS=
19449 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19450         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19451         ADA_SUBDIRS="gen src"
19452         if test "x$cf_with_tests" != "xno" ; then
19453                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19454         fi
19455 fi
19456
19457 SUB_MAKEFILES=
19458 for cf_dir in $SRC_SUBDIRS
19459 do
19460         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19461 done
19462
19463 if test -n "$ADA_SUBDIRS"; then
19464         for cf_dir in $ADA_SUBDIRS
19465         do
19466                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19467         done
19468
19469 fi
19470
19471 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19472    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19473    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19474 fi
19475
19476 DIRS_TO_MAKE="lib"
19477 for cf_item in $cf_list_models
19478 do
19479
19480         case $cf_item in
19481         libtool) cf_subdir='obj_lo'  ;;
19482         normal)  cf_subdir='objects' ;;
19483         debug)   cf_subdir='obj_g' ;;
19484         profile) cf_subdir='obj_p' ;;
19485         shared)
19486                 case $cf_cv_system_name in #(vi
19487                 cygwin) #(vi
19488                         cf_subdir='objects' ;;
19489                 *)
19490                         cf_subdir='obj_s' ;;
19491                 esac
19492         esac
19493
19494         for cf_item2 in $DIRS_TO_MAKE
19495         do
19496                 test $cf_item2 = $cf_subdir && break
19497         done
19498         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19499 done
19500 for cf_dir in $DIRS_TO_MAKE
19501 do
19502         test ! -d $cf_dir && mkdir $cf_dir
19503 done
19504
19505 # symbols that differ when compiling Ada95 by itself.
19506 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19507
19508 # values to use as strings
19509 cat >>confdefs.h <<EOF
19510 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19511 EOF
19512
19513 cat >>confdefs.h <<EOF
19514 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19515 EOF
19516
19517 ### Now that we're done running tests, add the compiler-warnings, if any
19518
19519 cf_fix_cppflags=no
19520 cf_new_cflags=
19521 cf_new_cppflags=
19522 cf_new_extra_cppflags=
19523
19524 for cf_add_cflags in $EXTRA_CFLAGS
19525 do
19526 case $cf_fix_cppflags in
19527 no)
19528         case $cf_add_cflags in #(vi
19529         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19530                 case $cf_add_cflags in
19531                 -D*)
19532                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19533
19534                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19535                                 && test -z "${cf_tst_cflags}" \
19536                                 && cf_fix_cppflags=yes
19537
19538                         if test $cf_fix_cppflags = yes ; then
19539                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19540                                 continue
19541                         elif test "${cf_tst_cflags}" = "\"'" ; then
19542                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19543                                 continue
19544                         fi
19545                         ;;
19546                 esac
19547                 case "$CPPFLAGS" in
19548                 *$cf_add_cflags) #(vi
19549                         ;;
19550                 *) #(vi
19551                         case $cf_add_cflags in #(vi
19552                         -D*)
19553                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19554
19555 CPPFLAGS=`echo "$CPPFLAGS" | \
19556         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19557                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19558
19559                                 ;;
19560                         esac
19561                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19562                         ;;
19563                 esac
19564                 ;;
19565         *)
19566                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19567                 ;;
19568         esac
19569         ;;
19570 yes)
19571         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19572
19573         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19574
19575         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19576                 && test -z "${cf_tst_cflags}" \
19577                 && cf_fix_cppflags=no
19578         ;;
19579 esac
19580 done
19581
19582 if test -n "$cf_new_cflags" ; then
19583
19584         CFLAGS="$CFLAGS $cf_new_cflags"
19585 fi
19586
19587 if test -n "$cf_new_cppflags" ; then
19588
19589         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19590 fi
19591
19592 if test -n "$cf_new_extra_cppflags" ; then
19593
19594         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19595 fi
19596
19597 ### Define substitutions for header files to avoid name-pollution
19598
19599 if test "$cf_cv_have_tcgetattr" = yes ; then
19600         HAVE_TCGETATTR=1
19601 else
19602         HAVE_TCGETATTR=0
19603 fi
19604
19605 if test "$ac_cv_header_termio_h" = yes ; then
19606         HAVE_TERMIO_H=1
19607 else
19608         HAVE_TERMIO_H=0
19609 fi
19610
19611 if test "$ac_cv_header_termios_h" = yes ; then
19612         HAVE_TERMIOS_H=1
19613 else
19614         HAVE_TERMIOS_H=0
19615 fi
19616
19617 ################################################################################
19618 test "$use_database" = yes && \
19619 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19620
19621 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19622 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19623
19624 if test x"$enable_pc_files" = xyes ; then \
19625 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19626 MAKE_PC_FILES=
19627 else
19628 MAKE_PC_FILES="#"
19629 fi
19630
19631 # Extract the first word of "tic", so it can be a program name with args.
19632 set dummy tic; ac_word=$2
19633 echo "$as_me:19633: checking for $ac_word" >&5
19634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19635 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19636   echo $ECHO_N "(cached) $ECHO_C" >&6
19637 else
19638   case $TIC_PATH in
19639   [\\/]* | ?:[\\/]*)
19640   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19641   ;;
19642   *)
19643   ac_save_IFS=$IFS; IFS=$ac_path_separator
19644 ac_dummy="$PATH:/usr/local/ncurses/bin"
19645 for ac_dir in $ac_dummy; do
19646   IFS=$ac_save_IFS
19647   test -z "$ac_dir" && ac_dir=.
19648   if $as_executable_p "$ac_dir/$ac_word"; then
19649    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19650    echo "$as_me:19650: found $ac_dir/$ac_word" >&5
19651    break
19652 fi
19653 done
19654
19655   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19656   ;;
19657 esac
19658 fi
19659 TIC_PATH=$ac_cv_path_TIC_PATH
19660
19661 if test -n "$TIC_PATH"; then
19662   echo "$as_me:19662: result: $TIC_PATH" >&5
19663 echo "${ECHO_T}$TIC_PATH" >&6
19664 else
19665   echo "$as_me:19665: result: no" >&5
19666 echo "${ECHO_T}no" >&6
19667 fi
19668
19669 if test -n "$FALLBACK_LIST"
19670 then
19671         if test "$TIC_PATH" = unknown
19672         then
19673                 { echo "$as_me:19673: WARNING: no tic program found for fallbacks" >&5
19674 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19675         fi
19676 fi
19677
19678 if test "x$cf_with_tests" != xno ; then
19679         MAKE_TESTS=
19680 else
19681         MAKE_TESTS="#"
19682 fi
19683
19684 ADAHTML_DIR=../../doc/html/ada
19685
19686 SUB_SCRIPTS=
19687 case $cf_cv_system_name in #(vi
19688 *mingw32*) #(vi
19689         SUB_SCRIPTS="mk-dlls.sh"
19690         ;;
19691 esac
19692
19693 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
19694 ac_config_commands="$ac_config_commands default"
19695 cat >confcache <<\_ACEOF
19696 # This file is a shell script that caches the results of configure
19697 # tests run on this system so they can be shared between configure
19698 # scripts and configure runs, see configure's option --config-cache.
19699 # It is not useful on other systems.  If it contains results you don't
19700 # want to keep, you may remove or edit it.
19701 #
19702 # config.status only pays attention to the cache file if you give it
19703 # the --recheck option to rerun configure.
19704 #
19705 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19706 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19707 # following values.
19708
19709 _ACEOF
19710
19711 # The following way of writing the cache mishandles newlines in values,
19712 # but we know of no workaround that is simple, portable, and efficient.
19713 # So, don't put newlines in cache variables' values.
19714 # Ultrix sh set writes to stderr and can't be redirected directly,
19715 # and sets the high bit in the cache file unless we assign to the vars.
19716 {
19717   (set) 2>&1 |
19718     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19719     *ac_space=\ *)
19720       # `set' does not quote correctly, so add quotes (double-quote
19721       # substitution turns \\\\ into \\, and sed turns \\ into \).
19722       sed -n \
19723         "s/'/'\\\\''/g;
19724           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19725       ;;
19726     *)
19727       # `set' quotes correctly as required by POSIX, so do not add quotes.
19728       sed -n \
19729         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19730       ;;
19731     esac;
19732 } |
19733   sed '
19734      t clear
19735      : clear
19736      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19737      t end
19738      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19739      : end' >>confcache
19740 if cmp -s $cache_file confcache; then :; else
19741   if test -w $cache_file; then
19742     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19743     cat confcache >$cache_file
19744   else
19745     echo "not updating unwritable cache $cache_file"
19746   fi
19747 fi
19748 rm -f confcache
19749
19750 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19751 # Let make expand exec_prefix.
19752 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19753
19754 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19755 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19756 # trailing colons and then remove the whole line if VPATH becomes empty
19757 # (actually we leave an empty line to preserve line numbers).
19758 if test "x$srcdir" = x.; then
19759   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19760 s/:*\$(srcdir):*/:/;
19761 s/:*\${srcdir}:*/:/;
19762 s/:*@srcdir@:*/:/;
19763 s/^\([^=]*=[    ]*\):*/\1/;
19764 s/:*$//;
19765 s/^[^=]*=[      ]*$//;
19766 }'
19767 fi
19768
19769 DEFS=-DHAVE_CONFIG_H
19770
19771 : ${CONFIG_STATUS=./config.status}
19772 ac_clean_files_save=$ac_clean_files
19773 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19774 { echo "$as_me:19774: creating $CONFIG_STATUS" >&5
19775 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19776 cat >$CONFIG_STATUS <<_ACEOF
19777 #! $SHELL
19778 # Generated automatically by configure.
19779 # Run this file to recreate the current configuration.
19780 # Compiler output produced by configure, useful for debugging
19781 # configure, is in config.log if it exists.
19782
19783 debug=false
19784 SHELL=\${CONFIG_SHELL-$SHELL}
19785 ac_cs_invocation="\$0 \$@"
19786
19787 _ACEOF
19788
19789 cat >>$CONFIG_STATUS <<\_ACEOF
19790 # Be Bourne compatible
19791 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19792   emulate sh
19793   NULLCMD=:
19794 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19795   set -o posix
19796 fi
19797
19798 # Name of the executable.
19799 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19800
19801 if expr a : '\(a\)' >/dev/null 2>&1; then
19802   as_expr=expr
19803 else
19804   as_expr=false
19805 fi
19806
19807 rm -f conf$$ conf$$.exe conf$$.file
19808 echo >conf$$.file
19809 if ln -s conf$$.file conf$$ 2>/dev/null; then
19810   # We could just check for DJGPP; but this test a) works b) is more generic
19811   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19812   if test -f conf$$.exe; then
19813     # Don't use ln at all; we don't have any links
19814     as_ln_s='cp -p'
19815   else
19816     as_ln_s='ln -s'
19817   fi
19818 elif ln conf$$.file conf$$ 2>/dev/null; then
19819   as_ln_s=ln
19820 else
19821   as_ln_s='cp -p'
19822 fi
19823 rm -f conf$$ conf$$.exe conf$$.file
19824
19825 as_executable_p="test -f"
19826
19827 # Support unset when possible.
19828 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19829   as_unset=unset
19830 else
19831   as_unset=false
19832 fi
19833
19834 # NLS nuisances.
19835 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19836 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19837 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19838 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19839 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19840 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19841 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19842 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19843
19844 # IFS
19845 # We need space, tab and new line, in precisely that order.
19846 as_nl='
19847 '
19848 IFS="   $as_nl"
19849
19850 # CDPATH.
19851 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19852
19853 exec 6>&1
19854
19855 _ACEOF
19856
19857 # Files that config.status was made for.
19858 if test -n "$ac_config_files"; then
19859   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19860 fi
19861
19862 if test -n "$ac_config_headers"; then
19863   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19864 fi
19865
19866 if test -n "$ac_config_links"; then
19867   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19868 fi
19869
19870 if test -n "$ac_config_commands"; then
19871   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19872 fi
19873
19874 cat >>$CONFIG_STATUS <<\EOF
19875
19876 ac_cs_usage="\
19877 \`$as_me' instantiates files from templates according to the
19878 current configuration.
19879
19880 Usage: $0 [OPTIONS] [FILE]...
19881
19882   -h, --help       print this help, then exit
19883   -V, --version    print version number, then exit
19884   -d, --debug      don't remove temporary files
19885       --recheck    update $as_me by reconfiguring in the same conditions
19886   --file=FILE[:TEMPLATE]
19887                    instantiate the configuration file FILE
19888   --header=FILE[:TEMPLATE]
19889                    instantiate the configuration header FILE
19890
19891 Configuration files:
19892 $config_files
19893
19894 Configuration headers:
19895 $config_headers
19896
19897 Configuration commands:
19898 $config_commands
19899
19900 Report bugs to <dickey@invisible-island.net>."
19901 EOF
19902
19903 cat >>$CONFIG_STATUS <<EOF
19904 ac_cs_version="\\
19905 config.status
19906 configured by $0, generated by GNU Autoconf 2.52.20101002,
19907   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19908
19909 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19910 Free Software Foundation, Inc.
19911 This config.status script is free software; the Free Software Foundation
19912 gives unlimited permission to copy, distribute and modify it."
19913 srcdir=$srcdir
19914 INSTALL="$INSTALL"
19915 EOF
19916
19917 cat >>$CONFIG_STATUS <<\EOF
19918 # If no file are specified by the user, then we need to provide default
19919 # value.  By we need to know if files were specified by the user.
19920 ac_need_defaults=:
19921 while test $# != 0
19922 do
19923   case $1 in
19924   --*=*)
19925     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19926     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19927     shift
19928     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19929     shift
19930     ;;
19931   -*);;
19932   *) # This is not an option, so the user has probably given explicit
19933      # arguments.
19934      ac_need_defaults=false;;
19935   esac
19936
19937   case $1 in
19938   # Handling of the options.
19939 EOF
19940 cat >>$CONFIG_STATUS <<EOF
19941   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19942     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19943     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19944 EOF
19945 cat >>$CONFIG_STATUS <<\EOF
19946   --version | --vers* | -V )
19947     echo "$ac_cs_version"; exit 0 ;;
19948   --he | --h)
19949     # Conflict between --help and --header
19950     { { echo "$as_me:19950: error: ambiguous option: $1
19951 Try \`$0 --help' for more information." >&5
19952 echo "$as_me: error: ambiguous option: $1
19953 Try \`$0 --help' for more information." >&2;}
19954    { (exit 1); exit 1; }; };;
19955   --help | --hel | -h )
19956     echo "$ac_cs_usage"; exit 0 ;;
19957   --debug | --d* | -d )
19958     debug=: ;;
19959   --file | --fil | --fi | --f )
19960     shift
19961     CONFIG_FILES="$CONFIG_FILES $1"
19962     ac_need_defaults=false;;
19963   --header | --heade | --head | --hea )
19964     shift
19965     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19966     ac_need_defaults=false;;
19967
19968   # This is an error.
19969   -*) { { echo "$as_me:19969: error: unrecognized option: $1
19970 Try \`$0 --help' for more information." >&5
19971 echo "$as_me: error: unrecognized option: $1
19972 Try \`$0 --help' for more information." >&2;}
19973    { (exit 1); exit 1; }; } ;;
19974
19975   *) ac_config_targets="$ac_config_targets $1" ;;
19976
19977   esac
19978   shift
19979 done
19980
19981 exec 5>>config.log
19982 cat >&5 << _ACEOF
19983
19984 ## ----------------------- ##
19985 ## Running config.status.  ##
19986 ## ----------------------- ##
19987
19988 This file was extended by $as_me 2.52.20101002, executed with
19989   CONFIG_FILES    = $CONFIG_FILES
19990   CONFIG_HEADERS  = $CONFIG_HEADERS
19991   CONFIG_LINKS    = $CONFIG_LINKS
19992   CONFIG_COMMANDS = $CONFIG_COMMANDS
19993   > $ac_cs_invocation
19994 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19995
19996 _ACEOF
19997 EOF
19998
19999 cat >>$CONFIG_STATUS <<EOF
20000 #
20001 # INIT-COMMANDS section.
20002 #
20003
20004 ### Special initialization commands, used to pass information from the
20005 ### configuration-run into config.status
20006
20007 AWK="$AWK"
20008 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20009 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20010 ECHO_LINK="$ECHO_LINK"
20011 LDCONFIG="$LDCONFIG"
20012 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20013 LIB_NAME="$LIB_NAME"
20014 LIB_SUBSETS="$LIB_SUBSETS"
20015 LIB_SUFFIX="$LIB_SUFFIX"
20016 LIB_TRACING="$LIB_TRACING"
20017 LN_S="$LN_S"
20018 MAKE_TERMINFO="$MAKE_TERMINFO"
20019 NCURSES_MAJOR="$NCURSES_MAJOR"
20020 NCURSES_MINOR="$NCURSES_MINOR"
20021 NCURSES_OSPEED="$NCURSES_OSPEED"
20022 NCURSES_PATCH="$NCURSES_PATCH"
20023 SRC_SUBDIRS="$SRC_SUBDIRS"
20024 TERMINFO="$TERMINFO"
20025 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20026 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20027 TICS_NAME="$TICS_NAME"
20028 TIC_PATH="$TIC_PATH"
20029 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20030 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20031 TINFO_NAME="$TINFO_NAME"
20032 TINFO_SUFFIX="$TINFO_SUFFIX"
20033 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20034 WITH_CURSES_H="$with_curses_h"
20035 WITH_ECHO="$with_echo"
20036 WITH_OVERWRITE="$with_overwrite"
20037 cf_LIST_MODELS="$cf_list_models"
20038 cf_cv_abi_version="$cf_cv_abi_version"
20039 cf_cv_do_relink="$cf_cv_do_relink"
20040 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20041 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20042 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20043 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20044 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20045 cf_cv_rel_version="$cf_cv_rel_version"
20046 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20047 cf_cv_shared_soname='$cf_cv_shared_soname'
20048 cf_cv_shlib_version="$cf_cv_shlib_version"
20049 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20050 cf_cv_system_name="$cf_cv_system_name"
20051 cf_with_ada="$cf_with_ada"
20052 cf_with_cxx_binding="$cf_with_cxx_binding"
20053 cf_with_manpages="$cf_with_manpages"
20054 cf_with_tests="$cf_with_tests"
20055 host="$host"
20056 target="$target"
20057
20058 EOF
20059
20060 cat >>$CONFIG_STATUS <<\EOF
20061 for ac_config_target in $ac_config_targets
20062 do
20063   case "$ac_config_target" in
20064   # Handling of arguments.
20065   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20066   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20067   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20068   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20069   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20070   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20071   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20072   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20073   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20074   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20075   *) { { echo "$as_me:20075: error: invalid argument: $ac_config_target" >&5
20076 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20077    { (exit 1); exit 1; }; };;
20078   esac
20079 done
20080
20081 # If the user did not use the arguments to specify the items to instantiate,
20082 # then the envvar interface is used.  Set only those that are not.
20083 # We use the long form for the default assignment because of an extremely
20084 # bizarre bug on SunOS 4.1.3.
20085 if $ac_need_defaults; then
20086   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20087   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20088   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20089 fi
20090
20091 # Create a temporary directory, and hook for its removal unless debugging.
20092 $debug ||
20093 {
20094   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20095   trap '{ (exit 1); exit 1; }' 1 2 13 15
20096 }
20097
20098 # Create a (secure) tmp directory for tmp files.
20099 : ${TMPDIR=/tmp}
20100 {
20101   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20102   test -n "$tmp" && test -d "$tmp"
20103 }  ||
20104 {
20105   tmp=$TMPDIR/cs$$-$RANDOM
20106   (umask 077 && mkdir $tmp)
20107 } ||
20108 {
20109    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20110    { (exit 1); exit 1; }
20111 }
20112
20113 EOF
20114
20115 cat >>$CONFIG_STATUS <<EOF
20116
20117 #
20118 # CONFIG_FILES section.
20119 #
20120
20121 # No need to generate the scripts if there are no CONFIG_FILES.
20122 # This happens for instance when ./config.status config.h
20123 if test -n "\$CONFIG_FILES"; then
20124   # Protect against being on the right side of a sed subst in config.status.
20125   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20126    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20127 s,@SHELL@,$SHELL,;t t
20128 s,@exec_prefix@,$exec_prefix,;t t
20129 s,@prefix@,$prefix,;t t
20130 s,@program_transform_name@,$program_transform_name,;t t
20131 s,@bindir@,$bindir,;t t
20132 s,@sbindir@,$sbindir,;t t
20133 s,@libexecdir@,$libexecdir,;t t
20134 s,@datadir@,$datadir,;t t
20135 s,@sysconfdir@,$sysconfdir,;t t
20136 s,@sharedstatedir@,$sharedstatedir,;t t
20137 s,@localstatedir@,$localstatedir,;t t
20138 s,@libdir@,$libdir,;t t
20139 s,@includedir@,$includedir,;t t
20140 s,@oldincludedir@,$oldincludedir,;t t
20141 s,@infodir@,$infodir,;t t
20142 s,@mandir@,$mandir,;t t
20143 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20144 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20145 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20146 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20147 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20148 s,@build_alias@,$build_alias,;t t
20149 s,@host_alias@,$host_alias,;t t
20150 s,@target_alias@,$target_alias,;t t
20151 s,@ECHO_C@,$ECHO_C,;t t
20152 s,@ECHO_N@,$ECHO_N,;t t
20153 s,@ECHO_T@,$ECHO_T,;t t
20154 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20155 s,@DEFS@,$DEFS,;t t
20156 s,@LIBS@,$LIBS,;t t
20157 s,@top_builddir@,$top_builddir,;t t
20158 s,@EGREP@,$EGREP,;t t
20159 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20160 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20161 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20162 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20163 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20164 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20165 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20166 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20167 s,@build@,$build,;t t
20168 s,@build_cpu@,$build_cpu,;t t
20169 s,@build_vendor@,$build_vendor,;t t
20170 s,@build_os@,$build_os,;t t
20171 s,@host@,$host,;t t
20172 s,@host_cpu@,$host_cpu,;t t
20173 s,@host_vendor@,$host_vendor,;t t
20174 s,@host_os@,$host_os,;t t
20175 s,@target@,$target,;t t
20176 s,@target_cpu@,$target_cpu,;t t
20177 s,@target_vendor@,$target_vendor,;t t
20178 s,@target_os@,$target_os,;t t
20179 s,@CC@,$CC,;t t
20180 s,@CFLAGS@,$CFLAGS,;t t
20181 s,@LDFLAGS@,$LDFLAGS,;t t
20182 s,@CPPFLAGS@,$CPPFLAGS,;t t
20183 s,@ac_ct_CC@,$ac_ct_CC,;t t
20184 s,@EXEEXT@,$EXEEXT,;t t
20185 s,@OBJEXT@,$OBJEXT,;t t
20186 s,@CPP@,$CPP,;t t
20187 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20188 s,@PROG_EXT@,$PROG_EXT,;t t
20189 s,@LDCONFIG@,$LDCONFIG,;t t
20190 s,@CXX@,$CXX,;t t
20191 s,@CXXFLAGS@,$CXXFLAGS,;t t
20192 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20193 s,@AWK@,$AWK,;t t
20194 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20195 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20196 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20197 s,@LINT@,$LINT,;t t
20198 s,@LINT_OPTS@,$LINT_OPTS,;t t
20199 s,@LN_S@,$LN_S,;t t
20200 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20201 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20202 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20203 s,@SET_MAKE@,$SET_MAKE,;t t
20204 s,@CTAGS@,$CTAGS,;t t
20205 s,@ETAGS@,$ETAGS,;t t
20206 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20207 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20208 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20209 s,@RANLIB@,$RANLIB,;t t
20210 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20211 s,@LD@,$LD,;t t
20212 s,@ac_ct_LD@,$ac_ct_LD,;t t
20213 s,@AR@,$AR,;t t
20214 s,@ac_ct_AR@,$ac_ct_AR,;t t
20215 s,@ARFLAGS@,$ARFLAGS,;t t
20216 s,@DESTDIR@,$DESTDIR,;t t
20217 s,@BUILD_CC@,$BUILD_CC,;t t
20218 s,@BUILD_CPP@,$BUILD_CPP,;t t
20219 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20220 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20221 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20222 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20223 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20224 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20225 s,@cf_list_models@,$cf_list_models,;t t
20226 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20227 s,@LIBTOOL@,$LIBTOOL,;t t
20228 s,@LT_UNDEF@,$LT_UNDEF,;t t
20229 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20230 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20231 s,@LIB_CREATE@,$LIB_CREATE,;t t
20232 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20233 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20234 s,@LIB_PREP@,$LIB_PREP,;t t
20235 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20236 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20237 s,@LIB_LINK@,$LIB_LINK,;t t
20238 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20239 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20240 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20241 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20242 s,@TICS_NAME@,$TICS_NAME,;t t
20243 s,@TINFO_NAME@,$TINFO_NAME,;t t
20244 s,@LIB_NAME@,$LIB_NAME,;t t
20245 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20246 s,@CC_G_OPT@,$CC_G_OPT,;t t
20247 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20248 s,@LD_MODEL@,$LD_MODEL,;t t
20249 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20250 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20251 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20252 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20253 s,@LINK_PROGS@,$LINK_PROGS,;t t
20254 s,@LINK_TESTS@,$LINK_TESTS,;t t
20255 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20256 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20257 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20258 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20259 s,@RPATH_LIST@,$RPATH_LIST,;t t
20260 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20261 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20262 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20263 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20264 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20265 s,@TERMINFO@,$TERMINFO,;t t
20266 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20267 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20268 s,@TERMPATH@,$TERMPATH,;t t
20269 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20270 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20271 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20272 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20273 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20274 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20275 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20276 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20277 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20278 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20279 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20280 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20281 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20282 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20283 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20284 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20285 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20286 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20287 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20288 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20289 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20290 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20291 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20292 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20293 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20294 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20295 s,@PTHREAD@,$PTHREAD,;t t
20296 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20297 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20298 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20299 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20300 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20301 s,@ECHO_LINK@,$ECHO_LINK,;t t
20302 s,@ADAFLAGS@,$ADAFLAGS,;t t
20303 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20304 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20305 s,@ADA_TRACE@,$ADA_TRACE,;t t
20306 s,@MATH_LIB@,$MATH_LIB,;t t
20307 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20308 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20309 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20310 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20311 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20312 s,@TEST_LIBS@,$TEST_LIBS,;t t
20313 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20314 s,@CXXCPP@,$CXXCPP,;t t
20315 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20316 s,@CXX_AR@,$CXX_AR,;t t
20317 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20318 s,@CXXLIBS@,$CXXLIBS,;t t
20319 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20320 s,@gnat_exists@,$gnat_exists,;t t
20321 s,@M4_exists@,$M4_exists,;t t
20322 s,@cf_ada_make@,$cf_ada_make,;t t
20323 s,@cf_compile_generics@,$cf_compile_generics,;t t
20324 s,@cf_generic_objects@,$cf_generic_objects,;t t
20325 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20326 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20327 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20328 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20329 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20330 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20331 s,@cf_ada_package@,$cf_ada_package,;t t
20332 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20333 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20334 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20335 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20336 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20337 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20338 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20339 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20340 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20341 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20342 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20343 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20344 s,@TICS_ARGS@,$TICS_ARGS,;t t
20345 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20346 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20347 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20348 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20349 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20350 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20351 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20352 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20353 s,@TICS_LIST@,$TICS_LIST,;t t
20354 s,@TINFO_LIST@,$TINFO_LIST,;t t
20355 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20356 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20357 s,@TEST_ARGS@,$TEST_ARGS,;t t
20358 s,@TEST_DEPS@,$TEST_DEPS,;t t
20359 s,@TEST_ARG2@,$TEST_ARG2,;t t
20360 s,@TEST_DEP2@,$TEST_DEP2,;t t
20361 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20362 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20363 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20364 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20365 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20366 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20367 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20368 s,@cross_compiling@,$cross_compiling,;t t
20369 s,@TIC_PATH@,$TIC_PATH,;t t
20370 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20371 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20372 CEOF
20373
20374 EOF
20375
20376   cat >>$CONFIG_STATUS <<\EOF
20377   # Split the substitutions into bite-sized pieces for seds with
20378   # small command number limits, like on Digital OSF/1 and HP-UX.
20379   ac_max_sed_lines=48
20380   ac_sed_frag=1 # Number of current file.
20381   ac_beg=1 # First line for current file.
20382   ac_end=$ac_max_sed_lines # Line after last line for current file.
20383   ac_more_lines=:
20384   ac_sed_cmds=
20385   while $ac_more_lines; do
20386     if test $ac_beg -gt 1; then
20387       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20388     else
20389       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20390     fi
20391     if test ! -s $tmp/subs.frag; then
20392       ac_more_lines=false
20393     else
20394       # The purpose of the label and of the branching condition is to
20395       # speed up the sed processing (if there are no `@' at all, there
20396       # is no need to browse any of the substitutions).
20397       # These are the two extra sed commands mentioned above.
20398       (echo ':t
20399   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20400       if test -z "$ac_sed_cmds"; then
20401         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20402       else
20403         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20404       fi
20405       ac_sed_frag=`expr $ac_sed_frag + 1`
20406       ac_beg=$ac_end
20407       ac_end=`expr $ac_end + $ac_max_sed_lines`
20408     fi
20409   done
20410   if test -z "$ac_sed_cmds"; then
20411     ac_sed_cmds=cat
20412   fi
20413 fi # test -n "$CONFIG_FILES"
20414
20415 EOF
20416 cat >>$CONFIG_STATUS <<\EOF
20417 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20418   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20419   case $ac_file in
20420   - | *:- | *:-:* ) # input from stdin
20421         cat >$tmp/stdin
20422         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20423         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20424   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20425         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20426   * )   ac_file_in=$ac_file.in ;;
20427   esac
20428
20429   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20430   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20431          X"$ac_file" : 'X\(//\)[^/]' \| \
20432          X"$ac_file" : 'X\(//\)$' \| \
20433          X"$ac_file" : 'X\(/\)' \| \
20434          .     : '\(.\)' 2>/dev/null ||
20435 echo X"$ac_file" |
20436     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20437           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20438           /^X\(\/\/\)$/{ s//\1/; q; }
20439           /^X\(\/\).*/{ s//\1/; q; }
20440           s/.*/./; q'`
20441   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20442     { case "$ac_dir" in
20443   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20444   *)                      as_incr_dir=.;;
20445 esac
20446 as_dummy="$ac_dir"
20447 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20448   case $as_mkdir_dir in
20449     # Skip DOS drivespec
20450     ?:) as_incr_dir=$as_mkdir_dir ;;
20451     *)
20452       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20453       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20454     ;;
20455   esac
20456 done; }
20457
20458     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20459     # A "../" for each directory in $ac_dir_suffix.
20460     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20461   else
20462     ac_dir_suffix= ac_dots=
20463   fi
20464
20465   case $srcdir in
20466   .)  ac_srcdir=.
20467       if test -z "$ac_dots"; then
20468          ac_top_srcdir=.
20469       else
20470          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20471       fi ;;
20472   [\\/]* | ?:[\\/]* )
20473       ac_srcdir=$srcdir$ac_dir_suffix;
20474       ac_top_srcdir=$srcdir ;;
20475   *) # Relative path.
20476     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20477     ac_top_srcdir=$ac_dots$srcdir ;;
20478   esac
20479
20480   case $INSTALL in
20481   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20482   *) ac_INSTALL=$ac_dots$INSTALL ;;
20483   esac
20484
20485   if test x"$ac_file" != x-; then
20486     { echo "$as_me:20486: creating $ac_file" >&5
20487 echo "$as_me: creating $ac_file" >&6;}
20488     rm -f "$ac_file"
20489   fi
20490   # Let's still pretend it is `configure' which instantiates (i.e., don't
20491   # use $as_me), people would be surprised to read:
20492   #    /* config.h.  Generated automatically by config.status.  */
20493   configure_input="Generated automatically from `echo $ac_file_in |
20494                                                  sed 's,.*/,,'` by configure."
20495
20496   # First look for the input files in the build tree, otherwise in the
20497   # src tree.
20498   ac_file_inputs=`IFS=:
20499     for f in $ac_file_in; do
20500       case $f in
20501       -) echo $tmp/stdin ;;
20502       [\\/$]*)
20503          # Absolute (can't be DOS-style, as IFS=:)
20504          test -f "$f" || { { echo "$as_me:20504: error: cannot find input file: $f" >&5
20505 echo "$as_me: error: cannot find input file: $f" >&2;}
20506    { (exit 1); exit 1; }; }
20507          echo $f;;
20508       *) # Relative
20509          if test -f "$f"; then
20510            # Build tree
20511            echo $f
20512          elif test -f "$srcdir/$f"; then
20513            # Source tree
20514            echo $srcdir/$f
20515          else
20516            # /dev/null tree
20517            { { echo "$as_me:20517: error: cannot find input file: $f" >&5
20518 echo "$as_me: error: cannot find input file: $f" >&2;}
20519    { (exit 1); exit 1; }; }
20520          fi;;
20521       esac
20522     done` || { (exit 1); exit 1; }
20523 EOF
20524 cat >>$CONFIG_STATUS <<EOF
20525   sed "$ac_vpsub
20526 $extrasub
20527 EOF
20528 cat >>$CONFIG_STATUS <<\EOF
20529 :t
20530 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20531 s,@configure_input@,$configure_input,;t t
20532 s,@srcdir@,$ac_srcdir,;t t
20533 s,@top_srcdir@,$ac_top_srcdir,;t t
20534 s,@INSTALL@,$ac_INSTALL,;t t
20535 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20536   rm -f $tmp/stdin
20537   if test x"$ac_file" != x-; then
20538     mv $tmp/out $ac_file
20539   else
20540     cat $tmp/out
20541     rm -f $tmp/out
20542   fi
20543
20544 done
20545 EOF
20546 cat >>$CONFIG_STATUS <<\EOF
20547
20548 #
20549 # CONFIG_HEADER section.
20550 #
20551
20552 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20553 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20554 #
20555 # ac_d sets the value in "#define NAME VALUE" lines.
20556 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20557 ac_dB='[        ].*$,\1#\2'
20558 ac_dC=' '
20559 ac_dD=',;t'
20560 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20561 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20562 ac_iB='\([      ]\),\1#\2define\3'
20563 ac_iC=' '
20564 ac_iD='\4,;t'
20565 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20566 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20567 ac_uB='$,\1#\2define\3'
20568 ac_uC=' '
20569 ac_uD=',;t'
20570
20571 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20572   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20573   case $ac_file in
20574   - | *:- | *:-:* ) # input from stdin
20575         cat >$tmp/stdin
20576         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20577         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20578   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20579         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20580   * )   ac_file_in=$ac_file.in ;;
20581   esac
20582
20583   test x"$ac_file" != x- && { echo "$as_me:20583: creating $ac_file" >&5
20584 echo "$as_me: creating $ac_file" >&6;}
20585
20586   # First look for the input files in the build tree, otherwise in the
20587   # src tree.
20588   ac_file_inputs=`IFS=:
20589     for f in $ac_file_in; do
20590       case $f in
20591       -) echo $tmp/stdin ;;
20592       [\\/$]*)
20593          # Absolute (can't be DOS-style, as IFS=:)
20594          test -f "$f" || { { echo "$as_me:20594: error: cannot find input file: $f" >&5
20595 echo "$as_me: error: cannot find input file: $f" >&2;}
20596    { (exit 1); exit 1; }; }
20597          echo $f;;
20598       *) # Relative
20599          if test -f "$f"; then
20600            # Build tree
20601            echo $f
20602          elif test -f "$srcdir/$f"; then
20603            # Source tree
20604            echo $srcdir/$f
20605          else
20606            # /dev/null tree
20607            { { echo "$as_me:20607: error: cannot find input file: $f" >&5
20608 echo "$as_me: error: cannot find input file: $f" >&2;}
20609    { (exit 1); exit 1; }; }
20610          fi;;
20611       esac
20612     done` || { (exit 1); exit 1; }
20613   # Remove the trailing spaces.
20614   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20615
20616 EOF
20617
20618 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20619 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20620 # be either 'cat' or 'sort'.
20621 cat confdefs.h | uniq >conftest.vals
20622
20623 # Break up conftest.vals because some shells have a limit on
20624 # the size of here documents, and old seds have small limits too.
20625
20626 rm -f conftest.tail
20627 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20628 while grep . conftest.vals >/dev/null
20629 do
20630   # Write chunks of a limited-size here document to conftest.frag.
20631   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20632   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20633   echo 'CEOF' >> $CONFIG_STATUS
20634   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20635   rm -f conftest.vals
20636   mv conftest.tail conftest.vals
20637 done
20638 rm -f conftest.vals
20639
20640 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20641 # marker @DEFS@.
20642 echo '  cat >> conftest.edit <<CEOF
20643 /@DEFS@/r conftest.frag
20644 /@DEFS@/d
20645 CEOF
20646 sed -f conftest.edit $tmp/in > $tmp/out
20647 rm -f $tmp/in
20648 mv $tmp/out $tmp/in
20649 rm -f conftest.edit conftest.frag
20650 ' >> $CONFIG_STATUS
20651
20652 cat >>$CONFIG_STATUS <<\EOF
20653   # Let's still pretend it is `configure' which instantiates (i.e., don't
20654   # use $as_me), people would be surprised to read:
20655   #    /* config.h.  Generated automatically by config.status.  */
20656   if test x"$ac_file" = x-; then
20657     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20658   else
20659     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20660   fi
20661   cat $tmp/in >>$tmp/config.h
20662   rm -f $tmp/in
20663   if test x"$ac_file" != x-; then
20664     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20665       { echo "$as_me:20665: $ac_file is unchanged" >&5
20666 echo "$as_me: $ac_file is unchanged" >&6;}
20667     else
20668       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20669          X"$ac_file" : 'X\(//\)[^/]' \| \
20670          X"$ac_file" : 'X\(//\)$' \| \
20671          X"$ac_file" : 'X\(/\)' \| \
20672          .     : '\(.\)' 2>/dev/null ||
20673 echo X"$ac_file" |
20674     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20675           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20676           /^X\(\/\/\)$/{ s//\1/; q; }
20677           /^X\(\/\).*/{ s//\1/; q; }
20678           s/.*/./; q'`
20679       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20680         { case "$ac_dir" in
20681   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20682   *)                      as_incr_dir=.;;
20683 esac
20684 as_dummy="$ac_dir"
20685 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20686   case $as_mkdir_dir in
20687     # Skip DOS drivespec
20688     ?:) as_incr_dir=$as_mkdir_dir ;;
20689     *)
20690       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20691       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20692     ;;
20693   esac
20694 done; }
20695
20696       fi
20697       rm -f $ac_file
20698       mv $tmp/config.h $ac_file
20699     fi
20700   else
20701     cat $tmp/config.h
20702     rm -f $tmp/config.h
20703   fi
20704 done
20705 EOF
20706 cat >>$CONFIG_STATUS <<\EOF
20707 #
20708 # CONFIG_COMMANDS section.
20709 #
20710 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20711   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20712   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20713
20714   case $ac_dest in
20715     default )
20716 if test "x$cf_with_tests" != xno ; then
20717
20718 for cf_dir in test
20719 do
20720         if test ! -d $srcdir/$cf_dir; then
20721                 continue
20722         elif test -f $srcdir/$cf_dir/programs; then
20723                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20724         fi
20725 done
20726
20727 fi
20728
20729         case $cf_cv_system_name in #(vi
20730         OS/2*|os2*) #(vi
20731         LIB_PREFIX=''
20732         ;;
20733         *)      LIB_PREFIX='lib'
20734         ;;
20735         esac
20736 cf_prefix=$LIB_PREFIX
20737
20738 if test $cf_cv_shlib_version = cygdll ; then
20739         TINFO_NAME=$TINFO_ARG_SUFFIX
20740         TINFO_SUFFIX=.dll
20741 fi
20742
20743 if test -n "$TINFO_SUFFIX" ; then
20744         case $TINFO_SUFFIX in
20745         tw*)
20746                 TINFO_NAME="${TINFO_NAME}tw"
20747                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20748                 ;;
20749         t*)
20750                 TINFO_NAME="${TINFO_NAME}t"
20751                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20752                 ;;
20753         w*)
20754                 TINFO_NAME="${TINFO_NAME}w"
20755                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20756                 ;;
20757         esac
20758 fi
20759
20760 for cf_dir in $SRC_SUBDIRS
20761 do
20762         if test ! -d $srcdir/$cf_dir ; then
20763                 continue
20764         elif test -f $srcdir/$cf_dir/modules; then
20765
20766                 SHARED_LIB=
20767                 LIBS_TO_MAKE=
20768                 for cf_item in $cf_LIST_MODELS
20769                 do
20770
20771         case $cf_item in #(vi
20772         libtool) #(vi
20773                 cf_suffix='.la'
20774                 cf_depsuf=$cf_suffix
20775                 ;;
20776         normal) #(vi
20777                 cf_suffix='.a'
20778                 cf_depsuf=$cf_suffix
20779                 ;;
20780         debug) #(vi
20781                 cf_suffix='_g.a'
20782                 cf_depsuf=$cf_suffix
20783                 ;;
20784         profile) #(vi
20785                 cf_suffix='_p.a'
20786                 cf_depsuf=$cf_suffix
20787                 ;;
20788         shared) #(vi
20789                 case $cf_cv_system_name in
20790                 aix[5-7]*) #(vi
20791                         cf_suffix='.a'
20792                         cf_depsuf=$cf_suffix
20793                         ;;
20794                 cygwin*) #(vi
20795                         cf_suffix='.dll'
20796                         cf_depsuf='.dll.a'
20797                         ;;
20798                 darwin*) #(vi
20799                         cf_suffix='.dylib'
20800                         cf_depsuf=$cf_suffix
20801                         ;;
20802                 hpux*) #(vi
20803                         case $target in
20804                         ia64*) #(vi
20805                                 cf_suffix='.so'
20806                                 cf_depsuf=$cf_suffix
20807                                 ;;
20808                         *) #(vi
20809                                 cf_suffix='.sl'
20810                                 cf_depsuf=$cf_suffix
20811                                 ;;
20812                         esac
20813                         ;;
20814                 *)      cf_suffix='.so'
20815                         cf_depsuf=$cf_suffix
20816                         ;;
20817                 esac
20818         esac
20819         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20820         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20821
20822                         if test $cf_item = shared ; then
20823                         if test "$cf_cv_do_symlinks" = yes ; then
20824                                 case "$cf_cv_shlib_version" in #(vi
20825                                 rel) #(vi
20826                                         case "$cf_cv_system_name" in #(vi
20827                                         darwin*)
20828                                         case .${LIB_SUFFIX} in
20829                                         .tw*)
20830                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20831                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20832                                                 ;;
20833                                         .t*)
20834                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20835                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20836                                                 ;;
20837                                         .w*)
20838                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20839                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20840                                                 ;;
20841                                         *)
20842                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20843                                                 ;;
20844                                         esac
20845                                         ;; #(vi
20846                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20847                                         esac
20848                                         ;;
20849                                 abi)
20850                                         case "$cf_cv_system_name" in #(vi
20851                                         darwin*)
20852                                         case .${LIB_SUFFIX} in
20853                                         .tw*)
20854                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20855                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20856                                                 ;;
20857                                         .t*)
20858                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20859                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20860                                                 ;;
20861                                         .w*)
20862                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20863                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20864                                                 ;;
20865                                         *)
20866                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20867                                                 ;;
20868                                         esac
20869                                         ;; #(vi
20870                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20871                                         esac
20872                                         ;;
20873                                 esac
20874                         fi
20875                         # cygwin needs import library, and has unique naming convention
20876                         # use autodetected ${cf_prefix} for import lib and static lib, but
20877                         # use 'cyg' prefix for shared lib.
20878                         if test $cf_cv_shlib_version = cygdll ; then
20879                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20880                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20881                                 continue
20882                         fi
20883                         fi
20884                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20885                 done
20886
20887                 if test $cf_dir = ncurses ; then
20888                         cf_subsets="$LIB_SUBSETS"
20889                         cf_r_parts="$cf_subsets"
20890                         cf_liblist="$LIBS_TO_MAKE"
20891
20892                         while test -n "$cf_r_parts"
20893                         do
20894                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20895                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20896                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20897                                         cf_item=
20898                                         case $cf_l_parts in #(vi
20899                                         *termlib*) #(vi
20900                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20901                                                 ;;
20902                                         *ticlib*)
20903                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20904                                                 ;;
20905                                         *)
20906                                                 break
20907                                                 ;;
20908                                         esac
20909                                         if test -n "$cf_item"; then
20910                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20911                                         fi
20912                                 else
20913                                         break
20914                                 fi
20915                         done
20916                 else
20917                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20918                 fi
20919
20920                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20921                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20922                         $cf_dir/Makefile >$cf_dir/Makefile.out
20923                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20924
20925                 $AWK -f $srcdir/mk-0th.awk \
20926                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20927                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20928
20929                 for cf_subset in $cf_subsets
20930                 do
20931                         cf_subdirs=
20932                         for cf_item in $cf_LIST_MODELS
20933                         do
20934                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20935
20936 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20937
20938         case $cf_item in #(vi
20939         libtool) #(vi
20940                 cf_suffix='.la'
20941                 cf_depsuf=$cf_suffix
20942                 ;;
20943         normal) #(vi
20944                 cf_suffix='.a'
20945                 cf_depsuf=$cf_suffix
20946                 ;;
20947         debug) #(vi
20948                 cf_suffix='_g.a'
20949                 cf_depsuf=$cf_suffix
20950                 ;;
20951         profile) #(vi
20952                 cf_suffix='_p.a'
20953                 cf_depsuf=$cf_suffix
20954                 ;;
20955         shared) #(vi
20956                 case $cf_cv_system_name in
20957                 aix[5-7]*) #(vi
20958                         cf_suffix='.a'
20959                         cf_depsuf=$cf_suffix
20960                         ;;
20961                 cygwin*) #(vi
20962                         cf_suffix='.dll'
20963                         cf_depsuf='.dll.a'
20964                         ;;
20965                 darwin*) #(vi
20966                         cf_suffix='.dylib'
20967                         cf_depsuf=$cf_suffix
20968                         ;;
20969                 hpux*) #(vi
20970                         case $target in
20971                         ia64*) #(vi
20972                                 cf_suffix='.so'
20973                                 cf_depsuf=$cf_suffix
20974                                 ;;
20975                         *) #(vi
20976                                 cf_suffix='.sl'
20977                                 cf_depsuf=$cf_suffix
20978                                 ;;
20979                         esac
20980                         ;;
20981                 *)      cf_suffix='.so'
20982                         cf_depsuf=$cf_suffix
20983                         ;;
20984                 esac
20985         esac
20986         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20987         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20988
20989         case $cf_item in
20990         libtool) cf_subdir='obj_lo'  ;;
20991         normal)  cf_subdir='objects' ;;
20992         debug)   cf_subdir='obj_g' ;;
20993         profile) cf_subdir='obj_p' ;;
20994         shared)
20995                 case $cf_cv_system_name in #(vi
20996                 cygwin) #(vi
20997                         cf_subdir='objects' ;;
20998                 *)
20999                         cf_subdir='obj_s' ;;
21000                 esac
21001         esac
21002
21003                         # Test for case where we build libtinfo with a different name.
21004                         cf_libname=$cf_dir
21005                         if test $cf_dir = ncurses ; then
21006                                 case $cf_subset in
21007                                 *base*)
21008                                         cf_libname=${cf_libname}$LIB_SUFFIX
21009                                         ;;
21010                                 *termlib*)
21011                                         cf_libname=$TINFO_LIB_SUFFIX
21012                                         ;;
21013                                 ticlib*)
21014                                         cf_libname=$TICS_LIB_SUFFIX
21015                                         ;;
21016                                 esac
21017                         else
21018                                 cf_libname=${cf_libname}$LIB_SUFFIX
21019                         fi
21020                         if test -n "${DFT_ARG_SUFFIX}" ; then
21021                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21022                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21023                         fi
21024
21025                         # These dependencies really are for development, not
21026                         # builds, but they are useful in porting, too.
21027                         cf_depend="../include/ncurses_cfg.h"
21028                         if test "$srcdir" = "."; then
21029                                 cf_reldir="."
21030                         else
21031                                 cf_reldir="\${srcdir}"
21032                         fi
21033
21034                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21035                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21036                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21037                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21038                         fi
21039
21040                         cf_dir_suffix=
21041                         old_cf_suffix="$cf_suffix"
21042                         if test "$cf_cv_shlib_version_infix" = yes ; then
21043                         if test -n "$LIB_SUFFIX" ; then
21044                                 case $LIB_SUFFIX in
21045                                 tw*)
21046                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21047                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21048                                         cf_dir_suffix=tw
21049                                         ;;
21050                                 t*)
21051                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21052                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21053                                         cf_dir_suffix=t
21054                                         ;;
21055                                 w*)
21056                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21057                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21058                                         cf_dir_suffix=w
21059                                         ;;
21060                                 esac
21061                         fi
21062                         fi
21063
21064                         $AWK -f $srcdir/mk-1st.awk \
21065                                 name=${cf_libname}${cf_dir_suffix} \
21066                                 traces=$LIB_TRACING \
21067                                 MODEL=$cf_ITEM \
21068                                 model=$cf_subdir \
21069                                 prefix=$cf_prefix \
21070                                 suffix=$cf_suffix \
21071                                 subset=$cf_subset \
21072                                 SymLink="$LN_S" \
21073                                 TermlibRoot=$TINFO_NAME \
21074                                 TermlibSuffix=$TINFO_SUFFIX \
21075                                 ShlibVer=$cf_cv_shlib_version \
21076                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21077                                 ReLink=${cf_cv_do_relink:-no} \
21078                                 DoLinks=$cf_cv_do_symlinks \
21079                                 rmSoLocs=$cf_cv_rm_so_locs \
21080                                 ldconfig="$LDCONFIG" \
21081                                 overwrite=$WITH_OVERWRITE \
21082                                 depend="$cf_depend" \
21083                                 host="$host" \
21084                                 libtool_version="$LIBTOOL_VERSION" \
21085                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21086
21087                         cf_suffix="$old_cf_suffix"
21088
21089                         for cf_subdir2 in $cf_subdirs lib
21090                         do
21091                                 test $cf_subdir = $cf_subdir2 && break
21092                         done
21093                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21094                         $AWK -f $srcdir/mk-2nd.awk \
21095                                 name=$cf_dir \
21096                                 traces=$LIB_TRACING \
21097                                 MODEL=$cf_ITEM \
21098                                 model=$cf_subdir \
21099                                 subset=$cf_subset \
21100                                 srcdir=$srcdir \
21101                                 echo=$WITH_ECHO \
21102                                 crenames=$cf_cv_prog_CC_c_o \
21103                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21104                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21105                         cf_subdirs="$cf_subdirs $cf_subdir"
21106                         done
21107                 done
21108         fi
21109
21110         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21111 done
21112
21113 for cf_dir in $SRC_SUBDIRS
21114 do
21115         if test ! -d $srcdir/$cf_dir ; then
21116                 continue
21117         fi
21118
21119         if test -f $cf_dir/Makefile ; then
21120                 case "$cf_dir" in
21121                 Ada95) #(vi
21122                         echo 'libs \' >> Makefile
21123                         echo 'install.libs \' >> Makefile
21124                         echo 'uninstall.libs ::' >> Makefile
21125                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21126                         ;;
21127                 esac
21128         fi
21129
21130         if test -f $srcdir/$cf_dir/modules; then
21131                 echo >> Makefile
21132                 if test -f $srcdir/$cf_dir/headers; then
21133 cat >> Makefile <<CF_EOF
21134 install.includes \\
21135 uninstall.includes \\
21136 CF_EOF
21137                 fi
21138 if test "$cf_dir" != "c++" ; then
21139 echo 'lint \' >> Makefile
21140 fi
21141 cat >> Makefile <<CF_EOF
21142 libs \\
21143 lintlib \\
21144 install.libs \\
21145 uninstall.libs \\
21146 install.$cf_dir \\
21147 uninstall.$cf_dir ::
21148         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21149 CF_EOF
21150         elif test -f $srcdir/$cf_dir/headers; then
21151 cat >> Makefile <<CF_EOF
21152
21153 libs \\
21154 install.libs \\
21155 uninstall.libs \\
21156 install.includes \\
21157 uninstall.includes ::
21158         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21159 CF_EOF
21160 fi
21161 done
21162
21163 cat >> Makefile <<CF_EOF
21164
21165 install.libs uninstall.libs \\
21166 install.data uninstall.data ::
21167 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21168 CF_EOF
21169
21170 if test "x$cf_with_manpages" = xyes; then
21171 cat >> Makefile <<CF_EOF
21172
21173 install.man \\
21174 uninstall.man ::
21175         cd man && \${MAKE} \${CF_MFLAGS} \$@
21176 CF_EOF
21177 fi
21178
21179 cat >> Makefile <<CF_EOF
21180
21181 distclean ::
21182         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21183         rm -f headers.sh headers.sed mk_shared_lib.sh
21184         rm -f edit_man.* man_alias.*
21185         rm -rf \${DIRS_TO_MAKE}
21186 CF_EOF
21187
21188 # Special case: tack's manpage lives in its own directory.
21189 if test "x$cf_with_manpages" = xyes; then
21190 if test -d tack ; then
21191 if test -f $srcdir/$tack.h; then
21192 cat >> Makefile <<CF_EOF
21193
21194 install.man \\
21195 uninstall.man ::
21196         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21197 CF_EOF
21198 fi
21199 fi
21200 fi
21201
21202 rm -f headers.sed headers.sh
21203
21204 echo creating headers.sh
21205 cat >headers.sh <<CF_EOF
21206 #! /bin/sh
21207 # This shell script is generated by the 'configure' script.  It is invoked in a
21208 # subdirectory of the build tree.  It generates a sed-script in the parent
21209 # directory that is used to adjust includes for header files that reside in a
21210 # subdirectory of /usr/include, etc.
21211 PRG=""
21212 while test \$# != 3
21213 do
21214 PRG="\$PRG \$1"; shift
21215 done
21216 DST=\$1
21217 REF=\$2
21218 SRC=\$3
21219 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21220 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21221 echo installing \$SRC in \$DST
21222 CF_EOF
21223
21224 if test $WITH_CURSES_H = yes; then
21225         cat >>headers.sh <<CF_EOF
21226 case \$DST in
21227 /*/include/*)
21228         END=\`basename \$DST\`
21229         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21230         do
21231                 NAME=\`basename \$i\`
21232                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21233         done
21234         ;;
21235 *)
21236         echo "" >> \$TMPSED
21237         ;;
21238 esac
21239 CF_EOF
21240
21241 else
21242         cat >>headers.sh <<CF_EOF
21243 case \$DST in
21244 /*/include/*)
21245         END=\`basename \$DST\`
21246         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21247         do
21248                 NAME=\`basename \$i\`
21249                 if test "\$NAME" = "curses.h"
21250                 then
21251                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21252                         NAME=ncurses.h
21253                 fi
21254                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21255         done
21256         ;;
21257 *)
21258         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21259         ;;
21260 esac
21261 CF_EOF
21262 fi
21263 cat >>headers.sh <<CF_EOF
21264 rm -f \$TMPSRC
21265 sed -f \$TMPSED \$SRC > \$TMPSRC
21266 NAME=\`basename \$SRC\`
21267 CF_EOF
21268 if test $WITH_CURSES_H != yes; then
21269         cat >>headers.sh <<CF_EOF
21270 test "\$NAME" = "curses.h" && NAME=ncurses.h
21271 CF_EOF
21272 fi
21273 cat >>headers.sh <<CF_EOF
21274 # Just in case someone gzip'd manpages, remove the conflicting copy.
21275 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21276
21277 eval \$PRG \$TMPSRC \$DST/\$NAME
21278 rm -f \$TMPSRC \$TMPSED
21279 CF_EOF
21280
21281 chmod 0755 headers.sh
21282
21283 for cf_dir in $SRC_SUBDIRS
21284 do
21285         if test ! -d $srcdir/$cf_dir ; then
21286                 continue
21287         fi
21288
21289         if test -f $srcdir/$cf_dir/headers; then
21290                 $AWK -f $srcdir/mk-hdr.awk \
21291                         subset="$LIB_SUBSETS" \
21292                         compat="$WITH_CURSES_H" \
21293                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21294         fi
21295
21296         if test -f $srcdir/$cf_dir/modules; then
21297                 if test "$cf_dir" != "c++" ; then
21298                         cat >>$cf_dir/Makefile <<"CF_EOF"
21299 depend : ${AUTO_SRC}
21300         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21301
21302 # DO NOT DELETE THIS LINE -- make depend depends on it.
21303 CF_EOF
21304                 fi
21305         fi
21306 done
21307
21308 if test "x$cf_with_ada" != xno ; then
21309 if test -z "$USE_OLD_MAKERULES" ; then
21310         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21311 fi
21312 fi
21313  ;;
21314   esac
21315 done
21316 EOF
21317
21318 cat >>$CONFIG_STATUS <<\EOF
21319
21320 { (exit 0); exit 0; }
21321 EOF
21322 chmod +x $CONFIG_STATUS
21323 ac_clean_files=$ac_clean_files_save
21324
21325 # configure is writing to config.log, and then calls config.status.
21326 # config.status does its own redirection, appending to config.log.
21327 # Unfortunately, on DOS this fails, as config.log is still kept open
21328 # by configure, so config.status won't be able to write to it; its
21329 # output is simply discarded.  So we exec the FD to /dev/null,
21330 # effectively closing config.log, so it can be properly (re)opened and
21331 # appended to by config.status.  When coming back to configure, we
21332 # need to make the FD available again.
21333 if test "$no_create" != yes; then
21334   ac_cs_success=:
21335   exec 5>/dev/null
21336   $SHELL $CONFIG_STATUS || ac_cs_success=false
21337   exec 5>>config.log
21338   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21339   # would make configure fail if this is the last instruction.
21340   $ac_cs_success || { (exit 1); exit 1; }
21341 fi
21342 ${MAKE:-make} preinstall