]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
17fd2115e74722582a134523dbc14b092c072c8c
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.541 .
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   --with-pkg-config-libdir=XXX use given directory for installing pc-files
706   --enable-pc-files       generate and install .pc files for pkg-config
707   --enable-mixed-case     tic should assume mixed-case filenames
708   --with-install-prefix   prefixes actual install-location ($DESTDIR)
709 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
710   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
711   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
712   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
713   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
714   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
715   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
716 Options to Specify the Libraries Built/Used:
717   --disable-libtool-version  enable to use libtool's incompatible naming scheme
718   --with-libtool          generate libraries with libtool
719   --with-shared           generate shared-libraries
720   --with-normal           generate normal-libraries (default)
721   --with-debug            generate debug-libraries (default)
722   --with-profile          generate profile-libraries
723   --with-lib-prefix       override library-prefix
724   --with-termlib          generate separate terminfo library
725   --with-ticlib           generate separate tic library
726   --with-gpm              use Alessandro Rubini's GPM library
727   --without-dlsym         do not use dlsym() to load GPM dynamically
728   --with-sysmouse         use sysmouse (FreeBSD console)
729   --enable-rpath          use rpath option when generating shared libraries
730   --disable-relink        relink shared libraries during install
731   --with-shlib-version=X  Specify rel or abi version for shared libs
732   --disable-rpath-hack    don't add rpath options for additional libraries
733 Fine-Tuning Your Configuration:
734   --disable-overwrite     leave out the link to -lcurses
735   --disable-database      do not use terminfo, only fallbacks/termcap
736   --with-database=XXX     specify terminfo source to install
737   --with-hashed-db        specify hashed-database library
738   --with-fallbacks=XXX    specify list of fallback terminal descriptions
739   --without-xterm-new     specify if xterm terminfo should be old version
740   --with-xterm-kbs=XXX     specify if xterm backspace sends BS or DEL
741   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
742   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
743   --disable-big-core      assume machine has little memory
744   --disable-big-strings   assume compiler has only standard-size strings
745   --enable-termcap        compile in termcap fallback support
746   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
747   --enable-getcap         fast termcap load, no xrefs to terminfo
748   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
749   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
750   --disable-root-environ  restrict environment when running as root
751   --enable-symlinks       make tic use symbolic links not hard links
752   --enable-broken_linker  compile with broken-linker support code
753   --enable-bsdpad         recognize BSD-style prefix padding
754   --enable-widec          compile with wide-char/UTF-8 code
755   --disable-lp64          allow chtype to be long (ignore _LP64)
756   --disable-largefile     omit support for large files
757   --disable-tparm-varargs compile tparm() without varargs interface
758   --disable-tic-depends   link tic library without explicit dependency on ncurses library
759   --with-bool=TYPE        override fallback type of bool variable
760   --with-caps=alt         compile with alternate Caps file
761   --with-chtype=TYPE      override type of chtype
762   --with-ospeed=TYPE      override type of ospeed variable
763   --with-mmask-t=TYPE     override type of mmask_t
764   --with-ccharw-max=XXX   override size CCHARW_MAX
765   --with-rcs-ids          compile-in RCS identifiers
766 Options to Specify How Manpages are Installed:
767   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
768                           optionally formatted/catonly, e.g., gzip,formatted
769   --with-manpage-renames  specify manpage-renaming
770   --with-manpage-aliases  specify manpage-aliases using .so
771   --with-manpage-symlinks specify manpage-aliases using symlinks
772   --with-manpage-tbl      specify manpage processing with tbl
773 Extensions:
774   --disable-ext-funcs     disable function-extensions
775   --enable-sp-funcs       enable experimental SCREEN-extensions
776   --enable-term-driver    enable experimental terminal-driver
777   --enable-const          compile with extra/non-standard const
778   --enable-ext-colors     compile for 256-color support
779   --enable-ext-mouse      compile for extended mouse-encoding
780   --enable-no-padding     compile with $NCURSES_NO_PADDING code
781   --enable-signed-char    compile using signed Boolean's in term.h
782   --enable-sigwinch       compile with SIGWINCH handler
783   --enable-tcap-names     compile with user-definable terminal capabilities
784 Development Code:
785   --without-develop       disable development options
786   --enable-hard-tabs      compile with hard-tabs code
787   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
788 Experimental Code:
789   --disable-assumed-color do not assume anything about default-colors
790   --disable-hashmap       compile without hashmap scrolling-optimization
791   --enable-colorfgbg      compile-in experimental $COLORFGBG code
792   --enable-interop        compile-in experimental interop bindings
793   --with-pthread          use POSIX thread library
794   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
795   --enable-weak-symbols   enable weak-symbols for pthreads
796   --enable-reentrant      compile with experimental reentrant code
797   --with-wrap-prefix=XXX  override prefix used for public variables
798   --enable-safe-sprintf   compile with experimental safe-sprintf code
799   --disable-scroll-hints  compile without scroll-hints code
800   --enable-wgetch-events  compile with experimental wgetch-events code
801 Testing/development Options:
802   --enable-echo           build: display "compiling" commands (default)
803   --enable-warnings       build: turn on GCC compiler warnings
804   --enable-assertions     test: turn on generation of assertion code
805   --with-dmalloc          test: use Gray Watson's dmalloc library
806   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
807   --with-valgrind         test: use valgrind
808   --disable-leaks         test: free permanent memory, analyze leaks
809   --enable-expanded       test: generate functions for certain macros
810   --disable-macros        test: use functions rather than macros
811   --with-trace            test: add trace() function to all models of ncurses
812 Ada95 Binding Options:
813   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
814   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
815   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
816   --with-ada-sharedlib=XX build Ada95 shared-library
817
818 Some influential environment variables:
819   CC          C compiler command
820   CFLAGS      C compiler flags
821   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
822               nonstandard directory <lib dir>
823   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
824               headers in a nonstandard directory <include dir>
825   CPP         C preprocessor
826   CXX         C++ compiler command
827   CXXFLAGS    C++ compiler flags
828   CXXCPP      C++ preprocessor
829
830 Use these variables to override the choices made by `configure' or to help
831 it to find libraries and programs with nonstandard names/locations.
832
833 EOF
834 fi
835
836 if test "$ac_init_help" = "recursive"; then
837   # If there are subdirs, report their specific --help.
838   ac_popdir=`pwd`
839   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
840     cd $ac_subdir
841     # A "../" for each directory in /$ac_subdir.
842     ac_dots=`echo $ac_subdir |
843              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
844
845     case $srcdir in
846     .) # No --srcdir option.  We are building in place.
847       ac_sub_srcdir=$srcdir ;;
848     [\\/]* | ?:[\\/]* ) # Absolute path.
849       ac_sub_srcdir=$srcdir/$ac_subdir ;;
850     *) # Relative path.
851       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
852     esac
853
854     # Check for guested configure; otherwise get Cygnus style configure.
855     if test -f $ac_sub_srcdir/configure.gnu; then
856       echo
857       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
858     elif test -f $ac_sub_srcdir/configure; then
859       echo
860       $SHELL $ac_sub_srcdir/configure  --help=recursive
861     elif test -f $ac_sub_srcdir/configure.ac ||
862            test -f $ac_sub_srcdir/configure.in; then
863       echo
864       $ac_configure --help
865     else
866       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
867     fi
868     cd $ac_popdir
869   done
870 fi
871
872 test -n "$ac_init_help" && exit 0
873 if $ac_init_version; then
874   cat <<\EOF
875
876 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
877 Free Software Foundation, Inc.
878 This configure script is free software; the Free Software Foundation
879 gives unlimited permission to copy, distribute and modify it.
880 EOF
881   exit 0
882 fi
883 exec 5>config.log
884 cat >&5 <<EOF
885 This file contains any messages produced by compilers while
886 running configure, to aid debugging if configure makes a mistake.
887
888 It was created by $as_me, which was
889 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
890
891   $ $0 $@
892
893 EOF
894 {
895 cat <<_ASUNAME
896 ## ---------- ##
897 ## Platform.  ##
898 ## ---------- ##
899
900 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
901 uname -m = `(uname -m) 2>/dev/null || echo unknown`
902 uname -r = `(uname -r) 2>/dev/null || echo unknown`
903 uname -s = `(uname -s) 2>/dev/null || echo unknown`
904 uname -v = `(uname -v) 2>/dev/null || echo unknown`
905
906 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
907 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
908
909 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
910 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
911 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
912 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
913 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
914 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
915 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
916
917 PATH = $PATH
918
919 _ASUNAME
920 } >&5
921
922 cat >&5 <<EOF
923 ## ------------ ##
924 ## Core tests.  ##
925 ## ------------ ##
926
927 EOF
928
929 # Keep a trace of the command line.
930 # Strip out --no-create and --no-recursion so they do not pile up.
931 # Also quote any args containing shell meta-characters.
932 ac_configure_args=
933 ac_sep=
934 for ac_arg
935 do
936   case $ac_arg in
937   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
938   | --no-cr | --no-c) ;;
939   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
940   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
941   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
942     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
943     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
944     ac_sep=" " ;;
945   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
946      ac_sep=" " ;;
947   esac
948   # Get rid of the leading space.
949 done
950
951 # When interrupted or exit'd, cleanup temporary files, and complete
952 # config.log.  We remove comments because anyway the quotes in there
953 # would cause problems or look ugly.
954 trap 'exit_status=$?
955   # Save into config.log some information that might help in debugging.
956   echo >&5
957   echo "## ----------------- ##" >&5
958   echo "## Cache variables.  ##" >&5
959   echo "## ----------------- ##" >&5
960   echo >&5
961   # The following way of writing the cache mishandles newlines in values,
962 {
963   (set) 2>&1 |
964     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
965     *ac_space=\ *)
966       sed -n \
967         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
968           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
969       ;;
970     *)
971       sed -n \
972         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
973       ;;
974     esac;
975 } >&5
976   sed "/^$/d" confdefs.h >conftest.log
977   if test -s conftest.log; then
978     echo >&5
979     echo "## ------------ ##" >&5
980     echo "## confdefs.h.  ##" >&5
981     echo "## ------------ ##" >&5
982     echo >&5
983     cat conftest.log >&5
984   fi
985   (echo; echo) >&5
986   test "$ac_signal" != 0 &&
987     echo "$as_me: caught signal $ac_signal" >&5
988   echo "$as_me: exit $exit_status" >&5
989   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
990     exit $exit_status
991      ' 0
992 for ac_signal in 1 2 13 15; do
993   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
994 done
995 ac_signal=0
996
997 # confdefs.h avoids OS command line length limits that DEFS can exceed.
998 rm -rf conftest* confdefs.h
999 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1000 echo >confdefs.h
1001
1002 # Let the site file select an alternate cache file if it wants to.
1003 # Prefer explicitly selected file to automatically selected ones.
1004 if test -z "$CONFIG_SITE"; then
1005   if test "x$prefix" != xNONE; then
1006     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1007   else
1008     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1009   fi
1010 fi
1011 for ac_site_file in $CONFIG_SITE; do
1012   if test -r "$ac_site_file"; then
1013     { echo "$as_me:1013: loading site script $ac_site_file" >&5
1014 echo "$as_me: loading site script $ac_site_file" >&6;}
1015     cat "$ac_site_file" >&5
1016     . "$ac_site_file"
1017   fi
1018 done
1019
1020 if test -r "$cache_file"; then
1021   # Some versions of bash will fail to source /dev/null (special
1022   # files actually), so we avoid doing that.
1023   if test -f "$cache_file"; then
1024     { echo "$as_me:1024: loading cache $cache_file" >&5
1025 echo "$as_me: loading cache $cache_file" >&6;}
1026     case $cache_file in
1027       [\\/]* | ?:[\\/]* ) . $cache_file;;
1028       *)                      . ./$cache_file;;
1029     esac
1030   fi
1031 else
1032   { echo "$as_me:1032: creating cache $cache_file" >&5
1033 echo "$as_me: creating cache $cache_file" >&6;}
1034   >$cache_file
1035 fi
1036
1037 # Check that the precious variables saved in the cache have kept the same
1038 # value.
1039 ac_cache_corrupted=false
1040 for ac_var in `(set) 2>&1 |
1041                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1042   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1043   eval ac_new_set=\$ac_env_${ac_var}_set
1044   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1045   eval ac_new_val="\$ac_env_${ac_var}_value"
1046   case $ac_old_set,$ac_new_set in
1047     set,)
1048       { echo "$as_me:1048: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1049 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1050       ac_cache_corrupted=: ;;
1051     ,set)
1052       { echo "$as_me:1052: error: \`$ac_var' was not set in the previous run" >&5
1053 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1054       ac_cache_corrupted=: ;;
1055     ,);;
1056     *)
1057       if test "x$ac_old_val" != "x$ac_new_val"; then
1058         { echo "$as_me:1058: error: \`$ac_var' has changed since the previous run:" >&5
1059 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1060         { echo "$as_me:1060:   former value:  $ac_old_val" >&5
1061 echo "$as_me:   former value:  $ac_old_val" >&2;}
1062         { echo "$as_me:1062:   current value: $ac_new_val" >&5
1063 echo "$as_me:   current value: $ac_new_val" >&2;}
1064         ac_cache_corrupted=:
1065       fi;;
1066   esac
1067   # Pass precious variables to config.status.  It doesn't matter if
1068   # we pass some twice (in addition to the command line arguments).
1069   if test "$ac_new_set" = set; then
1070     case $ac_new_val in
1071     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1072       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1073       ac_configure_args="$ac_configure_args '$ac_arg'"
1074       ;;
1075     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1076        ;;
1077     esac
1078   fi
1079 done
1080 if $ac_cache_corrupted; then
1081   { echo "$as_me:1081: error: changes in the environment can compromise the build" >&5
1082 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1083   { { echo "$as_me:1083: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1084 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1085    { (exit 1); exit 1; }; }
1086 fi
1087
1088 ac_ext=c
1089 ac_cpp='$CPP $CPPFLAGS'
1090 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1091 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1092 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1093 ac_main_return=return
1094
1095 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1096   *c*,-n*) ECHO_N= ECHO_C='
1097 ' ECHO_T='      ' ;;
1098   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1099   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1100 esac
1101 echo "#! $SHELL" >conftest.sh
1102 echo  "exit 0"   >>conftest.sh
1103 chmod +x conftest.sh
1104 if { (echo "$as_me:1104: PATH=\".;.\"; conftest.sh") >&5
1105   (PATH=".;."; conftest.sh) 2>&5
1106   ac_status=$?
1107   echo "$as_me:1107: \$? = $ac_status" >&5
1108   (exit $ac_status); }; then
1109   ac_path_separator=';'
1110 else
1111   ac_path_separator=:
1112 fi
1113 PATH_SEPARATOR="$ac_path_separator"
1114 rm -f conftest.sh
1115
1116 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1117
1118 top_builddir=`pwd`
1119
1120 echo "$as_me:1120: checking for egrep" >&5
1121 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1122 if test "${ac_cv_prog_egrep+set}" = set; then
1123   echo $ECHO_N "(cached) $ECHO_C" >&6
1124 else
1125   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1126     then ac_cv_prog_egrep='grep -E'
1127     else ac_cv_prog_egrep='egrep'
1128     fi
1129 fi
1130 echo "$as_me:1130: result: $ac_cv_prog_egrep" >&5
1131 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1132  EGREP=$ac_cv_prog_egrep
1133
1134 test -z "$EGREP" && { { echo "$as_me:1134: error: No egrep program found" >&5
1135 echo "$as_me: error: No egrep program found" >&2;}
1136    { (exit 1); exit 1; }; }
1137
1138 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1139 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1140 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1141 cf_cv_abi_version=${NCURSES_MAJOR}
1142 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1143 cf_cv_timestamp=`date`
1144 echo "$as_me:1144: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1145 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1146
1147 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1148
1149 # Check whether --with-rel-version or --without-rel-version was given.
1150 if test "${with_rel_version+set}" = set; then
1151   withval="$with_rel_version"
1152   { echo "$as_me:1152: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1153 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1154  cf_cv_rel_version=$withval
1155 fi;
1156
1157  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1158  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1159
1160 if test -n "$NCURSES_MAJOR" ; then
1161   case $NCURSES_MAJOR in #(vi
1162   [0-9]*) #(vi
1163         ;;
1164   *)
1165         { { echo "$as_me:1165: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1166 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1167    { (exit 1); exit 1; }; }
1168         ;;
1169   esac
1170 else
1171   { { echo "$as_me:1171: error: Release major-version value is empty" >&5
1172 echo "$as_me: error: Release major-version value is empty" >&2;}
1173    { (exit 1); exit 1; }; }
1174 fi
1175
1176 if test -n "$NCURSES_MINOR" ; then
1177   case $NCURSES_MINOR in #(vi
1178   [0-9]*) #(vi
1179         ;;
1180   *)
1181         { { echo "$as_me:1181: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1182 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1183    { (exit 1); exit 1; }; }
1184         ;;
1185   esac
1186 else
1187   { { echo "$as_me:1187: error: Release minor-version value is empty" >&5
1188 echo "$as_me: error: Release minor-version value is empty" >&2;}
1189    { (exit 1); exit 1; }; }
1190 fi
1191
1192 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1193
1194 # Check whether --with-abi-version or --without-abi-version was given.
1195 if test "${with_abi_version+set}" = set; then
1196   withval="$with_abi_version"
1197   { echo "$as_me:1197: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1198 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1199  cf_cv_abi_version=$withval
1200 fi;
1201
1202 if test -n "$cf_cv_abi_version" ; then
1203   case $cf_cv_abi_version in #(vi
1204   [0-9]*) #(vi
1205         ;;
1206   *)
1207         { { echo "$as_me:1207: error: ABI version is not a number: $cf_cv_abi_version" >&5
1208 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1209    { (exit 1); exit 1; }; }
1210         ;;
1211   esac
1212 else
1213   { { echo "$as_me:1213: error: ABI version value is empty" >&5
1214 echo "$as_me: error: ABI version value is empty" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 ac_aux_dir=
1219 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1220   if test -f $ac_dir/install-sh; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/install-sh -c"
1223     break
1224   elif test -f $ac_dir/install.sh; then
1225     ac_aux_dir=$ac_dir
1226     ac_install_sh="$ac_aux_dir/install.sh -c"
1227     break
1228   elif test -f $ac_dir/shtool; then
1229     ac_aux_dir=$ac_dir
1230     ac_install_sh="$ac_aux_dir/shtool install -c"
1231     break
1232   fi
1233 done
1234 if test -z "$ac_aux_dir"; then
1235   { { echo "$as_me:1235: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1236 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1237    { (exit 1); exit 1; }; }
1238 fi
1239 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1240 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1241 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1242
1243 # Make sure we can run config.sub.
1244 $ac_config_sub sun4 >/dev/null 2>&1 ||
1245   { { echo "$as_me:1245: error: cannot run $ac_config_sub" >&5
1246 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1247    { (exit 1); exit 1; }; }
1248
1249 echo "$as_me:1249: checking build system type" >&5
1250 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1251 if test "${ac_cv_build+set}" = set; then
1252   echo $ECHO_N "(cached) $ECHO_C" >&6
1253 else
1254   ac_cv_build_alias=$build_alias
1255 test -z "$ac_cv_build_alias" &&
1256   ac_cv_build_alias=`$ac_config_guess`
1257 test -z "$ac_cv_build_alias" &&
1258   { { echo "$as_me:1258: error: cannot guess build type; you must specify one" >&5
1259 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1260    { (exit 1); exit 1; }; }
1261 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1262   { { echo "$as_me:1262: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1263 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1264    { (exit 1); exit 1; }; }
1265
1266 fi
1267 echo "$as_me:1267: result: $ac_cv_build" >&5
1268 echo "${ECHO_T}$ac_cv_build" >&6
1269 build=$ac_cv_build
1270 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1271 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1272 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1273
1274 echo "$as_me:1274: checking host system type" >&5
1275 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1276 if test "${ac_cv_host+set}" = set; then
1277   echo $ECHO_N "(cached) $ECHO_C" >&6
1278 else
1279   ac_cv_host_alias=$host_alias
1280 test -z "$ac_cv_host_alias" &&
1281   ac_cv_host_alias=$ac_cv_build_alias
1282 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1283   { { echo "$as_me:1283: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1284 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1285    { (exit 1); exit 1; }; }
1286
1287 fi
1288 echo "$as_me:1288: result: $ac_cv_host" >&5
1289 echo "${ECHO_T}$ac_cv_host" >&6
1290 host=$ac_cv_host
1291 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1292 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1293 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1294
1295 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1296         echo "$as_me:1296: checking target system type" >&5
1297 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1298 if test "${ac_cv_target+set}" = set; then
1299   echo $ECHO_N "(cached) $ECHO_C" >&6
1300 else
1301   ac_cv_target_alias=$target_alias
1302 test "x$ac_cv_target_alias" = "x" &&
1303   ac_cv_target_alias=$ac_cv_host_alias
1304 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1305   { { echo "$as_me:1305: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1306 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1307    { (exit 1); exit 1; }; }
1308
1309 fi
1310 echo "$as_me:1310: result: $ac_cv_target" >&5
1311 echo "${ECHO_T}$ac_cv_target" >&6
1312 target=$ac_cv_target
1313 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1314 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1315 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1316
1317 # The aliases save the names the user supplied, while $host etc.
1318 # will get canonicalized.
1319 test -n "$target_alias" &&
1320   test "$program_prefix$program_suffix$program_transform_name" = \
1321     NONENONEs,x,x, &&
1322   program_prefix=${target_alias}-
1323         system_name="$host_os"
1324 else
1325         system_name="`(uname -s -r) 2>/dev/null`"
1326         if test -z "$system_name" ; then
1327                 system_name="`(hostname) 2>/dev/null`"
1328         fi
1329 fi
1330 test -n "$system_name" && cat >>confdefs.h <<EOF
1331 #define SYSTEM_NAME "$system_name"
1332 EOF
1333
1334 if test "${cf_cv_system_name+set}" = set; then
1335   echo $ECHO_N "(cached) $ECHO_C" >&6
1336 else
1337   cf_cv_system_name="$system_name"
1338 fi
1339
1340 test -z "$system_name" && system_name="$cf_cv_system_name"
1341 test -n "$cf_cv_system_name" && echo "$as_me:1341: result: Configuring for $cf_cv_system_name" >&5
1342 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1343
1344 if test ".$system_name" != ".$cf_cv_system_name" ; then
1345         echo "$as_me:1345: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1346 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1347         { { echo "$as_me:1347: error: \"Please remove config.cache and try again.\"" >&5
1348 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1349    { (exit 1); exit 1; }; }
1350 fi
1351
1352 # Check whether --with-system-type or --without-system-type was given.
1353 if test "${with_system_type+set}" = set; then
1354   withval="$with_system_type"
1355   { echo "$as_me:1355: WARNING: overriding system type to $withval" >&5
1356 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1357  cf_cv_system_name=$withval
1358 fi;
1359
1360 ###     Save the given $CFLAGS to allow user-override.
1361 cf_user_CFLAGS="$CFLAGS"
1362
1363 ###     Default install-location
1364
1365 echo "$as_me:1365: checking for prefix" >&5
1366 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1367 if test "x$prefix" = "xNONE" ; then
1368         case "$cf_cv_system_name" in
1369                 # non-vendor systems don't have a conflict
1370         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1371                 prefix=/usr
1372                 ;;
1373         *)      prefix=$ac_default_prefix
1374                 ;;
1375         esac
1376 fi
1377 echo "$as_me:1377: result: $prefix" >&5
1378 echo "${ECHO_T}$prefix" >&6
1379
1380 if test "x$prefix" = "xNONE" ; then
1381 echo "$as_me:1381: checking for default include-directory" >&5
1382 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1383 test -n "$verbose" && echo 1>&6
1384 for cf_symbol in \
1385         $includedir \
1386         $includedir/ncurses \
1387         $prefix/include \
1388         $prefix/include/ncurses \
1389         /usr/local/include \
1390         /usr/local/include/ncurses \
1391         /usr/include \
1392         /usr/include/ncurses
1393 do
1394         cf_dir=`eval echo $cf_symbol`
1395         if test -f $cf_dir/curses.h ; then
1396         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1397                 includedir="$cf_symbol"
1398                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1399                 break
1400         fi
1401         fi
1402         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1403 done
1404 echo "$as_me:1404: result: $includedir" >&5
1405 echo "${ECHO_T}$includedir" >&6
1406 fi
1407
1408 ###     Checks for programs.
1409 ac_ext=c
1410 ac_cpp='$CPP $CPPFLAGS'
1411 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1412 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1413 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1414 ac_main_return=return
1415 if test -n "$ac_tool_prefix"; then
1416   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1417 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1418 echo "$as_me:1418: checking for $ac_word" >&5
1419 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1420 if test "${ac_cv_prog_CC+set}" = set; then
1421   echo $ECHO_N "(cached) $ECHO_C" >&6
1422 else
1423   if test -n "$CC"; then
1424   ac_cv_prog_CC="$CC" # Let the user override the test.
1425 else
1426   ac_save_IFS=$IFS; IFS=$ac_path_separator
1427 ac_dummy="$PATH"
1428 for ac_dir in $ac_dummy; do
1429   IFS=$ac_save_IFS
1430   test -z "$ac_dir" && ac_dir=.
1431   $as_executable_p "$ac_dir/$ac_word" || continue
1432 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1433 echo "$as_me:1433: found $ac_dir/$ac_word" >&5
1434 break
1435 done
1436
1437 fi
1438 fi
1439 CC=$ac_cv_prog_CC
1440 if test -n "$CC"; then
1441   echo "$as_me:1441: result: $CC" >&5
1442 echo "${ECHO_T}$CC" >&6
1443 else
1444   echo "$as_me:1444: result: no" >&5
1445 echo "${ECHO_T}no" >&6
1446 fi
1447
1448 fi
1449 if test -z "$ac_cv_prog_CC"; then
1450   ac_ct_CC=$CC
1451   # Extract the first word of "gcc", so it can be a program name with args.
1452 set dummy gcc; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$ac_ct_CC"; then
1459   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_ac_ct_CC="gcc"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1475 if test -n "$ac_ct_CC"; then
1476   echo "$as_me:1476: result: $ac_ct_CC" >&5
1477 echo "${ECHO_T}$ac_ct_CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483   CC=$ac_ct_CC
1484 else
1485   CC="$ac_cv_prog_CC"
1486 fi
1487
1488 if test -z "$CC"; then
1489   if test -n "$ac_tool_prefix"; then
1490   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1491 set dummy ${ac_tool_prefix}cc; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$CC"; then
1498   ac_cv_prog_CC="$CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_CC="${ac_tool_prefix}cc"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 CC=$ac_cv_prog_CC
1514 if test -n "$CC"; then
1515   echo "$as_me:1515: result: $CC" >&5
1516 echo "${ECHO_T}$CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522 fi
1523 if test -z "$ac_cv_prog_CC"; then
1524   ac_ct_CC=$CC
1525   # Extract the first word of "cc", so it can be a program name with args.
1526 set dummy cc; ac_word=$2
1527 echo "$as_me:1527: checking for $ac_word" >&5
1528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1529 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1530   echo $ECHO_N "(cached) $ECHO_C" >&6
1531 else
1532   if test -n "$ac_ct_CC"; then
1533   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1534 else
1535   ac_save_IFS=$IFS; IFS=$ac_path_separator
1536 ac_dummy="$PATH"
1537 for ac_dir in $ac_dummy; do
1538   IFS=$ac_save_IFS
1539   test -z "$ac_dir" && ac_dir=.
1540   $as_executable_p "$ac_dir/$ac_word" || continue
1541 ac_cv_prog_ac_ct_CC="cc"
1542 echo "$as_me:1542: found $ac_dir/$ac_word" >&5
1543 break
1544 done
1545
1546 fi
1547 fi
1548 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1549 if test -n "$ac_ct_CC"; then
1550   echo "$as_me:1550: result: $ac_ct_CC" >&5
1551 echo "${ECHO_T}$ac_ct_CC" >&6
1552 else
1553   echo "$as_me:1553: result: no" >&5
1554 echo "${ECHO_T}no" >&6
1555 fi
1556
1557   CC=$ac_ct_CC
1558 else
1559   CC="$ac_cv_prog_CC"
1560 fi
1561
1562 fi
1563 if test -z "$CC"; then
1564   # Extract the first word of "cc", so it can be a program name with args.
1565 set dummy cc; ac_word=$2
1566 echo "$as_me:1566: checking for $ac_word" >&5
1567 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1568 if test "${ac_cv_prog_CC+set}" = set; then
1569   echo $ECHO_N "(cached) $ECHO_C" >&6
1570 else
1571   if test -n "$CC"; then
1572   ac_cv_prog_CC="$CC" # Let the user override the test.
1573 else
1574   ac_prog_rejected=no
1575   ac_save_IFS=$IFS; IFS=$ac_path_separator
1576 ac_dummy="$PATH"
1577 for ac_dir in $ac_dummy; do
1578   IFS=$ac_save_IFS
1579   test -z "$ac_dir" && ac_dir=.
1580   $as_executable_p "$ac_dir/$ac_word" || continue
1581 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1582   ac_prog_rejected=yes
1583   continue
1584 fi
1585 ac_cv_prog_CC="cc"
1586 echo "$as_me:1586: found $ac_dir/$ac_word" >&5
1587 break
1588 done
1589
1590 if test $ac_prog_rejected = yes; then
1591   # We found a bogon in the path, so make sure we never use it.
1592   set dummy $ac_cv_prog_CC
1593   shift
1594   if test $# != 0; then
1595     # We chose a different compiler from the bogus one.
1596     # However, it has the same basename, so the bogon will be chosen
1597     # first if we set CC to just the basename; use the full file name.
1598     shift
1599     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1600     shift
1601     ac_cv_prog_CC="$@"
1602   fi
1603 fi
1604 fi
1605 fi
1606 CC=$ac_cv_prog_CC
1607 if test -n "$CC"; then
1608   echo "$as_me:1608: result: $CC" >&5
1609 echo "${ECHO_T}$CC" >&6
1610 else
1611   echo "$as_me:1611: result: no" >&5
1612 echo "${ECHO_T}no" >&6
1613 fi
1614
1615 fi
1616 if test -z "$CC"; then
1617   if test -n "$ac_tool_prefix"; then
1618   for ac_prog in cl
1619   do
1620     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1621 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1622 echo "$as_me:1622: checking for $ac_word" >&5
1623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1624 if test "${ac_cv_prog_CC+set}" = set; then
1625   echo $ECHO_N "(cached) $ECHO_C" >&6
1626 else
1627   if test -n "$CC"; then
1628   ac_cv_prog_CC="$CC" # Let the user override the test.
1629 else
1630   ac_save_IFS=$IFS; IFS=$ac_path_separator
1631 ac_dummy="$PATH"
1632 for ac_dir in $ac_dummy; do
1633   IFS=$ac_save_IFS
1634   test -z "$ac_dir" && ac_dir=.
1635   $as_executable_p "$ac_dir/$ac_word" || continue
1636 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1637 echo "$as_me:1637: found $ac_dir/$ac_word" >&5
1638 break
1639 done
1640
1641 fi
1642 fi
1643 CC=$ac_cv_prog_CC
1644 if test -n "$CC"; then
1645   echo "$as_me:1645: result: $CC" >&5
1646 echo "${ECHO_T}$CC" >&6
1647 else
1648   echo "$as_me:1648: result: no" >&5
1649 echo "${ECHO_T}no" >&6
1650 fi
1651
1652     test -n "$CC" && break
1653   done
1654 fi
1655 if test -z "$CC"; then
1656   ac_ct_CC=$CC
1657   for ac_prog in cl
1658 do
1659   # Extract the first word of "$ac_prog", so it can be a program name with args.
1660 set dummy $ac_prog; ac_word=$2
1661 echo "$as_me:1661: checking for $ac_word" >&5
1662 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1663 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1664   echo $ECHO_N "(cached) $ECHO_C" >&6
1665 else
1666   if test -n "$ac_ct_CC"; then
1667   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1668 else
1669   ac_save_IFS=$IFS; IFS=$ac_path_separator
1670 ac_dummy="$PATH"
1671 for ac_dir in $ac_dummy; do
1672   IFS=$ac_save_IFS
1673   test -z "$ac_dir" && ac_dir=.
1674   $as_executable_p "$ac_dir/$ac_word" || continue
1675 ac_cv_prog_ac_ct_CC="$ac_prog"
1676 echo "$as_me:1676: found $ac_dir/$ac_word" >&5
1677 break
1678 done
1679
1680 fi
1681 fi
1682 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1683 if test -n "$ac_ct_CC"; then
1684   echo "$as_me:1684: result: $ac_ct_CC" >&5
1685 echo "${ECHO_T}$ac_ct_CC" >&6
1686 else
1687   echo "$as_me:1687: result: no" >&5
1688 echo "${ECHO_T}no" >&6
1689 fi
1690
1691   test -n "$ac_ct_CC" && break
1692 done
1693
1694   CC=$ac_ct_CC
1695 fi
1696
1697 fi
1698
1699 test -z "$CC" && { { echo "$as_me:1699: error: no acceptable cc found in \$PATH" >&5
1700 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1701    { (exit 1); exit 1; }; }
1702
1703 # Provide some information about the compiler.
1704 echo "$as_me:1704:" \
1705      "checking for C compiler version" >&5
1706 ac_compiler=`set X $ac_compile; echo $2`
1707 { (eval echo "$as_me:1707: \"$ac_compiler --version </dev/null >&5\"") >&5
1708   (eval $ac_compiler --version </dev/null >&5) 2>&5
1709   ac_status=$?
1710   echo "$as_me:1710: \$? = $ac_status" >&5
1711   (exit $ac_status); }
1712 { (eval echo "$as_me:1712: \"$ac_compiler -v </dev/null >&5\"") >&5
1713   (eval $ac_compiler -v </dev/null >&5) 2>&5
1714   ac_status=$?
1715   echo "$as_me:1715: \$? = $ac_status" >&5
1716   (exit $ac_status); }
1717 { (eval echo "$as_me:1717: \"$ac_compiler -V </dev/null >&5\"") >&5
1718   (eval $ac_compiler -V </dev/null >&5) 2>&5
1719   ac_status=$?
1720   echo "$as_me:1720: \$? = $ac_status" >&5
1721   (exit $ac_status); }
1722
1723 cat >conftest.$ac_ext <<_ACEOF
1724 #line 1724 "configure"
1725 #include "confdefs.h"
1726
1727 int
1728 main ()
1729 {
1730
1731   ;
1732   return 0;
1733 }
1734 _ACEOF
1735 ac_clean_files_save=$ac_clean_files
1736 ac_clean_files="$ac_clean_files a.out a.exe"
1737 # Try to create an executable without -o first, disregard a.out.
1738 # It will help us diagnose broken compilers, and finding out an intuition
1739 # of exeext.
1740 echo "$as_me:1740: checking for C compiler default output" >&5
1741 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1742 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1743 if { (eval echo "$as_me:1743: \"$ac_link_default\"") >&5
1744   (eval $ac_link_default) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); }; then
1748   # Find the output, starting from the most likely.  This scheme is
1749 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1750 # resort.
1751 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1752                 ls a.out conftest 2>/dev/null;
1753                 ls a.* conftest.* 2>/dev/null`; do
1754   case $ac_file in
1755     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1756     a.out ) # We found the default executable, but exeext='' is most
1757             # certainly right.
1758             break;;
1759     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1760           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1761           export ac_cv_exeext
1762           break;;
1763     * ) break;;
1764   esac
1765 done
1766 else
1767   echo "$as_me: failed program was:" >&5
1768 cat conftest.$ac_ext >&5
1769 { { echo "$as_me:1769: error: C compiler cannot create executables" >&5
1770 echo "$as_me: error: C compiler cannot create executables" >&2;}
1771    { (exit 77); exit 77; }; }
1772 fi
1773
1774 ac_exeext=$ac_cv_exeext
1775 echo "$as_me:1775: result: $ac_file" >&5
1776 echo "${ECHO_T}$ac_file" >&6
1777
1778 # Check the compiler produces executables we can run.  If not, either
1779 # the compiler is broken, or we cross compile.
1780 echo "$as_me:1780: checking whether the C compiler works" >&5
1781 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1782 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1783 # If not cross compiling, check that we can run a simple program.
1784 if test "$cross_compiling" != yes; then
1785   if { ac_try='./$ac_file'
1786   { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1787   (eval $ac_try) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); }; }; then
1791     cross_compiling=no
1792   else
1793     if test "$cross_compiling" = maybe; then
1794         cross_compiling=yes
1795     else
1796         { { echo "$as_me:1796: error: cannot run C compiled programs.
1797 If you meant to cross compile, use \`--host'." >&5
1798 echo "$as_me: error: cannot run C compiled programs.
1799 If you meant to cross compile, use \`--host'." >&2;}
1800    { (exit 1); exit 1; }; }
1801     fi
1802   fi
1803 fi
1804 echo "$as_me:1804: result: yes" >&5
1805 echo "${ECHO_T}yes" >&6
1806
1807 rm -f a.out a.exe conftest$ac_cv_exeext
1808 ac_clean_files=$ac_clean_files_save
1809 # Check the compiler produces executables we can run.  If not, either
1810 # the compiler is broken, or we cross compile.
1811 echo "$as_me:1811: checking whether we are cross compiling" >&5
1812 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1813 echo "$as_me:1813: result: $cross_compiling" >&5
1814 echo "${ECHO_T}$cross_compiling" >&6
1815
1816 echo "$as_me:1816: checking for executable suffix" >&5
1817 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1818 if { (eval echo "$as_me:1818: \"$ac_link\"") >&5
1819   (eval $ac_link) 2>&5
1820   ac_status=$?
1821   echo "$as_me:1821: \$? = $ac_status" >&5
1822   (exit $ac_status); }; then
1823   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1824 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1825 # work properly (i.e., refer to `conftest.exe'), while it won't with
1826 # `rm'.
1827 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1828   case $ac_file in
1829     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1830     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1831           export ac_cv_exeext
1832           break;;
1833     * ) break;;
1834   esac
1835 done
1836 else
1837   { { echo "$as_me:1837: error: cannot compute EXEEXT: cannot compile and link" >&5
1838 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1839    { (exit 1); exit 1; }; }
1840 fi
1841
1842 rm -f conftest$ac_cv_exeext
1843 echo "$as_me:1843: result: $ac_cv_exeext" >&5
1844 echo "${ECHO_T}$ac_cv_exeext" >&6
1845
1846 rm -f conftest.$ac_ext
1847 EXEEXT=$ac_cv_exeext
1848 ac_exeext=$EXEEXT
1849 echo "$as_me:1849: checking for object suffix" >&5
1850 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1851 if test "${ac_cv_objext+set}" = set; then
1852   echo $ECHO_N "(cached) $ECHO_C" >&6
1853 else
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857
1858 int
1859 main ()
1860 {
1861
1862   ;
1863   return 0;
1864 }
1865 _ACEOF
1866 rm -f conftest.o conftest.obj
1867 if { (eval echo "$as_me:1867: \"$ac_compile\"") >&5
1868   (eval $ac_compile) 2>&5
1869   ac_status=$?
1870   echo "$as_me:1870: \$? = $ac_status" >&5
1871   (exit $ac_status); }; then
1872   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1873   case $ac_file in
1874     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1875     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1876        break;;
1877   esac
1878 done
1879 else
1880   echo "$as_me: failed program was:" >&5
1881 cat conftest.$ac_ext >&5
1882 { { echo "$as_me:1882: error: cannot compute OBJEXT: cannot compile" >&5
1883 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1884    { (exit 1); exit 1; }; }
1885 fi
1886
1887 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1888 fi
1889 echo "$as_me:1889: result: $ac_cv_objext" >&5
1890 echo "${ECHO_T}$ac_cv_objext" >&6
1891 OBJEXT=$ac_cv_objext
1892 ac_objext=$OBJEXT
1893 echo "$as_me:1893: checking whether we are using the GNU C compiler" >&5
1894 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1895 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1896   echo $ECHO_N "(cached) $ECHO_C" >&6
1897 else
1898   cat >conftest.$ac_ext <<_ACEOF
1899 #line 1899 "configure"
1900 #include "confdefs.h"
1901
1902 int
1903 main ()
1904 {
1905 #ifndef __GNUC__
1906        choke me
1907 #endif
1908
1909   ;
1910   return 0;
1911 }
1912 _ACEOF
1913 rm -f conftest.$ac_objext
1914 if { (eval echo "$as_me:1914: \"$ac_compile\"") >&5
1915   (eval $ac_compile) 2>&5
1916   ac_status=$?
1917   echo "$as_me:1917: \$? = $ac_status" >&5
1918   (exit $ac_status); } &&
1919          { ac_try='test -s conftest.$ac_objext'
1920   { (eval echo "$as_me:1920: \"$ac_try\"") >&5
1921   (eval $ac_try) 2>&5
1922   ac_status=$?
1923   echo "$as_me:1923: \$? = $ac_status" >&5
1924   (exit $ac_status); }; }; then
1925   ac_compiler_gnu=yes
1926 else
1927   echo "$as_me: failed program was:" >&5
1928 cat conftest.$ac_ext >&5
1929 ac_compiler_gnu=no
1930 fi
1931 rm -f conftest.$ac_objext conftest.$ac_ext
1932 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1933
1934 fi
1935 echo "$as_me:1935: result: $ac_cv_c_compiler_gnu" >&5
1936 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1937 GCC=`test $ac_compiler_gnu = yes && echo yes`
1938 ac_test_CFLAGS=${CFLAGS+set}
1939 ac_save_CFLAGS=$CFLAGS
1940 CFLAGS="-g"
1941 echo "$as_me:1941: checking whether $CC accepts -g" >&5
1942 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1943 if test "${ac_cv_prog_cc_g+set}" = set; then
1944   echo $ECHO_N "(cached) $ECHO_C" >&6
1945 else
1946   cat >conftest.$ac_ext <<_ACEOF
1947 #line 1947 "configure"
1948 #include "confdefs.h"
1949
1950 int
1951 main ()
1952 {
1953
1954   ;
1955   return 0;
1956 }
1957 _ACEOF
1958 rm -f conftest.$ac_objext
1959 if { (eval echo "$as_me:1959: \"$ac_compile\"") >&5
1960   (eval $ac_compile) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit $ac_status); } &&
1964          { ac_try='test -s conftest.$ac_objext'
1965   { (eval echo "$as_me:1965: \"$ac_try\"") >&5
1966   (eval $ac_try) 2>&5
1967   ac_status=$?
1968   echo "$as_me:1968: \$? = $ac_status" >&5
1969   (exit $ac_status); }; }; then
1970   ac_cv_prog_cc_g=yes
1971 else
1972   echo "$as_me: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1974 ac_cv_prog_cc_g=no
1975 fi
1976 rm -f conftest.$ac_objext conftest.$ac_ext
1977 fi
1978 echo "$as_me:1978: result: $ac_cv_prog_cc_g" >&5
1979 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1980 if test "$ac_test_CFLAGS" = set; then
1981   CFLAGS=$ac_save_CFLAGS
1982 elif test $ac_cv_prog_cc_g = yes; then
1983   if test "$GCC" = yes; then
1984     CFLAGS="-g -O2"
1985   else
1986     CFLAGS="-g"
1987   fi
1988 else
1989   if test "$GCC" = yes; then
1990     CFLAGS="-O2"
1991   else
1992     CFLAGS=
1993   fi
1994 fi
1995 # Some people use a C++ compiler to compile C.  Since we use `exit',
1996 # in C++ we need to declare it.  In case someone uses the same compiler
1997 # for both compiling C and C++ we need to have the C++ compiler decide
1998 # the declaration of exit, since it's the most demanding environment.
1999 cat >conftest.$ac_ext <<_ACEOF
2000 #ifndef __cplusplus
2001   choke me
2002 #endif
2003 _ACEOF
2004 rm -f conftest.$ac_objext
2005 if { (eval echo "$as_me:2005: \"$ac_compile\"") >&5
2006   (eval $ac_compile) 2>&5
2007   ac_status=$?
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); } &&
2010          { ac_try='test -s conftest.$ac_objext'
2011   { (eval echo "$as_me:2011: \"$ac_try\"") >&5
2012   (eval $ac_try) 2>&5
2013   ac_status=$?
2014   echo "$as_me:2014: \$? = $ac_status" >&5
2015   (exit $ac_status); }; }; then
2016   for ac_declaration in \
2017    ''\
2018    '#include <stdlib.h>' \
2019    'extern "C" void std::exit (int) throw (); using std::exit;' \
2020    'extern "C" void std::exit (int); using std::exit;' \
2021    'extern "C" void exit (int) throw ();' \
2022    'extern "C" void exit (int);' \
2023    'void exit (int);'
2024 do
2025   cat >conftest.$ac_ext <<_ACEOF
2026 #line 2026 "configure"
2027 #include "confdefs.h"
2028 #include <stdlib.h>
2029 $ac_declaration
2030 int
2031 main ()
2032 {
2033 exit (42);
2034   ;
2035   return 0;
2036 }
2037 _ACEOF
2038 rm -f conftest.$ac_objext
2039 if { (eval echo "$as_me:2039: \"$ac_compile\"") >&5
2040   (eval $ac_compile) 2>&5
2041   ac_status=$?
2042   echo "$as_me:2042: \$? = $ac_status" >&5
2043   (exit $ac_status); } &&
2044          { ac_try='test -s conftest.$ac_objext'
2045   { (eval echo "$as_me:2045: \"$ac_try\"") >&5
2046   (eval $ac_try) 2>&5
2047   ac_status=$?
2048   echo "$as_me:2048: \$? = $ac_status" >&5
2049   (exit $ac_status); }; }; then
2050   :
2051 else
2052   echo "$as_me: failed program was:" >&5
2053 cat conftest.$ac_ext >&5
2054 continue
2055 fi
2056 rm -f conftest.$ac_objext conftest.$ac_ext
2057   cat >conftest.$ac_ext <<_ACEOF
2058 #line 2058 "configure"
2059 #include "confdefs.h"
2060 $ac_declaration
2061 int
2062 main ()
2063 {
2064 exit (42);
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f conftest.$ac_objext
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit $ac_status); } &&
2075          { ac_try='test -s conftest.$ac_objext'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit $ac_status); }; }; then
2081   break
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
2085 fi
2086 rm -f conftest.$ac_objext conftest.$ac_ext
2087 done
2088 rm -rf conftest*
2089 if test -n "$ac_declaration"; then
2090   echo '#ifdef __cplusplus' >>confdefs.h
2091   echo $ac_declaration      >>confdefs.h
2092   echo '#endif'             >>confdefs.h
2093 fi
2094
2095 else
2096   echo "$as_me: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 fi
2099 rm -f conftest.$ac_objext conftest.$ac_ext
2100 ac_ext=c
2101 ac_cpp='$CPP $CPPFLAGS'
2102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2105 ac_main_return=return
2106
2107 GCC_VERSION=none
2108 if test "$GCC" = yes ; then
2109         echo "$as_me:2109: checking version of $CC" >&5
2110 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2111         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2112         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2113         echo "$as_me:2113: result: $GCC_VERSION" >&5
2114 echo "${ECHO_T}$GCC_VERSION" >&6
2115 fi
2116
2117 ac_ext=c
2118 ac_cpp='$CPP $CPPFLAGS'
2119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2122 ac_main_return=return
2123 echo "$as_me:2123: checking how to run the C preprocessor" >&5
2124 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2125 # On Suns, sometimes $CPP names a directory.
2126 if test -n "$CPP" && test -d "$CPP"; then
2127   CPP=
2128 fi
2129 if test -z "$CPP"; then
2130   if test "${ac_cv_prog_CPP+set}" = set; then
2131   echo $ECHO_N "(cached) $ECHO_C" >&6
2132 else
2133       # Double quotes because CPP needs to be expanded
2134     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2135     do
2136       ac_preproc_ok=false
2137 for ac_c_preproc_warn_flag in '' yes
2138 do
2139   # Use a header file that comes with gcc, so configuring glibc
2140   # with a fresh cross-compiler works.
2141   # On the NeXT, cc -E runs the code through the compiler's parser,
2142   # not just through cpp. "Syntax error" is here to catch this case.
2143   cat >conftest.$ac_ext <<_ACEOF
2144 #line 2144 "configure"
2145 #include "confdefs.h"
2146 #include <assert.h>
2147                      Syntax error
2148 _ACEOF
2149 if { (eval echo "$as_me:2149: \"$ac_cpp conftest.$ac_ext\"") >&5
2150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2151   ac_status=$?
2152   egrep -v '^ *\+' conftest.er1 >conftest.err
2153   rm -f conftest.er1
2154   cat conftest.err >&5
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); } >/dev/null; then
2157   if test -s conftest.err; then
2158     ac_cpp_err=$ac_c_preproc_warn_flag
2159   else
2160     ac_cpp_err=
2161   fi
2162 else
2163   ac_cpp_err=yes
2164 fi
2165 if test -z "$ac_cpp_err"; then
2166   :
2167 else
2168   echo "$as_me: failed program was:" >&5
2169   cat conftest.$ac_ext >&5
2170   # Broken: fails on valid input.
2171 continue
2172 fi
2173 rm -f conftest.err conftest.$ac_ext
2174
2175   # OK, works on sane cases.  Now check whether non-existent headers
2176   # can be detected and how.
2177   cat >conftest.$ac_ext <<_ACEOF
2178 #line 2178 "configure"
2179 #include "confdefs.h"
2180 #include <ac_nonexistent.h>
2181 _ACEOF
2182 if { (eval echo "$as_me:2182: \"$ac_cpp conftest.$ac_ext\"") >&5
2183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2184   ac_status=$?
2185   egrep -v '^ *\+' conftest.er1 >conftest.err
2186   rm -f conftest.er1
2187   cat conftest.err >&5
2188   echo "$as_me:2188: \$? = $ac_status" >&5
2189   (exit $ac_status); } >/dev/null; then
2190   if test -s conftest.err; then
2191     ac_cpp_err=$ac_c_preproc_warn_flag
2192   else
2193     ac_cpp_err=
2194   fi
2195 else
2196   ac_cpp_err=yes
2197 fi
2198 if test -z "$ac_cpp_err"; then
2199   # Broken: success on invalid input.
2200 continue
2201 else
2202   echo "$as_me: failed program was:" >&5
2203   cat conftest.$ac_ext >&5
2204   # Passes both tests.
2205 ac_preproc_ok=:
2206 break
2207 fi
2208 rm -f conftest.err conftest.$ac_ext
2209
2210 done
2211 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2212 rm -f conftest.err conftest.$ac_ext
2213 if $ac_preproc_ok; then
2214   break
2215 fi
2216
2217     done
2218     ac_cv_prog_CPP=$CPP
2219
2220 fi
2221   CPP=$ac_cv_prog_CPP
2222 else
2223   ac_cv_prog_CPP=$CPP
2224 fi
2225 echo "$as_me:2225: result: $CPP" >&5
2226 echo "${ECHO_T}$CPP" >&6
2227 ac_preproc_ok=false
2228 for ac_c_preproc_warn_flag in '' yes
2229 do
2230   # Use a header file that comes with gcc, so configuring glibc
2231   # with a fresh cross-compiler works.
2232   # On the NeXT, cc -E runs the code through the compiler's parser,
2233   # not just through cpp. "Syntax error" is here to catch this case.
2234   cat >conftest.$ac_ext <<_ACEOF
2235 #line 2235 "configure"
2236 #include "confdefs.h"
2237 #include <assert.h>
2238                      Syntax error
2239 _ACEOF
2240 if { (eval echo "$as_me:2240: \"$ac_cpp conftest.$ac_ext\"") >&5
2241   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2242   ac_status=$?
2243   egrep -v '^ *\+' conftest.er1 >conftest.err
2244   rm -f conftest.er1
2245   cat conftest.err >&5
2246   echo "$as_me:2246: \$? = $ac_status" >&5
2247   (exit $ac_status); } >/dev/null; then
2248   if test -s conftest.err; then
2249     ac_cpp_err=$ac_c_preproc_warn_flag
2250   else
2251     ac_cpp_err=
2252   fi
2253 else
2254   ac_cpp_err=yes
2255 fi
2256 if test -z "$ac_cpp_err"; then
2257   :
2258 else
2259   echo "$as_me: failed program was:" >&5
2260   cat conftest.$ac_ext >&5
2261   # Broken: fails on valid input.
2262 continue
2263 fi
2264 rm -f conftest.err conftest.$ac_ext
2265
2266   # OK, works on sane cases.  Now check whether non-existent headers
2267   # can be detected and how.
2268   cat >conftest.$ac_ext <<_ACEOF
2269 #line 2269 "configure"
2270 #include "confdefs.h"
2271 #include <ac_nonexistent.h>
2272 _ACEOF
2273 if { (eval echo "$as_me:2273: \"$ac_cpp conftest.$ac_ext\"") >&5
2274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2275   ac_status=$?
2276   egrep -v '^ *\+' conftest.er1 >conftest.err
2277   rm -f conftest.er1
2278   cat conftest.err >&5
2279   echo "$as_me:2279: \$? = $ac_status" >&5
2280   (exit $ac_status); } >/dev/null; then
2281   if test -s conftest.err; then
2282     ac_cpp_err=$ac_c_preproc_warn_flag
2283   else
2284     ac_cpp_err=
2285   fi
2286 else
2287   ac_cpp_err=yes
2288 fi
2289 if test -z "$ac_cpp_err"; then
2290   # Broken: success on invalid input.
2291 continue
2292 else
2293   echo "$as_me: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   # Passes both tests.
2296 ac_preproc_ok=:
2297 break
2298 fi
2299 rm -f conftest.err conftest.$ac_ext
2300
2301 done
2302 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2303 rm -f conftest.err conftest.$ac_ext
2304 if $ac_preproc_ok; then
2305   :
2306 else
2307   { { echo "$as_me:2307: error: C preprocessor \"$CPP\" fails sanity check" >&5
2308 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2309    { (exit 1); exit 1; }; }
2310 fi
2311
2312 ac_ext=c
2313 ac_cpp='$CPP $CPPFLAGS'
2314 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2315 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2316 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2317 ac_main_return=return
2318
2319 if test $ac_cv_c_compiler_gnu = yes; then
2320     echo "$as_me:2320: checking whether $CC needs -traditional" >&5
2321 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2322 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2323   echo $ECHO_N "(cached) $ECHO_C" >&6
2324 else
2325     ac_pattern="Autoconf.*'x'"
2326   cat >conftest.$ac_ext <<_ACEOF
2327 #line 2327 "configure"
2328 #include "confdefs.h"
2329 #include <sgtty.h>
2330 int Autoconf = TIOCGETP;
2331 _ACEOF
2332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2333   egrep "$ac_pattern" >/dev/null 2>&1; then
2334   ac_cv_prog_gcc_traditional=yes
2335 else
2336   ac_cv_prog_gcc_traditional=no
2337 fi
2338 rm -rf conftest*
2339
2340   if test $ac_cv_prog_gcc_traditional = no; then
2341     cat >conftest.$ac_ext <<_ACEOF
2342 #line 2342 "configure"
2343 #include "confdefs.h"
2344 #include <termio.h>
2345 int Autoconf = TCGETA;
2346 _ACEOF
2347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2348   egrep "$ac_pattern" >/dev/null 2>&1; then
2349   ac_cv_prog_gcc_traditional=yes
2350 fi
2351 rm -rf conftest*
2352
2353   fi
2354 fi
2355 echo "$as_me:2355: result: $ac_cv_prog_gcc_traditional" >&5
2356 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2357   if test $ac_cv_prog_gcc_traditional = yes; then
2358     CC="$CC -traditional"
2359   fi
2360 fi
2361
2362 echo "$as_me:2362: checking whether $CC understands -c and -o together" >&5
2363 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2364 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2365   echo $ECHO_N "(cached) $ECHO_C" >&6
2366 else
2367
2368 cat > conftest.$ac_ext <<CF_EOF
2369 #include <stdio.h>
2370 int main()
2371 {
2372         ${cf_cv_main_return:-return}(0);
2373 }
2374 CF_EOF
2375 # We do the test twice because some compilers refuse to overwrite an
2376 # existing .o file with -o, though they will create one.
2377 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2378 if { (eval echo "$as_me:2378: \"$ac_try\"") >&5
2379   (eval $ac_try) 2>&5
2380   ac_status=$?
2381   echo "$as_me:2381: \$? = $ac_status" >&5
2382   (exit $ac_status); } &&
2383   test -f conftest2.$ac_objext && { (eval echo "$as_me:2383: \"$ac_try\"") >&5
2384   (eval $ac_try) 2>&5
2385   ac_status=$?
2386   echo "$as_me:2386: \$? = $ac_status" >&5
2387   (exit $ac_status); };
2388 then
2389   eval cf_cv_prog_CC_c_o=yes
2390 else
2391   eval cf_cv_prog_CC_c_o=no
2392 fi
2393 rm -rf conftest*
2394
2395 fi
2396 if test $cf_cv_prog_CC_c_o = yes; then
2397   echo "$as_me:2397: result: yes" >&5
2398 echo "${ECHO_T}yes" >&6
2399 else
2400   echo "$as_me:2400: result: no" >&5
2401 echo "${ECHO_T}no" >&6
2402 fi
2403
2404 echo "$as_me:2404: checking for POSIXized ISC" >&5
2405 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2406 if test -d /etc/conf/kconfig.d &&
2407    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2408 then
2409   echo "$as_me:2409: result: yes" >&5
2410 echo "${ECHO_T}yes" >&6
2411   ISC=yes # If later tests want to check for ISC.
2412
2413 cat >>confdefs.h <<\EOF
2414 #define _POSIX_SOURCE 1
2415 EOF
2416
2417   if test "$GCC" = yes; then
2418     CC="$CC -posix"
2419   else
2420     CC="$CC -Xp"
2421   fi
2422 else
2423   echo "$as_me:2423: result: no" >&5
2424 echo "${ECHO_T}no" >&6
2425   ISC=
2426 fi
2427
2428 # This should have been defined by AC_PROG_CC
2429 : ${CC:=cc}
2430
2431 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2432 # into CC.  This will not help with broken scripts that wrap the compiler with
2433 # options, but eliminates a more common category of user confusion.
2434 echo "$as_me:2434: checking \$CC variable" >&5
2435 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2436 case "$CC" in #(vi
2437 *[\ \   ]-[IUD]*)
2438         echo "$as_me:2438: result: broken" >&5
2439 echo "${ECHO_T}broken" >&6
2440         { echo "$as_me:2440: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2441 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2442         # humor him...
2443         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2444         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_flags
2452 do
2453 case $cf_fix_cppflags in
2454 no)
2455         case $cf_add_cflags in #(vi
2456         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2457                 case $cf_add_cflags in
2458                 -D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         elif test "${cf_tst_cflags}" = "\"'" ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         fi
2472                         ;;
2473                 esac
2474                 case "$CPPFLAGS" in
2475                 *$cf_add_cflags) #(vi
2476                         ;;
2477                 *) #(vi
2478                         case $cf_add_cflags in #(vi
2479                         -D*)
2480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2481
2482 CPPFLAGS=`echo "$CPPFLAGS" | \
2483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2485
2486                                 ;;
2487                         esac
2488                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2489                         ;;
2490                 esac
2491                 ;;
2492         *)
2493                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2494                 ;;
2495         esac
2496         ;;
2497 yes)
2498         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2499
2500         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2501
2502         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2503                 && test -z "${cf_tst_cflags}" \
2504                 && cf_fix_cppflags=no
2505         ;;
2506 esac
2507 done
2508
2509 if test -n "$cf_new_cflags" ; then
2510
2511         CFLAGS="$CFLAGS $cf_new_cflags"
2512 fi
2513
2514 if test -n "$cf_new_cppflags" ; then
2515
2516         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2517 fi
2518
2519 if test -n "$cf_new_extra_cppflags" ; then
2520
2521         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2522 fi
2523
2524         ;;
2525 *)
2526         echo "$as_me:2526: result: ok" >&5
2527 echo "${ECHO_T}ok" >&6
2528         ;;
2529 esac
2530
2531 echo "$as_me:2531: checking for ${CC:-cc} option to accept ANSI C" >&5
2532 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2533 if test "${cf_cv_ansi_cc+set}" = set; then
2534   echo $ECHO_N "(cached) $ECHO_C" >&6
2535 else
2536
2537 cf_cv_ansi_cc=no
2538 cf_save_CFLAGS="$CFLAGS"
2539 cf_save_CPPFLAGS="$CPPFLAGS"
2540 # Don't try gcc -ansi; that turns off useful extensions and
2541 # breaks some systems' header files.
2542 # AIX                   -qlanglvl=ansi
2543 # Ultrix and OSF/1      -std1
2544 # HP-UX                 -Aa -D_HPUX_SOURCE
2545 # SVR4                  -Xc
2546 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2547 for cf_arg in "-DCC_HAS_PROTOS" \
2548         "" \
2549         -qlanglvl=ansi \
2550         -std1 \
2551         -Ae \
2552         "-Aa -D_HPUX_SOURCE" \
2553         -Xc
2554 do
2555
2556 cf_fix_cppflags=no
2557 cf_new_cflags=
2558 cf_new_cppflags=
2559 cf_new_extra_cppflags=
2560
2561 for cf_add_cflags in $cf_arg
2562 do
2563 case $cf_fix_cppflags in
2564 no)
2565         case $cf_add_cflags in #(vi
2566         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2567                 case $cf_add_cflags in
2568                 -D*)
2569                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2570
2571                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2572                                 && test -z "${cf_tst_cflags}" \
2573                                 && cf_fix_cppflags=yes
2574
2575                         if test $cf_fix_cppflags = yes ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         elif test "${cf_tst_cflags}" = "\"'" ; then
2579                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2580                                 continue
2581                         fi
2582                         ;;
2583                 esac
2584                 case "$CPPFLAGS" in
2585                 *$cf_add_cflags) #(vi
2586                         ;;
2587                 *) #(vi
2588                         case $cf_add_cflags in #(vi
2589                         -D*)
2590                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2591
2592 CPPFLAGS=`echo "$CPPFLAGS" | \
2593         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2594                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2595
2596                                 ;;
2597                         esac
2598                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2599                         ;;
2600                 esac
2601                 ;;
2602         *)
2603                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2604                 ;;
2605         esac
2606         ;;
2607 yes)
2608         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2609
2610         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2611
2612         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2613                 && test -z "${cf_tst_cflags}" \
2614                 && cf_fix_cppflags=no
2615         ;;
2616 esac
2617 done
2618
2619 if test -n "$cf_new_cflags" ; then
2620
2621         CFLAGS="$CFLAGS $cf_new_cflags"
2622 fi
2623
2624 if test -n "$cf_new_cppflags" ; then
2625
2626         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2627 fi
2628
2629 if test -n "$cf_new_extra_cppflags" ; then
2630
2631         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2632 fi
2633
2634         cat >conftest.$ac_ext <<_ACEOF
2635 #line 2635 "configure"
2636 #include "confdefs.h"
2637
2638 #ifndef CC_HAS_PROTOS
2639 #if !defined(__STDC__) || (__STDC__ != 1)
2640 choke me
2641 #endif
2642 #endif
2643
2644 int
2645 main ()
2646 {
2647
2648         int test (int i, double x);
2649         struct s1 {int (*f) (int a);};
2650         struct s2 {int (*f) (double a);};
2651   ;
2652   return 0;
2653 }
2654 _ACEOF
2655 rm -f conftest.$ac_objext
2656 if { (eval echo "$as_me:2656: \"$ac_compile\"") >&5
2657   (eval $ac_compile) 2>&5
2658   ac_status=$?
2659   echo "$as_me:2659: \$? = $ac_status" >&5
2660   (exit $ac_status); } &&
2661          { ac_try='test -s conftest.$ac_objext'
2662   { (eval echo "$as_me:2662: \"$ac_try\"") >&5
2663   (eval $ac_try) 2>&5
2664   ac_status=$?
2665   echo "$as_me:2665: \$? = $ac_status" >&5
2666   (exit $ac_status); }; }; then
2667   cf_cv_ansi_cc="$cf_arg"; break
2668 else
2669   echo "$as_me: failed program was:" >&5
2670 cat conftest.$ac_ext >&5
2671 fi
2672 rm -f conftest.$ac_objext conftest.$ac_ext
2673 done
2674 CFLAGS="$cf_save_CFLAGS"
2675 CPPFLAGS="$cf_save_CPPFLAGS"
2676
2677 fi
2678 echo "$as_me:2678: result: $cf_cv_ansi_cc" >&5
2679 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2680
2681 if test "$cf_cv_ansi_cc" != "no"; then
2682 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2683
2684 cf_fix_cppflags=no
2685 cf_new_cflags=
2686 cf_new_cppflags=
2687 cf_new_extra_cppflags=
2688
2689 for cf_add_cflags in $cf_cv_ansi_cc
2690 do
2691 case $cf_fix_cppflags in
2692 no)
2693         case $cf_add_cflags in #(vi
2694         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2695                 case $cf_add_cflags in
2696                 -D*)
2697                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2698
2699                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2700                                 && test -z "${cf_tst_cflags}" \
2701                                 && cf_fix_cppflags=yes
2702
2703                         if test $cf_fix_cppflags = yes ; then
2704                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2705                                 continue
2706                         elif test "${cf_tst_cflags}" = "\"'" ; then
2707                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2708                                 continue
2709                         fi
2710                         ;;
2711                 esac
2712                 case "$CPPFLAGS" in
2713                 *$cf_add_cflags) #(vi
2714                         ;;
2715                 *) #(vi
2716                         case $cf_add_cflags in #(vi
2717                         -D*)
2718                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2719
2720 CPPFLAGS=`echo "$CPPFLAGS" | \
2721         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2722                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2723
2724                                 ;;
2725                         esac
2726                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2727                         ;;
2728                 esac
2729                 ;;
2730         *)
2731                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2732                 ;;
2733         esac
2734         ;;
2735 yes)
2736         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2737
2738         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2739
2740         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2741                 && test -z "${cf_tst_cflags}" \
2742                 && cf_fix_cppflags=no
2743         ;;
2744 esac
2745 done
2746
2747 if test -n "$cf_new_cflags" ; then
2748
2749         CFLAGS="$CFLAGS $cf_new_cflags"
2750 fi
2751
2752 if test -n "$cf_new_cppflags" ; then
2753
2754         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2755 fi
2756
2757 if test -n "$cf_new_extra_cppflags" ; then
2758
2759         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2760 fi
2761
2762 else
2763         cat >>confdefs.h <<\EOF
2764 #define CC_HAS_PROTOS 1
2765 EOF
2766
2767 fi
2768 fi
2769
2770 if test "$cf_cv_ansi_cc" = "no"; then
2771         { { echo "$as_me:2771: error: Your compiler does not appear to recognize prototypes.
2772 You have the following choices:
2773         a. adjust your compiler options
2774         b. get an up-to-date compiler
2775         c. use a wrapper such as unproto" >&5
2776 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2777 You have the following choices:
2778         a. adjust your compiler options
2779         b. get an up-to-date compiler
2780         c. use a wrapper such as unproto" >&2;}
2781    { (exit 1); exit 1; }; }
2782 fi
2783
2784 case $cf_cv_system_name in
2785 os2*)
2786     CFLAGS="$CFLAGS -Zmt"
2787     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2788     CXXFLAGS="$CXXFLAGS -Zmt"
2789     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2790     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2791     ac_cv_exeext=.exe
2792     ;;
2793 esac
2794
2795 PROG_EXT="$EXEEXT"
2796
2797 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2798 #define PROG_EXT "$PROG_EXT"
2799 EOF
2800
2801 if test "$cross_compiling" = yes ; then
2802   LDCONFIG=:
2803 else
2804 case "$cf_cv_system_name" in #(vi
2805 dragonfly*|mirbsd*|freebsd*) #(vi
2806   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2807   ;;
2808 *) LDPATH=$PATH:/sbin:/usr/sbin
2809   # Extract the first word of "ldconfig", so it can be a program name with args.
2810 set dummy ldconfig; ac_word=$2
2811 echo "$as_me:2811: checking for $ac_word" >&5
2812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2813 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2814   echo $ECHO_N "(cached) $ECHO_C" >&6
2815 else
2816   case $LDCONFIG in
2817   [\\/]* | ?:[\\/]*)
2818   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2819   ;;
2820   *)
2821   ac_save_IFS=$IFS; IFS=$ac_path_separator
2822 ac_dummy="$LDPATH"
2823 for ac_dir in $ac_dummy; do
2824   IFS=$ac_save_IFS
2825   test -z "$ac_dir" && ac_dir=.
2826   if $as_executable_p "$ac_dir/$ac_word"; then
2827    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2828    echo "$as_me:2828: found $ac_dir/$ac_word" >&5
2829    break
2830 fi
2831 done
2832
2833   ;;
2834 esac
2835 fi
2836 LDCONFIG=$ac_cv_path_LDCONFIG
2837
2838 if test -n "$LDCONFIG"; then
2839   echo "$as_me:2839: result: $LDCONFIG" >&5
2840 echo "${ECHO_T}$LDCONFIG" >&6
2841 else
2842   echo "$as_me:2842: result: no" >&5
2843 echo "${ECHO_T}no" >&6
2844 fi
2845
2846   ;;
2847 esac
2848 fi
2849
2850 echo "$as_me:2850: checking if you want to ensure bool is consistent with C++" >&5
2851 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2852
2853 # Check whether --with-cxx or --without-cxx was given.
2854 if test "${with_cxx+set}" = set; then
2855   withval="$with_cxx"
2856   cf_with_cxx=$withval
2857 else
2858   cf_with_cxx=yes
2859 fi;
2860 echo "$as_me:2860: result: $cf_with_cxx" >&5
2861 echo "${ECHO_T}$cf_with_cxx" >&6
2862 if test "X$cf_with_cxx" = Xno ; then
2863         CXX=""
2864         GXX=""
2865 else
2866         # with autoconf 2.13, we can change the error to a warning:
2867                 ac_ext=cc
2868 ac_cpp='$CXXCPP $CPPFLAGS'
2869 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2870 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2871 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2872 ac_main_return=return
2873 if test -n "$ac_tool_prefix"; then
2874   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2875   do
2876     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2877 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2878 echo "$as_me:2878: checking for $ac_word" >&5
2879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2880 if test "${ac_cv_prog_CXX+set}" = set; then
2881   echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883   if test -n "$CXX"; then
2884   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2885 else
2886   ac_save_IFS=$IFS; IFS=$ac_path_separator
2887 ac_dummy="$PATH"
2888 for ac_dir in $ac_dummy; do
2889   IFS=$ac_save_IFS
2890   test -z "$ac_dir" && ac_dir=.
2891   $as_executable_p "$ac_dir/$ac_word" || continue
2892 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2893 echo "$as_me:2893: found $ac_dir/$ac_word" >&5
2894 break
2895 done
2896
2897 fi
2898 fi
2899 CXX=$ac_cv_prog_CXX
2900 if test -n "$CXX"; then
2901   echo "$as_me:2901: result: $CXX" >&5
2902 echo "${ECHO_T}$CXX" >&6
2903 else
2904   echo "$as_me:2904: result: no" >&5
2905 echo "${ECHO_T}no" >&6
2906 fi
2907
2908     test -n "$CXX" && break
2909   done
2910 fi
2911 if test -z "$CXX"; then
2912   ac_ct_CXX=$CXX
2913   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2914 do
2915   # Extract the first word of "$ac_prog", so it can be a program name with args.
2916 set dummy $ac_prog; ac_word=$2
2917 echo "$as_me:2917: checking for $ac_word" >&5
2918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2919 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2920   echo $ECHO_N "(cached) $ECHO_C" >&6
2921 else
2922   if test -n "$ac_ct_CXX"; then
2923   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2924 else
2925   ac_save_IFS=$IFS; IFS=$ac_path_separator
2926 ac_dummy="$PATH"
2927 for ac_dir in $ac_dummy; do
2928   IFS=$ac_save_IFS
2929   test -z "$ac_dir" && ac_dir=.
2930   $as_executable_p "$ac_dir/$ac_word" || continue
2931 ac_cv_prog_ac_ct_CXX="$ac_prog"
2932 echo "$as_me:2932: found $ac_dir/$ac_word" >&5
2933 break
2934 done
2935
2936 fi
2937 fi
2938 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2939 if test -n "$ac_ct_CXX"; then
2940   echo "$as_me:2940: result: $ac_ct_CXX" >&5
2941 echo "${ECHO_T}$ac_ct_CXX" >&6
2942 else
2943   echo "$as_me:2943: result: no" >&5
2944 echo "${ECHO_T}no" >&6
2945 fi
2946
2947   test -n "$ac_ct_CXX" && break
2948 done
2949 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2950
2951   CXX=$ac_ct_CXX
2952 fi
2953
2954 # Provide some information about the compiler.
2955 echo "$as_me:2955:" \
2956      "checking for C++ compiler version" >&5
2957 ac_compiler=`set X $ac_compile; echo $2`
2958 { (eval echo "$as_me:2958: \"$ac_compiler --version </dev/null >&5\"") >&5
2959   (eval $ac_compiler --version </dev/null >&5) 2>&5
2960   ac_status=$?
2961   echo "$as_me:2961: \$? = $ac_status" >&5
2962   (exit $ac_status); }
2963 { (eval echo "$as_me:2963: \"$ac_compiler -v </dev/null >&5\"") >&5
2964   (eval $ac_compiler -v </dev/null >&5) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); }
2968 { (eval echo "$as_me:2968: \"$ac_compiler -V </dev/null >&5\"") >&5
2969   (eval $ac_compiler -V </dev/null >&5) 2>&5
2970   ac_status=$?
2971   echo "$as_me:2971: \$? = $ac_status" >&5
2972   (exit $ac_status); }
2973
2974 echo "$as_me:2974: checking whether we are using the GNU C++ compiler" >&5
2975 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2976 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2977   echo $ECHO_N "(cached) $ECHO_C" >&6
2978 else
2979   cat >conftest.$ac_ext <<_ACEOF
2980 #line 2980 "configure"
2981 #include "confdefs.h"
2982
2983 int
2984 main ()
2985 {
2986 #ifndef __GNUC__
2987        choke me
2988 #endif
2989
2990   ;
2991   return 0;
2992 }
2993 _ACEOF
2994 rm -f conftest.$ac_objext
2995 if { (eval echo "$as_me:2995: \"$ac_compile\"") >&5
2996   (eval $ac_compile) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); } &&
3000          { ac_try='test -s conftest.$ac_objext'
3001   { (eval echo "$as_me:3001: \"$ac_try\"") >&5
3002   (eval $ac_try) 2>&5
3003   ac_status=$?
3004   echo "$as_me:3004: \$? = $ac_status" >&5
3005   (exit $ac_status); }; }; then
3006   ac_compiler_gnu=yes
3007 else
3008   echo "$as_me: failed program was:" >&5
3009 cat conftest.$ac_ext >&5
3010 ac_compiler_gnu=no
3011 fi
3012 rm -f conftest.$ac_objext conftest.$ac_ext
3013 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3014
3015 fi
3016 echo "$as_me:3016: result: $ac_cv_cxx_compiler_gnu" >&5
3017 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3018 GXX=`test $ac_compiler_gnu = yes && echo yes`
3019 ac_test_CXXFLAGS=${CXXFLAGS+set}
3020 ac_save_CXXFLAGS=$CXXFLAGS
3021 CXXFLAGS="-g"
3022 echo "$as_me:3022: checking whether $CXX accepts -g" >&5
3023 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3024 if test "${ac_cv_prog_cxx_g+set}" = set; then
3025   echo $ECHO_N "(cached) $ECHO_C" >&6
3026 else
3027   cat >conftest.$ac_ext <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030
3031 int
3032 main ()
3033 {
3034
3035   ;
3036   return 0;
3037 }
3038 _ACEOF
3039 rm -f conftest.$ac_objext
3040 if { (eval echo "$as_me:3040: \"$ac_compile\"") >&5
3041   (eval $ac_compile) 2>&5
3042   ac_status=$?
3043   echo "$as_me:3043: \$? = $ac_status" >&5
3044   (exit $ac_status); } &&
3045          { ac_try='test -s conftest.$ac_objext'
3046   { (eval echo "$as_me:3046: \"$ac_try\"") >&5
3047   (eval $ac_try) 2>&5
3048   ac_status=$?
3049   echo "$as_me:3049: \$? = $ac_status" >&5
3050   (exit $ac_status); }; }; then
3051   ac_cv_prog_cxx_g=yes
3052 else
3053   echo "$as_me: failed program was:" >&5
3054 cat conftest.$ac_ext >&5
3055 ac_cv_prog_cxx_g=no
3056 fi
3057 rm -f conftest.$ac_objext conftest.$ac_ext
3058 fi
3059 echo "$as_me:3059: result: $ac_cv_prog_cxx_g" >&5
3060 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3061 if test "$ac_test_CXXFLAGS" = set; then
3062   CXXFLAGS=$ac_save_CXXFLAGS
3063 elif test $ac_cv_prog_cxx_g = yes; then
3064   if test "$GXX" = yes; then
3065     CXXFLAGS="-g -O2"
3066   else
3067     CXXFLAGS="-g"
3068   fi
3069 else
3070   if test "$GXX" = yes; then
3071     CXXFLAGS="-O2"
3072   else
3073     CXXFLAGS=
3074   fi
3075 fi
3076 for ac_declaration in \
3077    ''\
3078    '#include <stdlib.h>' \
3079    'extern "C" void std::exit (int) throw (); using std::exit;' \
3080    'extern "C" void std::exit (int); using std::exit;' \
3081    'extern "C" void exit (int) throw ();' \
3082    'extern "C" void exit (int);' \
3083    'void exit (int);'
3084 do
3085   cat >conftest.$ac_ext <<_ACEOF
3086 #line 3086 "configure"
3087 #include "confdefs.h"
3088 #include <stdlib.h>
3089 $ac_declaration
3090 int
3091 main ()
3092 {
3093 exit (42);
3094   ;
3095   return 0;
3096 }
3097 _ACEOF
3098 rm -f conftest.$ac_objext
3099 if { (eval echo "$as_me:3099: \"$ac_compile\"") >&5
3100   (eval $ac_compile) 2>&5
3101   ac_status=$?
3102   echo "$as_me:3102: \$? = $ac_status" >&5
3103   (exit $ac_status); } &&
3104          { ac_try='test -s conftest.$ac_objext'
3105   { (eval echo "$as_me:3105: \"$ac_try\"") >&5
3106   (eval $ac_try) 2>&5
3107   ac_status=$?
3108   echo "$as_me:3108: \$? = $ac_status" >&5
3109   (exit $ac_status); }; }; then
3110   :
3111 else
3112   echo "$as_me: failed program was:" >&5
3113 cat conftest.$ac_ext >&5
3114 continue
3115 fi
3116 rm -f conftest.$ac_objext conftest.$ac_ext
3117   cat >conftest.$ac_ext <<_ACEOF
3118 #line 3118 "configure"
3119 #include "confdefs.h"
3120 $ac_declaration
3121 int
3122 main ()
3123 {
3124 exit (42);
3125   ;
3126   return 0;
3127 }
3128 _ACEOF
3129 rm -f conftest.$ac_objext
3130 if { (eval echo "$as_me:3130: \"$ac_compile\"") >&5
3131   (eval $ac_compile) 2>&5
3132   ac_status=$?
3133   echo "$as_me:3133: \$? = $ac_status" >&5
3134   (exit $ac_status); } &&
3135          { ac_try='test -s conftest.$ac_objext'
3136   { (eval echo "$as_me:3136: \"$ac_try\"") >&5
3137   (eval $ac_try) 2>&5
3138   ac_status=$?
3139   echo "$as_me:3139: \$? = $ac_status" >&5
3140   (exit $ac_status); }; }; then
3141   break
3142 else
3143   echo "$as_me: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3145 fi
3146 rm -f conftest.$ac_objext conftest.$ac_ext
3147 done
3148 rm -rf conftest*
3149 if test -n "$ac_declaration"; then
3150   echo '#ifdef __cplusplus' >>confdefs.h
3151   echo $ac_declaration      >>confdefs.h
3152   echo '#endif'             >>confdefs.h
3153 fi
3154
3155 ac_ext=c
3156 ac_cpp='$CPP $CPPFLAGS'
3157 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3158 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3160 ac_main_return=return
3161
3162                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3163         if test "$CXX" = "g++" ; then
3164                 # Extract the first word of "g++", so it can be a program name with args.
3165 set dummy g++; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_path_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   case $CXX in
3172   [\\/]* | ?:[\\/]*)
3173   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3174   ;;
3175   *)
3176   ac_save_IFS=$IFS; IFS=$ac_path_separator
3177 ac_dummy="$PATH"
3178 for ac_dir in $ac_dummy; do
3179   IFS=$ac_save_IFS
3180   test -z "$ac_dir" && ac_dir=.
3181   if $as_executable_p "$ac_dir/$ac_word"; then
3182    ac_cv_path_CXX="$ac_dir/$ac_word"
3183    echo "$as_me:3183: found $ac_dir/$ac_word" >&5
3184    break
3185 fi
3186 done
3187
3188   ;;
3189 esac
3190 fi
3191 CXX=$ac_cv_path_CXX
3192
3193 if test -n "$CXX"; then
3194   echo "$as_me:3194: result: $CXX" >&5
3195 echo "${ECHO_T}$CXX" >&6
3196 else
3197   echo "$as_me:3197: result: no" >&5
3198 echo "${ECHO_T}no" >&6
3199 fi
3200
3201         fi
3202         if test "$CXX" = "g++" ; then
3203                 { echo "$as_me:3203: WARNING: ignoring hardcoded g++" >&5
3204 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3205                 cf_with_cxx=no; CXX=""; GXX="";
3206         fi
3207 fi
3208
3209 GXX_VERSION=none
3210 if test "$GXX" = yes; then
3211         echo "$as_me:3211: checking version of g++" >&5
3212 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3213         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3214         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3215         echo "$as_me:3215: result: $GXX_VERSION" >&5
3216 echo "${ECHO_T}$GXX_VERSION" >&6
3217 fi
3218
3219 case $GXX_VERSION in
3220 1*|2.[0-6]*)
3221         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3222         # cf_cxx_library=no
3223         { echo "$as_me:3223: WARNING: templates do not work" >&5
3224 echo "$as_me: WARNING: templates do not work" >&2;}
3225         ;;
3226 esac
3227
3228 echo "$as_me:3228: checking if you want to build C++ binding and demo" >&5
3229 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3230
3231 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3232 if test "${with_cxx_binding+set}" = set; then
3233   withval="$with_cxx_binding"
3234   cf_with_cxx_binding=$withval
3235 else
3236   cf_with_cxx_binding=$cf_with_cxx
3237 fi;
3238 echo "$as_me:3238: result: $cf_with_cxx_binding" >&5
3239 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3240
3241 echo "$as_me:3241: checking if you want to build with Ada95" >&5
3242 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3243
3244 # Check whether --with-ada or --without-ada was given.
3245 if test "${with_ada+set}" = set; then
3246   withval="$with_ada"
3247   cf_with_ada=$withval
3248 else
3249   cf_with_ada=yes
3250 fi;
3251 echo "$as_me:3251: result: $cf_with_ada" >&5
3252 echo "${ECHO_T}$cf_with_ada" >&6
3253
3254 echo "$as_me:3254: checking if you want to install manpages" >&5
3255 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3256
3257 # Check whether --with-manpages or --without-manpages was given.
3258 if test "${with_manpages+set}" = set; then
3259   withval="$with_manpages"
3260   cf_with_manpages=$withval
3261 else
3262   cf_with_manpages=yes
3263 fi;
3264 echo "$as_me:3264: result: $cf_with_manpages" >&5
3265 echo "${ECHO_T}$cf_with_manpages" >&6
3266
3267 echo "$as_me:3267: checking if you want to build programs such as tic" >&5
3268 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3269
3270 # Check whether --with-progs or --without-progs was given.
3271 if test "${with_progs+set}" = set; then
3272   withval="$with_progs"
3273   cf_with_progs=$withval
3274 else
3275   cf_with_progs=yes
3276 fi;
3277 echo "$as_me:3277: result: $cf_with_progs" >&5
3278 echo "${ECHO_T}$cf_with_progs" >&6
3279
3280 echo "$as_me:3280: checking if you want to build test-programs" >&5
3281 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3282
3283 # Check whether --with-tests or --without-tests was given.
3284 if test "${with_tests+set}" = set; then
3285   withval="$with_tests"
3286   cf_with_tests=$withval
3287 else
3288   cf_with_tests=yes
3289 fi;
3290 echo "$as_me:3290: result: $cf_with_tests" >&5
3291 echo "${ECHO_T}$cf_with_tests" >&6
3292
3293 echo "$as_me:3293: checking if you wish to install curses.h" >&5
3294 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3295
3296 # Check whether --with-curses-h or --without-curses-h was given.
3297 if test "${with_curses_h+set}" = set; then
3298   withval="$with_curses_h"
3299   with_curses_h=$withval
3300 else
3301   with_curses_h=yes
3302 fi;
3303 echo "$as_me:3303: result: $with_curses_h" >&5
3304 echo "${ECHO_T}$with_curses_h" >&6
3305
3306 modules_to_build="ncurses"
3307 if test "X$cf_with_progs" != Xno ; then
3308 modules_to_build="$modules_to_build progs tack"
3309 fi
3310 modules_to_build="$modules_to_build panel menu form"
3311
3312 test "$program_prefix" != NONE &&
3313   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3314 # Use a double $ so make ignores it.
3315 test "$program_suffix" != NONE &&
3316   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3317 # Double any \ or $.  echo might interpret backslashes.
3318 # By default was `s,x,x', remove it if useless.
3319 cat <<\_ACEOF >conftest.sed
3320 s/[\\$]/&&/g;s/;s,x,x,$//
3321 _ACEOF
3322 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3323 rm conftest.sed
3324
3325 for ac_prog in mawk gawk nawk awk
3326 do
3327   # Extract the first word of "$ac_prog", so it can be a program name with args.
3328 set dummy $ac_prog; ac_word=$2
3329 echo "$as_me:3329: checking for $ac_word" >&5
3330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3331 if test "${ac_cv_prog_AWK+set}" = set; then
3332   echo $ECHO_N "(cached) $ECHO_C" >&6
3333 else
3334   if test -n "$AWK"; then
3335   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3336 else
3337   ac_save_IFS=$IFS; IFS=$ac_path_separator
3338 ac_dummy="$PATH"
3339 for ac_dir in $ac_dummy; do
3340   IFS=$ac_save_IFS
3341   test -z "$ac_dir" && ac_dir=.
3342   $as_executable_p "$ac_dir/$ac_word" || continue
3343 ac_cv_prog_AWK="$ac_prog"
3344 echo "$as_me:3344: found $ac_dir/$ac_word" >&5
3345 break
3346 done
3347
3348 fi
3349 fi
3350 AWK=$ac_cv_prog_AWK
3351 if test -n "$AWK"; then
3352   echo "$as_me:3352: result: $AWK" >&5
3353 echo "${ECHO_T}$AWK" >&6
3354 else
3355   echo "$as_me:3355: result: no" >&5
3356 echo "${ECHO_T}no" >&6
3357 fi
3358
3359   test -n "$AWK" && break
3360 done
3361
3362 test -z "$AWK" && { { echo "$as_me:3362: error: No awk program found" >&5
3363 echo "$as_me: error: No awk program found" >&2;}
3364    { (exit 1); exit 1; }; }
3365
3366 echo "$as_me:3366: checking for egrep" >&5
3367 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3368 if test "${ac_cv_prog_egrep+set}" = set; then
3369   echo $ECHO_N "(cached) $ECHO_C" >&6
3370 else
3371   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3372     then ac_cv_prog_egrep='grep -E'
3373     else ac_cv_prog_egrep='egrep'
3374     fi
3375 fi
3376 echo "$as_me:3376: result: $ac_cv_prog_egrep" >&5
3377 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3378  EGREP=$ac_cv_prog_egrep
3379
3380 test -z "$EGREP" && { { echo "$as_me:3380: error: No egrep program found" >&5
3381 echo "$as_me: error: No egrep program found" >&2;}
3382    { (exit 1); exit 1; }; }
3383
3384 # Find a good install program.  We prefer a C program (faster),
3385 # so one script is as good as another.  But avoid the broken or
3386 # incompatible versions:
3387 # SysV /etc/install, /usr/sbin/install
3388 # SunOS /usr/etc/install
3389 # IRIX /sbin/install
3390 # AIX /bin/install
3391 # AmigaOS /C/install, which installs bootblocks on floppy discs
3392 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3393 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3394 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3395 # ./install, which can be erroneously created by make from ./install.sh.
3396 echo "$as_me:3396: checking for a BSD compatible install" >&5
3397 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3398 if test -z "$INSTALL"; then
3399 if test "${ac_cv_path_install+set}" = set; then
3400   echo $ECHO_N "(cached) $ECHO_C" >&6
3401 else
3402     ac_save_IFS=$IFS; IFS=$ac_path_separator
3403   for ac_dir in $PATH; do
3404     IFS=$ac_save_IFS
3405     # Account for people who put trailing slashes in PATH elements.
3406     case $ac_dir/ in
3407     / | ./ | .// | /cC/* \
3408     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3409     | /usr/ucb/* ) ;;
3410     *)
3411       # OSF1 and SCO ODT 3.0 have their own names for install.
3412       # Don't use installbsd from OSF since it installs stuff as root
3413       # by default.
3414       for ac_prog in ginstall scoinst install; do
3415         if $as_executable_p "$ac_dir/$ac_prog"; then
3416           if test $ac_prog = install &&
3417             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3418             # AIX install.  It has an incompatible calling convention.
3419             :
3420           elif test $ac_prog = install &&
3421             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3422             # program-specific install script used by HP pwplus--don't use.
3423             :
3424           else
3425             ac_cv_path_install="$ac_dir/$ac_prog -c"
3426             break 2
3427           fi
3428         fi
3429       done
3430       ;;
3431     esac
3432   done
3433
3434 fi
3435   if test "${ac_cv_path_install+set}" = set; then
3436     INSTALL=$ac_cv_path_install
3437   else
3438     # As a last resort, use the slow shell script.  We don't cache a
3439     # path for INSTALL within a source directory, because that will
3440     # break other packages using the cache if that directory is
3441     # removed, or if the path is relative.
3442     INSTALL=$ac_install_sh
3443   fi
3444 fi
3445 echo "$as_me:3445: result: $INSTALL" >&5
3446 echo "${ECHO_T}$INSTALL" >&6
3447
3448 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3449 # It thinks the first close brace ends the variable substitution.
3450 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3451
3452 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3453
3454 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3455
3456 case $INSTALL in
3457 /*)
3458   ;;
3459 *)
3460   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3461   test -z "$cf_dir" && cf_dir=.
3462   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3463   ;;
3464 esac
3465
3466 for ac_prog in tdlint lint alint splint lclint
3467 do
3468   # Extract the first word of "$ac_prog", so it can be a program name with args.
3469 set dummy $ac_prog; ac_word=$2
3470 echo "$as_me:3470: checking for $ac_word" >&5
3471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3472 if test "${ac_cv_prog_LINT+set}" = set; then
3473   echo $ECHO_N "(cached) $ECHO_C" >&6
3474 else
3475   if test -n "$LINT"; then
3476   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3477 else
3478   ac_save_IFS=$IFS; IFS=$ac_path_separator
3479 ac_dummy="$PATH"
3480 for ac_dir in $ac_dummy; do
3481   IFS=$ac_save_IFS
3482   test -z "$ac_dir" && ac_dir=.
3483   $as_executable_p "$ac_dir/$ac_word" || continue
3484 ac_cv_prog_LINT="$ac_prog"
3485 echo "$as_me:3485: found $ac_dir/$ac_word" >&5
3486 break
3487 done
3488
3489 fi
3490 fi
3491 LINT=$ac_cv_prog_LINT
3492 if test -n "$LINT"; then
3493   echo "$as_me:3493: result: $LINT" >&5
3494 echo "${ECHO_T}$LINT" >&6
3495 else
3496   echo "$as_me:3496: result: no" >&5
3497 echo "${ECHO_T}no" >&6
3498 fi
3499
3500   test -n "$LINT" && break
3501 done
3502
3503 echo "$as_me:3503: checking whether ln -s works" >&5
3504 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3505 LN_S=$as_ln_s
3506 if test "$LN_S" = "ln -s"; then
3507   echo "$as_me:3507: result: yes" >&5
3508 echo "${ECHO_T}yes" >&6
3509 else
3510   echo "$as_me:3510: result: no, using $LN_S" >&5
3511 echo "${ECHO_T}no, using $LN_S" >&6
3512 fi
3513
3514 echo "$as_me:3514: checking if $LN_S -f options work" >&5
3515 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3516
3517 rm -f conf$$.src conf$$dst
3518 echo >conf$$.dst
3519 echo first >conf$$.src
3520 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3521         cf_prog_ln_sf=yes
3522 else
3523         cf_prog_ln_sf=no
3524 fi
3525 rm -f conf$$.dst conf$$src
3526 echo "$as_me:3526: result: $cf_prog_ln_sf" >&5
3527 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3528
3529 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3530
3531 echo "$as_me:3531: checking for long file names" >&5
3532 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3533 if test "${ac_cv_sys_long_file_names+set}" = set; then
3534   echo $ECHO_N "(cached) $ECHO_C" >&6
3535 else
3536   ac_cv_sys_long_file_names=yes
3537 # Test for long file names in all the places we know might matter:
3538 #      .                the current directory, where building will happen
3539 #      $prefix/lib      where we will be installing things
3540 #      $exec_prefix/lib likewise
3541 # eval it to expand exec_prefix.
3542 #      $TMPDIR          if set, where it might want to write temporary files
3543 # if $TMPDIR is not set:
3544 #      /tmp             where it might want to write temporary files
3545 #      /var/tmp         likewise
3546 #      /usr/tmp         likewise
3547 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3548   ac_tmpdirs=$TMPDIR
3549 else
3550   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3551 fi
3552 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3553   test -d $ac_dir || continue
3554   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3555   ac_xdir=$ac_dir/cf$$
3556   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3557   ac_tf1=$ac_xdir/conftest9012345
3558   ac_tf2=$ac_xdir/conftest9012346
3559   (echo 1 >$ac_tf1) 2>/dev/null
3560   (echo 2 >$ac_tf2) 2>/dev/null
3561   ac_val=`cat $ac_tf1 2>/dev/null`
3562   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3563     ac_cv_sys_long_file_names=no
3564     rm -rf $ac_xdir 2>/dev/null
3565     break
3566   fi
3567   rm -rf $ac_xdir 2>/dev/null
3568 done
3569 fi
3570 echo "$as_me:3570: result: $ac_cv_sys_long_file_names" >&5
3571 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3572 if test $ac_cv_sys_long_file_names = yes; then
3573
3574 cat >>confdefs.h <<\EOF
3575 #define HAVE_LONG_FILE_NAMES 1
3576 EOF
3577
3578 fi
3579
3580 # if we find pkg-config, check if we should install the ".pc" files.
3581
3582 echo "$as_me:3582: checking if you want to use pkg-config" >&5
3583 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3584
3585 # Check whether --with-pkg-config or --without-pkg-config was given.
3586 if test "${with_pkg_config+set}" = set; then
3587   withval="$with_pkg_config"
3588   cf_pkg_config=$withval
3589 else
3590   cf_pkg_config=yes
3591 fi;
3592 echo "$as_me:3592: result: $cf_pkg_config" >&5
3593 echo "${ECHO_T}$cf_pkg_config" >&6
3594
3595 case $cf_pkg_config in #(vi
3596 no) #(vi
3597         PKG_CONFIG=none
3598         ;;
3599 yes) #(vi
3600
3601 if test -n "$ac_tool_prefix"; then
3602   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3603 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3604 echo "$as_me:3604: checking for $ac_word" >&5
3605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3606 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3607   echo $ECHO_N "(cached) $ECHO_C" >&6
3608 else
3609   case $PKG_CONFIG in
3610   [\\/]* | ?:[\\/]*)
3611   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3612   ;;
3613   *)
3614   ac_save_IFS=$IFS; IFS=$ac_path_separator
3615 ac_dummy="$PATH"
3616 for ac_dir in $ac_dummy; do
3617   IFS=$ac_save_IFS
3618   test -z "$ac_dir" && ac_dir=.
3619   if $as_executable_p "$ac_dir/$ac_word"; then
3620    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3621    echo "$as_me:3621: found $ac_dir/$ac_word" >&5
3622    break
3623 fi
3624 done
3625
3626   ;;
3627 esac
3628 fi
3629 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3630
3631 if test -n "$PKG_CONFIG"; then
3632   echo "$as_me:3632: result: $PKG_CONFIG" >&5
3633 echo "${ECHO_T}$PKG_CONFIG" >&6
3634 else
3635   echo "$as_me:3635: result: no" >&5
3636 echo "${ECHO_T}no" >&6
3637 fi
3638
3639 fi
3640 if test -z "$ac_cv_path_PKG_CONFIG"; then
3641   ac_pt_PKG_CONFIG=$PKG_CONFIG
3642   # Extract the first word of "pkg-config", so it can be a program name with args.
3643 set dummy pkg-config; ac_word=$2
3644 echo "$as_me:3644: checking for $ac_word" >&5
3645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3646 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3647   echo $ECHO_N "(cached) $ECHO_C" >&6
3648 else
3649   case $ac_pt_PKG_CONFIG in
3650   [\\/]* | ?:[\\/]*)
3651   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3652   ;;
3653   *)
3654   ac_save_IFS=$IFS; IFS=$ac_path_separator
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657   IFS=$ac_save_IFS
3658   test -z "$ac_dir" && ac_dir=.
3659   if $as_executable_p "$ac_dir/$ac_word"; then
3660    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3661    echo "$as_me:3661: found $ac_dir/$ac_word" >&5
3662    break
3663 fi
3664 done
3665
3666   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3667   ;;
3668 esac
3669 fi
3670 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3671
3672 if test -n "$ac_pt_PKG_CONFIG"; then
3673   echo "$as_me:3673: result: $ac_pt_PKG_CONFIG" >&5
3674 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3675 else
3676   echo "$as_me:3676: result: no" >&5
3677 echo "${ECHO_T}no" >&6
3678 fi
3679
3680   PKG_CONFIG=$ac_pt_PKG_CONFIG
3681 else
3682   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3683 fi
3684
3685         ;;
3686 *)
3687         PKG_CONFIG=$withval
3688         ;;
3689 esac
3690
3691 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3692 if test "$PKG_CONFIG" != none ; then
3693
3694 if test "x$prefix" != xNONE; then
3695   cf_path_syntax="$prefix"
3696 else
3697   cf_path_syntax="$ac_default_prefix"
3698 fi
3699
3700 case ".$PKG_CONFIG" in #(vi
3701 .\$\(*\)*|.\'*\'*) #(vi
3702   ;;
3703 ..|./*|.\\*) #(vi
3704   ;;
3705 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3706   ;;
3707 .\${*prefix}*) #(vi
3708   eval PKG_CONFIG="$PKG_CONFIG"
3709   case ".$PKG_CONFIG" in #(vi
3710   .NONE/*)
3711     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3712     ;;
3713   esac
3714   ;; #(vi
3715 .no|.NONE/*)
3716   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3717   ;;
3718 *)
3719   { { echo "$as_me:3719: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3720 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3721    { (exit 1); exit 1; }; }
3722   ;;
3723 esac
3724
3725 fi
3726
3727 if test "$PKG_CONFIG" != none ; then
3728         echo "$as_me:3728: checking for $PKG_CONFIG library directory" >&5
3729 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3730
3731 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3732 if test "${with_pkg_config_libdir+set}" = set; then
3733   withval="$with_pkg_config_libdir"
3734   PKG_CONFIG_LIBDIR=$withval
3735 else
3736   PKG_CONFIG_LIBDIR=yes
3737 fi;
3738
3739         case x$PKG_CONFIG_LIBDIR in #(vi
3740         x/*) #(vi
3741                 ;;
3742         xyes) #(vi
3743                 # look for the library directory using the same prefix as the executable
3744                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3745                 case x`(arch) 2>/dev/null` in #(vi
3746                 *64) #(vi
3747                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3748                         do
3749                                 if test -d $cf_config/pkgconfig
3750                                 then
3751                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3752                                         break
3753                                 fi
3754                         done
3755                         ;;
3756                 *)
3757                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3758                         ;;
3759                 esac
3760                 ;;
3761         *)
3762                 ;;
3763         esac
3764
3765         echo "$as_me:3765: result: $PKG_CONFIG_LIBDIR" >&5
3766 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3767 fi
3768
3769 if test "$PKG_CONFIG" != none ; then
3770         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3771                 echo "$as_me:3771: checking if we should install .pc files for $PKG_CONFIG" >&5
3772 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3773
3774 # Check whether --enable-pc-files or --disable-pc-files was given.
3775 if test "${enable_pc_files+set}" = set; then
3776   enableval="$enable_pc_files"
3777   enable_pc_files=$enableval
3778 else
3779   enable_pc_files=no
3780 fi;
3781                 echo "$as_me:3781: result: $enable_pc_files" >&5
3782 echo "${ECHO_T}$enable_pc_files" >&6
3783         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3784                 enable_pc_files=no
3785                 { echo "$as_me:3785: WARNING: did not find $PKG_CONFIG library" >&5
3786 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3787         fi
3788 else
3789         enable_pc_files=no
3790 fi
3791
3792 echo "$as_me:3792: checking if we should assume mixed-case filenames" >&5
3793 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3794
3795 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3796 if test "${enable_mixed_case+set}" = set; then
3797   enableval="$enable_mixed_case"
3798   enable_mixedcase=$enableval
3799 else
3800   enable_mixedcase=auto
3801 fi;
3802 echo "$as_me:3802: result: $enable_mixedcase" >&5
3803 echo "${ECHO_T}$enable_mixedcase" >&6
3804 if test "$enable_mixedcase" = "auto" ; then
3805
3806 echo "$as_me:3806: checking if filesystem supports mixed-case filenames" >&5
3807 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3808 if test "${cf_cv_mixedcase+set}" = set; then
3809   echo $ECHO_N "(cached) $ECHO_C" >&6
3810 else
3811
3812 if test "$cross_compiling" = yes ; then
3813         case $target_alias in #(vi
3814         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3815                 cf_cv_mixedcase=no
3816                 ;;
3817         *)
3818                 cf_cv_mixedcase=yes
3819                 ;;
3820         esac
3821 else
3822         rm -f conftest CONFTEST
3823         echo test >conftest
3824         if test -f CONFTEST ; then
3825                 cf_cv_mixedcase=no
3826         else
3827                 cf_cv_mixedcase=yes
3828         fi
3829         rm -f conftest CONFTEST
3830 fi
3831
3832 fi
3833 echo "$as_me:3833: result: $cf_cv_mixedcase" >&5
3834 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3835 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3836 #define MIXEDCASE_FILENAMES 1
3837 EOF
3838
3839 else
3840     cf_cv_mixedcase=$enable_mixedcase
3841     if test "$enable_mixedcase" = "yes" ; then
3842         cat >>confdefs.h <<\EOF
3843 #define MIXEDCASE_FILENAMES 1
3844 EOF
3845
3846     fi
3847 fi
3848
3849 # do this after mixed-case option (tags/TAGS is not as important as tic).
3850 echo "$as_me:3850: checking whether ${MAKE-make} sets \${MAKE}" >&5
3851 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3852 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3853 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3854   echo $ECHO_N "(cached) $ECHO_C" >&6
3855 else
3856   cat >conftest.make <<\EOF
3857 all:
3858         @echo 'ac_maketemp="${MAKE}"'
3859 EOF
3860 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3861 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3862 if test -n "$ac_maketemp"; then
3863   eval ac_cv_prog_make_${ac_make}_set=yes
3864 else
3865   eval ac_cv_prog_make_${ac_make}_set=no
3866 fi
3867 rm -f conftest.make
3868 fi
3869 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3870   echo "$as_me:3870: result: yes" >&5
3871 echo "${ECHO_T}yes" >&6
3872   SET_MAKE=
3873 else
3874   echo "$as_me:3874: result: no" >&5
3875 echo "${ECHO_T}no" >&6
3876   SET_MAKE="MAKE=${MAKE-make}"
3877 fi
3878
3879 for ac_prog in exctags ctags
3880 do
3881   # Extract the first word of "$ac_prog", so it can be a program name with args.
3882 set dummy $ac_prog; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_CTAGS+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$CTAGS"; then
3889   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_CTAGS="$ac_prog"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 CTAGS=$ac_cv_prog_CTAGS
3905 if test -n "$CTAGS"; then
3906   echo "$as_me:3906: result: $CTAGS" >&5
3907 echo "${ECHO_T}$CTAGS" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913   test -n "$CTAGS" && break
3914 done
3915
3916 for ac_prog in exetags etags
3917 do
3918   # Extract the first word of "$ac_prog", so it can be a program name with args.
3919 set dummy $ac_prog; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_ETAGS+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$ETAGS"; then
3926   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_ETAGS="$ac_prog"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939 fi
3940 fi
3941 ETAGS=$ac_cv_prog_ETAGS
3942 if test -n "$ETAGS"; then
3943   echo "$as_me:3943: result: $ETAGS" >&5
3944 echo "${ECHO_T}$ETAGS" >&6
3945 else
3946   echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3948 fi
3949
3950   test -n "$ETAGS" && break
3951 done
3952
3953 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3954 set dummy ${CTAGS:-ctags}; ac_word=$2
3955 echo "$as_me:3955: checking for $ac_word" >&5
3956 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3957 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3958   echo $ECHO_N "(cached) $ECHO_C" >&6
3959 else
3960   if test -n "$MAKE_LOWER_TAGS"; then
3961   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3962 else
3963   ac_save_IFS=$IFS; IFS=$ac_path_separator
3964 ac_dummy="$PATH"
3965 for ac_dir in $ac_dummy; do
3966   IFS=$ac_save_IFS
3967   test -z "$ac_dir" && ac_dir=.
3968   $as_executable_p "$ac_dir/$ac_word" || continue
3969 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3970 echo "$as_me:3970: found $ac_dir/$ac_word" >&5
3971 break
3972 done
3973
3974   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3975 fi
3976 fi
3977 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3978 if test -n "$MAKE_LOWER_TAGS"; then
3979   echo "$as_me:3979: result: $MAKE_LOWER_TAGS" >&5
3980 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3981 else
3982   echo "$as_me:3982: result: no" >&5
3983 echo "${ECHO_T}no" >&6
3984 fi
3985
3986 if test "$cf_cv_mixedcase" = yes ; then
3987         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3988 set dummy ${ETAGS:-etags}; ac_word=$2
3989 echo "$as_me:3989: checking for $ac_word" >&5
3990 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3991 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3992   echo $ECHO_N "(cached) $ECHO_C" >&6
3993 else
3994   if test -n "$MAKE_UPPER_TAGS"; then
3995   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3996 else
3997   ac_save_IFS=$IFS; IFS=$ac_path_separator
3998 ac_dummy="$PATH"
3999 for ac_dir in $ac_dummy; do
4000   IFS=$ac_save_IFS
4001   test -z "$ac_dir" && ac_dir=.
4002   $as_executable_p "$ac_dir/$ac_word" || continue
4003 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4004 echo "$as_me:4004: found $ac_dir/$ac_word" >&5
4005 break
4006 done
4007
4008   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4009 fi
4010 fi
4011 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4012 if test -n "$MAKE_UPPER_TAGS"; then
4013   echo "$as_me:4013: result: $MAKE_UPPER_TAGS" >&5
4014 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4015 else
4016   echo "$as_me:4016: result: no" >&5
4017 echo "${ECHO_T}no" >&6
4018 fi
4019
4020 else
4021         MAKE_UPPER_TAGS=no
4022 fi
4023
4024 if test "$MAKE_UPPER_TAGS" = yes ; then
4025         MAKE_UPPER_TAGS=
4026 else
4027         MAKE_UPPER_TAGS="#"
4028 fi
4029
4030 if test "$MAKE_LOWER_TAGS" = yes ; then
4031         MAKE_LOWER_TAGS=
4032 else
4033         MAKE_LOWER_TAGS="#"
4034 fi
4035
4036 echo "$as_me:4036: checking for makeflags variable" >&5
4037 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4038 if test "${cf_cv_makeflags+set}" = set; then
4039   echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041
4042         cf_cv_makeflags=''
4043         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4044         do
4045                 cat >cf_makeflags.tmp <<CF_EOF
4046 SHELL = /bin/sh
4047 all :
4048         @ echo '.$cf_option'
4049 CF_EOF
4050                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4051                 case "$cf_result" in
4052                 .*k)
4053                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4054                         case "$cf_result" in
4055                         .*CC=*) cf_cv_makeflags=
4056                                 ;;
4057                         *)      cf_cv_makeflags=$cf_option
4058                                 ;;
4059                         esac
4060                         break
4061                         ;;
4062                 .-)     ;;
4063                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4064                         ;;
4065                 esac
4066         done
4067         rm -f cf_makeflags.tmp
4068
4069 fi
4070 echo "$as_me:4070: result: $cf_cv_makeflags" >&5
4071 echo "${ECHO_T}$cf_cv_makeflags" >&6
4072
4073 if test -n "$ac_tool_prefix"; then
4074   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4075 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4076 echo "$as_me:4076: checking for $ac_word" >&5
4077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4078 if test "${ac_cv_prog_RANLIB+set}" = set; then
4079   echo $ECHO_N "(cached) $ECHO_C" >&6
4080 else
4081   if test -n "$RANLIB"; then
4082   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4083 else
4084   ac_save_IFS=$IFS; IFS=$ac_path_separator
4085 ac_dummy="$PATH"
4086 for ac_dir in $ac_dummy; do
4087   IFS=$ac_save_IFS
4088   test -z "$ac_dir" && ac_dir=.
4089   $as_executable_p "$ac_dir/$ac_word" || continue
4090 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4091 echo "$as_me:4091: found $ac_dir/$ac_word" >&5
4092 break
4093 done
4094
4095 fi
4096 fi
4097 RANLIB=$ac_cv_prog_RANLIB
4098 if test -n "$RANLIB"; then
4099   echo "$as_me:4099: result: $RANLIB" >&5
4100 echo "${ECHO_T}$RANLIB" >&6
4101 else
4102   echo "$as_me:4102: result: no" >&5
4103 echo "${ECHO_T}no" >&6
4104 fi
4105
4106 fi
4107 if test -z "$ac_cv_prog_RANLIB"; then
4108   ac_ct_RANLIB=$RANLIB
4109   # Extract the first word of "ranlib", so it can be a program name with args.
4110 set dummy ranlib; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$ac_ct_RANLIB"; then
4117   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4131 fi
4132 fi
4133 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4134 if test -n "$ac_ct_RANLIB"; then
4135   echo "$as_me:4135: result: $ac_ct_RANLIB" >&5
4136 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4137 else
4138   echo "$as_me:4138: result: no" >&5
4139 echo "${ECHO_T}no" >&6
4140 fi
4141
4142   RANLIB=$ac_ct_RANLIB
4143 else
4144   RANLIB="$ac_cv_prog_RANLIB"
4145 fi
4146
4147 if test -n "$ac_tool_prefix"; then
4148   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4149 set dummy ${ac_tool_prefix}ld; ac_word=$2
4150 echo "$as_me:4150: checking for $ac_word" >&5
4151 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4152 if test "${ac_cv_prog_LD+set}" = set; then
4153   echo $ECHO_N "(cached) $ECHO_C" >&6
4154 else
4155   if test -n "$LD"; then
4156   ac_cv_prog_LD="$LD" # Let the user override the test.
4157 else
4158   ac_save_IFS=$IFS; IFS=$ac_path_separator
4159 ac_dummy="$PATH"
4160 for ac_dir in $ac_dummy; do
4161   IFS=$ac_save_IFS
4162   test -z "$ac_dir" && ac_dir=.
4163   $as_executable_p "$ac_dir/$ac_word" || continue
4164 ac_cv_prog_LD="${ac_tool_prefix}ld"
4165 echo "$as_me:4165: found $ac_dir/$ac_word" >&5
4166 break
4167 done
4168
4169 fi
4170 fi
4171 LD=$ac_cv_prog_LD
4172 if test -n "$LD"; then
4173   echo "$as_me:4173: result: $LD" >&5
4174 echo "${ECHO_T}$LD" >&6
4175 else
4176   echo "$as_me:4176: result: no" >&5
4177 echo "${ECHO_T}no" >&6
4178 fi
4179
4180 fi
4181 if test -z "$ac_cv_prog_LD"; then
4182   ac_ct_LD=$LD
4183   # Extract the first word of "ld", so it can be a program name with args.
4184 set dummy ld; ac_word=$2
4185 echo "$as_me:4185: checking for $ac_word" >&5
4186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4187 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190   if test -n "$ac_ct_LD"; then
4191   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4192 else
4193   ac_save_IFS=$IFS; IFS=$ac_path_separator
4194 ac_dummy="$PATH"
4195 for ac_dir in $ac_dummy; do
4196   IFS=$ac_save_IFS
4197   test -z "$ac_dir" && ac_dir=.
4198   $as_executable_p "$ac_dir/$ac_word" || continue
4199 ac_cv_prog_ac_ct_LD="ld"
4200 echo "$as_me:4200: found $ac_dir/$ac_word" >&5
4201 break
4202 done
4203
4204   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4205 fi
4206 fi
4207 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4208 if test -n "$ac_ct_LD"; then
4209   echo "$as_me:4209: result: $ac_ct_LD" >&5
4210 echo "${ECHO_T}$ac_ct_LD" >&6
4211 else
4212   echo "$as_me:4212: result: no" >&5
4213 echo "${ECHO_T}no" >&6
4214 fi
4215
4216   LD=$ac_ct_LD
4217 else
4218   LD="$ac_cv_prog_LD"
4219 fi
4220
4221 if test -n "$ac_tool_prefix"; then
4222   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4223 set dummy ${ac_tool_prefix}ar; ac_word=$2
4224 echo "$as_me:4224: checking for $ac_word" >&5
4225 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4226 if test "${ac_cv_prog_AR+set}" = set; then
4227   echo $ECHO_N "(cached) $ECHO_C" >&6
4228 else
4229   if test -n "$AR"; then
4230   ac_cv_prog_AR="$AR" # Let the user override the test.
4231 else
4232   ac_save_IFS=$IFS; IFS=$ac_path_separator
4233 ac_dummy="$PATH"
4234 for ac_dir in $ac_dummy; do
4235   IFS=$ac_save_IFS
4236   test -z "$ac_dir" && ac_dir=.
4237   $as_executable_p "$ac_dir/$ac_word" || continue
4238 ac_cv_prog_AR="${ac_tool_prefix}ar"
4239 echo "$as_me:4239: found $ac_dir/$ac_word" >&5
4240 break
4241 done
4242
4243 fi
4244 fi
4245 AR=$ac_cv_prog_AR
4246 if test -n "$AR"; then
4247   echo "$as_me:4247: result: $AR" >&5
4248 echo "${ECHO_T}$AR" >&6
4249 else
4250   echo "$as_me:4250: result: no" >&5
4251 echo "${ECHO_T}no" >&6
4252 fi
4253
4254 fi
4255 if test -z "$ac_cv_prog_AR"; then
4256   ac_ct_AR=$AR
4257   # Extract the first word of "ar", so it can be a program name with args.
4258 set dummy ar; ac_word=$2
4259 echo "$as_me:4259: checking for $ac_word" >&5
4260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4261 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   if test -n "$ac_ct_AR"; then
4265   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4266 else
4267   ac_save_IFS=$IFS; IFS=$ac_path_separator
4268 ac_dummy="$PATH"
4269 for ac_dir in $ac_dummy; do
4270   IFS=$ac_save_IFS
4271   test -z "$ac_dir" && ac_dir=.
4272   $as_executable_p "$ac_dir/$ac_word" || continue
4273 ac_cv_prog_ac_ct_AR="ar"
4274 echo "$as_me:4274: found $ac_dir/$ac_word" >&5
4275 break
4276 done
4277
4278   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4279 fi
4280 fi
4281 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4282 if test -n "$ac_ct_AR"; then
4283   echo "$as_me:4283: result: $ac_ct_AR" >&5
4284 echo "${ECHO_T}$ac_ct_AR" >&6
4285 else
4286   echo "$as_me:4286: result: no" >&5
4287 echo "${ECHO_T}no" >&6
4288 fi
4289
4290   AR=$ac_ct_AR
4291 else
4292   AR="$ac_cv_prog_AR"
4293 fi
4294
4295 if test -n "$ac_tool_prefix"; then
4296   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4297 set dummy ${ac_tool_prefix}ar; ac_word=$2
4298 echo "$as_me:4298: checking for $ac_word" >&5
4299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4300 if test "${ac_cv_prog_AR+set}" = set; then
4301   echo $ECHO_N "(cached) $ECHO_C" >&6
4302 else
4303   if test -n "$AR"; then
4304   ac_cv_prog_AR="$AR" # Let the user override the test.
4305 else
4306   ac_save_IFS=$IFS; IFS=$ac_path_separator
4307 ac_dummy="$PATH"
4308 for ac_dir in $ac_dummy; do
4309   IFS=$ac_save_IFS
4310   test -z "$ac_dir" && ac_dir=.
4311   $as_executable_p "$ac_dir/$ac_word" || continue
4312 ac_cv_prog_AR="${ac_tool_prefix}ar"
4313 echo "$as_me:4313: found $ac_dir/$ac_word" >&5
4314 break
4315 done
4316
4317 fi
4318 fi
4319 AR=$ac_cv_prog_AR
4320 if test -n "$AR"; then
4321   echo "$as_me:4321: result: $AR" >&5
4322 echo "${ECHO_T}$AR" >&6
4323 else
4324   echo "$as_me:4324: result: no" >&5
4325 echo "${ECHO_T}no" >&6
4326 fi
4327
4328 fi
4329 if test -z "$ac_cv_prog_AR"; then
4330   ac_ct_AR=$AR
4331   # Extract the first word of "ar", so it can be a program name with args.
4332 set dummy ar; ac_word=$2
4333 echo "$as_me:4333: checking for $ac_word" >&5
4334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4335 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4336   echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338   if test -n "$ac_ct_AR"; then
4339   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4340 else
4341   ac_save_IFS=$IFS; IFS=$ac_path_separator
4342 ac_dummy="$PATH"
4343 for ac_dir in $ac_dummy; do
4344   IFS=$ac_save_IFS
4345   test -z "$ac_dir" && ac_dir=.
4346   $as_executable_p "$ac_dir/$ac_word" || continue
4347 ac_cv_prog_ac_ct_AR="ar"
4348 echo "$as_me:4348: found $ac_dir/$ac_word" >&5
4349 break
4350 done
4351
4352   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4353 fi
4354 fi
4355 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4356 if test -n "$ac_ct_AR"; then
4357   echo "$as_me:4357: result: $ac_ct_AR" >&5
4358 echo "${ECHO_T}$ac_ct_AR" >&6
4359 else
4360   echo "$as_me:4360: result: no" >&5
4361 echo "${ECHO_T}no" >&6
4362 fi
4363
4364   AR=$ac_ct_AR
4365 else
4366   AR="$ac_cv_prog_AR"
4367 fi
4368
4369 echo "$as_me:4369: checking for options to update archives" >&5
4370 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4371 if test "${cf_cv_ar_flags+set}" = set; then
4372   echo $ECHO_N "(cached) $ECHO_C" >&6
4373 else
4374
4375         cf_cv_ar_flags=unknown
4376         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4377         do
4378
4379                 # check if $ARFLAGS already contains this choice
4380                 if test "x$ARFLAGS" != "x" ; then
4381                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4382                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4383                                 cf_cv_ar_flags=
4384                                 break
4385                         fi
4386                 fi
4387
4388                 rm -f conftest.$ac_cv_objext
4389                 rm -f conftest.a
4390
4391                 cat >conftest.$ac_ext <<EOF
4392 #line 4392 "configure"
4393 int     testdata[3] = { 123, 456, 789 };
4394 EOF
4395                 if { (eval echo "$as_me:4395: \"$ac_compile\"") >&5
4396   (eval $ac_compile) 2>&5
4397   ac_status=$?
4398   echo "$as_me:4398: \$? = $ac_status" >&5
4399   (exit $ac_status); } ; then
4400                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4401                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4402                         if test -f conftest.a ; then
4403                                 cf_cv_ar_flags=$cf_ar_flags
4404                                 break
4405                         fi
4406                 else
4407                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4408
4409 echo "${as_me:-configure}:4409: testing cannot compile test-program ..." 1>&5
4410
4411                         break
4412                 fi
4413         done
4414         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4415
4416 fi
4417 echo "$as_me:4417: result: $cf_cv_ar_flags" >&5
4418 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4419
4420 if test -n "$ARFLAGS" ; then
4421         if test -n "$cf_cv_ar_flags" ; then
4422                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4423         fi
4424 else
4425         ARFLAGS=$cf_cv_ar_flags
4426 fi
4427
4428 echo "$as_me:4428: checking if you have specified an install-prefix" >&5
4429 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4430
4431 # Check whether --with-install-prefix or --without-install-prefix was given.
4432 if test "${with_install_prefix+set}" = set; then
4433   withval="$with_install_prefix"
4434   case "$withval" in #(vi
4435         yes|no) #(vi
4436                 ;;
4437         *)      DESTDIR="$withval"
4438                 ;;
4439         esac
4440 fi;
4441 echo "$as_me:4441: result: $DESTDIR" >&5
4442 echo "${ECHO_T}$DESTDIR" >&6
4443
4444 ###############################################################################
4445
4446 # If we're cross-compiling, allow the user to override the tools and their
4447 # options.  The configure script is oriented toward identifying the host
4448 # compiler, etc., but we need a build compiler to generate parts of the source.
4449
4450 if test "$cross_compiling" = yes ; then
4451
4452         # defaults that we might want to override
4453         : ${BUILD_CFLAGS:=''}
4454         : ${BUILD_CPPFLAGS:=''}
4455         : ${BUILD_LDFLAGS:=''}
4456         : ${BUILD_LIBS:=''}
4457         : ${BUILD_EXEEXT:='$x'}
4458         : ${BUILD_OBJEXT:='o'}
4459
4460 # Check whether --with-build-cc or --without-build-cc was given.
4461 if test "${with_build_cc+set}" = set; then
4462   withval="$with_build_cc"
4463   BUILD_CC="$withval"
4464 else
4465   for ac_prog in gcc cc cl
4466 do
4467   # Extract the first word of "$ac_prog", so it can be a program name with args.
4468 set dummy $ac_prog; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   if test -n "$BUILD_CC"; then
4475   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4476 else
4477   ac_save_IFS=$IFS; IFS=$ac_path_separator
4478 ac_dummy="$PATH"
4479 for ac_dir in $ac_dummy; do
4480   IFS=$ac_save_IFS
4481   test -z "$ac_dir" && ac_dir=.
4482   $as_executable_p "$ac_dir/$ac_word" || continue
4483 ac_cv_prog_BUILD_CC="$ac_prog"
4484 echo "$as_me:4484: found $ac_dir/$ac_word" >&5
4485 break
4486 done
4487
4488 fi
4489 fi
4490 BUILD_CC=$ac_cv_prog_BUILD_CC
4491 if test -n "$BUILD_CC"; then
4492   echo "$as_me:4492: result: $BUILD_CC" >&5
4493 echo "${ECHO_T}$BUILD_CC" >&6
4494 else
4495   echo "$as_me:4495: result: no" >&5
4496 echo "${ECHO_T}no" >&6
4497 fi
4498
4499   test -n "$BUILD_CC" && break
4500 done
4501
4502 fi;
4503         echo "$as_me:4503: checking for native build C compiler" >&5
4504 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4505         echo "$as_me:4505: result: $BUILD_CC" >&5
4506 echo "${ECHO_T}$BUILD_CC" >&6
4507
4508         echo "$as_me:4508: checking for native build C preprocessor" >&5
4509 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4510
4511 # Check whether --with-build-cpp or --without-build-cpp was given.
4512 if test "${with_build_cpp+set}" = set; then
4513   withval="$with_build_cpp"
4514   BUILD_CPP="$withval"
4515 else
4516   BUILD_CPP='${BUILD_CC} -E'
4517 fi;
4518         echo "$as_me:4518: result: $BUILD_CPP" >&5
4519 echo "${ECHO_T}$BUILD_CPP" >&6
4520
4521         echo "$as_me:4521: checking for native build C flags" >&5
4522 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4523
4524 # Check whether --with-build-cflags or --without-build-cflags was given.
4525 if test "${with_build_cflags+set}" = set; then
4526   withval="$with_build_cflags"
4527   BUILD_CFLAGS="$withval"
4528 fi;
4529         echo "$as_me:4529: result: $BUILD_CFLAGS" >&5
4530 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4531
4532         echo "$as_me:4532: checking for native build C preprocessor-flags" >&5
4533 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4534
4535 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4536 if test "${with_build_cppflags+set}" = set; then
4537   withval="$with_build_cppflags"
4538   BUILD_CPPFLAGS="$withval"
4539 fi;
4540         echo "$as_me:4540: result: $BUILD_CPPFLAGS" >&5
4541 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4542
4543         echo "$as_me:4543: checking for native build linker-flags" >&5
4544 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4545
4546 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4547 if test "${with_build_ldflags+set}" = set; then
4548   withval="$with_build_ldflags"
4549   BUILD_LDFLAGS="$withval"
4550 fi;
4551         echo "$as_me:4551: result: $BUILD_LDFLAGS" >&5
4552 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4553
4554         echo "$as_me:4554: checking for native build linker-libraries" >&5
4555 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4556
4557 # Check whether --with-build-libs or --without-build-libs was given.
4558 if test "${with_build_libs+set}" = set; then
4559   withval="$with_build_libs"
4560   BUILD_LIBS="$withval"
4561 fi;
4562         echo "$as_me:4562: result: $BUILD_LIBS" >&5
4563 echo "${ECHO_T}$BUILD_LIBS" >&6
4564
4565         # this assumes we're on Unix.
4566         BUILD_EXEEXT=
4567         BUILD_OBJEXT=o
4568
4569         : ${BUILD_CC:='${CC}'}
4570
4571         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4572                 { { echo "$as_me:4572: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&5
4574 echo "$as_me: error: Cross-build requires two compilers.
4575 Use --with-build-cc to specify the native compiler." >&2;}
4576    { (exit 1); exit 1; }; }
4577         fi
4578
4579 else
4580         : ${BUILD_CC:='${CC}'}
4581         : ${BUILD_CPP:='${CPP}'}
4582         : ${BUILD_CFLAGS:='${CFLAGS}'}
4583         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4584         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4585         : ${BUILD_LIBS:='${LIBS}'}
4586         : ${BUILD_EXEEXT:='$x'}
4587         : ${BUILD_OBJEXT:='o'}
4588 fi
4589
4590 ###############################################################################
4591
4592 ### Options to allow the user to specify the set of libraries which are used.
4593 ### Use "--without-normal --with-shared" to allow the default model to be
4594 ### shared, for example.
4595 cf_list_models=""
4596
4597 echo "$as_me:4597: checking if libtool -version-number should be used" >&5
4598 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4599
4600 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4601 if test "${enable_libtool_version+set}" = set; then
4602   enableval="$enable_libtool_version"
4603   test "$enableval" != no && enableval=yes
4604   if test "$enableval" != "yes" ; then
4605     cf_libtool_version=no
4606   else
4607     cf_libtool_version=yes
4608   fi
4609 else
4610   enableval=yes
4611   cf_libtool_version=yes
4612
4613 fi;
4614 echo "$as_me:4614: result: $cf_libtool_version" >&5
4615 echo "${ECHO_T}$cf_libtool_version" >&6
4616
4617 if test "$cf_libtool_version" = yes ; then
4618         LIBTOOL_VERSION="-version-number"
4619 else
4620         LIBTOOL_VERSION="-version-info"
4621 fi
4622
4623 LIBTOOL=
4624
4625 # common library maintenance symbols that are convenient for libtool scripts:
4626 LIB_CREATE='${AR} -cr'
4627 LIB_OBJECT='${OBJECTS}'
4628 LIB_SUFFIX=.a
4629 LIB_PREP="$RANLIB"
4630
4631 # symbols used to prop libtool up to enable it to determine what it should be
4632 # doing:
4633 LIB_CLEAN=
4634 LIB_COMPILE=
4635 LIB_LINK='${CC}'
4636 LIB_INSTALL=
4637 LIB_UNINSTALL=
4638
4639 echo "$as_me:4639: checking if you want to build libraries with libtool" >&5
4640 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4641
4642 # Check whether --with-libtool or --without-libtool was given.
4643 if test "${with_libtool+set}" = set; then
4644   withval="$with_libtool"
4645   with_libtool=$withval
4646 else
4647   with_libtool=no
4648 fi;
4649 echo "$as_me:4649: result: $with_libtool" >&5
4650 echo "${ECHO_T}$with_libtool" >&6
4651 if test "$with_libtool" != "no"; then
4652
4653         if test "$with_libtool" != "yes" ; then
4654
4655 if test "x$prefix" != xNONE; then
4656   cf_path_syntax="$prefix"
4657 else
4658   cf_path_syntax="$ac_default_prefix"
4659 fi
4660
4661 case ".$with_libtool" in #(vi
4662 .\$\(*\)*|.\'*\'*) #(vi
4663   ;;
4664 ..|./*|.\\*) #(vi
4665   ;;
4666 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4667   ;;
4668 .\${*prefix}*) #(vi
4669   eval with_libtool="$with_libtool"
4670   case ".$with_libtool" in #(vi
4671   .NONE/*)
4672     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4673     ;;
4674   esac
4675   ;; #(vi
4676 .no|.NONE/*)
4677   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4678   ;;
4679 *)
4680   { { echo "$as_me:4680: error: expected a pathname, not \"$with_libtool\"" >&5
4681 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4682    { (exit 1); exit 1; }; }
4683   ;;
4684 esac
4685
4686                 LIBTOOL=$with_libtool
4687         else
4688                 # Extract the first word of "libtool", so it can be a program name with args.
4689 set dummy libtool; ac_word=$2
4690 echo "$as_me:4690: checking for $ac_word" >&5
4691 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4692 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4693   echo $ECHO_N "(cached) $ECHO_C" >&6
4694 else
4695   case $LIBTOOL in
4696   [\\/]* | ?:[\\/]*)
4697   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4698   ;;
4699   *)
4700   ac_save_IFS=$IFS; IFS=$ac_path_separator
4701 ac_dummy="$PATH"
4702 for ac_dir in $ac_dummy; do
4703   IFS=$ac_save_IFS
4704   test -z "$ac_dir" && ac_dir=.
4705   if $as_executable_p "$ac_dir/$ac_word"; then
4706    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4707    echo "$as_me:4707: found $ac_dir/$ac_word" >&5
4708    break
4709 fi
4710 done
4711
4712   ;;
4713 esac
4714 fi
4715 LIBTOOL=$ac_cv_path_LIBTOOL
4716
4717 if test -n "$LIBTOOL"; then
4718   echo "$as_me:4718: result: $LIBTOOL" >&5
4719 echo "${ECHO_T}$LIBTOOL" >&6
4720 else
4721   echo "$as_me:4721: result: no" >&5
4722 echo "${ECHO_T}no" >&6
4723 fi
4724
4725         fi
4726         if test -z "$LIBTOOL" ; then
4727                 { { echo "$as_me:4727: error: Cannot find libtool" >&5
4728 echo "$as_me: error: Cannot find libtool" >&2;}
4729    { (exit 1); exit 1; }; }
4730         fi
4731         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4732         LIB_OBJECT='${OBJECTS:.o=.lo}'
4733         LIB_SUFFIX=.la
4734         LIB_CLEAN='${LIBTOOL} --mode=clean'
4735         LIB_COMPILE='${LIBTOOL} --mode=compile'
4736         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4737         LIB_INSTALL='${LIBTOOL} --mode=install'
4738         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4739         LIB_PREP=:
4740
4741         # Show the version of libtool
4742         echo "$as_me:4742: checking version of libtool" >&5
4743 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4744
4745         # Save the version in a cache variable - this is not entirely a good
4746         # thing, but the version string from libtool is very ugly, and for
4747         # bug reports it might be useful to have the original string. "("
4748         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.].*//'`
4749         echo "$as_me:4749: result: $cf_cv_libtool_version" >&5
4750 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4751         if test -z "$cf_cv_libtool_version" ; then
4752                 { { echo "$as_me:4752: error: This is not GNU libtool" >&5
4753 echo "$as_me: error: This is not GNU libtool" >&2;}
4754    { (exit 1); exit 1; }; }
4755         fi
4756
4757         # special hack to add -no-undefined (which libtool should do for itself)
4758         LT_UNDEF=
4759         case "$cf_cv_system_name" in #(vi
4760         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4761                 LT_UNDEF=-no-undefined
4762                 ;;
4763         esac
4764
4765         # special hack to add --tag option for C++ compiler
4766         case $cf_cv_libtool_version in #(vi
4767         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4768                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4769                 LIBTOOL="$LIBTOOL --tag=CC"
4770                 ;;
4771         *)
4772                 LIBTOOL_CXX="$LIBTOOL"
4773                 ;;
4774         esac
4775 else
4776         LIBTOOL=""
4777         LIBTOOL_CXX=""
4778 fi
4779
4780 test -z "$LIBTOOL" && ECHO_LT=
4781
4782 if test "$with_libtool" != "no" ; then
4783
4784 cf_list_models="$cf_list_models libtool"
4785
4786 else
4787
4788 echo "$as_me:4788: checking if you want to build shared libraries" >&5
4789 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4790
4791 # Check whether --with-shared or --without-shared was given.
4792 if test "${with_shared+set}" = set; then
4793   withval="$with_shared"
4794   with_shared=$withval
4795 else
4796   with_shared=no
4797 fi;
4798 echo "$as_me:4798: result: $with_shared" >&5
4799 echo "${ECHO_T}$with_shared" >&6
4800 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4801
4802 echo "$as_me:4802: checking if you want to build static libraries" >&5
4803 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4804
4805 # Check whether --with-normal or --without-normal was given.
4806 if test "${with_normal+set}" = set; then
4807   withval="$with_normal"
4808   with_normal=$withval
4809 else
4810   with_normal=yes
4811 fi;
4812 echo "$as_me:4812: result: $with_normal" >&5
4813 echo "${ECHO_T}$with_normal" >&6
4814 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4815
4816 echo "$as_me:4816: checking if you want to build debug libraries" >&5
4817 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4818
4819 # Check whether --with-debug or --without-debug was given.
4820 if test "${with_debug+set}" = set; then
4821   withval="$with_debug"
4822   with_debug=$withval
4823 else
4824   with_debug=yes
4825 fi;
4826 echo "$as_me:4826: result: $with_debug" >&5
4827 echo "${ECHO_T}$with_debug" >&6
4828 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4829
4830 echo "$as_me:4830: checking if you want to build profiling libraries" >&5
4831 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4832
4833 # Check whether --with-profile or --without-profile was given.
4834 if test "${with_profile+set}" = set; then
4835   withval="$with_profile"
4836   with_profile=$withval
4837 else
4838   with_profile=no
4839 fi;
4840 echo "$as_me:4840: result: $with_profile" >&5
4841 echo "${ECHO_T}$with_profile" >&6
4842 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4843
4844 fi
4845
4846 ###############################################################################
4847
4848 echo "$as_me:4848: checking for specified models" >&5
4849 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4850 test -z "$cf_list_models" && cf_list_models=normal
4851 test "$with_libtool" != "no" && cf_list_models=libtool
4852 echo "$as_me:4852: result: $cf_list_models" >&5
4853 echo "${ECHO_T}$cf_list_models" >&6
4854
4855 ### Use the first model as the default, and save its suffix for use in building
4856 ### up test-applications.
4857 echo "$as_me:4857: checking for default model" >&5
4858 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4859 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4860 echo "$as_me:4860: result: $DFT_LWR_MODEL" >&5
4861 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4862
4863 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4864
4865 TICS_NAME=tic
4866
4867 TINFO_NAME=tinfo
4868
4869 LIB_NAME=ncurses
4870
4871 LIB_DIR=../lib
4872 LIB_2ND=../../lib
4873
4874 echo "$as_me:4874: checking if you want to have a library-prefix" >&5
4875 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4876
4877 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4878 if test "${with_lib_prefix+set}" = set; then
4879   withval="$with_lib_prefix"
4880   with_lib_prefix=$withval
4881 else
4882   with_lib_prefix=auto
4883 fi;
4884 echo "$as_me:4884: result: $with_lib_prefix" >&5
4885 echo "${ECHO_T}$with_lib_prefix" >&6
4886
4887 if test $with_lib_prefix = auto
4888 then
4889
4890         case $cf_cv_system_name in #(vi
4891         OS/2*|os2*) #(vi
4892         LIB_PREFIX=''
4893         ;;
4894         *)      LIB_PREFIX='lib'
4895         ;;
4896         esac
4897 cf_prefix=$LIB_PREFIX
4898
4899 elif test $with_lib_prefix = no
4900 then
4901         LIB_PREFIX=
4902 else
4903         LIB_PREFIX=$with_lib_prefix
4904 fi
4905
4906 LIB_SUFFIX=
4907
4908 ###############################################################################
4909
4910 echo "$as_me:4910: checking if you want to build a separate terminfo library" >&5
4911 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4912
4913 # Check whether --with-termlib or --without-termlib was given.
4914 if test "${with_termlib+set}" = set; then
4915   withval="$with_termlib"
4916   with_termlib=$withval
4917 else
4918   with_termlib=no
4919 fi;
4920 echo "$as_me:4920: result: $with_termlib" >&5
4921 echo "${ECHO_T}$with_termlib" >&6
4922
4923 echo "$as_me:4923: checking if you want to build a separate tic library" >&5
4924 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4925
4926 # Check whether --with-ticlib or --without-ticlib was given.
4927 if test "${with_ticlib+set}" = set; then
4928   withval="$with_ticlib"
4929   with_ticlib=$withval
4930 else
4931   with_ticlib=no
4932 fi;
4933 echo "$as_me:4933: result: $with_ticlib" >&5
4934 echo "${ECHO_T}$with_ticlib" >&6
4935
4936 ### Checks for special libraries, must be done up-front.
4937 SHLIB_LIST=""
4938
4939 echo "$as_me:4939: checking if you want to link with the GPM mouse library" >&5
4940 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4941
4942 # Check whether --with-gpm or --without-gpm was given.
4943 if test "${with_gpm+set}" = set; then
4944   withval="$with_gpm"
4945   with_gpm=$withval
4946 else
4947   with_gpm=maybe
4948 fi;
4949 echo "$as_me:4949: result: $with_gpm" >&5
4950 echo "${ECHO_T}$with_gpm" >&6
4951
4952 if test "$with_gpm" != no ; then
4953         echo "$as_me:4953: checking for gpm.h" >&5
4954 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4955 if test "${ac_cv_header_gpm_h+set}" = set; then
4956   echo $ECHO_N "(cached) $ECHO_C" >&6
4957 else
4958   cat >conftest.$ac_ext <<_ACEOF
4959 #line 4959 "configure"
4960 #include "confdefs.h"
4961 #include <gpm.h>
4962 _ACEOF
4963 if { (eval echo "$as_me:4963: \"$ac_cpp conftest.$ac_ext\"") >&5
4964   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4965   ac_status=$?
4966   egrep -v '^ *\+' conftest.er1 >conftest.err
4967   rm -f conftest.er1
4968   cat conftest.err >&5
4969   echo "$as_me:4969: \$? = $ac_status" >&5
4970   (exit $ac_status); } >/dev/null; then
4971   if test -s conftest.err; then
4972     ac_cpp_err=$ac_c_preproc_warn_flag
4973   else
4974     ac_cpp_err=
4975   fi
4976 else
4977   ac_cpp_err=yes
4978 fi
4979 if test -z "$ac_cpp_err"; then
4980   ac_cv_header_gpm_h=yes
4981 else
4982   echo "$as_me: failed program was:" >&5
4983   cat conftest.$ac_ext >&5
4984   ac_cv_header_gpm_h=no
4985 fi
4986 rm -f conftest.err conftest.$ac_ext
4987 fi
4988 echo "$as_me:4988: result: $ac_cv_header_gpm_h" >&5
4989 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4990 if test $ac_cv_header_gpm_h = yes; then
4991
4992                 cat >>confdefs.h <<\EOF
4993 #define HAVE_GPM_H 1
4994 EOF
4995
4996                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4997                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4998
4999 echo "${as_me:-configure}:4999: testing assuming we really have GPM library ..." 1>&5
5000
5001                         cat >>confdefs.h <<\EOF
5002 #define HAVE_LIBGPM 1
5003 EOF
5004
5005                 else
5006                         echo "$as_me:5006: checking for Gpm_Open in -lgpm" >&5
5007 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5008 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5009   echo $ECHO_N "(cached) $ECHO_C" >&6
5010 else
5011   ac_check_lib_save_LIBS=$LIBS
5012 LIBS="-lgpm  $LIBS"
5013 cat >conftest.$ac_ext <<_ACEOF
5014 #line 5014 "configure"
5015 #include "confdefs.h"
5016
5017 /* Override any gcc2 internal prototype to avoid an error.  */
5018 #ifdef __cplusplus
5019 extern "C"
5020 #endif
5021 /* We use char because int might match the return type of a gcc2
5022    builtin and then its argument prototype would still apply.  */
5023 char Gpm_Open ();
5024 int
5025 main ()
5026 {
5027 Gpm_Open ();
5028   ;
5029   return 0;
5030 }
5031 _ACEOF
5032 rm -f conftest.$ac_objext conftest$ac_exeext
5033 if { (eval echo "$as_me:5033: \"$ac_link\"") >&5
5034   (eval $ac_link) 2>&5
5035   ac_status=$?
5036   echo "$as_me:5036: \$? = $ac_status" >&5
5037   (exit $ac_status); } &&
5038          { ac_try='test -s conftest$ac_exeext'
5039   { (eval echo "$as_me:5039: \"$ac_try\"") >&5
5040   (eval $ac_try) 2>&5
5041   ac_status=$?
5042   echo "$as_me:5042: \$? = $ac_status" >&5
5043   (exit $ac_status); }; }; then
5044   ac_cv_lib_gpm_Gpm_Open=yes
5045 else
5046   echo "$as_me: failed program was:" >&5
5047 cat conftest.$ac_ext >&5
5048 ac_cv_lib_gpm_Gpm_Open=no
5049 fi
5050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5051 LIBS=$ac_check_lib_save_LIBS
5052 fi
5053 echo "$as_me:5053: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5054 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5055 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5056   :
5057 else
5058
5059                                 { { echo "$as_me:5059: error: Cannot link with GPM library" >&5
5060 echo "$as_me: error: Cannot link with GPM library" >&2;}
5061    { (exit 1); exit 1; }; }
5062                 fi
5063                 with_gpm=yes
5064
5065 fi
5066
5067 else
5068
5069                 test "$with_gpm" != maybe && { echo "$as_me:5069: WARNING: Cannot find GPM header" >&5
5070 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5071                 with_gpm=no
5072
5073 fi
5074
5075 fi
5076
5077 if test "$with_gpm" != no ; then
5078         echo "$as_me:5078: checking if you want to load GPM dynamically" >&5
5079 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5080
5081 # Check whether --with-dlsym or --without-dlsym was given.
5082 if test "${with_dlsym+set}" = set; then
5083   withval="$with_dlsym"
5084   with_dlsym=$withval
5085 else
5086   with_dlsym=yes
5087 fi;
5088         echo "$as_me:5088: result: $with_dlsym" >&5
5089 echo "${ECHO_T}$with_dlsym" >&6
5090         if test "$with_dlsym" = yes ; then
5091
5092 cf_have_dlsym=no
5093 echo "$as_me:5093: checking for dlsym" >&5
5094 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5095 if test "${ac_cv_func_dlsym+set}" = set; then
5096   echo $ECHO_N "(cached) $ECHO_C" >&6
5097 else
5098   cat >conftest.$ac_ext <<_ACEOF
5099 #line 5099 "configure"
5100 #include "confdefs.h"
5101 /* System header to define __stub macros and hopefully few prototypes,
5102     which can conflict with char dlsym (); below.  */
5103 #include <assert.h>
5104 /* Override any gcc2 internal prototype to avoid an error.  */
5105 #ifdef __cplusplus
5106 extern "C"
5107 #endif
5108 /* We use char because int might match the return type of a gcc2
5109    builtin and then its argument prototype would still apply.  */
5110 char dlsym ();
5111 char (*f) ();
5112
5113 int
5114 main ()
5115 {
5116 /* The GNU C library defines this for functions which it implements
5117     to always fail with ENOSYS.  Some functions are actually named
5118     something starting with __ and the normal name is an alias.  */
5119 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5120 choke me
5121 #else
5122 f = dlsym;
5123 #endif
5124
5125   ;
5126   return 0;
5127 }
5128 _ACEOF
5129 rm -f conftest.$ac_objext conftest$ac_exeext
5130 if { (eval echo "$as_me:5130: \"$ac_link\"") >&5
5131   (eval $ac_link) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -s conftest$ac_exeext'
5136   { (eval echo "$as_me:5136: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:5139: \$? = $ac_status" >&5
5140   (exit $ac_status); }; }; then
5141   ac_cv_func_dlsym=yes
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 ac_cv_func_dlsym=no
5146 fi
5147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5148 fi
5149 echo "$as_me:5149: result: $ac_cv_func_dlsym" >&5
5150 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5151 if test $ac_cv_func_dlsym = yes; then
5152   cf_have_dlsym=yes
5153 else
5154
5155 cf_have_libdl=no
5156 echo "$as_me:5156: checking for dlsym in -ldl" >&5
5157 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5158 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5159   echo $ECHO_N "(cached) $ECHO_C" >&6
5160 else
5161   ac_check_lib_save_LIBS=$LIBS
5162 LIBS="-ldl  $LIBS"
5163 cat >conftest.$ac_ext <<_ACEOF
5164 #line 5164 "configure"
5165 #include "confdefs.h"
5166
5167 /* Override any gcc2 internal prototype to avoid an error.  */
5168 #ifdef __cplusplus
5169 extern "C"
5170 #endif
5171 /* We use char because int might match the return type of a gcc2
5172    builtin and then its argument prototype would still apply.  */
5173 char dlsym ();
5174 int
5175 main ()
5176 {
5177 dlsym ();
5178   ;
5179   return 0;
5180 }
5181 _ACEOF
5182 rm -f conftest.$ac_objext conftest$ac_exeext
5183 if { (eval echo "$as_me:5183: \"$ac_link\"") >&5
5184   (eval $ac_link) 2>&5
5185   ac_status=$?
5186   echo "$as_me:5186: \$? = $ac_status" >&5
5187   (exit $ac_status); } &&
5188          { ac_try='test -s conftest$ac_exeext'
5189   { (eval echo "$as_me:5189: \"$ac_try\"") >&5
5190   (eval $ac_try) 2>&5
5191   ac_status=$?
5192   echo "$as_me:5192: \$? = $ac_status" >&5
5193   (exit $ac_status); }; }; then
5194   ac_cv_lib_dl_dlsym=yes
5195 else
5196   echo "$as_me: failed program was:" >&5
5197 cat conftest.$ac_ext >&5
5198 ac_cv_lib_dl_dlsym=no
5199 fi
5200 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5201 LIBS=$ac_check_lib_save_LIBS
5202 fi
5203 echo "$as_me:5203: result: $ac_cv_lib_dl_dlsym" >&5
5204 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5205 if test $ac_cv_lib_dl_dlsym = yes; then
5206
5207         cf_have_dlsym=yes
5208         cf_have_libdl=yes
5209 fi
5210
5211 fi
5212
5213 if test "$cf_have_dlsym" = yes ; then
5214         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5215
5216         echo "$as_me:5216: checking whether able to link to dl*() functions" >&5
5217 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5218         cat >conftest.$ac_ext <<_ACEOF
5219 #line 5219 "configure"
5220 #include "confdefs.h"
5221 #include <dlfcn.h>
5222 int
5223 main ()
5224 {
5225
5226                 void *obj;
5227                 if ((obj = dlopen("filename", 0)) != 0) {
5228                         if (dlsym(obj, "symbolname") == 0) {
5229                         dlclose(obj);
5230                         }
5231                 }
5232   ;
5233   return 0;
5234 }
5235 _ACEOF
5236 rm -f conftest.$ac_objext conftest$ac_exeext
5237 if { (eval echo "$as_me:5237: \"$ac_link\"") >&5
5238   (eval $ac_link) 2>&5
5239   ac_status=$?
5240   echo "$as_me:5240: \$? = $ac_status" >&5
5241   (exit $ac_status); } &&
5242          { ac_try='test -s conftest$ac_exeext'
5243   { (eval echo "$as_me:5243: \"$ac_try\"") >&5
5244   (eval $ac_try) 2>&5
5245   ac_status=$?
5246   echo "$as_me:5246: \$? = $ac_status" >&5
5247   (exit $ac_status); }; }; then
5248
5249                 cat >>confdefs.h <<\EOF
5250 #define HAVE_LIBDL 1
5251 EOF
5252
5253 else
5254   echo "$as_me: failed program was:" >&5
5255 cat conftest.$ac_ext >&5
5256
5257                 { { echo "$as_me:5257: error: Cannot link test program for libdl" >&5
5258 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5259    { (exit 1); exit 1; }; }
5260 fi
5261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5262         echo "$as_me:5262: result: ok" >&5
5263 echo "${ECHO_T}ok" >&6
5264 else
5265         { { echo "$as_me:5265: error: Cannot find dlsym function" >&5
5266 echo "$as_me: error: Cannot find dlsym function" >&2;}
5267    { (exit 1); exit 1; }; }
5268 fi
5269
5270                 if test "$with_gpm" != yes ; then
5271                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5272
5273 echo "${as_me:-configure}:5273: testing assuming soname for gpm is $with_gpm ..." 1>&5
5274
5275                         cf_cv_gpm_soname="$with_gpm"
5276                 else
5277
5278 echo "$as_me:5278: checking for soname of gpm library" >&5
5279 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5280 if test "${cf_cv_gpm_soname+set}" = set; then
5281   echo $ECHO_N "(cached) $ECHO_C" >&6
5282 else
5283
5284 cf_cv_gpm_soname=unknown
5285 if test "$cross_compiling" != yes ; then
5286 cat >conftest.$ac_ext <<CF_EOF
5287 #include <gpm.h>
5288 int main()
5289 {
5290 if (Gpm_Open(0,0)) Gpm_Close();
5291         ${cf_cv_main_return:-return}(0);
5292 }
5293 CF_EOF
5294 cf_save_LIBS="$LIBS"
5295         LIBS="-lgpm $LIBS"
5296         if { (eval echo "$as_me:5296: \"$ac_compile\"") >&5
5297   (eval $ac_compile) 2>&5
5298   ac_status=$?
5299   echo "$as_me:5299: \$? = $ac_status" >&5
5300   (exit $ac_status); } ; then
5301                 if { (eval echo "$as_me:5301: \"$ac_link\"") >&5
5302   (eval $ac_link) 2>&5
5303   ac_status=$?
5304   echo "$as_me:5304: \$? = $ac_status" >&5
5305   (exit $ac_status); } ; then
5306                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5307                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5308                 fi
5309         fi
5310 rm -rf conftest*
5311 LIBS="$cf_save_LIBS"
5312 fi
5313
5314 fi
5315 echo "$as_me:5315: result: $cf_cv_gpm_soname" >&5
5316 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5317
5318                 fi
5319                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5320 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5321 EOF
5322
5323                 SHLIB_LIST="-ldl $SHLIB_LIST"
5324         else
5325                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5326                 TEST_LIBS="-lgpm $TEST_LIBS"
5327         fi
5328         cat >>confdefs.h <<\EOF
5329 #define HAVE_LIBGPM 1
5330 EOF
5331
5332 echo "$as_me:5332: checking for Gpm_Wgetch in -lgpm" >&5
5333 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5334 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5335   echo $ECHO_N "(cached) $ECHO_C" >&6
5336 else
5337   ac_check_lib_save_LIBS=$LIBS
5338 LIBS="-lgpm  $LIBS"
5339 cat >conftest.$ac_ext <<_ACEOF
5340 #line 5340 "configure"
5341 #include "confdefs.h"
5342
5343 /* Override any gcc2 internal prototype to avoid an error.  */
5344 #ifdef __cplusplus
5345 extern "C"
5346 #endif
5347 /* We use char because int might match the return type of a gcc2
5348    builtin and then its argument prototype would still apply.  */
5349 char Gpm_Wgetch ();
5350 int
5351 main ()
5352 {
5353 Gpm_Wgetch ();
5354   ;
5355   return 0;
5356 }
5357 _ACEOF
5358 rm -f conftest.$ac_objext conftest$ac_exeext
5359 if { (eval echo "$as_me:5359: \"$ac_link\"") >&5
5360   (eval $ac_link) 2>&5
5361   ac_status=$?
5362   echo "$as_me:5362: \$? = $ac_status" >&5
5363   (exit $ac_status); } &&
5364          { ac_try='test -s conftest$ac_exeext'
5365   { (eval echo "$as_me:5365: \"$ac_try\"") >&5
5366   (eval $ac_try) 2>&5
5367   ac_status=$?
5368   echo "$as_me:5368: \$? = $ac_status" >&5
5369   (exit $ac_status); }; }; then
5370   ac_cv_lib_gpm_Gpm_Wgetch=yes
5371 else
5372   echo "$as_me: failed program was:" >&5
5373 cat conftest.$ac_ext >&5
5374 ac_cv_lib_gpm_Gpm_Wgetch=no
5375 fi
5376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5377 LIBS=$ac_check_lib_save_LIBS
5378 fi
5379 echo "$as_me:5379: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5380 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5381 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5382
5383 echo "$as_me:5383: checking if GPM is weakly bound to curses library" >&5
5384 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5385 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5386   echo $ECHO_N "(cached) $ECHO_C" >&6
5387 else
5388
5389 cf_cv_check_gpm_wgetch=unknown
5390 if test "$cross_compiling" != yes ; then
5391
5392 cat >conftest.$ac_ext <<CF_EOF
5393 #include <gpm.h>
5394 int main()
5395 {
5396         Gpm_Wgetch();
5397         ${cf_cv_main_return:-return}(0);
5398 }
5399 CF_EOF
5400
5401         cf_save_LIBS="$LIBS"
5402         # This only works if we can look at the symbol table.  If a shared
5403         # library is stripped for install, we cannot use that.  So we're forced
5404         # to rely on the static library, noting that some packagers may not
5405         # include it.
5406         LIBS="-static -lgpm -dynamic $LIBS"
5407         if { (eval echo "$as_me:5407: \"$ac_compile\"") >&5
5408   (eval $ac_compile) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); } ; then
5412                 if { (eval echo "$as_me:5412: \"$ac_link\"") >&5
5413   (eval $ac_link) 2>&5
5414   ac_status=$?
5415   echo "$as_me:5415: \$? = $ac_status" >&5
5416   (exit $ac_status); } ; then
5417                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5418                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5419                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5420                 fi
5421         fi
5422         rm -rf conftest*
5423         LIBS="$cf_save_LIBS"
5424 fi
5425
5426 fi
5427 echo "$as_me:5427: result: $cf_cv_check_gpm_wgetch" >&5
5428 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5429
5430 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5431         { echo "$as_me:5431: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5432 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5433 fi
5434
5435 fi
5436
5437 fi
5438
5439 # not everyone has "test -c"
5440 if test -c /dev/sysmouse 2>/dev/null ; then
5441 echo "$as_me:5441: checking if you want to use sysmouse" >&5
5442 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5443
5444 # Check whether --with-sysmouse or --without-sysmouse was given.
5445 if test "${with_sysmouse+set}" = set; then
5446   withval="$with_sysmouse"
5447   cf_with_sysmouse=$withval
5448 else
5449   cf_with_sysmouse=maybe
5450 fi;
5451         if test "$cf_with_sysmouse" != no ; then
5452         cat >conftest.$ac_ext <<_ACEOF
5453 #line 5453 "configure"
5454 #include "confdefs.h"
5455
5456 #include <osreldate.h>
5457 #if (__FreeBSD_version >= 400017)
5458 #include <sys/consio.h>
5459 #include <sys/fbio.h>
5460 #else
5461 #include <machine/console.h>
5462 #endif
5463
5464 int
5465 main ()
5466 {
5467
5468         struct mouse_info the_mouse;
5469         ioctl(0, CONS_MOUSECTL, &the_mouse);
5470
5471   ;
5472   return 0;
5473 }
5474 _ACEOF
5475 rm -f conftest.$ac_objext
5476 if { (eval echo "$as_me:5476: \"$ac_compile\"") >&5
5477   (eval $ac_compile) 2>&5
5478   ac_status=$?
5479   echo "$as_me:5479: \$? = $ac_status" >&5
5480   (exit $ac_status); } &&
5481          { ac_try='test -s conftest.$ac_objext'
5482   { (eval echo "$as_me:5482: \"$ac_try\"") >&5
5483   (eval $ac_try) 2>&5
5484   ac_status=$?
5485   echo "$as_me:5485: \$? = $ac_status" >&5
5486   (exit $ac_status); }; }; then
5487   cf_with_sysmouse=yes
5488 else
5489   echo "$as_me: failed program was:" >&5
5490 cat conftest.$ac_ext >&5
5491 cf_with_sysmouse=no
5492 fi
5493 rm -f conftest.$ac_objext conftest.$ac_ext
5494         fi
5495 echo "$as_me:5495: result: $cf_with_sysmouse" >&5
5496 echo "${ECHO_T}$cf_with_sysmouse" >&6
5497 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5498 #define USE_SYSMOUSE 1
5499 EOF
5500
5501 fi
5502
5503 if test X"$CC_G_OPT" = X"" ; then
5504         CC_G_OPT='-g'
5505         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5506 fi
5507
5508 if test X"$CXX_G_OPT" = X"" ; then
5509         CXX_G_OPT='-g'
5510         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5511 fi
5512
5513 echo "$as_me:5513: checking for default loader flags" >&5
5514 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5515 case $DFT_LWR_MODEL in
5516 libtool) LD_MODEL=''   ;;
5517 normal)  LD_MODEL=''   ;;
5518 debug)   LD_MODEL=$CC_G_OPT ;;
5519 profile) LD_MODEL='-pg';;
5520 shared)  LD_MODEL=''   ;;
5521 esac
5522 echo "$as_me:5522: result: $LD_MODEL" >&5
5523 echo "${ECHO_T}$LD_MODEL" >&6
5524
5525 case $DFT_LWR_MODEL in
5526 shared)
5527
5528 echo "$as_me:5528: checking if rpath option should be used" >&5
5529 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5530
5531 # Check whether --enable-rpath or --disable-rpath was given.
5532 if test "${enable_rpath+set}" = set; then
5533   enableval="$enable_rpath"
5534   cf_cv_enable_rpath=$enableval
5535 else
5536   cf_cv_enable_rpath=no
5537 fi;
5538 echo "$as_me:5538: result: $cf_cv_enable_rpath" >&5
5539 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5540
5541 echo "$as_me:5541: checking if shared libraries should be relinked during install" >&5
5542 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5543
5544 # Check whether --enable-relink or --disable-relink was given.
5545 if test "${enable_relink+set}" = set; then
5546   enableval="$enable_relink"
5547   cf_cv_do_relink=$enableval
5548 else
5549   cf_cv_do_relink=yes
5550 fi;
5551 echo "$as_me:5551: result: $cf_cv_do_relink" >&5
5552 echo "${ECHO_T}$cf_cv_do_relink" >&6
5553         ;;
5554 esac
5555
5556 LD_RPATH_OPT=
5557 echo "$as_me:5557: checking for an rpath option" >&5
5558 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5559 case $cf_cv_system_name in #(vi
5560 irix*) #(vi
5561         if test "$GCC" = yes; then
5562                 LD_RPATH_OPT="-Wl,-rpath,"
5563         else
5564                 LD_RPATH_OPT="-rpath "
5565         fi
5566         ;;
5567 linux*|gnu*|k*bsd*-gnu) #(vi
5568         LD_RPATH_OPT="-Wl,-rpath,"
5569         ;;
5570 openbsd[2-9].*|mirbsd*) #(vi
5571         LD_RPATH_OPT="-Wl,-rpath,"
5572         ;;
5573 dragonfly*|freebsd*) #(vi
5574         LD_RPATH_OPT="-rpath "
5575         ;;
5576 netbsd*) #(vi
5577         LD_RPATH_OPT="-Wl,-rpath,"
5578         ;;
5579 osf*|mls+*) #(vi
5580         LD_RPATH_OPT="-rpath "
5581         ;;
5582 solaris2*) #(vi
5583         LD_RPATH_OPT="-R"
5584         ;;
5585 *)
5586         ;;
5587 esac
5588 echo "$as_me:5588: result: $LD_RPATH_OPT" >&5
5589 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5590
5591 case "x$LD_RPATH_OPT" in #(vi
5592 x-R*)
5593         echo "$as_me:5593: checking if we need a space after rpath option" >&5
5594 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5595         cf_save_LIBS="$LIBS"
5596         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5597         cat >conftest.$ac_ext <<_ACEOF
5598 #line 5598 "configure"
5599 #include "confdefs.h"
5600
5601 int
5602 main ()
5603 {
5604
5605   ;
5606   return 0;
5607 }
5608 _ACEOF
5609 rm -f conftest.$ac_objext conftest$ac_exeext
5610 if { (eval echo "$as_me:5610: \"$ac_link\"") >&5
5611   (eval $ac_link) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); } &&
5615          { ac_try='test -s conftest$ac_exeext'
5616   { (eval echo "$as_me:5616: \"$ac_try\"") >&5
5617   (eval $ac_try) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); }; }; then
5621   cf_rpath_space=no
5622 else
5623   echo "$as_me: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5625 cf_rpath_space=yes
5626 fi
5627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5628         LIBS="$cf_save_LIBS"
5629         echo "$as_me:5629: result: $cf_rpath_space" >&5
5630 echo "${ECHO_T}$cf_rpath_space" >&6
5631         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5632         ;;
5633 esac
5634
5635         LOCAL_LDFLAGS=
5636         LOCAL_LDFLAGS2=
5637         LD_SHARED_OPTS=
5638         INSTALL_LIB="-m 644"
5639
5640         cf_cv_do_symlinks=no
5641         cf_ld_rpath_opt=
5642         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5643
5644         echo "$as_me:5644: checking if release/abi version should be used for shared libs" >&5
5645 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5646
5647 # Check whether --with-shlib-version or --without-shlib-version was given.
5648 if test "${with_shlib_version+set}" = set; then
5649   withval="$with_shlib_version"
5650   test -z "$withval" && withval=auto
5651         case $withval in #(vi
5652         yes) #(vi
5653                 cf_cv_shlib_version=auto
5654                 ;;
5655         rel|abi|auto|no) #(vi
5656                 cf_cv_shlib_version=$withval
5657                 ;;
5658         *)
5659                 { { echo "$as_me:5659: error: option value must be one of: rel, abi, auto or no" >&5
5660 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5661    { (exit 1); exit 1; }; }
5662                 ;;
5663         esac
5664
5665 else
5666   cf_cv_shlib_version=auto
5667 fi;
5668         echo "$as_me:5668: result: $cf_cv_shlib_version" >&5
5669 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5670
5671         cf_cv_rm_so_locs=no
5672
5673         # Some less-capable ports of gcc support only -fpic
5674         CC_SHARED_OPTS=
5675         if test "$GCC" = yes
5676         then
5677                 echo "$as_me:5677: checking which $CC option to use" >&5
5678 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5679                 cf_save_CFLAGS="$CFLAGS"
5680                 for CC_SHARED_OPTS in -fPIC -fpic ''
5681                 do
5682                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5683                         cat >conftest.$ac_ext <<_ACEOF
5684 #line 5684 "configure"
5685 #include "confdefs.h"
5686 #include <stdio.h>
5687 int
5688 main ()
5689 {
5690 int x = 1
5691   ;
5692   return 0;
5693 }
5694 _ACEOF
5695 rm -f conftest.$ac_objext
5696 if { (eval echo "$as_me:5696: \"$ac_compile\"") >&5
5697   (eval $ac_compile) 2>&5
5698   ac_status=$?
5699   echo "$as_me:5699: \$? = $ac_status" >&5
5700   (exit $ac_status); } &&
5701          { ac_try='test -s conftest.$ac_objext'
5702   { (eval echo "$as_me:5702: \"$ac_try\"") >&5
5703   (eval $ac_try) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); }; }; then
5707   break
5708 else
5709   echo "$as_me: failed program was:" >&5
5710 cat conftest.$ac_ext >&5
5711 fi
5712 rm -f conftest.$ac_objext conftest.$ac_ext
5713                 done
5714                 echo "$as_me:5714: result: $CC_SHARED_OPTS" >&5
5715 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5716                 CFLAGS="$cf_save_CFLAGS"
5717         fi
5718
5719         cf_cv_shlib_version_infix=no
5720
5721         case $cf_cv_system_name in #(vi
5722         aix4.3-9*|aix[5-7]*) #(vi
5723                 if test "$GCC" = yes; then
5724                         CC_SHARED_OPTS=
5725                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5726                 else
5727                         # CC_SHARED_OPTS='-qpic=large -G'
5728                         # perhaps "-bM:SRE -bnoentry -bexpall"
5729                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5730                 fi
5731                 ;;
5732         beos*) #(vi
5733                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5734                 ;;
5735         cygwin*) #(vi
5736                 CC_SHARED_OPTS=
5737                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5738                 cf_cv_shlib_version=cygdll
5739                 cf_cv_shlib_version_infix=cygdll
5740                 cat >mk_shared_lib.sh <<-CF_EOF
5741                 #!/bin/sh
5742                 SHARED_LIB=\$1
5743                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5744                 shift
5745                 cat <<-EOF
5746                 Linking shared library
5747                 ** SHARED_LIB \$SHARED_LIB
5748                 ** IMPORT_LIB \$IMPORT_LIB
5749 EOF
5750                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5751 CF_EOF
5752                 chmod +x mk_shared_lib.sh
5753                 ;;
5754         darwin*) #(vi
5755                 EXTRA_CFLAGS="-no-cpp-precomp"
5756                 CC_SHARED_OPTS="-dynamic"
5757                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5758                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5759                 cf_cv_shlib_version_infix=yes
5760                 echo "$as_me:5760: checking if ld -search_paths_first works" >&5
5761 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5762 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5763   echo $ECHO_N "(cached) $ECHO_C" >&6
5764 else
5765
5766                         cf_save_LDFLAGS=$LDFLAGS
5767                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5768                         cat >conftest.$ac_ext <<_ACEOF
5769 #line 5769 "configure"
5770 #include "confdefs.h"
5771
5772 int
5773 main ()
5774 {
5775 int i;
5776   ;
5777   return 0;
5778 }
5779 _ACEOF
5780 rm -f conftest.$ac_objext conftest$ac_exeext
5781 if { (eval echo "$as_me:5781: \"$ac_link\"") >&5
5782   (eval $ac_link) 2>&5
5783   ac_status=$?
5784   echo "$as_me:5784: \$? = $ac_status" >&5
5785   (exit $ac_status); } &&
5786          { ac_try='test -s conftest$ac_exeext'
5787   { (eval echo "$as_me:5787: \"$ac_try\"") >&5
5788   (eval $ac_try) 2>&5
5789   ac_status=$?
5790   echo "$as_me:5790: \$? = $ac_status" >&5
5791   (exit $ac_status); }; }; then
5792   cf_cv_ldflags_search_paths_first=yes
5793 else
5794   echo "$as_me: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5796 cf_cv_ldflags_search_paths_first=no
5797 fi
5798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5799                                 LDFLAGS=$cf_save_LDFLAGS
5800 fi
5801 echo "$as_me:5801: result: $cf_cv_ldflags_search_paths_first" >&5
5802 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5803                 if test $cf_cv_ldflags_search_paths_first = yes; then
5804                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5805                 fi
5806                 ;;
5807         hpux*) #(vi
5808                 # (tested with gcc 2.7.2 -- I don't have c89)
5809                 if test "$GCC" = yes; then
5810                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5811                 else
5812                         CC_SHARED_OPTS='+Z'
5813                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5814                 fi
5815                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5816                 # HP-UX shared libraries must be executable, and should be
5817                 # readonly to exploit a quirk in the memory manager.
5818                 INSTALL_LIB="-m 555"
5819                 ;;
5820         interix*)
5821                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5822                 if test "$cf_cv_shlib_version" = rel; then
5823                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5824                 else
5825                         cf_shared_soname='`basename `'
5826                 fi
5827                 CC_SHARED_OPTS=
5828                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5829                 ;;
5830         irix*) #(vi
5831                 if test "$cf_cv_enable_rpath" = yes ; then
5832                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5833                 fi
5834                 # tested with IRIX 5.2 and 'cc'.
5835                 if test "$GCC" != yes; then
5836                         CC_SHARED_OPTS='-KPIC'
5837                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5838                 else
5839                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5840                 fi
5841                 cf_cv_rm_so_locs=yes
5842                 ;;
5843         linux*|gnu*|k*bsd*-gnu) #(vi
5844                 if test "$DFT_LWR_MODEL" = "shared" ; then
5845                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5846                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5847                 fi
5848                 if test "$cf_cv_enable_rpath" = yes ; then
5849                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5850                 fi
5851
5852         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5853         if test "$cf_cv_shlib_version" = rel; then
5854                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5855         else
5856                 cf_cv_shared_soname='`basename $@`'
5857         fi
5858
5859                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5860                 ;;
5861         openbsd[2-9].*|mirbsd*) #(vi
5862                 if test "$DFT_LWR_MODEL" = "shared" ; then
5863                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5864                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5865                 fi
5866                 if test "$cf_cv_enable_rpath" = yes ; then
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5870
5871         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5872         if test "$cf_cv_shlib_version" = rel; then
5873                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5874         else
5875                 cf_cv_shared_soname='`basename $@`'
5876         fi
5877
5878                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5879                 ;;
5880         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5881                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5882                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5883                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5884                 ;;
5885         dragonfly*|freebsd*) #(vi
5886                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5887                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5888                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5889                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5890                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
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='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5901                 ;;
5902         netbsd*) #(vi
5903                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5904                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5905                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5906                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5907                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5908                         if test "$cf_cv_shlib_version" = auto; then
5909                         if test -f /usr/libexec/ld.elf_so; then
5910                                 cf_cv_shlib_version=abi
5911                         else
5912                                 cf_cv_shlib_version=rel
5913                         fi
5914                         fi
5915
5916         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5917         if test "$cf_cv_shlib_version" = rel; then
5918                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5919         else
5920                 cf_cv_shared_soname='`basename $@`'
5921         fi
5922
5923                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5924                 else
5925                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5926                 fi
5927                 ;;
5928         osf*|mls+*) #(vi
5929                 # tested with OSF/1 V3.2 and 'cc'
5930                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5931                 # link with shared libs).
5932                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5933                 case $host_os in #(vi
5934                 osf4*)
5935                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5936                         ;;
5937                 esac
5938                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5939                 if test "$DFT_LWR_MODEL" = "shared" ; then
5940                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5941                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5942                 fi
5943                 cf_cv_rm_so_locs=yes
5944                 ;;
5945         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5946                 # tested with osr5.0.5
5947                 if test "$GCC" != yes; then
5948                         CC_SHARED_OPTS='-belf -KPIC'
5949                 fi
5950                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         # only way is to set LD_RUN_PATH but no switch for it
5953                         RUN_PATH=$libdir
5954                 fi
5955                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5957                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5958                 ;;
5959         sunos4*) #(vi
5960                 # tested with SunOS 4.1.1 and gcc 2.7.0
5961                 if test "$GCC" != yes; then
5962                         CC_SHARED_OPTS='-KPIC'
5963                 fi
5964                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5965                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5966                 ;;
5967         solaris2*) #(vi
5968                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5969                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5970                 if test "$DFT_LWR_MODEL" = "shared" ; then
5971                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5972                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5973                 fi
5974                 if test "$cf_cv_enable_rpath" = yes ; then
5975                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5976                 fi
5977
5978         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5979         if test "$cf_cv_shlib_version" = rel; then
5980                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5981         else
5982                 cf_cv_shared_soname='`basename $@`'
5983         fi
5984
5985                 if test "$GCC" != yes; then
5986                         cf_save_CFLAGS="$CFLAGS"
5987                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5988                         do
5989                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5990                                 cat >conftest.$ac_ext <<_ACEOF
5991 #line 5991 "configure"
5992 #include "confdefs.h"
5993 #include <stdio.h>
5994 int
5995 main ()
5996 {
5997 printf("Hello\n");
5998   ;
5999   return 0;
6000 }
6001 _ACEOF
6002 rm -f conftest.$ac_objext
6003 if { (eval echo "$as_me:6003: \"$ac_compile\"") >&5
6004   (eval $ac_compile) 2>&5
6005   ac_status=$?
6006   echo "$as_me:6006: \$? = $ac_status" >&5
6007   (exit $ac_status); } &&
6008          { ac_try='test -s conftest.$ac_objext'
6009   { (eval echo "$as_me:6009: \"$ac_try\"") >&5
6010   (eval $ac_try) 2>&5
6011   ac_status=$?
6012   echo "$as_me:6012: \$? = $ac_status" >&5
6013   (exit $ac_status); }; }; then
6014   break
6015 else
6016   echo "$as_me: failed program was:" >&5
6017 cat conftest.$ac_ext >&5
6018 fi
6019 rm -f conftest.$ac_objext conftest.$ac_ext
6020                         done
6021                         CFLAGS="$cf_save_CFLAGS"
6022                         CC_SHARED_OPTS=$cf_shared_opts
6023                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6024                 else
6025                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6026                 fi
6027                 ;;
6028         sysv5uw7*|unix_sv*) #(vi
6029                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6030                 if test "$GCC" != yes; then
6031                         CC_SHARED_OPTS='-KPIC'
6032                 fi
6033                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6034                 ;;
6035         *)
6036                 CC_SHARED_OPTS='unknown'
6037                 MK_SHARED_LIB='echo unknown'
6038                 ;;
6039         esac
6040
6041         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6042         case "$cf_cv_shlib_version" in #(vi
6043         rel|abi)
6044                 case "$MK_SHARED_LIB" in #(vi
6045                 *'-o $@') #(vi
6046                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6047                         ;;
6048                 *)
6049                         { echo "$as_me:6049: WARNING: ignored --with-shlib-version" >&5
6050 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6051                         ;;
6052                 esac
6053                 ;;
6054         esac
6055
6056         # RPATH_LIST is a colon-separated list of directories
6057         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6058         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6059
6060 if test "$CC_SHARED_OPTS" = "unknown"; then
6061         for model in $cf_list_models; do
6062                 if test "$model" = "shared"; then
6063                         { { echo "$as_me:6063: error: Shared libraries are not supported in this version" >&5
6064 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6065    { (exit 1); exit 1; }; }
6066                 fi
6067         done
6068 fi
6069
6070 ### If we're building with rpath, try to link non-standard libs that way too.
6071 if test "$DFT_LWR_MODEL" = "shared"; then
6072
6073 echo "$as_me:6073: checking if rpath-hack should be disabled" >&5
6074 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6075
6076 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6077 if test "${enable_rpath_hack+set}" = set; then
6078   enableval="$enable_rpath_hack"
6079   test "$enableval" != no && enableval=yes
6080   if test "$enableval" != "yes" ; then
6081     cf_disable_rpath_hack=yes
6082   else
6083     cf_disable_rpath_hack=no
6084   fi
6085 else
6086   enableval=yes
6087   cf_disable_rpath_hack=no
6088
6089 fi;
6090 echo "$as_me:6090: result: $cf_disable_rpath_hack" >&5
6091 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6092 if test "$cf_disable_rpath_hack" = no ; then
6093
6094 echo "$as_me:6094: checking for updated LDFLAGS" >&5
6095 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6096 if test -n "$LD_RPATH_OPT" ; then
6097         echo "$as_me:6097: result: maybe" >&5
6098 echo "${ECHO_T}maybe" >&6
6099
6100         for ac_prog in ldd
6101 do
6102   # Extract the first word of "$ac_prog", so it can be a program name with args.
6103 set dummy $ac_prog; ac_word=$2
6104 echo "$as_me:6104: checking for $ac_word" >&5
6105 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6106 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6107   echo $ECHO_N "(cached) $ECHO_C" >&6
6108 else
6109   if test -n "$cf_ldd_prog"; then
6110   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6111 else
6112   ac_save_IFS=$IFS; IFS=$ac_path_separator
6113 ac_dummy="$PATH"
6114 for ac_dir in $ac_dummy; do
6115   IFS=$ac_save_IFS
6116   test -z "$ac_dir" && ac_dir=.
6117   $as_executable_p "$ac_dir/$ac_word" || continue
6118 ac_cv_prog_cf_ldd_prog="$ac_prog"
6119 echo "$as_me:6119: found $ac_dir/$ac_word" >&5
6120 break
6121 done
6122
6123 fi
6124 fi
6125 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6126 if test -n "$cf_ldd_prog"; then
6127   echo "$as_me:6127: result: $cf_ldd_prog" >&5
6128 echo "${ECHO_T}$cf_ldd_prog" >&6
6129 else
6130   echo "$as_me:6130: result: no" >&5
6131 echo "${ECHO_T}no" >&6
6132 fi
6133
6134   test -n "$cf_ldd_prog" && break
6135 done
6136 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6137
6138         cf_rpath_list="/usr/lib /lib"
6139         if test "$cf_ldd_prog" != no
6140         then
6141                 cf_rpath_oops=
6142
6143 cat >conftest.$ac_ext <<_ACEOF
6144 #line 6144 "configure"
6145 #include "confdefs.h"
6146 #include <stdio.h>
6147 int
6148 main ()
6149 {
6150 printf("Hello");
6151   ;
6152   return 0;
6153 }
6154 _ACEOF
6155 rm -f conftest.$ac_objext conftest$ac_exeext
6156 if { (eval echo "$as_me:6156: \"$ac_link\"") >&5
6157   (eval $ac_link) 2>&5
6158   ac_status=$?
6159   echo "$as_me:6159: \$? = $ac_status" >&5
6160   (exit $ac_status); } &&
6161          { ac_try='test -s conftest$ac_exeext'
6162   { (eval echo "$as_me:6162: \"$ac_try\"") >&5
6163   (eval $ac_try) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit $ac_status); }; }; then
6167   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6168                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6169 else
6170   echo "$as_me: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 fi
6173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6174
6175                 # If we passed the link-test, but get a "not found" on a given library,
6176                 # this could be due to inept reconfiguration of gcc to make it only
6177                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6178                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6179                 # /usr/local libraries.
6180                 if test -n "$cf_rpath_oops"
6181                 then
6182                         for cf_rpath_src in $cf_rpath_oops
6183                         do
6184                                 for cf_rpath_dir in \
6185                                         /usr/local \
6186                                         /usr/pkg \
6187                                         /opt/sfw
6188                                 do
6189                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6190                                         then
6191                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6192
6193 echo "${as_me:-configure}:6193: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6194
6195                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6196                                                 break
6197                                         fi
6198                                 done
6199                         done
6200                 fi
6201         fi
6202
6203         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6204
6205 echo "${as_me:-configure}:6205: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6206
6207 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6208
6209 echo "${as_me:-configure}:6209: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6210
6211 cf_rpath_dst=
6212 for cf_rpath_src in $LDFLAGS
6213 do
6214         case $cf_rpath_src in #(vi
6215         -L*) #(vi
6216
6217                 # check if this refers to a directory which we will ignore
6218                 cf_rpath_skip=no
6219                 if test -n "$cf_rpath_list"
6220                 then
6221                         for cf_rpath_item in $cf_rpath_list
6222                         do
6223                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6224                                 then
6225                                         cf_rpath_skip=yes
6226                                         break
6227                                 fi
6228                         done
6229                 fi
6230
6231                 if test "$cf_rpath_skip" = no
6232                 then
6233                         # transform the option
6234                         if test "$LD_RPATH_OPT" = "-R " ; then
6235                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6236                         else
6237                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6238                         fi
6239
6240                         # if we have not already added this, add it now
6241                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6242                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6243                         then
6244                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6245
6246 echo "${as_me:-configure}:6246: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6247
6248                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6249                         fi
6250                 fi
6251                 ;;
6252         esac
6253         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6254 done
6255 LDFLAGS=$cf_rpath_dst
6256
6257 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6258
6259 echo "${as_me:-configure}:6259: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6260
6261 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6262
6263 echo "${as_me:-configure}:6263: testing ...checking LIBS $LIBS ..." 1>&5
6264
6265 cf_rpath_dst=
6266 for cf_rpath_src in $LIBS
6267 do
6268         case $cf_rpath_src in #(vi
6269         -L*) #(vi
6270
6271                 # check if this refers to a directory which we will ignore
6272                 cf_rpath_skip=no
6273                 if test -n "$cf_rpath_list"
6274                 then
6275                         for cf_rpath_item in $cf_rpath_list
6276                         do
6277                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6278                                 then
6279                                         cf_rpath_skip=yes
6280                                         break
6281                                 fi
6282                         done
6283                 fi
6284
6285                 if test "$cf_rpath_skip" = no
6286                 then
6287                         # transform the option
6288                         if test "$LD_RPATH_OPT" = "-R " ; then
6289                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6290                         else
6291                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6292                         fi
6293
6294                         # if we have not already added this, add it now
6295                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6296                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6297                         then
6298                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6299
6300 echo "${as_me:-configure}:6300: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6301
6302                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6303                         fi
6304                 fi
6305                 ;;
6306         esac
6307         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6308 done
6309 LIBS=$cf_rpath_dst
6310
6311 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6312
6313 echo "${as_me:-configure}:6313: testing ...checked LIBS $LIBS ..." 1>&5
6314
6315         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6316
6317 echo "${as_me:-configure}:6317: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6318
6319 fi
6320
6321 fi
6322
6323 fi
6324
6325 ###############################################################################
6326
6327 ###     use option --disable-overwrite to leave out the link to -lcurses
6328 echo "$as_me:6328: checking if you wish to install ncurses overwriting curses" >&5
6329 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6330
6331 # Check whether --enable-overwrite or --disable-overwrite was given.
6332 if test "${enable_overwrite+set}" = set; then
6333   enableval="$enable_overwrite"
6334   with_overwrite=$enableval
6335 else
6336   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6337 fi;
6338 echo "$as_me:6338: result: $with_overwrite" >&5
6339 echo "${ECHO_T}$with_overwrite" >&6
6340
6341 echo "$as_me:6341: checking if external terminfo-database is used" >&5
6342 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6343
6344 # Check whether --enable-database or --disable-database was given.
6345 if test "${enable_database+set}" = set; then
6346   enableval="$enable_database"
6347   use_database=$enableval
6348 else
6349   use_database=yes
6350 fi;
6351 echo "$as_me:6351: result: $use_database" >&5
6352 echo "${ECHO_T}$use_database" >&6
6353
6354 case $host_os in #(vi
6355 os2*) #(vi
6356         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6357         ;;
6358 *) #(vi
6359         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6360         ;;
6361 esac
6362
6363 if test "$use_database" != no ; then
6364         cat >>confdefs.h <<\EOF
6365 #define USE_DATABASE 1
6366 EOF
6367
6368         echo "$as_me:6368: checking which terminfo source-file will be installed" >&5
6369 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6370
6371 # Check whether --with-database or --without-database was given.
6372 if test "${with_database+set}" = set; then
6373   withval="$with_database"
6374   TERMINFO_SRC=$withval
6375 fi;
6376         echo "$as_me:6376: result: $TERMINFO_SRC" >&5
6377 echo "${ECHO_T}$TERMINFO_SRC" >&6
6378
6379         echo "$as_me:6379: checking whether to use hashed database instead of directory/tree" >&5
6380 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6381
6382 # Check whether --with-hashed-db or --without-hashed-db was given.
6383 if test "${with_hashed_db+set}" = set; then
6384   withval="$with_hashed_db"
6385
6386 else
6387   with_hashed_db=no
6388 fi;
6389         echo "$as_me:6389: result: $with_hashed_db" >&5
6390 echo "${ECHO_T}$with_hashed_db" >&6
6391 else
6392         with_hashed_db=no
6393 fi
6394
6395 echo "$as_me:6395: checking for list of fallback descriptions" >&5
6396 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6397
6398 # Check whether --with-fallbacks or --without-fallbacks was given.
6399 if test "${with_fallbacks+set}" = set; then
6400   withval="$with_fallbacks"
6401   with_fallback=$withval
6402 else
6403   with_fallback=
6404 fi;
6405 echo "$as_me:6405: result: $with_fallback" >&5
6406 echo "${ECHO_T}$with_fallback" >&6
6407 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6408
6409 echo "$as_me:6409: checking if you want modern xterm or antique" >&5
6410 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6411
6412 # Check whether --with-xterm-new or --without-xterm-new was given.
6413 if test "${with_xterm_new+set}" = set; then
6414   withval="$with_xterm_new"
6415   with_xterm_new=$withval
6416 else
6417   with_xterm_new=yes
6418 fi;
6419 case $with_xterm_new in
6420 no)     with_xterm_new=xterm-old;;
6421 *)      with_xterm_new=xterm-new;;
6422 esac
6423 echo "$as_me:6423: result: $with_xterm_new" >&5
6424 echo "${ECHO_T}$with_xterm_new" >&6
6425 WHICH_XTERM=$with_xterm_new
6426
6427 echo "$as_me:6427: checking if xterm backspace sends BS or DEL" >&5
6428 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6429
6430 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6431 if test "${with_xterm_kbs+set}" = set; then
6432   withval="$with_xterm_kbs"
6433   with_xterm_kbs=$withval
6434 else
6435   with_xterm_kbs=BS
6436 fi;
6437 case x$with_xterm_kbs in
6438 xyes|xno|xBS|xbs|x8)
6439         with_xterm_kbs=BS
6440         ;;
6441 xDEL|xdel|x127)
6442         with_xterm_kbs=DEL
6443         ;;
6444 *)
6445         with_xterm_kbs=$withval
6446         ;;
6447 esac
6448 echo "$as_me:6448: result: $with_xterm_kbs" >&5
6449 echo "${ECHO_T}$with_xterm_kbs" >&6
6450 XTERM_KBS=$with_xterm_kbs
6451
6452 MAKE_TERMINFO=
6453 if test "$use_database" = no ; then
6454         TERMINFO="${datadir}/terminfo"
6455         MAKE_TERMINFO="#"
6456 else
6457
6458 echo "$as_me:6458: checking for list of terminfo directories" >&5
6459 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6460
6461         case $cf_cv_system_name in
6462         os2*)   PATH_SEPARATOR=';'  ;;
6463         *)      PATH_SEPARATOR=':'  ;;
6464         esac
6465
6466 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6467 if test "${with_terminfo_dirs+set}" = set; then
6468   withval="$with_terminfo_dirs"
6469
6470 else
6471   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6472 fi;
6473 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6474 cf_dst_path=
6475 for cf_src_path in $withval
6476 do
6477
6478 if test "x$prefix" != xNONE; then
6479   cf_path_syntax="$prefix"
6480 else
6481   cf_path_syntax="$ac_default_prefix"
6482 fi
6483
6484 case ".$cf_src_path" in #(vi
6485 .\$\(*\)*|.\'*\'*) #(vi
6486   ;;
6487 ..|./*|.\\*) #(vi
6488   ;;
6489 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6490   ;;
6491 .\${*prefix}*) #(vi
6492   eval cf_src_path="$cf_src_path"
6493   case ".$cf_src_path" in #(vi
6494   .NONE/*)
6495     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6496     ;;
6497   esac
6498   ;; #(vi
6499 .no|.NONE/*)
6500   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6501   ;;
6502 *)
6503   { { echo "$as_me:6503: error: expected a pathname, not \"$cf_src_path\"" >&5
6504 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6505    { (exit 1); exit 1; }; }
6506   ;;
6507 esac
6508
6509   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6510   cf_dst_path="${cf_dst_path}${cf_src_path}"
6511 done
6512 IFS="$ac_save_ifs"
6513
6514 eval 'TERMINFO_DIRS="$cf_dst_path"'
6515
6516 echo "$as_me:6516: result: $TERMINFO_DIRS" >&5
6517 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6518 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6519 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6520 EOF
6521
6522 echo "$as_me:6522: checking for default terminfo directory" >&5
6523 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6524
6525 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6526 if test "${with_default_terminfo_dir+set}" = set; then
6527   withval="$with_default_terminfo_dir"
6528
6529 else
6530   withval="${TERMINFO:-${datadir}/terminfo}"
6531 fi; if test -n "${datadir}/terminfo" ; then
6532
6533 if test "x$prefix" != xNONE; then
6534   cf_path_syntax="$prefix"
6535 else
6536   cf_path_syntax="$ac_default_prefix"
6537 fi
6538
6539 case ".$withval" in #(vi
6540 .\$\(*\)*|.\'*\'*) #(vi
6541   ;;
6542 ..|./*|.\\*) #(vi
6543   ;;
6544 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6545   ;;
6546 .\${*prefix}*) #(vi
6547   eval withval="$withval"
6548   case ".$withval" in #(vi
6549   .NONE/*)
6550     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6551     ;;
6552   esac
6553   ;; #(vi
6554 .no|.NONE/*)
6555   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6556   ;;
6557 *)
6558   { { echo "$as_me:6558: error: expected a pathname, not \"$withval\"" >&5
6559 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6560    { (exit 1); exit 1; }; }
6561   ;;
6562 esac
6563
6564 fi
6565 TERMINFO="$withval"
6566
6567 echo "$as_me:6567: result: $TERMINFO" >&5
6568 echo "${ECHO_T}$TERMINFO" >&6
6569 cat >>confdefs.h <<EOF
6570 #define TERMINFO "$TERMINFO"
6571 EOF
6572
6573 fi
6574
6575 ###     use option --disable-big-core to make tic run on small machines
6576 ###     We need 4Mb, check if we can allocate 50% more than that.
6577 echo "$as_me:6577: checking if big-core option selected" >&5
6578 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6579
6580 # Check whether --enable-big-core or --disable-big-core was given.
6581 if test "${enable_big_core+set}" = set; then
6582   enableval="$enable_big_core"
6583   with_big_core=$enableval
6584 else
6585   if test "$cross_compiling" = yes; then
6586   with_big_core=no
6587 else
6588   cat >conftest.$ac_ext <<_ACEOF
6589 #line 6589 "configure"
6590 #include "confdefs.h"
6591
6592 #include <stdlib.h>
6593 #include <string.h>
6594 int main() {
6595         unsigned long n = 6000000L;
6596         char *s = malloc(n);
6597         if (s != 0)
6598                 s[0] = s[n-1] = 0;
6599         ${cf_cv_main_return:-return}(s == 0);
6600 }
6601 _ACEOF
6602 rm -f conftest$ac_exeext
6603 if { (eval echo "$as_me:6603: \"$ac_link\"") >&5
6604   (eval $ac_link) 2>&5
6605   ac_status=$?
6606   echo "$as_me:6606: \$? = $ac_status" >&5
6607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6608   { (eval echo "$as_me:6608: \"$ac_try\"") >&5
6609   (eval $ac_try) 2>&5
6610   ac_status=$?
6611   echo "$as_me:6611: \$? = $ac_status" >&5
6612   (exit $ac_status); }; }; then
6613   with_big_core=yes
6614 else
6615   echo "$as_me: program exited with status $ac_status" >&5
6616 echo "$as_me: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 with_big_core=no
6619 fi
6620 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6621 fi
6622 fi;
6623 echo "$as_me:6623: result: $with_big_core" >&5
6624 echo "${ECHO_T}$with_big_core" >&6
6625 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6626 #define HAVE_BIG_CORE 1
6627 EOF
6628
6629 ### ISO C only guarantees 512-char strings, we have tables which load faster
6630 ### when constructed using "big" strings.  More than the C compiler, the awk
6631 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6632 echo "$as_me:6632: checking if big-strings option selected" >&5
6633 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6634
6635 # Check whether --enable-big-strings or --disable-big-strings was given.
6636 if test "${enable_big_strings+set}" = set; then
6637   enableval="$enable_big_strings"
6638   with_big_strings=$enableval
6639 else
6640
6641         case x$AWK in #(vi
6642         x)
6643                 eval with_big_strings=no
6644                 ;;
6645         *) #(vi
6646                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6647                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $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
6648                         eval with_big_strings=yes
6649                 else
6650                         eval with_big_strings=no
6651                 fi
6652                 ;;
6653         esac
6654
6655 fi;
6656 echo "$as_me:6656: result: $with_big_strings" >&5
6657 echo "${ECHO_T}$with_big_strings" >&6
6658
6659 USE_BIG_STRINGS=0
6660 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6661
6662 ###     use option --enable-termcap to compile in the termcap fallback support
6663 echo "$as_me:6663: checking if you want termcap-fallback support" >&5
6664 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6665
6666 # Check whether --enable-termcap or --disable-termcap was given.
6667 if test "${enable_termcap+set}" = set; then
6668   enableval="$enable_termcap"
6669   with_termcap=$enableval
6670 else
6671   with_termcap=no
6672 fi;
6673 echo "$as_me:6673: result: $with_termcap" >&5
6674 echo "${ECHO_T}$with_termcap" >&6
6675
6676 if test "$with_termcap" != "yes" ; then
6677         if test "$use_database" = no ; then
6678                 if test -z "$with_fallback" ; then
6679                         { { echo "$as_me:6679: error: You have disabled the database w/o specifying fallbacks" >&5
6680 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6681    { (exit 1); exit 1; }; }
6682                 fi
6683         fi
6684         cat >>confdefs.h <<\EOF
6685 #define PURE_TERMINFO 1
6686 EOF
6687
6688 else
6689
6690 if test "$with_ticlib" != no ; then
6691         { { echo "$as_me:6691: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6692 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6693    { (exit 1); exit 1; }; }
6694 fi
6695
6696 cat >>confdefs.h <<\EOF
6697 #define USE_TERMCAP 1
6698 EOF
6699
6700 echo "$as_me:6700: checking for list of termcap files" >&5
6701 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6702
6703 # Check whether --with-termpath or --without-termpath was given.
6704 if test "${with_termpath+set}" = set; then
6705   withval="$with_termpath"
6706
6707 else
6708   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6709 fi;
6710 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6711 cf_dst_path=
6712 for cf_src_path in $withval
6713 do
6714
6715 if test "x$prefix" != xNONE; then
6716   cf_path_syntax="$prefix"
6717 else
6718   cf_path_syntax="$ac_default_prefix"
6719 fi
6720
6721 case ".$cf_src_path" in #(vi
6722 .\$\(*\)*|.\'*\'*) #(vi
6723   ;;
6724 ..|./*|.\\*) #(vi
6725   ;;
6726 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6727   ;;
6728 .\${*prefix}*) #(vi
6729   eval cf_src_path="$cf_src_path"
6730   case ".$cf_src_path" in #(vi
6731   .NONE/*)
6732     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6733     ;;
6734   esac
6735   ;; #(vi
6736 .no|.NONE/*)
6737   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6738   ;;
6739 *)
6740   { { echo "$as_me:6740: error: expected a pathname, not \"$cf_src_path\"" >&5
6741 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6742    { (exit 1); exit 1; }; }
6743   ;;
6744 esac
6745
6746   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6747   cf_dst_path="${cf_dst_path}${cf_src_path}"
6748 done
6749 IFS="$ac_save_ifs"
6750
6751 eval 'TERMPATH="$cf_dst_path"'
6752
6753 echo "$as_me:6753: result: $TERMPATH" >&5
6754 echo "${ECHO_T}$TERMPATH" >&6
6755 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6756 #define TERMPATH "$TERMPATH"
6757 EOF
6758
6759 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6760 echo "$as_me:6760: checking if fast termcap-loader is needed" >&5
6761 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6762
6763 # Check whether --enable-getcap or --disable-getcap was given.
6764 if test "${enable_getcap+set}" = set; then
6765   enableval="$enable_getcap"
6766   with_getcap=$enableval
6767 else
6768   with_getcap=no
6769 fi;
6770 echo "$as_me:6770: result: $with_getcap" >&5
6771 echo "${ECHO_T}$with_getcap" >&6
6772 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6773 #define USE_GETCAP 1
6774 EOF
6775
6776 echo "$as_me:6776: checking if translated termcaps will be cached in ~/.terminfo" >&5
6777 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6778
6779 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6780 if test "${enable_getcap_cache+set}" = set; then
6781   enableval="$enable_getcap_cache"
6782   with_getcap_cache=$enableval
6783 else
6784   with_getcap_cache=no
6785 fi;
6786 echo "$as_me:6786: result: $with_getcap_cache" >&5
6787 echo "${ECHO_T}$with_getcap_cache" >&6
6788 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6789 #define USE_GETCAP_CACHE 1
6790 EOF
6791
6792 fi
6793
6794 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6795 echo "$as_me:6795: checking if ~/.terminfo is wanted" >&5
6796 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6797
6798 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6799 if test "${enable_home_terminfo+set}" = set; then
6800   enableval="$enable_home_terminfo"
6801   with_home_terminfo=$enableval
6802 else
6803   with_home_terminfo=yes
6804 fi;
6805 echo "$as_me:6805: result: $with_home_terminfo" >&5
6806 echo "${ECHO_T}$with_home_terminfo" >&6
6807 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6808 #define USE_HOME_TERMINFO 1
6809 EOF
6810
6811 echo "$as_me:6811: checking if you want to use restricted environment when running as root" >&5
6812 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6813
6814 # Check whether --enable-root-environ or --disable-root-environ was given.
6815 if test "${enable_root_environ+set}" = set; then
6816   enableval="$enable_root_environ"
6817   with_root_environ=$enableval
6818 else
6819   with_root_environ=yes
6820 fi;
6821 echo "$as_me:6821: result: $with_root_environ" >&5
6822 echo "${ECHO_T}$with_root_environ" >&6
6823 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6824 #define USE_ROOT_ENVIRON 1
6825 EOF
6826
6827 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6828 ###   to reduce storage requirements for the terminfo database.
6829
6830 for ac_func in \
6831         remove \
6832         unlink
6833 do
6834 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6835 echo "$as_me:6835: checking for $ac_func" >&5
6836 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6837 if eval "test \"\${$as_ac_var+set}\" = set"; then
6838   echo $ECHO_N "(cached) $ECHO_C" >&6
6839 else
6840   cat >conftest.$ac_ext <<_ACEOF
6841 #line 6841 "configure"
6842 #include "confdefs.h"
6843 /* System header to define __stub macros and hopefully few prototypes,
6844     which can conflict with char $ac_func (); below.  */
6845 #include <assert.h>
6846 /* Override any gcc2 internal prototype to avoid an error.  */
6847 #ifdef __cplusplus
6848 extern "C"
6849 #endif
6850 /* We use char because int might match the return type of a gcc2
6851    builtin and then its argument prototype would still apply.  */
6852 char $ac_func ();
6853 char (*f) ();
6854
6855 int
6856 main ()
6857 {
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862 choke me
6863 #else
6864 f = $ac_func;
6865 #endif
6866
6867   ;
6868   return 0;
6869 }
6870 _ACEOF
6871 rm -f conftest.$ac_objext conftest$ac_exeext
6872 if { (eval echo "$as_me:6872: \"$ac_link\"") >&5
6873   (eval $ac_link) 2>&5
6874   ac_status=$?
6875   echo "$as_me:6875: \$? = $ac_status" >&5
6876   (exit $ac_status); } &&
6877          { ac_try='test -s conftest$ac_exeext'
6878   { (eval echo "$as_me:6878: \"$ac_try\"") >&5
6879   (eval $ac_try) 2>&5
6880   ac_status=$?
6881   echo "$as_me:6881: \$? = $ac_status" >&5
6882   (exit $ac_status); }; }; then
6883   eval "$as_ac_var=yes"
6884 else
6885   echo "$as_me: failed program was:" >&5
6886 cat conftest.$ac_ext >&5
6887 eval "$as_ac_var=no"
6888 fi
6889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6890 fi
6891 echo "$as_me:6891: result: `eval echo '${'$as_ac_var'}'`" >&5
6892 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6893 if test `eval echo '${'$as_ac_var'}'` = yes; then
6894   cat >>confdefs.h <<EOF
6895 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6896 EOF
6897
6898 fi
6899 done
6900
6901 if test "$cross_compiling" = yes ; then
6902
6903 for ac_func in \
6904                 link \
6905                 symlink
6906 do
6907 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6908 echo "$as_me:6908: checking for $ac_func" >&5
6909 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6910 if eval "test \"\${$as_ac_var+set}\" = set"; then
6911   echo $ECHO_N "(cached) $ECHO_C" >&6
6912 else
6913   cat >conftest.$ac_ext <<_ACEOF
6914 #line 6914 "configure"
6915 #include "confdefs.h"
6916 /* System header to define __stub macros and hopefully few prototypes,
6917     which can conflict with char $ac_func (); below.  */
6918 #include <assert.h>
6919 /* Override any gcc2 internal prototype to avoid an error.  */
6920 #ifdef __cplusplus
6921 extern "C"
6922 #endif
6923 /* We use char because int might match the return type of a gcc2
6924    builtin and then its argument prototype would still apply.  */
6925 char $ac_func ();
6926 char (*f) ();
6927
6928 int
6929 main ()
6930 {
6931 /* The GNU C library defines this for functions which it implements
6932     to always fail with ENOSYS.  Some functions are actually named
6933     something starting with __ and the normal name is an alias.  */
6934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6935 choke me
6936 #else
6937 f = $ac_func;
6938 #endif
6939
6940   ;
6941   return 0;
6942 }
6943 _ACEOF
6944 rm -f conftest.$ac_objext conftest$ac_exeext
6945 if { (eval echo "$as_me:6945: \"$ac_link\"") >&5
6946   (eval $ac_link) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); } &&
6950          { ac_try='test -s conftest$ac_exeext'
6951   { (eval echo "$as_me:6951: \"$ac_try\"") >&5
6952   (eval $ac_try) 2>&5
6953   ac_status=$?
6954   echo "$as_me:6954: \$? = $ac_status" >&5
6955   (exit $ac_status); }; }; then
6956   eval "$as_ac_var=yes"
6957 else
6958   echo "$as_me: failed program was:" >&5
6959 cat conftest.$ac_ext >&5
6960 eval "$as_ac_var=no"
6961 fi
6962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6963 fi
6964 echo "$as_me:6964: result: `eval echo '${'$as_ac_var'}'`" >&5
6965 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6966 if test `eval echo '${'$as_ac_var'}'` = yes; then
6967   cat >>confdefs.h <<EOF
6968 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6969 EOF
6970
6971 fi
6972 done
6973
6974 else
6975         echo "$as_me:6975: checking if link/symlink functions work" >&5
6976 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6977 if test "${cf_cv_link_funcs+set}" = set; then
6978   echo $ECHO_N "(cached) $ECHO_C" >&6
6979 else
6980
6981                 cf_cv_link_funcs=
6982                 for cf_func in link symlink ; do
6983                         if test "$cross_compiling" = yes; then
6984
6985                         eval 'ac_cv_func_'$cf_func'=error'
6986 else
6987   cat >conftest.$ac_ext <<_ACEOF
6988 #line 6988 "configure"
6989 #include "confdefs.h"
6990
6991 #include <sys/types.h>
6992 #include <sys/stat.h>
6993 #ifdef HAVE_UNISTD_H
6994 #include <unistd.h>
6995 #endif
6996 int main()
6997 {
6998         int fail = 0;
6999         char *src = "config.log";
7000         char *dst = "conftest.chk";
7001         struct stat src_sb;
7002         struct stat dst_sb;
7003
7004         stat(src, &src_sb);
7005         fail = ($cf_func("config.log", "conftest.chk") < 0)
7006             || (stat(dst, &dst_sb) < 0)
7007             || (dst_sb.st_mtime != src_sb.st_mtime);
7008 #ifdef HAVE_UNLINK
7009         unlink(dst);
7010 #else
7011         remove(dst);
7012 #endif
7013         ${cf_cv_main_return:-return} (fail);
7014 }
7015
7016 _ACEOF
7017 rm -f conftest$ac_exeext
7018 if { (eval echo "$as_me:7018: \"$ac_link\"") >&5
7019   (eval $ac_link) 2>&5
7020   ac_status=$?
7021   echo "$as_me:7021: \$? = $ac_status" >&5
7022   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7023   { (eval echo "$as_me:7023: \"$ac_try\"") >&5
7024   (eval $ac_try) 2>&5
7025   ac_status=$?
7026   echo "$as_me:7026: \$? = $ac_status" >&5
7027   (exit $ac_status); }; }; then
7028
7029                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7030                         eval 'ac_cv_func_'$cf_func'=yes'
7031 else
7032   echo "$as_me: program exited with status $ac_status" >&5
7033 echo "$as_me: failed program was:" >&5
7034 cat conftest.$ac_ext >&5
7035
7036                         eval 'ac_cv_func_'$cf_func'=no'
7037 fi
7038 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7039 fi
7040                 done
7041                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7042
7043 fi
7044 echo "$as_me:7044: result: $cf_cv_link_funcs" >&5
7045 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7046         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
7047 #define HAVE_LINK 1
7048 EOF
7049
7050         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7051 #define HAVE_SYMLINK 1
7052 EOF
7053
7054 fi
7055
7056 with_links=no
7057 with_symlinks=no
7058
7059 # soft links (symbolic links) are useful for some systems where hard links do
7060 # not work, or to make it simpler to copy terminfo trees around.
7061 if test "$ac_cv_func_symlink" = yes ; then
7062     echo "$as_me:7062: checking if tic should use symbolic links" >&5
7063 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7064
7065 # Check whether --enable-symlinks or --disable-symlinks was given.
7066 if test "${enable_symlinks+set}" = set; then
7067   enableval="$enable_symlinks"
7068   with_symlinks=$enableval
7069 else
7070   with_symlinks=no
7071 fi;
7072     echo "$as_me:7072: result: $with_symlinks" >&5
7073 echo "${ECHO_T}$with_symlinks" >&6
7074 fi
7075
7076 # If we have hard links and did not choose to use soft links instead, there is
7077 # no reason to make this choice optional - use the hard links.
7078 if test "$with_symlinks" = no ; then
7079     echo "$as_me:7079: checking if tic should use hard links" >&5
7080 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7081     if test "$ac_cv_func_link" = yes ; then
7082         with_links=yes
7083     else
7084         with_links=no
7085     fi
7086     echo "$as_me:7086: result: $with_links" >&5
7087 echo "${ECHO_T}$with_links" >&6
7088 fi
7089
7090 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7091 #define USE_LINKS 1
7092 EOF
7093
7094 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7095 #define USE_SYMLINKS 1
7096 EOF
7097
7098 ###   use option --enable-broken-linker to force on use of broken-linker support
7099 echo "$as_me:7099: checking if you want broken-linker support code" >&5
7100 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7101
7102 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7103 if test "${enable_broken_linker+set}" = set; then
7104   enableval="$enable_broken_linker"
7105   with_broken_linker=$enableval
7106 else
7107   with_broken_linker=${BROKEN_LINKER:-no}
7108 fi;
7109 echo "$as_me:7109: result: $with_broken_linker" >&5
7110 echo "${ECHO_T}$with_broken_linker" >&6
7111
7112 BROKEN_LINKER=0
7113 if test "$with_broken_linker" = yes ; then
7114         cat >>confdefs.h <<\EOF
7115 #define BROKEN_LINKER 1
7116 EOF
7117
7118         BROKEN_LINKER=1
7119 elif test "$DFT_LWR_MODEL" = shared ; then
7120         case $cf_cv_system_name in #(vi
7121         cygwin*)
7122                 cat >>confdefs.h <<\EOF
7123 #define BROKEN_LINKER 1
7124 EOF
7125
7126                 BROKEN_LINKER=1
7127                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7128
7129 echo "${as_me:-configure}:7129: testing cygwin linker is broken anyway ..." 1>&5
7130
7131                 ;;
7132         esac
7133 fi
7134
7135 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7136 echo "$as_me:7136: checking if tputs should process BSD-style prefix padding" >&5
7137 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7138
7139 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7140 if test "${enable_bsdpad+set}" = set; then
7141   enableval="$enable_bsdpad"
7142   with_bsdpad=$enableval
7143 else
7144   with_bsdpad=no
7145 fi;
7146 echo "$as_me:7146: result: $with_bsdpad" >&5
7147 echo "${ECHO_T}$with_bsdpad" >&6
7148 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7149 #define BSD_TPUTS 1
7150 EOF
7151
7152 ###   use option --enable-widec to turn on use of wide-character support
7153 NCURSES_CH_T=chtype
7154 NCURSES_LIBUTF8=0
7155
7156 NEED_WCHAR_H=0
7157 NCURSES_MBSTATE_T=0
7158 NCURSES_WCHAR_T=0
7159 NCURSES_WINT_T=0
7160
7161 # Check to define _XOPEN_SOURCE "automatically"
7162
7163 cf_XOPEN_SOURCE=500
7164 cf_POSIX_C_SOURCE=199506L
7165 cf_xopen_source=
7166
7167 case $host_os in #(vi
7168 aix[4-7]*) #(vi
7169         cf_xopen_source="-D_ALL_SOURCE"
7170         ;;
7171 cygwin) #(vi
7172         cf_XOPEN_SOURCE=600
7173         ;;
7174 darwin[0-8].*) #(vi
7175         cf_xopen_source="-D_APPLE_C_SOURCE"
7176         ;;
7177 darwin*) #(vi
7178         cf_xopen_source="-D_DARWIN_C_SOURCE"
7179         cf_XOPEN_SOURCE=
7180         ;;
7181 freebsd*|dragonfly*) #(vi
7182         # 5.x headers associate
7183         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7184         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7185         cf_POSIX_C_SOURCE=200112L
7186         cf_XOPEN_SOURCE=600
7187         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7188         ;;
7189 hpux11*) #(vi
7190         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7191         ;;
7192 hpux*) #(vi
7193         cf_xopen_source="-D_HPUX_SOURCE"
7194         ;;
7195 irix[56].*) #(vi
7196         cf_xopen_source="-D_SGI_SOURCE"
7197         cf_XOPEN_SOURCE=
7198         ;;
7199 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7200
7201 echo "$as_me:7201: checking if we must define _GNU_SOURCE" >&5
7202 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7203 if test "${cf_cv_gnu_source+set}" = set; then
7204   echo $ECHO_N "(cached) $ECHO_C" >&6
7205 else
7206
7207 cat >conftest.$ac_ext <<_ACEOF
7208 #line 7208 "configure"
7209 #include "confdefs.h"
7210 #include <sys/types.h>
7211 int
7212 main ()
7213 {
7214
7215 #ifndef _XOPEN_SOURCE
7216 make an error
7217 #endif
7218   ;
7219   return 0;
7220 }
7221 _ACEOF
7222 rm -f conftest.$ac_objext
7223 if { (eval echo "$as_me:7223: \"$ac_compile\"") >&5
7224   (eval $ac_compile) 2>&5
7225   ac_status=$?
7226   echo "$as_me:7226: \$? = $ac_status" >&5
7227   (exit $ac_status); } &&
7228          { ac_try='test -s conftest.$ac_objext'
7229   { (eval echo "$as_me:7229: \"$ac_try\"") >&5
7230   (eval $ac_try) 2>&5
7231   ac_status=$?
7232   echo "$as_me:7232: \$? = $ac_status" >&5
7233   (exit $ac_status); }; }; then
7234   cf_cv_gnu_source=no
7235 else
7236   echo "$as_me: failed program was:" >&5
7237 cat conftest.$ac_ext >&5
7238 cf_save="$CPPFLAGS"
7239          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7240          cat >conftest.$ac_ext <<_ACEOF
7241 #line 7241 "configure"
7242 #include "confdefs.h"
7243 #include <sys/types.h>
7244 int
7245 main ()
7246 {
7247
7248 #ifdef _XOPEN_SOURCE
7249 make an error
7250 #endif
7251   ;
7252   return 0;
7253 }
7254 _ACEOF
7255 rm -f conftest.$ac_objext
7256 if { (eval echo "$as_me:7256: \"$ac_compile\"") >&5
7257   (eval $ac_compile) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit $ac_status); } &&
7261          { ac_try='test -s conftest.$ac_objext'
7262   { (eval echo "$as_me:7262: \"$ac_try\"") >&5
7263   (eval $ac_try) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit $ac_status); }; }; then
7267   cf_cv_gnu_source=no
7268 else
7269   echo "$as_me: failed program was:" >&5
7270 cat conftest.$ac_ext >&5
7271 cf_cv_gnu_source=yes
7272 fi
7273 rm -f conftest.$ac_objext conftest.$ac_ext
7274         CPPFLAGS="$cf_save"
7275
7276 fi
7277 rm -f conftest.$ac_objext conftest.$ac_ext
7278
7279 fi
7280 echo "$as_me:7280: result: $cf_cv_gnu_source" >&5
7281 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7282 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7283
7284         ;;
7285 mirbsd*) #(vi
7286         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7287         cf_XOPEN_SOURCE=
7288
7289 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7290
7291 cf_save_CFLAGS="$CFLAGS"
7292 cf_save_CPPFLAGS="$CPPFLAGS"
7293
7294 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7295         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7296                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7297
7298 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7299         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7300                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7301
7302 echo "$as_me:7302: checking if we should define _POSIX_C_SOURCE" >&5
7303 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7304 if test "${cf_cv_posix_c_source+set}" = set; then
7305   echo $ECHO_N "(cached) $ECHO_C" >&6
7306 else
7307
7308 echo "${as_me:-configure}:7308: testing if the symbol is already defined go no further ..." 1>&5
7309
7310         cat >conftest.$ac_ext <<_ACEOF
7311 #line 7311 "configure"
7312 #include "confdefs.h"
7313 #include <sys/types.h>
7314 int
7315 main ()
7316 {
7317
7318 #ifndef _POSIX_C_SOURCE
7319 make an error
7320 #endif
7321   ;
7322   return 0;
7323 }
7324 _ACEOF
7325 rm -f conftest.$ac_objext
7326 if { (eval echo "$as_me:7326: \"$ac_compile\"") >&5
7327   (eval $ac_compile) 2>&5
7328   ac_status=$?
7329   echo "$as_me:7329: \$? = $ac_status" >&5
7330   (exit $ac_status); } &&
7331          { ac_try='test -s conftest.$ac_objext'
7332   { (eval echo "$as_me:7332: \"$ac_try\"") >&5
7333   (eval $ac_try) 2>&5
7334   ac_status=$?
7335   echo "$as_me:7335: \$? = $ac_status" >&5
7336   (exit $ac_status); }; }; then
7337   cf_cv_posix_c_source=no
7338 else
7339   echo "$as_me: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
7341 cf_want_posix_source=no
7342          case .$cf_POSIX_C_SOURCE in #(vi
7343          .[12]??*) #(vi
7344                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7345                 ;;
7346          .2) #(vi
7347                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7348                 cf_want_posix_source=yes
7349                 ;;
7350          .*)
7351                 cf_want_posix_source=yes
7352                 ;;
7353          esac
7354          if test "$cf_want_posix_source" = yes ; then
7355                 cat >conftest.$ac_ext <<_ACEOF
7356 #line 7356 "configure"
7357 #include "confdefs.h"
7358 #include <sys/types.h>
7359 int
7360 main ()
7361 {
7362
7363 #ifdef _POSIX_SOURCE
7364 make an error
7365 #endif
7366   ;
7367   return 0;
7368 }
7369 _ACEOF
7370 rm -f conftest.$ac_objext
7371 if { (eval echo "$as_me:7371: \"$ac_compile\"") >&5
7372   (eval $ac_compile) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit $ac_status); } &&
7376          { ac_try='test -s conftest.$ac_objext'
7377   { (eval echo "$as_me:7377: \"$ac_try\"") >&5
7378   (eval $ac_try) 2>&5
7379   ac_status=$?
7380   echo "$as_me:7380: \$? = $ac_status" >&5
7381   (exit $ac_status); }; }; then
7382   :
7383 else
7384   echo "$as_me: failed program was:" >&5
7385 cat conftest.$ac_ext >&5
7386 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7387 fi
7388 rm -f conftest.$ac_objext conftest.$ac_ext
7389          fi
7390
7391 echo "${as_me:-configure}:7391: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7392
7393          CFLAGS="$cf_trim_CFLAGS"
7394          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7395
7396 echo "${as_me:-configure}:7396: testing if the second compile does not leave our definition intact error ..." 1>&5
7397
7398          cat >conftest.$ac_ext <<_ACEOF
7399 #line 7399 "configure"
7400 #include "confdefs.h"
7401 #include <sys/types.h>
7402 int
7403 main ()
7404 {
7405
7406 #ifndef _POSIX_C_SOURCE
7407 make an error
7408 #endif
7409   ;
7410   return 0;
7411 }
7412 _ACEOF
7413 rm -f conftest.$ac_objext
7414 if { (eval echo "$as_me:7414: \"$ac_compile\"") >&5
7415   (eval $ac_compile) 2>&5
7416   ac_status=$?
7417   echo "$as_me:7417: \$? = $ac_status" >&5
7418   (exit $ac_status); } &&
7419          { ac_try='test -s conftest.$ac_objext'
7420   { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7421   (eval $ac_try) 2>&5
7422   ac_status=$?
7423   echo "$as_me:7423: \$? = $ac_status" >&5
7424   (exit $ac_status); }; }; then
7425   :
7426 else
7427   echo "$as_me: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 cf_cv_posix_c_source=no
7430 fi
7431 rm -f conftest.$ac_objext conftest.$ac_ext
7432          CFLAGS="$cf_save_CFLAGS"
7433          CPPFLAGS="$cf_save_CPPFLAGS"
7434
7435 fi
7436 rm -f conftest.$ac_objext conftest.$ac_ext
7437
7438 fi
7439 echo "$as_me:7439: result: $cf_cv_posix_c_source" >&5
7440 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7441
7442 if test "$cf_cv_posix_c_source" != no ; then
7443         CFLAGS="$cf_trim_CFLAGS"
7444         CPPFLAGS="$cf_trim_CPPFLAGS"
7445
7446 cf_fix_cppflags=no
7447 cf_new_cflags=
7448 cf_new_cppflags=
7449 cf_new_extra_cppflags=
7450
7451 for cf_add_cflags in $cf_cv_posix_c_source
7452 do
7453 case $cf_fix_cppflags in
7454 no)
7455         case $cf_add_cflags in #(vi
7456         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7457                 case $cf_add_cflags in
7458                 -D*)
7459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7460
7461                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7462                                 && test -z "${cf_tst_cflags}" \
7463                                 && cf_fix_cppflags=yes
7464
7465                         if test $cf_fix_cppflags = yes ; then
7466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7467                                 continue
7468                         elif test "${cf_tst_cflags}" = "\"'" ; then
7469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7470                                 continue
7471                         fi
7472                         ;;
7473                 esac
7474                 case "$CPPFLAGS" in
7475                 *$cf_add_cflags) #(vi
7476                         ;;
7477                 *) #(vi
7478                         case $cf_add_cflags in #(vi
7479                         -D*)
7480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7481
7482 CPPFLAGS=`echo "$CPPFLAGS" | \
7483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7485
7486                                 ;;
7487                         esac
7488                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7489                         ;;
7490                 esac
7491                 ;;
7492         *)
7493                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7494                 ;;
7495         esac
7496         ;;
7497 yes)
7498         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7499
7500         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7501
7502         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7503                 && test -z "${cf_tst_cflags}" \
7504                 && cf_fix_cppflags=no
7505         ;;
7506 esac
7507 done
7508
7509 if test -n "$cf_new_cflags" ; then
7510
7511         CFLAGS="$CFLAGS $cf_new_cflags"
7512 fi
7513
7514 if test -n "$cf_new_cppflags" ; then
7515
7516         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7517 fi
7518
7519 if test -n "$cf_new_extra_cppflags" ; then
7520
7521         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7522 fi
7523
7524 fi
7525
7526         ;;
7527 netbsd*) #(vi
7528         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7529         ;;
7530 openbsd[4-9]*) #(vi
7531         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7532         cf_xopen_source="-D_BSD_SOURCE"
7533         cf_XOPEN_SOURCE=600
7534         ;;
7535 openbsd*) #(vi
7536         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7537         ;;
7538 osf[45]*) #(vi
7539         cf_xopen_source="-D_OSF_SOURCE"
7540         ;;
7541 nto-qnx*) #(vi
7542         cf_xopen_source="-D_QNX_SOURCE"
7543         ;;
7544 sco*) #(vi
7545         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7546         ;;
7547 solaris2.*) #(vi
7548         cf_xopen_source="-D__EXTENSIONS__"
7549         ;;
7550 *)
7551
7552 echo "$as_me:7552: checking if we should define _XOPEN_SOURCE" >&5
7553 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7554 if test "${cf_cv_xopen_source+set}" = set; then
7555   echo $ECHO_N "(cached) $ECHO_C" >&6
7556 else
7557
7558         cat >conftest.$ac_ext <<_ACEOF
7559 #line 7559 "configure"
7560 #include "confdefs.h"
7561
7562 #include <stdlib.h>
7563 #include <string.h>
7564 #include <sys/types.h>
7565
7566 int
7567 main ()
7568 {
7569
7570 #ifndef _XOPEN_SOURCE
7571 make an error
7572 #endif
7573   ;
7574   return 0;
7575 }
7576 _ACEOF
7577 rm -f conftest.$ac_objext
7578 if { (eval echo "$as_me:7578: \"$ac_compile\"") >&5
7579   (eval $ac_compile) 2>&5
7580   ac_status=$?
7581   echo "$as_me:7581: \$? = $ac_status" >&5
7582   (exit $ac_status); } &&
7583          { ac_try='test -s conftest.$ac_objext'
7584   { (eval echo "$as_me:7584: \"$ac_try\"") >&5
7585   (eval $ac_try) 2>&5
7586   ac_status=$?
7587   echo "$as_me:7587: \$? = $ac_status" >&5
7588   (exit $ac_status); }; }; then
7589   cf_cv_xopen_source=no
7590 else
7591   echo "$as_me: failed program was:" >&5
7592 cat conftest.$ac_ext >&5
7593 cf_save="$CPPFLAGS"
7594          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7595          cat >conftest.$ac_ext <<_ACEOF
7596 #line 7596 "configure"
7597 #include "confdefs.h"
7598
7599 #include <stdlib.h>
7600 #include <string.h>
7601 #include <sys/types.h>
7602
7603 int
7604 main ()
7605 {
7606
7607 #ifdef _XOPEN_SOURCE
7608 make an error
7609 #endif
7610   ;
7611   return 0;
7612 }
7613 _ACEOF
7614 rm -f conftest.$ac_objext
7615 if { (eval echo "$as_me:7615: \"$ac_compile\"") >&5
7616   (eval $ac_compile) 2>&5
7617   ac_status=$?
7618   echo "$as_me:7618: \$? = $ac_status" >&5
7619   (exit $ac_status); } &&
7620          { ac_try='test -s conftest.$ac_objext'
7621   { (eval echo "$as_me:7621: \"$ac_try\"") >&5
7622   (eval $ac_try) 2>&5
7623   ac_status=$?
7624   echo "$as_me:7624: \$? = $ac_status" >&5
7625   (exit $ac_status); }; }; then
7626   cf_cv_xopen_source=no
7627 else
7628   echo "$as_me: failed program was:" >&5
7629 cat conftest.$ac_ext >&5
7630 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7631 fi
7632 rm -f conftest.$ac_objext conftest.$ac_ext
7633         CPPFLAGS="$cf_save"
7634
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637
7638 fi
7639 echo "$as_me:7639: result: $cf_cv_xopen_source" >&5
7640 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7641
7642 if test "$cf_cv_xopen_source" != no ; then
7643
7644 CFLAGS=`echo "$CFLAGS" | \
7645         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7646                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7647
7648 CPPFLAGS=`echo "$CPPFLAGS" | \
7649         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7650                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7651
7652         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7653
7654 cf_fix_cppflags=no
7655 cf_new_cflags=
7656 cf_new_cppflags=
7657 cf_new_extra_cppflags=
7658
7659 for cf_add_cflags in $cf_temp_xopen_source
7660 do
7661 case $cf_fix_cppflags in
7662 no)
7663         case $cf_add_cflags in #(vi
7664         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7665                 case $cf_add_cflags in
7666                 -D*)
7667                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7668
7669                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7670                                 && test -z "${cf_tst_cflags}" \
7671                                 && cf_fix_cppflags=yes
7672
7673                         if test $cf_fix_cppflags = yes ; then
7674                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7675                                 continue
7676                         elif test "${cf_tst_cflags}" = "\"'" ; then
7677                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7678                                 continue
7679                         fi
7680                         ;;
7681                 esac
7682                 case "$CPPFLAGS" in
7683                 *$cf_add_cflags) #(vi
7684                         ;;
7685                 *) #(vi
7686                         case $cf_add_cflags in #(vi
7687                         -D*)
7688                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7689
7690 CPPFLAGS=`echo "$CPPFLAGS" | \
7691         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7692                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7693
7694                                 ;;
7695                         esac
7696                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7697                         ;;
7698                 esac
7699                 ;;
7700         *)
7701                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7702                 ;;
7703         esac
7704         ;;
7705 yes)
7706         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7707
7708         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7709
7710         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7711                 && test -z "${cf_tst_cflags}" \
7712                 && cf_fix_cppflags=no
7713         ;;
7714 esac
7715 done
7716
7717 if test -n "$cf_new_cflags" ; then
7718
7719         CFLAGS="$CFLAGS $cf_new_cflags"
7720 fi
7721
7722 if test -n "$cf_new_cppflags" ; then
7723
7724         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7725 fi
7726
7727 if test -n "$cf_new_extra_cppflags" ; then
7728
7729         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7730 fi
7731
7732 fi
7733
7734 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7735
7736 cf_save_CFLAGS="$CFLAGS"
7737 cf_save_CPPFLAGS="$CPPFLAGS"
7738
7739 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7740         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7741                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7742
7743 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7744         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7745                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7746
7747 echo "$as_me:7747: checking if we should define _POSIX_C_SOURCE" >&5
7748 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7749 if test "${cf_cv_posix_c_source+set}" = set; then
7750   echo $ECHO_N "(cached) $ECHO_C" >&6
7751 else
7752
7753 echo "${as_me:-configure}:7753: testing if the symbol is already defined go no further ..." 1>&5
7754
7755         cat >conftest.$ac_ext <<_ACEOF
7756 #line 7756 "configure"
7757 #include "confdefs.h"
7758 #include <sys/types.h>
7759 int
7760 main ()
7761 {
7762
7763 #ifndef _POSIX_C_SOURCE
7764 make an error
7765 #endif
7766   ;
7767   return 0;
7768 }
7769 _ACEOF
7770 rm -f conftest.$ac_objext
7771 if { (eval echo "$as_me:7771: \"$ac_compile\"") >&5
7772   (eval $ac_compile) 2>&5
7773   ac_status=$?
7774   echo "$as_me:7774: \$? = $ac_status" >&5
7775   (exit $ac_status); } &&
7776          { ac_try='test -s conftest.$ac_objext'
7777   { (eval echo "$as_me:7777: \"$ac_try\"") >&5
7778   (eval $ac_try) 2>&5
7779   ac_status=$?
7780   echo "$as_me:7780: \$? = $ac_status" >&5
7781   (exit $ac_status); }; }; then
7782   cf_cv_posix_c_source=no
7783 else
7784   echo "$as_me: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 cf_want_posix_source=no
7787          case .$cf_POSIX_C_SOURCE in #(vi
7788          .[12]??*) #(vi
7789                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7790                 ;;
7791          .2) #(vi
7792                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7793                 cf_want_posix_source=yes
7794                 ;;
7795          .*)
7796                 cf_want_posix_source=yes
7797                 ;;
7798          esac
7799          if test "$cf_want_posix_source" = yes ; then
7800                 cat >conftest.$ac_ext <<_ACEOF
7801 #line 7801 "configure"
7802 #include "confdefs.h"
7803 #include <sys/types.h>
7804 int
7805 main ()
7806 {
7807
7808 #ifdef _POSIX_SOURCE
7809 make an error
7810 #endif
7811   ;
7812   return 0;
7813 }
7814 _ACEOF
7815 rm -f conftest.$ac_objext
7816 if { (eval echo "$as_me:7816: \"$ac_compile\"") >&5
7817   (eval $ac_compile) 2>&5
7818   ac_status=$?
7819   echo "$as_me:7819: \$? = $ac_status" >&5
7820   (exit $ac_status); } &&
7821          { ac_try='test -s conftest.$ac_objext'
7822   { (eval echo "$as_me:7822: \"$ac_try\"") >&5
7823   (eval $ac_try) 2>&5
7824   ac_status=$?
7825   echo "$as_me:7825: \$? = $ac_status" >&5
7826   (exit $ac_status); }; }; then
7827   :
7828 else
7829   echo "$as_me: failed program was:" >&5
7830 cat conftest.$ac_ext >&5
7831 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7832 fi
7833 rm -f conftest.$ac_objext conftest.$ac_ext
7834          fi
7835
7836 echo "${as_me:-configure}:7836: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7837
7838          CFLAGS="$cf_trim_CFLAGS"
7839          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7840
7841 echo "${as_me:-configure}:7841: testing if the second compile does not leave our definition intact error ..." 1>&5
7842
7843          cat >conftest.$ac_ext <<_ACEOF
7844 #line 7844 "configure"
7845 #include "confdefs.h"
7846 #include <sys/types.h>
7847 int
7848 main ()
7849 {
7850
7851 #ifndef _POSIX_C_SOURCE
7852 make an error
7853 #endif
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 rm -f conftest.$ac_objext
7859 if { (eval echo "$as_me:7859: \"$ac_compile\"") >&5
7860   (eval $ac_compile) 2>&5
7861   ac_status=$?
7862   echo "$as_me:7862: \$? = $ac_status" >&5
7863   (exit $ac_status); } &&
7864          { ac_try='test -s conftest.$ac_objext'
7865   { (eval echo "$as_me:7865: \"$ac_try\"") >&5
7866   (eval $ac_try) 2>&5
7867   ac_status=$?
7868   echo "$as_me:7868: \$? = $ac_status" >&5
7869   (exit $ac_status); }; }; then
7870   :
7871 else
7872   echo "$as_me: failed program was:" >&5
7873 cat conftest.$ac_ext >&5
7874 cf_cv_posix_c_source=no
7875 fi
7876 rm -f conftest.$ac_objext conftest.$ac_ext
7877          CFLAGS="$cf_save_CFLAGS"
7878          CPPFLAGS="$cf_save_CPPFLAGS"
7879
7880 fi
7881 rm -f conftest.$ac_objext conftest.$ac_ext
7882
7883 fi
7884 echo "$as_me:7884: result: $cf_cv_posix_c_source" >&5
7885 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7886
7887 if test "$cf_cv_posix_c_source" != no ; then
7888         CFLAGS="$cf_trim_CFLAGS"
7889         CPPFLAGS="$cf_trim_CPPFLAGS"
7890
7891 cf_fix_cppflags=no
7892 cf_new_cflags=
7893 cf_new_cppflags=
7894 cf_new_extra_cppflags=
7895
7896 for cf_add_cflags in $cf_cv_posix_c_source
7897 do
7898 case $cf_fix_cppflags in
7899 no)
7900         case $cf_add_cflags in #(vi
7901         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7902                 case $cf_add_cflags in
7903                 -D*)
7904                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7905
7906                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7907                                 && test -z "${cf_tst_cflags}" \
7908                                 && cf_fix_cppflags=yes
7909
7910                         if test $cf_fix_cppflags = yes ; then
7911                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7912                                 continue
7913                         elif test "${cf_tst_cflags}" = "\"'" ; then
7914                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7915                                 continue
7916                         fi
7917                         ;;
7918                 esac
7919                 case "$CPPFLAGS" in
7920                 *$cf_add_cflags) #(vi
7921                         ;;
7922                 *) #(vi
7923                         case $cf_add_cflags in #(vi
7924                         -D*)
7925                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7926
7927 CPPFLAGS=`echo "$CPPFLAGS" | \
7928         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7929                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7930
7931                                 ;;
7932                         esac
7933                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7934                         ;;
7935                 esac
7936                 ;;
7937         *)
7938                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7939                 ;;
7940         esac
7941         ;;
7942 yes)
7943         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7944
7945         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7946
7947         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7948                 && test -z "${cf_tst_cflags}" \
7949                 && cf_fix_cppflags=no
7950         ;;
7951 esac
7952 done
7953
7954 if test -n "$cf_new_cflags" ; then
7955
7956         CFLAGS="$CFLAGS $cf_new_cflags"
7957 fi
7958
7959 if test -n "$cf_new_cppflags" ; then
7960
7961         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7962 fi
7963
7964 if test -n "$cf_new_extra_cppflags" ; then
7965
7966         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7967 fi
7968
7969 fi
7970
7971         ;;
7972 esac
7973
7974 if test -n "$cf_xopen_source" ; then
7975
7976 cf_fix_cppflags=no
7977 cf_new_cflags=
7978 cf_new_cppflags=
7979 cf_new_extra_cppflags=
7980
7981 for cf_add_cflags in $cf_xopen_source
7982 do
7983 case $cf_fix_cppflags in
7984 no)
7985         case $cf_add_cflags in #(vi
7986         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7987                 case $cf_add_cflags in
7988                 -D*)
7989                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7990
7991                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7992                                 && test -z "${cf_tst_cflags}" \
7993                                 && cf_fix_cppflags=yes
7994
7995                         if test $cf_fix_cppflags = yes ; then
7996                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7997                                 continue
7998                         elif test "${cf_tst_cflags}" = "\"'" ; then
7999                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8000                                 continue
8001                         fi
8002                         ;;
8003                 esac
8004                 case "$CPPFLAGS" in
8005                 *$cf_add_cflags) #(vi
8006                         ;;
8007                 *) #(vi
8008                         case $cf_add_cflags in #(vi
8009                         -D*)
8010                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8011
8012 CPPFLAGS=`echo "$CPPFLAGS" | \
8013         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8014                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8015
8016                                 ;;
8017                         esac
8018                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8019                         ;;
8020                 esac
8021                 ;;
8022         *)
8023                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8024                 ;;
8025         esac
8026         ;;
8027 yes)
8028         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8029
8030         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8031
8032         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8033                 && test -z "${cf_tst_cflags}" \
8034                 && cf_fix_cppflags=no
8035         ;;
8036 esac
8037 done
8038
8039 if test -n "$cf_new_cflags" ; then
8040
8041         CFLAGS="$CFLAGS $cf_new_cflags"
8042 fi
8043
8044 if test -n "$cf_new_cppflags" ; then
8045
8046         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8047 fi
8048
8049 if test -n "$cf_new_extra_cppflags" ; then
8050
8051         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8052 fi
8053
8054 fi
8055
8056 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8057         echo "$as_me:8057: checking if _XOPEN_SOURCE really is set" >&5
8058 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8059         cat >conftest.$ac_ext <<_ACEOF
8060 #line 8060 "configure"
8061 #include "confdefs.h"
8062 #include <stdlib.h>
8063 int
8064 main ()
8065 {
8066
8067 #ifndef _XOPEN_SOURCE
8068 make an error
8069 #endif
8070   ;
8071   return 0;
8072 }
8073 _ACEOF
8074 rm -f conftest.$ac_objext
8075 if { (eval echo "$as_me:8075: \"$ac_compile\"") >&5
8076   (eval $ac_compile) 2>&5
8077   ac_status=$?
8078   echo "$as_me:8078: \$? = $ac_status" >&5
8079   (exit $ac_status); } &&
8080          { ac_try='test -s conftest.$ac_objext'
8081   { (eval echo "$as_me:8081: \"$ac_try\"") >&5
8082   (eval $ac_try) 2>&5
8083   ac_status=$?
8084   echo "$as_me:8084: \$? = $ac_status" >&5
8085   (exit $ac_status); }; }; then
8086   cf_XOPEN_SOURCE_set=yes
8087 else
8088   echo "$as_me: failed program was:" >&5
8089 cat conftest.$ac_ext >&5
8090 cf_XOPEN_SOURCE_set=no
8091 fi
8092 rm -f conftest.$ac_objext conftest.$ac_ext
8093         echo "$as_me:8093: result: $cf_XOPEN_SOURCE_set" >&5
8094 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8095         if test $cf_XOPEN_SOURCE_set = yes
8096         then
8097                 cat >conftest.$ac_ext <<_ACEOF
8098 #line 8098 "configure"
8099 #include "confdefs.h"
8100 #include <stdlib.h>
8101 int
8102 main ()
8103 {
8104
8105 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8106 make an error
8107 #endif
8108   ;
8109   return 0;
8110 }
8111 _ACEOF
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
8114   (eval $ac_compile) 2>&5
8115   ac_status=$?
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); } &&
8118          { ac_try='test -s conftest.$ac_objext'
8119   { (eval echo "$as_me:8119: \"$ac_try\"") >&5
8120   (eval $ac_try) 2>&5
8121   ac_status=$?
8122   echo "$as_me:8122: \$? = $ac_status" >&5
8123   (exit $ac_status); }; }; then
8124   cf_XOPEN_SOURCE_set_ok=yes
8125 else
8126   echo "$as_me: failed program was:" >&5
8127 cat conftest.$ac_ext >&5
8128 cf_XOPEN_SOURCE_set_ok=no
8129 fi
8130 rm -f conftest.$ac_objext conftest.$ac_ext
8131                 if test $cf_XOPEN_SOURCE_set_ok = no
8132                 then
8133                         { echo "$as_me:8133: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8134 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8135                 fi
8136         else
8137
8138 echo "$as_me:8138: checking if we should define _XOPEN_SOURCE" >&5
8139 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8140 if test "${cf_cv_xopen_source+set}" = set; then
8141   echo $ECHO_N "(cached) $ECHO_C" >&6
8142 else
8143
8144         cat >conftest.$ac_ext <<_ACEOF
8145 #line 8145 "configure"
8146 #include "confdefs.h"
8147
8148 #include <stdlib.h>
8149 #include <string.h>
8150 #include <sys/types.h>
8151
8152 int
8153 main ()
8154 {
8155
8156 #ifndef _XOPEN_SOURCE
8157 make an error
8158 #endif
8159   ;
8160   return 0;
8161 }
8162 _ACEOF
8163 rm -f conftest.$ac_objext
8164 if { (eval echo "$as_me:8164: \"$ac_compile\"") >&5
8165   (eval $ac_compile) 2>&5
8166   ac_status=$?
8167   echo "$as_me:8167: \$? = $ac_status" >&5
8168   (exit $ac_status); } &&
8169          { ac_try='test -s conftest.$ac_objext'
8170   { (eval echo "$as_me:8170: \"$ac_try\"") >&5
8171   (eval $ac_try) 2>&5
8172   ac_status=$?
8173   echo "$as_me:8173: \$? = $ac_status" >&5
8174   (exit $ac_status); }; }; then
8175   cf_cv_xopen_source=no
8176 else
8177   echo "$as_me: failed program was:" >&5
8178 cat conftest.$ac_ext >&5
8179 cf_save="$CPPFLAGS"
8180          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8181          cat >conftest.$ac_ext <<_ACEOF
8182 #line 8182 "configure"
8183 #include "confdefs.h"
8184
8185 #include <stdlib.h>
8186 #include <string.h>
8187 #include <sys/types.h>
8188
8189 int
8190 main ()
8191 {
8192
8193 #ifdef _XOPEN_SOURCE
8194 make an error
8195 #endif
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext
8201 if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5
8202   (eval $ac_compile) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest.$ac_objext'
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   cf_cv_xopen_source=no
8213 else
8214   echo "$as_me: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8217 fi
8218 rm -f conftest.$ac_objext conftest.$ac_ext
8219         CPPFLAGS="$cf_save"
8220
8221 fi
8222 rm -f conftest.$ac_objext conftest.$ac_ext
8223
8224 fi
8225 echo "$as_me:8225: result: $cf_cv_xopen_source" >&5
8226 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8227
8228 if test "$cf_cv_xopen_source" != no ; then
8229
8230 CFLAGS=`echo "$CFLAGS" | \
8231         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8232                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8233
8234 CPPFLAGS=`echo "$CPPFLAGS" | \
8235         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8236                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8237
8238         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8239
8240 cf_fix_cppflags=no
8241 cf_new_cflags=
8242 cf_new_cppflags=
8243 cf_new_extra_cppflags=
8244
8245 for cf_add_cflags in $cf_temp_xopen_source
8246 do
8247 case $cf_fix_cppflags in
8248 no)
8249         case $cf_add_cflags in #(vi
8250         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8251                 case $cf_add_cflags in
8252                 -D*)
8253                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8254
8255                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8256                                 && test -z "${cf_tst_cflags}" \
8257                                 && cf_fix_cppflags=yes
8258
8259                         if test $cf_fix_cppflags = yes ; then
8260                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8261                                 continue
8262                         elif test "${cf_tst_cflags}" = "\"'" ; then
8263                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8264                                 continue
8265                         fi
8266                         ;;
8267                 esac
8268                 case "$CPPFLAGS" in
8269                 *$cf_add_cflags) #(vi
8270                         ;;
8271                 *) #(vi
8272                         case $cf_add_cflags in #(vi
8273                         -D*)
8274                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8275
8276 CPPFLAGS=`echo "$CPPFLAGS" | \
8277         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8278                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8279
8280                                 ;;
8281                         esac
8282                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8283                         ;;
8284                 esac
8285                 ;;
8286         *)
8287                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8288                 ;;
8289         esac
8290         ;;
8291 yes)
8292         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8293
8294         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8295
8296         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8297                 && test -z "${cf_tst_cflags}" \
8298                 && cf_fix_cppflags=no
8299         ;;
8300 esac
8301 done
8302
8303 if test -n "$cf_new_cflags" ; then
8304
8305         CFLAGS="$CFLAGS $cf_new_cflags"
8306 fi
8307
8308 if test -n "$cf_new_cppflags" ; then
8309
8310         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8311 fi
8312
8313 if test -n "$cf_new_extra_cppflags" ; then
8314
8315         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8316 fi
8317
8318 fi
8319
8320         fi
8321 fi
8322
8323 # Work around breakage on OS X
8324
8325 echo "$as_me:8325: checking if SIGWINCH is defined" >&5
8326 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8327 if test "${cf_cv_define_sigwinch+set}" = set; then
8328   echo $ECHO_N "(cached) $ECHO_C" >&6
8329 else
8330
8331         cat >conftest.$ac_ext <<_ACEOF
8332 #line 8332 "configure"
8333 #include "confdefs.h"
8334
8335 #include <sys/types.h>
8336 #include <sys/signal.h>
8337
8338 int
8339 main ()
8340 {
8341 int x = SIGWINCH
8342   ;
8343   return 0;
8344 }
8345 _ACEOF
8346 rm -f conftest.$ac_objext
8347 if { (eval echo "$as_me:8347: \"$ac_compile\"") >&5
8348   (eval $ac_compile) 2>&5
8349   ac_status=$?
8350   echo "$as_me:8350: \$? = $ac_status" >&5
8351   (exit $ac_status); } &&
8352          { ac_try='test -s conftest.$ac_objext'
8353   { (eval echo "$as_me:8353: \"$ac_try\"") >&5
8354   (eval $ac_try) 2>&5
8355   ac_status=$?
8356   echo "$as_me:8356: \$? = $ac_status" >&5
8357   (exit $ac_status); }; }; then
8358   cf_cv_define_sigwinch=yes
8359 else
8360   echo "$as_me: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8362 cat >conftest.$ac_ext <<_ACEOF
8363 #line 8363 "configure"
8364 #include "confdefs.h"
8365
8366 #undef _XOPEN_SOURCE
8367 #undef _POSIX_SOURCE
8368 #undef _POSIX_C_SOURCE
8369 #include <sys/types.h>
8370 #include <sys/signal.h>
8371
8372 int
8373 main ()
8374 {
8375 int x = SIGWINCH
8376   ;
8377   return 0;
8378 }
8379 _ACEOF
8380 rm -f conftest.$ac_objext
8381 if { (eval echo "$as_me:8381: \"$ac_compile\"") >&5
8382   (eval $ac_compile) 2>&5
8383   ac_status=$?
8384   echo "$as_me:8384: \$? = $ac_status" >&5
8385   (exit $ac_status); } &&
8386          { ac_try='test -s conftest.$ac_objext'
8387   { (eval echo "$as_me:8387: \"$ac_try\"") >&5
8388   (eval $ac_try) 2>&5
8389   ac_status=$?
8390   echo "$as_me:8390: \$? = $ac_status" >&5
8391   (exit $ac_status); }; }; then
8392   cf_cv_define_sigwinch=maybe
8393 else
8394   echo "$as_me: failed program was:" >&5
8395 cat conftest.$ac_ext >&5
8396 cf_cv_define_sigwinch=no
8397 fi
8398 rm -f conftest.$ac_objext conftest.$ac_ext
8399
8400 fi
8401 rm -f conftest.$ac_objext conftest.$ac_ext
8402
8403 fi
8404 echo "$as_me:8404: result: $cf_cv_define_sigwinch" >&5
8405 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8406
8407 if test "$cf_cv_define_sigwinch" = maybe ; then
8408 echo "$as_me:8408: checking for actual SIGWINCH definition" >&5
8409 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8410 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8411   echo $ECHO_N "(cached) $ECHO_C" >&6
8412 else
8413
8414 cf_cv_fixup_sigwinch=unknown
8415 cf_sigwinch=32
8416 while test $cf_sigwinch != 1
8417 do
8418         cat >conftest.$ac_ext <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421
8422 #undef _XOPEN_SOURCE
8423 #undef _POSIX_SOURCE
8424 #undef _POSIX_C_SOURCE
8425 #include <sys/types.h>
8426 #include <sys/signal.h>
8427
8428 int
8429 main ()
8430 {
8431
8432 #if SIGWINCH != $cf_sigwinch
8433 make an error
8434 #endif
8435 int x = SIGWINCH
8436   ;
8437   return 0;
8438 }
8439 _ACEOF
8440 rm -f conftest.$ac_objext
8441 if { (eval echo "$as_me:8441: \"$ac_compile\"") >&5
8442   (eval $ac_compile) 2>&5
8443   ac_status=$?
8444   echo "$as_me:8444: \$? = $ac_status" >&5
8445   (exit $ac_status); } &&
8446          { ac_try='test -s conftest.$ac_objext'
8447   { (eval echo "$as_me:8447: \"$ac_try\"") >&5
8448   (eval $ac_try) 2>&5
8449   ac_status=$?
8450   echo "$as_me:8450: \$? = $ac_status" >&5
8451   (exit $ac_status); }; }; then
8452   cf_cv_fixup_sigwinch=$cf_sigwinch
8453          break
8454 else
8455   echo "$as_me: failed program was:" >&5
8456 cat conftest.$ac_ext >&5
8457 fi
8458 rm -f conftest.$ac_objext conftest.$ac_ext
8459
8460 cf_sigwinch=`expr $cf_sigwinch - 1`
8461 done
8462
8463 fi
8464 echo "$as_me:8464: result: $cf_cv_fixup_sigwinch" >&5
8465 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8466
8467         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8468                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8469         fi
8470 fi
8471
8472 # Checks for CODESET support.
8473
8474   echo "$as_me:8474: checking for nl_langinfo and CODESET" >&5
8475 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8476 if test "${am_cv_langinfo_codeset+set}" = set; then
8477   echo $ECHO_N "(cached) $ECHO_C" >&6
8478 else
8479   cat >conftest.$ac_ext <<_ACEOF
8480 #line 8480 "configure"
8481 #include "confdefs.h"
8482 #include <langinfo.h>
8483 int
8484 main ()
8485 {
8486 char* cs = nl_langinfo(CODESET);
8487   ;
8488   return 0;
8489 }
8490 _ACEOF
8491 rm -f conftest.$ac_objext conftest$ac_exeext
8492 if { (eval echo "$as_me:8492: \"$ac_link\"") >&5
8493   (eval $ac_link) 2>&5
8494   ac_status=$?
8495   echo "$as_me:8495: \$? = $ac_status" >&5
8496   (exit $ac_status); } &&
8497          { ac_try='test -s conftest$ac_exeext'
8498   { (eval echo "$as_me:8498: \"$ac_try\"") >&5
8499   (eval $ac_try) 2>&5
8500   ac_status=$?
8501   echo "$as_me:8501: \$? = $ac_status" >&5
8502   (exit $ac_status); }; }; then
8503   am_cv_langinfo_codeset=yes
8504 else
8505   echo "$as_me: failed program was:" >&5
8506 cat conftest.$ac_ext >&5
8507 am_cv_langinfo_codeset=no
8508 fi
8509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8510
8511 fi
8512 echo "$as_me:8512: result: $am_cv_langinfo_codeset" >&5
8513 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8514   if test $am_cv_langinfo_codeset = yes; then
8515
8516 cat >>confdefs.h <<\EOF
8517 #define HAVE_LANGINFO_CODESET 1
8518 EOF
8519
8520   fi
8521
8522 # use these variables to work around a defect in gcc's fixincludes.
8523 NCURSES_OK_WCHAR_T=
8524 NCURSES_OK_WINT_T=
8525
8526 echo "$as_me:8526: checking if you want wide-character code" >&5
8527 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8528
8529 # Check whether --enable-widec or --disable-widec was given.
8530 if test "${enable_widec+set}" = set; then
8531   enableval="$enable_widec"
8532   with_widec=$enableval
8533 else
8534   with_widec=no
8535 fi;
8536 echo "$as_me:8536: result: $with_widec" >&5
8537 echo "${ECHO_T}$with_widec" >&6
8538 if test "$with_widec" = yes ; then
8539         LIB_SUFFIX="w${LIB_SUFFIX}"
8540         cat >>confdefs.h <<\EOF
8541 #define USE_WIDEC_SUPPORT 1
8542 EOF
8543
8544         cat >>confdefs.h <<\EOF
8545 #define NCURSES_WIDECHAR 1
8546 EOF
8547
8548 echo "$as_me:8548: checking if wchar.h can be used as is" >&5
8549 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8550 if test "${cf_cv_wchar_h_okay+set}" = set; then
8551   echo $ECHO_N "(cached) $ECHO_C" >&6
8552 else
8553
8554 cat >conftest.$ac_ext <<_ACEOF
8555 #line 8555 "configure"
8556 #include "confdefs.h"
8557
8558 #include <stdlib.h>
8559 #include <wchar.h>
8560
8561 int
8562 main ()
8563 {
8564
8565         wint_t foo = 0;
8566         int bar = iswpunct(foo)
8567   ;
8568   return 0;
8569 }
8570 _ACEOF
8571 rm -f conftest.$ac_objext
8572 if { (eval echo "$as_me:8572: \"$ac_compile\"") >&5
8573   (eval $ac_compile) 2>&5
8574   ac_status=$?
8575   echo "$as_me:8575: \$? = $ac_status" >&5
8576   (exit $ac_status); } &&
8577          { ac_try='test -s conftest.$ac_objext'
8578   { (eval echo "$as_me:8578: \"$ac_try\"") >&5
8579   (eval $ac_try) 2>&5
8580   ac_status=$?
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); }; }; then
8583   cf_cv_wchar_h_okay=yes
8584 else
8585   echo "$as_me: failed program was:" >&5
8586 cat conftest.$ac_ext >&5
8587 cf_cv_wchar_h_okay=no
8588 fi
8589 rm -f conftest.$ac_objext conftest.$ac_ext
8590 fi
8591 echo "$as_me:8591: result: $cf_cv_wchar_h_okay" >&5
8592 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8593
8594 if test $cf_cv_wchar_h_okay = no
8595 then
8596
8597 echo "$as_me:8597: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8598 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8599 cat >conftest.$ac_ext <<_ACEOF
8600 #line 8600 "configure"
8601 #include "confdefs.h"
8602 #include <sys/types.h>
8603
8604 int
8605 main ()
8606 {
8607
8608 #ifndef _XOPEN_SOURCE_EXTENDED
8609 make an error
8610 #endif
8611   ;
8612   return 0;
8613 }
8614 _ACEOF
8615 rm -f conftest.$ac_objext
8616 if { (eval echo "$as_me:8616: \"$ac_compile\"") >&5
8617   (eval $ac_compile) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); } &&
8621          { ac_try='test -s conftest.$ac_objext'
8622   { (eval echo "$as_me:8622: \"$ac_try\"") >&5
8623   (eval $ac_try) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); }; }; then
8627   cf_result=no
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8631 cf_result=yes
8632 fi
8633 rm -f conftest.$ac_objext conftest.$ac_ext
8634 echo "$as_me:8634: result: $cf_result" >&5
8635 echo "${ECHO_T}$cf_result" >&6
8636
8637 if test "$cf_result" = yes ; then
8638         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8639 elif test "x" != "x" ; then
8640         echo "$as_me:8640: checking checking for compatible value versus " >&5
8641 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8642         cat >conftest.$ac_ext <<_ACEOF
8643 #line 8643 "configure"
8644 #include "confdefs.h"
8645 #include <sys/types.h>
8646
8647 int
8648 main ()
8649 {
8650
8651 #if _XOPEN_SOURCE_EXTENDED- < 0
8652 make an error
8653 #endif
8654   ;
8655   return 0;
8656 }
8657 _ACEOF
8658 rm -f conftest.$ac_objext
8659 if { (eval echo "$as_me:8659: \"$ac_compile\"") >&5
8660   (eval $ac_compile) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit $ac_status); } &&
8664          { ac_try='test -s conftest.$ac_objext'
8665   { (eval echo "$as_me:8665: \"$ac_try\"") >&5
8666   (eval $ac_try) 2>&5
8667   ac_status=$?
8668   echo "$as_me:8668: \$? = $ac_status" >&5
8669   (exit $ac_status); }; }; then
8670   cf_result=yes
8671 else
8672   echo "$as_me: failed program was:" >&5
8673 cat conftest.$ac_ext >&5
8674 cf_result=no
8675 fi
8676 rm -f conftest.$ac_objext conftest.$ac_ext
8677         echo "$as_me:8677: result: $cf_result" >&5
8678 echo "${ECHO_T}$cf_result" >&6
8679         if test "$cf_result" = no ; then
8680                 # perhaps we can override it - try...
8681                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8682         fi
8683 fi
8684
8685 fi
8686
8687         # with_overwrite=no
8688         NCURSES_CH_T=cchar_t
8689
8690 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8691 do
8692 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8693 echo "$as_me:8693: checking for $ac_func" >&5
8694 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8695 if eval "test \"\${$as_ac_var+set}\" = set"; then
8696   echo $ECHO_N "(cached) $ECHO_C" >&6
8697 else
8698   cat >conftest.$ac_ext <<_ACEOF
8699 #line 8699 "configure"
8700 #include "confdefs.h"
8701 /* System header to define __stub macros and hopefully few prototypes,
8702     which can conflict with char $ac_func (); below.  */
8703 #include <assert.h>
8704 /* Override any gcc2 internal prototype to avoid an error.  */
8705 #ifdef __cplusplus
8706 extern "C"
8707 #endif
8708 /* We use char because int might match the return type of a gcc2
8709    builtin and then its argument prototype would still apply.  */
8710 char $ac_func ();
8711 char (*f) ();
8712
8713 int
8714 main ()
8715 {
8716 /* The GNU C library defines this for functions which it implements
8717     to always fail with ENOSYS.  Some functions are actually named
8718     something starting with __ and the normal name is an alias.  */
8719 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8720 choke me
8721 #else
8722 f = $ac_func;
8723 #endif
8724
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext conftest$ac_exeext
8730 if { (eval echo "$as_me:8730: \"$ac_link\"") >&5
8731   (eval $ac_link) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest$ac_exeext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   eval "$as_ac_var=yes"
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 eval "$as_ac_var=no"
8746 fi
8747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8748 fi
8749 echo "$as_me:8749: result: `eval echo '${'$as_ac_var'}'`" >&5
8750 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8751 if test `eval echo '${'$as_ac_var'}'` = yes; then
8752   cat >>confdefs.h <<EOF
8753 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8754 EOF
8755
8756 fi
8757 done
8758
8759         if test "$ac_cv_func_putwc" != yes ; then
8760
8761 echo "$as_me:8761: checking for multibyte character support" >&5
8762 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8763 if test "${cf_cv_utf8_lib+set}" = set; then
8764   echo $ECHO_N "(cached) $ECHO_C" >&6
8765 else
8766
8767         cf_save_LIBS="$LIBS"
8768         cat >conftest.$ac_ext <<_ACEOF
8769 #line 8769 "configure"
8770 #include "confdefs.h"
8771
8772 #include <stdlib.h>
8773 int
8774 main ()
8775 {
8776 putwc(0,0);
8777   ;
8778   return 0;
8779 }
8780 _ACEOF
8781 rm -f conftest.$ac_objext conftest$ac_exeext
8782 if { (eval echo "$as_me:8782: \"$ac_link\"") >&5
8783   (eval $ac_link) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); } &&
8787          { ac_try='test -s conftest$ac_exeext'
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_utf8_lib=yes
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8797
8798 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8799 # will be set on completion of the AC_TRY_LINK below.
8800 cf_cv_header_path_utf8=
8801 cf_cv_library_path_utf8=
8802
8803 echo "${as_me:-configure}:8803: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8804
8805 cf_save_LIBS="$LIBS"
8806
8807 cat >conftest.$ac_ext <<_ACEOF
8808 #line 8808 "configure"
8809 #include "confdefs.h"
8810
8811 #include <libutf8.h>
8812 int
8813 main ()
8814 {
8815 putwc(0,0);
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 rm -f conftest.$ac_objext conftest$ac_exeext
8821 if { (eval echo "$as_me:8821: \"$ac_link\"") >&5
8822   (eval $ac_link) 2>&5
8823   ac_status=$?
8824   echo "$as_me:8824: \$? = $ac_status" >&5
8825   (exit $ac_status); } &&
8826          { ac_try='test -s conftest$ac_exeext'
8827   { (eval echo "$as_me:8827: \"$ac_try\"") >&5
8828   (eval $ac_try) 2>&5
8829   ac_status=$?
8830   echo "$as_me:8830: \$? = $ac_status" >&5
8831   (exit $ac_status); }; }; then
8832
8833         cf_cv_find_linkage_utf8=yes
8834         cf_cv_header_path_utf8=/usr/include
8835         cf_cv_library_path_utf8=/usr/lib
8836
8837 else
8838   echo "$as_me: failed program was:" >&5
8839 cat conftest.$ac_ext >&5
8840
8841 LIBS="-lutf8  $cf_save_LIBS"
8842
8843 cat >conftest.$ac_ext <<_ACEOF
8844 #line 8844 "configure"
8845 #include "confdefs.h"
8846
8847 #include <libutf8.h>
8848 int
8849 main ()
8850 {
8851 putwc(0,0);
8852   ;
8853   return 0;
8854 }
8855 _ACEOF
8856 rm -f conftest.$ac_objext conftest$ac_exeext
8857 if { (eval echo "$as_me:8857: \"$ac_link\"") >&5
8858   (eval $ac_link) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); } &&
8862          { ac_try='test -s conftest$ac_exeext'
8863   { (eval echo "$as_me:8863: \"$ac_try\"") >&5
8864   (eval $ac_try) 2>&5
8865   ac_status=$?
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); }; }; then
8868
8869         cf_cv_find_linkage_utf8=yes
8870         cf_cv_header_path_utf8=/usr/include
8871         cf_cv_library_path_utf8=/usr/lib
8872         cf_cv_library_file_utf8="-lutf8"
8873
8874 else
8875   echo "$as_me: failed program was:" >&5
8876 cat conftest.$ac_ext >&5
8877
8878         cf_cv_find_linkage_utf8=no
8879         LIBS="$cf_save_LIBS"
8880
8881     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8882
8883 echo "${as_me:-configure}:8883: testing find linkage for utf8 library ..." 1>&5
8884
8885 echo "${as_me:-configure}:8885: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8886
8887     cf_save_CPPFLAGS="$CPPFLAGS"
8888     cf_test_CPPFLAGS="$CPPFLAGS"
8889
8890 cf_search=
8891
8892 # collect the current set of include-directories from compiler flags
8893 cf_header_path_list=""
8894 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8895         for cf_header_path in $CPPFLAGS $CFLAGS
8896         do
8897                 case $cf_header_path in #(vi
8898                 -I*)
8899                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8900
8901 test "$cf_header_path" != "NONE" && \
8902 test -d "$cf_header_path" && \
8903  {
8904         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8905         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8906         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8907         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8908         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8909         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8910 }
8911
8912                         cf_header_path_list="$cf_header_path_list $cf_search"
8913                         ;;
8914                 esac
8915         done
8916 fi
8917
8918 # add the variations for the package we are looking for
8919
8920 cf_search=
8921
8922 test "/usr" != "$prefix" && \
8923 test -d "/usr" && \
8924 (test $prefix = NONE || test "/usr" != "$prefix") && {
8925         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8926         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8927         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8928         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8929         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8930         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8931 }
8932
8933 test "$prefix" != "NONE" && \
8934 test -d "$prefix" && \
8935  {
8936         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8937         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8938         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8939         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8940         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8941         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8942 }
8943
8944 test "/usr/local" != "$prefix" && \
8945 test -d "/usr/local" && \
8946 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8947         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8948         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8949         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8950         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8951         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8952         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8953 }
8954
8955 test "/opt" != "$prefix" && \
8956 test -d "/opt" && \
8957 (test $prefix = NONE || test "/opt" != "$prefix") && {
8958         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8959         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8960         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8961         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8962         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8963         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8964 }
8965
8966 test "$HOME" != "$prefix" && \
8967 test -d "$HOME" && \
8968 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8969         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8970         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8971         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8972         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8973         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8974         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8975 }
8976
8977 test "$includedir" != NONE && \
8978 test "$includedir" != "/usr/include" && \
8979 test -d "$includedir" && {
8980         test -d $includedir &&    cf_search="$cf_search $includedir"
8981         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8982 }
8983
8984 test "$oldincludedir" != NONE && \
8985 test "$oldincludedir" != "/usr/include" && \
8986 test -d "$oldincludedir" && {
8987         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8988         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8989 }
8990
8991 cf_search="$cf_search $cf_header_path_list"
8992
8993     for cf_cv_header_path_utf8 in $cf_search
8994     do
8995       if test -d $cf_cv_header_path_utf8 ; then
8996         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8997
8998 echo "${as_me:-configure}:8998: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8999
9000         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9001         cat >conftest.$ac_ext <<_ACEOF
9002 #line 9002 "configure"
9003 #include "confdefs.h"
9004
9005 #include <libutf8.h>
9006 int
9007 main ()
9008 {
9009 putwc(0,0);
9010   ;
9011   return 0;
9012 }
9013 _ACEOF
9014 rm -f conftest.$ac_objext
9015 if { (eval echo "$as_me:9015: \"$ac_compile\"") >&5
9016   (eval $ac_compile) 2>&5
9017   ac_status=$?
9018   echo "$as_me:9018: \$? = $ac_status" >&5
9019   (exit $ac_status); } &&
9020          { ac_try='test -s conftest.$ac_objext'
9021   { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9022   (eval $ac_try) 2>&5
9023   ac_status=$?
9024   echo "$as_me:9024: \$? = $ac_status" >&5
9025   (exit $ac_status); }; }; then
9026
9027             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9028
9029 echo "${as_me:-configure}:9029: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9030
9031             cf_cv_find_linkage_utf8=maybe
9032             cf_test_CPPFLAGS="$CPPFLAGS"
9033             break
9034 else
9035   echo "$as_me: failed program was:" >&5
9036 cat conftest.$ac_ext >&5
9037
9038             CPPFLAGS="$cf_save_CPPFLAGS"
9039
9040 fi
9041 rm -f conftest.$ac_objext conftest.$ac_ext
9042       fi
9043     done
9044
9045     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9046
9047 echo "${as_me:-configure}:9047: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9048
9049       cf_save_LIBS="$LIBS"
9050       cf_save_LDFLAGS="$LDFLAGS"
9051
9052       if test "$cf_cv_find_linkage_utf8" != yes ; then
9053
9054 cf_search=
9055 cf_library_path_list=""
9056 if test -n "${LDFLAGS}${LIBS}" ; then
9057         for cf_library_path in $LDFLAGS $LIBS
9058         do
9059                 case $cf_library_path in #(vi
9060                 -L*)
9061                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9062
9063 test "$cf_library_path" != "NONE" && \
9064 test -d "$cf_library_path" && \
9065  {
9066         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9067         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9068         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9069         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9070         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9071         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9072 }
9073
9074                         cf_library_path_list="$cf_library_path_list $cf_search"
9075                         ;;
9076                 esac
9077         done
9078 fi
9079
9080 cf_search=
9081
9082 test "/usr" != "$prefix" && \
9083 test -d "/usr" && \
9084 (test $prefix = NONE || test "/usr" != "$prefix") && {
9085         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9086         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9087         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9088         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9089         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9090         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9091 }
9092
9093 test "$prefix" != "NONE" && \
9094 test -d "$prefix" && \
9095  {
9096         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9097         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9098         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9099         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9100         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9101         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9102 }
9103
9104 test "/usr/local" != "$prefix" && \
9105 test -d "/usr/local" && \
9106 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9107         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9108         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9109         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9110         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9111         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9112         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9113 }
9114
9115 test "/opt" != "$prefix" && \
9116 test -d "/opt" && \
9117 (test $prefix = NONE || test "/opt" != "$prefix") && {
9118         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9119         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9120         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9121         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9122         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9123         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9124 }
9125
9126 test "$HOME" != "$prefix" && \
9127 test -d "$HOME" && \
9128 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9129         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9130         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9131         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9132         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9133         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9134         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9135 }
9136
9137 cf_search="$cf_library_path_list $cf_search"
9138
9139         for cf_cv_library_path_utf8 in $cf_search
9140         do
9141           if test -d $cf_cv_library_path_utf8 ; then
9142             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9143
9144 echo "${as_me:-configure}:9144: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9145
9146             CPPFLAGS="$cf_test_CPPFLAGS"
9147             LIBS="-lutf8  $cf_save_LIBS"
9148             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9149             cat >conftest.$ac_ext <<_ACEOF
9150 #line 9150 "configure"
9151 #include "confdefs.h"
9152
9153 #include <libutf8.h>
9154 int
9155 main ()
9156 {
9157 putwc(0,0);
9158   ;
9159   return 0;
9160 }
9161 _ACEOF
9162 rm -f conftest.$ac_objext conftest$ac_exeext
9163 if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164   (eval $ac_link) 2>&5
9165   ac_status=$?
9166   echo "$as_me:9166: \$? = $ac_status" >&5
9167   (exit $ac_status); } &&
9168          { ac_try='test -s conftest$ac_exeext'
9169   { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170   (eval $ac_try) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); }; }; then
9174
9175                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9176
9177 echo "${as_me:-configure}:9177: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9178
9179                 cf_cv_find_linkage_utf8=yes
9180                 cf_cv_library_file_utf8="-lutf8"
9181                 break
9182 else
9183   echo "$as_me: failed program was:" >&5
9184 cat conftest.$ac_ext >&5
9185
9186                 CPPFLAGS="$cf_save_CPPFLAGS"
9187                 LIBS="$cf_save_LIBS"
9188                 LDFLAGS="$cf_save_LDFLAGS"
9189
9190 fi
9191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9192           fi
9193         done
9194         CPPFLAGS="$cf_save_CPPFLAGS"
9195         LDFLAGS="$cf_save_LDFLAGS"
9196       fi
9197
9198     else
9199       cf_cv_find_linkage_utf8=no
9200     fi
9201
9202 fi
9203 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9204
9205 fi
9206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9207
9208 LIBS="$cf_save_LIBS"
9209
9210 if test "$cf_cv_find_linkage_utf8" = yes ; then
9211 cf_cv_utf8_lib=add-on
9212 else
9213 cf_cv_utf8_lib=no
9214 fi
9215
9216 fi
9217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9218 fi
9219 echo "$as_me:9219: result: $cf_cv_utf8_lib" >&5
9220 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9221
9222 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9223 # ncurses/ncursesw:
9224 if test "$cf_cv_utf8_lib" = "add-on" ; then
9225         cat >>confdefs.h <<\EOF
9226 #define HAVE_LIBUTF8_H 1
9227 EOF
9228
9229 if test -n "$cf_cv_header_path_utf8" ; then
9230   for cf_add_incdir in $cf_cv_header_path_utf8
9231   do
9232         while test $cf_add_incdir != /usr/include
9233         do
9234           if test -d $cf_add_incdir
9235           then
9236                 cf_have_incdir=no
9237                 if test -n "$CFLAGS$CPPFLAGS" ; then
9238                   # a loop is needed to ensure we can add subdirs of existing dirs
9239                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9240                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9241                           cf_have_incdir=yes; break
9242                         fi
9243                   done
9244                 fi
9245
9246                 if test "$cf_have_incdir" = no ; then
9247                   if test "$cf_add_incdir" = /usr/local/include ; then
9248                         if test "$GCC" = yes
9249                         then
9250                           cf_save_CPPFLAGS=$CPPFLAGS
9251                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9252                           cat >conftest.$ac_ext <<_ACEOF
9253 #line 9253 "configure"
9254 #include "confdefs.h"
9255 #include <stdio.h>
9256 int
9257 main ()
9258 {
9259 printf("Hello")
9260   ;
9261   return 0;
9262 }
9263 _ACEOF
9264 rm -f conftest.$ac_objext
9265 if { (eval echo "$as_me:9265: \"$ac_compile\"") >&5
9266   (eval $ac_compile) 2>&5
9267   ac_status=$?
9268   echo "$as_me:9268: \$? = $ac_status" >&5
9269   (exit $ac_status); } &&
9270          { ac_try='test -s conftest.$ac_objext'
9271   { (eval echo "$as_me:9271: \"$ac_try\"") >&5
9272   (eval $ac_try) 2>&5
9273   ac_status=$?
9274   echo "$as_me:9274: \$? = $ac_status" >&5
9275   (exit $ac_status); }; }; then
9276   :
9277 else
9278   echo "$as_me: failed program was:" >&5
9279 cat conftest.$ac_ext >&5
9280 cf_have_incdir=yes
9281 fi
9282 rm -f conftest.$ac_objext conftest.$ac_ext
9283                           CPPFLAGS=$cf_save_CPPFLAGS
9284                         fi
9285                   fi
9286                 fi
9287
9288                 if test "$cf_have_incdir" = no ; then
9289                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9290
9291 echo "${as_me:-configure}:9291: testing adding $cf_add_incdir to include-path ..." 1>&5
9292
9293                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9294
9295                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9296                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9297                   cf_add_incdir="$cf_top_incdir"
9298                 else
9299                   break
9300                 fi
9301           fi
9302         done
9303   done
9304 fi
9305
9306 if test -n "$cf_cv_library_path_utf8" ; then
9307   for cf_add_libdir in $cf_cv_library_path_utf8
9308   do
9309     if test $cf_add_libdir = /usr/lib ; then
9310       :
9311     elif test -d $cf_add_libdir
9312     then
9313       cf_have_libdir=no
9314       if test -n "$LDFLAGS$LIBS" ; then
9315         # a loop is needed to ensure we can add subdirs of existing dirs
9316         for cf_test_libdir in $LDFLAGS $LIBS ; do
9317           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9318             cf_have_libdir=yes; break
9319           fi
9320         done
9321       fi
9322       if test "$cf_have_libdir" = no ; then
9323         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9324
9325 echo "${as_me:-configure}:9325: testing adding $cf_add_libdir to library-path ..." 1>&5
9326
9327         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9328       fi
9329     fi
9330   done
9331 fi
9332
9333         LIBS="$cf_cv_library_file_utf8 $LIBS"
9334 fi
9335
9336                 if test "$cf_cv_utf8_lib" != no ; then
9337                         NCURSES_LIBUTF8=1
9338                 fi
9339         fi
9340
9341 # This is needed on Tru64 5.0 to declare mbstate_t
9342 echo "$as_me:9342: checking if we must include wchar.h to declare mbstate_t" >&5
9343 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9344 if test "${cf_cv_mbstate_t+set}" = set; then
9345   echo $ECHO_N "(cached) $ECHO_C" >&6
9346 else
9347
9348 cat >conftest.$ac_ext <<_ACEOF
9349 #line 9349 "configure"
9350 #include "confdefs.h"
9351
9352 #include <stdlib.h>
9353 #include <stdarg.h>
9354 #include <stdio.h>
9355 #ifdef HAVE_LIBUTF8_H
9356 #include <libutf8.h>
9357 #endif
9358 int
9359 main ()
9360 {
9361 mbstate_t state
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_mbstate_t=no
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cat >conftest.$ac_ext <<_ACEOF
9383 #line 9383 "configure"
9384 #include "confdefs.h"
9385
9386 #include <stdlib.h>
9387 #include <stdarg.h>
9388 #include <stdio.h>
9389 #include <wchar.h>
9390 #ifdef HAVE_LIBUTF8_H
9391 #include <libutf8.h>
9392 #endif
9393 int
9394 main ()
9395 {
9396 mbstate_t value
9397   ;
9398   return 0;
9399 }
9400 _ACEOF
9401 rm -f conftest.$ac_objext
9402 if { (eval echo "$as_me:9402: \"$ac_compile\"") >&5
9403   (eval $ac_compile) 2>&5
9404   ac_status=$?
9405   echo "$as_me:9405: \$? = $ac_status" >&5
9406   (exit $ac_status); } &&
9407          { ac_try='test -s conftest.$ac_objext'
9408   { (eval echo "$as_me:9408: \"$ac_try\"") >&5
9409   (eval $ac_try) 2>&5
9410   ac_status=$?
9411   echo "$as_me:9411: \$? = $ac_status" >&5
9412   (exit $ac_status); }; }; then
9413   cf_cv_mbstate_t=yes
9414 else
9415   echo "$as_me: failed program was:" >&5
9416 cat conftest.$ac_ext >&5
9417 cf_cv_mbstate_t=unknown
9418 fi
9419 rm -f conftest.$ac_objext conftest.$ac_ext
9420 fi
9421 rm -f conftest.$ac_objext conftest.$ac_ext
9422 fi
9423 echo "$as_me:9423: result: $cf_cv_mbstate_t" >&5
9424 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9425
9426 if test "$cf_cv_mbstate_t" = yes ; then
9427         cat >>confdefs.h <<\EOF
9428 #define NEED_WCHAR_H 1
9429 EOF
9430
9431         NEED_WCHAR_H=1
9432 fi
9433
9434 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9435 if test "$cf_cv_mbstate_t" = unknown ; then
9436         NCURSES_MBSTATE_T=1
9437 fi
9438
9439 # This is needed on Tru64 5.0 to declare wchar_t
9440 echo "$as_me:9440: checking if we must include wchar.h to declare wchar_t" >&5
9441 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9442 if test "${cf_cv_wchar_t+set}" = set; then
9443   echo $ECHO_N "(cached) $ECHO_C" >&6
9444 else
9445
9446 cat >conftest.$ac_ext <<_ACEOF
9447 #line 9447 "configure"
9448 #include "confdefs.h"
9449
9450 #include <stdlib.h>
9451 #include <stdarg.h>
9452 #include <stdio.h>
9453 #ifdef HAVE_LIBUTF8_H
9454 #include <libutf8.h>
9455 #endif
9456 int
9457 main ()
9458 {
9459 wchar_t state
9460   ;
9461   return 0;
9462 }
9463 _ACEOF
9464 rm -f conftest.$ac_objext
9465 if { (eval echo "$as_me:9465: \"$ac_compile\"") >&5
9466   (eval $ac_compile) 2>&5
9467   ac_status=$?
9468   echo "$as_me:9468: \$? = $ac_status" >&5
9469   (exit $ac_status); } &&
9470          { ac_try='test -s conftest.$ac_objext'
9471   { (eval echo "$as_me:9471: \"$ac_try\"") >&5
9472   (eval $ac_try) 2>&5
9473   ac_status=$?
9474   echo "$as_me:9474: \$? = $ac_status" >&5
9475   (exit $ac_status); }; }; then
9476   cf_cv_wchar_t=no
9477 else
9478   echo "$as_me: failed program was:" >&5
9479 cat conftest.$ac_ext >&5
9480 cat >conftest.$ac_ext <<_ACEOF
9481 #line 9481 "configure"
9482 #include "confdefs.h"
9483
9484 #include <stdlib.h>
9485 #include <stdarg.h>
9486 #include <stdio.h>
9487 #include <wchar.h>
9488 #ifdef HAVE_LIBUTF8_H
9489 #include <libutf8.h>
9490 #endif
9491 int
9492 main ()
9493 {
9494 wchar_t value
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 rm -f conftest.$ac_objext
9500 if { (eval echo "$as_me:9500: \"$ac_compile\"") >&5
9501   (eval $ac_compile) 2>&5
9502   ac_status=$?
9503   echo "$as_me:9503: \$? = $ac_status" >&5
9504   (exit $ac_status); } &&
9505          { ac_try='test -s conftest.$ac_objext'
9506   { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); }; }; then
9511   cf_cv_wchar_t=yes
9512 else
9513   echo "$as_me: failed program was:" >&5
9514 cat conftest.$ac_ext >&5
9515 cf_cv_wchar_t=unknown
9516 fi
9517 rm -f conftest.$ac_objext conftest.$ac_ext
9518 fi
9519 rm -f conftest.$ac_objext conftest.$ac_ext
9520 fi
9521 echo "$as_me:9521: result: $cf_cv_wchar_t" >&5
9522 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9523
9524 if test "$cf_cv_wchar_t" = yes ; then
9525         cat >>confdefs.h <<\EOF
9526 #define NEED_WCHAR_H 1
9527 EOF
9528
9529         NEED_WCHAR_H=1
9530 fi
9531
9532 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9533 if test "$cf_cv_wchar_t" = unknown ; then
9534         NCURSES_WCHAR_T=1
9535 fi
9536
9537 # if we find wchar_t in either place, use substitution to provide a fallback.
9538 if test "$cf_cv_wchar_t" != unknown ; then
9539         NCURSES_OK_WCHAR_T=1
9540 fi
9541
9542 # This is needed on Tru64 5.0 to declare wint_t
9543 echo "$as_me:9543: checking if we must include wchar.h to declare wint_t" >&5
9544 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9545 if test "${cf_cv_wint_t+set}" = set; then
9546   echo $ECHO_N "(cached) $ECHO_C" >&6
9547 else
9548
9549 cat >conftest.$ac_ext <<_ACEOF
9550 #line 9550 "configure"
9551 #include "confdefs.h"
9552
9553 #include <stdlib.h>
9554 #include <stdarg.h>
9555 #include <stdio.h>
9556 #ifdef HAVE_LIBUTF8_H
9557 #include <libutf8.h>
9558 #endif
9559 int
9560 main ()
9561 {
9562 wint_t state
9563   ;
9564   return 0;
9565 }
9566 _ACEOF
9567 rm -f conftest.$ac_objext
9568 if { (eval echo "$as_me:9568: \"$ac_compile\"") >&5
9569   (eval $ac_compile) 2>&5
9570   ac_status=$?
9571   echo "$as_me:9571: \$? = $ac_status" >&5
9572   (exit $ac_status); } &&
9573          { ac_try='test -s conftest.$ac_objext'
9574   { (eval echo "$as_me:9574: \"$ac_try\"") >&5
9575   (eval $ac_try) 2>&5
9576   ac_status=$?
9577   echo "$as_me:9577: \$? = $ac_status" >&5
9578   (exit $ac_status); }; }; then
9579   cf_cv_wint_t=no
9580 else
9581   echo "$as_me: failed program was:" >&5
9582 cat conftest.$ac_ext >&5
9583 cat >conftest.$ac_ext <<_ACEOF
9584 #line 9584 "configure"
9585 #include "confdefs.h"
9586
9587 #include <stdlib.h>
9588 #include <stdarg.h>
9589 #include <stdio.h>
9590 #include <wchar.h>
9591 #ifdef HAVE_LIBUTF8_H
9592 #include <libutf8.h>
9593 #endif
9594 int
9595 main ()
9596 {
9597 wint_t value
9598   ;
9599   return 0;
9600 }
9601 _ACEOF
9602 rm -f conftest.$ac_objext
9603 if { (eval echo "$as_me:9603: \"$ac_compile\"") >&5
9604   (eval $ac_compile) 2>&5
9605   ac_status=$?
9606   echo "$as_me:9606: \$? = $ac_status" >&5
9607   (exit $ac_status); } &&
9608          { ac_try='test -s conftest.$ac_objext'
9609   { (eval echo "$as_me:9609: \"$ac_try\"") >&5
9610   (eval $ac_try) 2>&5
9611   ac_status=$?
9612   echo "$as_me:9612: \$? = $ac_status" >&5
9613   (exit $ac_status); }; }; then
9614   cf_cv_wint_t=yes
9615 else
9616   echo "$as_me: failed program was:" >&5
9617 cat conftest.$ac_ext >&5
9618 cf_cv_wint_t=unknown
9619 fi
9620 rm -f conftest.$ac_objext conftest.$ac_ext
9621 fi
9622 rm -f conftest.$ac_objext conftest.$ac_ext
9623 fi
9624 echo "$as_me:9624: result: $cf_cv_wint_t" >&5
9625 echo "${ECHO_T}$cf_cv_wint_t" >&6
9626
9627 if test "$cf_cv_wint_t" = yes ; then
9628         cat >>confdefs.h <<\EOF
9629 #define NEED_WCHAR_H 1
9630 EOF
9631
9632         NEED_WCHAR_H=1
9633 fi
9634
9635 # if we do not find wint_t in either place, use substitution to provide a fallback.
9636 if test "$cf_cv_wint_t" = unknown ; then
9637         NCURSES_WINT_T=1
9638 fi
9639
9640 # if we find wint_t in either place, use substitution to provide a fallback.
9641 if test "$cf_cv_wint_t" != unknown ; then
9642         NCURSES_OK_WINT_T=1
9643 fi
9644
9645         if test "$NCURSES_MBSTATE_T" != 0; then
9646                 cat >>confdefs.h <<\EOF
9647 #define NEED_MBSTATE_T_DEF 1
9648 EOF
9649
9650         fi
9651 fi
9652
9653 ###   use option --disable-lp64 to allow long chtype
9654 case $cf_cv_abi_version in
9655 [345]*)
9656         default_with_lp64=no
9657         ;;
9658 *)
9659         default_with_lp64=yes
9660         ;;
9661 esac
9662
9663 echo "$as_me:9663: checking whether to enable _LP64 definition in curses.h" >&5
9664 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9665
9666 # Check whether --enable-lp64 or --disable-lp64 was given.
9667 if test "${enable_lp64+set}" = set; then
9668   enableval="$enable_lp64"
9669   with_lp64=$enableval
9670 else
9671   with_lp64=$default_with_lp64
9672 fi;
9673 echo "$as_me:9673: result: $with_lp64" >&5
9674 echo "${ECHO_T}$with_lp64" >&6
9675
9676 if test "$with_lp64" = yes ; then
9677         cf_cv_enable_lp64=1
9678 else
9679         cf_cv_enable_lp64=0
9680 fi
9681
9682 # Check whether --enable-largefile or --disable-largefile was given.
9683 if test "${enable_largefile+set}" = set; then
9684   enableval="$enable_largefile"
9685
9686 fi;
9687 if test "$enable_largefile" != no; then
9688
9689   echo "$as_me:9689: checking for special C compiler options needed for large files" >&5
9690 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9691 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9692   echo $ECHO_N "(cached) $ECHO_C" >&6
9693 else
9694   ac_cv_sys_largefile_CC=no
9695      if test "$GCC" != yes; then
9696        ac_save_CC=$CC
9697        while :; do
9698          # IRIX 6.2 and later do not support large files by default,
9699          # so use the C compiler's -n32 option if that helps.
9700          cat >conftest.$ac_ext <<_ACEOF
9701 #line 9701 "configure"
9702 #include "confdefs.h"
9703 #include <sys/types.h>
9704  /* Check that off_t can represent 2**63 - 1 correctly.
9705     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9706     since some C++ compilers masquerading as C compilers
9707     incorrectly reject 9223372036854775807.  */
9708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9709   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9710                        && LARGE_OFF_T % 2147483647 == 1)
9711                       ? 1 : -1];
9712 int
9713 main ()
9714 {
9715
9716   ;
9717   return 0;
9718 }
9719 _ACEOF
9720          rm -f conftest.$ac_objext
9721 if { (eval echo "$as_me:9721: \"$ac_compile\"") >&5
9722   (eval $ac_compile) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); } &&
9726          { ac_try='test -s conftest.$ac_objext'
9727   { (eval echo "$as_me:9727: \"$ac_try\"") >&5
9728   (eval $ac_try) 2>&5
9729   ac_status=$?
9730   echo "$as_me:9730: \$? = $ac_status" >&5
9731   (exit $ac_status); }; }; then
9732   break
9733 else
9734   echo "$as_me: failed program was:" >&5
9735 cat conftest.$ac_ext >&5
9736 fi
9737 rm -f conftest.$ac_objext
9738          CC="$CC -n32"
9739          rm -f conftest.$ac_objext
9740 if { (eval echo "$as_me:9740: \"$ac_compile\"") >&5
9741   (eval $ac_compile) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } &&
9745          { ac_try='test -s conftest.$ac_objext'
9746   { (eval echo "$as_me:9746: \"$ac_try\"") >&5
9747   (eval $ac_try) 2>&5
9748   ac_status=$?
9749   echo "$as_me:9749: \$? = $ac_status" >&5
9750   (exit $ac_status); }; }; then
9751   ac_cv_sys_largefile_CC=' -n32'; break
9752 else
9753   echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 fi
9756 rm -f conftest.$ac_objext
9757          break
9758        done
9759        CC=$ac_save_CC
9760        rm -f conftest.$ac_ext
9761     fi
9762 fi
9763 echo "$as_me:9763: result: $ac_cv_sys_largefile_CC" >&5
9764 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9765   if test "$ac_cv_sys_largefile_CC" != no; then
9766     CC=$CC$ac_cv_sys_largefile_CC
9767   fi
9768
9769   echo "$as_me:9769: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9770 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9771 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9772   echo $ECHO_N "(cached) $ECHO_C" >&6
9773 else
9774   while :; do
9775   ac_cv_sys_file_offset_bits=no
9776   cat >conftest.$ac_ext <<_ACEOF
9777 #line 9777 "configure"
9778 #include "confdefs.h"
9779 #include <sys/types.h>
9780  /* Check that off_t can represent 2**63 - 1 correctly.
9781     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9782     since some C++ compilers masquerading as C compilers
9783     incorrectly reject 9223372036854775807.  */
9784 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9785   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9786                        && LARGE_OFF_T % 2147483647 == 1)
9787                       ? 1 : -1];
9788 int
9789 main ()
9790 {
9791
9792   ;
9793   return 0;
9794 }
9795 _ACEOF
9796 rm -f conftest.$ac_objext
9797 if { (eval echo "$as_me:9797: \"$ac_compile\"") >&5
9798   (eval $ac_compile) 2>&5
9799   ac_status=$?
9800   echo "$as_me:9800: \$? = $ac_status" >&5
9801   (exit $ac_status); } &&
9802          { ac_try='test -s conftest.$ac_objext'
9803   { (eval echo "$as_me:9803: \"$ac_try\"") >&5
9804   (eval $ac_try) 2>&5
9805   ac_status=$?
9806   echo "$as_me:9806: \$? = $ac_status" >&5
9807   (exit $ac_status); }; }; then
9808   break
9809 else
9810   echo "$as_me: failed program was:" >&5
9811 cat conftest.$ac_ext >&5
9812 fi
9813 rm -f conftest.$ac_objext conftest.$ac_ext
9814   cat >conftest.$ac_ext <<_ACEOF
9815 #line 9815 "configure"
9816 #include "confdefs.h"
9817 #define _FILE_OFFSET_BITS 64
9818 #include <sys/types.h>
9819  /* Check that off_t can represent 2**63 - 1 correctly.
9820     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9821     since some C++ compilers masquerading as C compilers
9822     incorrectly reject 9223372036854775807.  */
9823 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9824   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9825                        && LARGE_OFF_T % 2147483647 == 1)
9826                       ? 1 : -1];
9827 int
9828 main ()
9829 {
9830
9831   ;
9832   return 0;
9833 }
9834 _ACEOF
9835 rm -f conftest.$ac_objext
9836 if { (eval echo "$as_me:9836: \"$ac_compile\"") >&5
9837   (eval $ac_compile) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); } &&
9841          { ac_try='test -s conftest.$ac_objext'
9842   { (eval echo "$as_me:9842: \"$ac_try\"") >&5
9843   (eval $ac_try) 2>&5
9844   ac_status=$?
9845   echo "$as_me:9845: \$? = $ac_status" >&5
9846   (exit $ac_status); }; }; then
9847   ac_cv_sys_file_offset_bits=64; break
9848 else
9849   echo "$as_me: failed program was:" >&5
9850 cat conftest.$ac_ext >&5
9851 fi
9852 rm -f conftest.$ac_objext conftest.$ac_ext
9853   break
9854 done
9855 fi
9856 echo "$as_me:9856: result: $ac_cv_sys_file_offset_bits" >&5
9857 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9858 if test "$ac_cv_sys_file_offset_bits" != no; then
9859
9860 cat >>confdefs.h <<EOF
9861 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9862 EOF
9863
9864 fi
9865 rm -rf conftest*
9866   echo "$as_me:9866: checking for _LARGE_FILES value needed for large files" >&5
9867 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9868 if test "${ac_cv_sys_large_files+set}" = set; then
9869   echo $ECHO_N "(cached) $ECHO_C" >&6
9870 else
9871   while :; do
9872   ac_cv_sys_large_files=no
9873   cat >conftest.$ac_ext <<_ACEOF
9874 #line 9874 "configure"
9875 #include "confdefs.h"
9876 #include <sys/types.h>
9877  /* Check that off_t can represent 2**63 - 1 correctly.
9878     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9879     since some C++ compilers masquerading as C compilers
9880     incorrectly reject 9223372036854775807.  */
9881 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9882   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9883                        && LARGE_OFF_T % 2147483647 == 1)
9884                       ? 1 : -1];
9885 int
9886 main ()
9887 {
9888
9889   ;
9890   return 0;
9891 }
9892 _ACEOF
9893 rm -f conftest.$ac_objext
9894 if { (eval echo "$as_me:9894: \"$ac_compile\"") >&5
9895   (eval $ac_compile) 2>&5
9896   ac_status=$?
9897   echo "$as_me:9897: \$? = $ac_status" >&5
9898   (exit $ac_status); } &&
9899          { ac_try='test -s conftest.$ac_objext'
9900   { (eval echo "$as_me:9900: \"$ac_try\"") >&5
9901   (eval $ac_try) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); }; }; then
9905   break
9906 else
9907   echo "$as_me: failed program was:" >&5
9908 cat conftest.$ac_ext >&5
9909 fi
9910 rm -f conftest.$ac_objext conftest.$ac_ext
9911   cat >conftest.$ac_ext <<_ACEOF
9912 #line 9912 "configure"
9913 #include "confdefs.h"
9914 #define _LARGE_FILES 1
9915 #include <sys/types.h>
9916  /* Check that off_t can represent 2**63 - 1 correctly.
9917     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9918     since some C++ compilers masquerading as C compilers
9919     incorrectly reject 9223372036854775807.  */
9920 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9921   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9922                        && LARGE_OFF_T % 2147483647 == 1)
9923                       ? 1 : -1];
9924 int
9925 main ()
9926 {
9927
9928   ;
9929   return 0;
9930 }
9931 _ACEOF
9932 rm -f conftest.$ac_objext
9933 if { (eval echo "$as_me:9933: \"$ac_compile\"") >&5
9934   (eval $ac_compile) 2>&5
9935   ac_status=$?
9936   echo "$as_me:9936: \$? = $ac_status" >&5
9937   (exit $ac_status); } &&
9938          { ac_try='test -s conftest.$ac_objext'
9939   { (eval echo "$as_me:9939: \"$ac_try\"") >&5
9940   (eval $ac_try) 2>&5
9941   ac_status=$?
9942   echo "$as_me:9942: \$? = $ac_status" >&5
9943   (exit $ac_status); }; }; then
9944   ac_cv_sys_large_files=1; break
9945 else
9946   echo "$as_me: failed program was:" >&5
9947 cat conftest.$ac_ext >&5
9948 fi
9949 rm -f conftest.$ac_objext conftest.$ac_ext
9950   break
9951 done
9952 fi
9953 echo "$as_me:9953: result: $ac_cv_sys_large_files" >&5
9954 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9955 if test "$ac_cv_sys_large_files" != no; then
9956
9957 cat >>confdefs.h <<EOF
9958 #define _LARGE_FILES $ac_cv_sys_large_files
9959 EOF
9960
9961 fi
9962 rm -rf conftest*
9963 fi
9964
9965     if test "$enable_largefile" != no ; then
9966         echo "$as_me:9966: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9967 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9968 if test "${ac_cv_sys_largefile_source+set}" = set; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 else
9971   while :; do
9972   ac_cv_sys_largefile_source=no
9973   cat >conftest.$ac_ext <<_ACEOF
9974 #line 9974 "configure"
9975 #include "confdefs.h"
9976 #include <stdio.h>
9977 int
9978 main ()
9979 {
9980 return !fseeko;
9981   ;
9982   return 0;
9983 }
9984 _ACEOF
9985 rm -f conftest.$ac_objext
9986 if { (eval echo "$as_me:9986: \"$ac_compile\"") >&5
9987   (eval $ac_compile) 2>&5
9988   ac_status=$?
9989   echo "$as_me:9989: \$? = $ac_status" >&5
9990   (exit $ac_status); } &&
9991          { ac_try='test -s conftest.$ac_objext'
9992   { (eval echo "$as_me:9992: \"$ac_try\"") >&5
9993   (eval $ac_try) 2>&5
9994   ac_status=$?
9995   echo "$as_me:9995: \$? = $ac_status" >&5
9996   (exit $ac_status); }; }; then
9997   break
9998 else
9999   echo "$as_me: failed program was:" >&5
10000 cat conftest.$ac_ext >&5
10001 fi
10002 rm -f conftest.$ac_objext conftest.$ac_ext
10003   cat >conftest.$ac_ext <<_ACEOF
10004 #line 10004 "configure"
10005 #include "confdefs.h"
10006 #define _LARGEFILE_SOURCE 1
10007 #include <stdio.h>
10008 int
10009 main ()
10010 {
10011 return !fseeko;
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest.$ac_objext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_sys_largefile_source=1; break
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034   break
10035 done
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_sys_largefile_source" >&5
10038 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10039 if test "$ac_cv_sys_largefile_source" != no; then
10040
10041 cat >>confdefs.h <<EOF
10042 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10043 EOF
10044
10045 fi
10046 rm -rf conftest*
10047
10048 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10049 # in glibc 2.1.3, but that breaks too many other things.
10050 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10051 echo "$as_me:10051: checking for fseeko" >&5
10052 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10053 if test "${ac_cv_func_fseeko+set}" = set; then
10054   echo $ECHO_N "(cached) $ECHO_C" >&6
10055 else
10056   cat >conftest.$ac_ext <<_ACEOF
10057 #line 10057 "configure"
10058 #include "confdefs.h"
10059 #include <stdio.h>
10060 int
10061 main ()
10062 {
10063 return fseeko && fseeko (stdin, 0, 0);
10064   ;
10065   return 0;
10066 }
10067 _ACEOF
10068 rm -f conftest.$ac_objext conftest$ac_exeext
10069 if { (eval echo "$as_me:10069: \"$ac_link\"") >&5
10070   (eval $ac_link) 2>&5
10071   ac_status=$?
10072   echo "$as_me:10072: \$? = $ac_status" >&5
10073   (exit $ac_status); } &&
10074          { ac_try='test -s conftest$ac_exeext'
10075   { (eval echo "$as_me:10075: \"$ac_try\"") >&5
10076   (eval $ac_try) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); }; }; then
10080   ac_cv_func_fseeko=yes
10081 else
10082   echo "$as_me: failed program was:" >&5
10083 cat conftest.$ac_ext >&5
10084 ac_cv_func_fseeko=no
10085 fi
10086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10087 fi
10088 echo "$as_me:10088: result: $ac_cv_func_fseeko" >&5
10089 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10090 if test $ac_cv_func_fseeko = yes; then
10091
10092 cat >>confdefs.h <<\EOF
10093 #define HAVE_FSEEKO 1
10094 EOF
10095
10096 fi
10097
10098         # Normally we would collect these definitions in the config.h,
10099         # but (like _XOPEN_SOURCE), some environments rely on having these
10100         # defined before any of the system headers are included.  Another
10101         # case comes up with C++, e.g., on AIX the compiler compiles the
10102         # header files by themselves before looking at the body files it is
10103         # told to compile.  For ncurses, those header files do not include
10104         # the config.h
10105         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10106         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10107         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10108
10109         echo "$as_me:10109: checking whether to use struct dirent64" >&5
10110 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10111 if test "${cf_cv_struct_dirent64+set}" = set; then
10112   echo $ECHO_N "(cached) $ECHO_C" >&6
10113 else
10114
10115                 cat >conftest.$ac_ext <<_ACEOF
10116 #line 10116 "configure"
10117 #include "confdefs.h"
10118
10119 #include <sys/types.h>
10120 #include <dirent.h>
10121
10122 int
10123 main ()
10124 {
10125
10126                 /* if transitional largefile support is setup, this is true */
10127                 extern struct dirent64 * readdir(DIR *);
10128                 struct dirent64 *x = readdir((DIR *)0);
10129                 struct dirent *y = readdir((DIR *)0);
10130                 int z = x - y;
10131
10132   ;
10133   return 0;
10134 }
10135 _ACEOF
10136 rm -f conftest.$ac_objext
10137 if { (eval echo "$as_me:10137: \"$ac_compile\"") >&5
10138   (eval $ac_compile) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); } &&
10142          { ac_try='test -s conftest.$ac_objext'
10143   { (eval echo "$as_me:10143: \"$ac_try\"") >&5
10144   (eval $ac_try) 2>&5
10145   ac_status=$?
10146   echo "$as_me:10146: \$? = $ac_status" >&5
10147   (exit $ac_status); }; }; then
10148   cf_cv_struct_dirent64=yes
10149 else
10150   echo "$as_me: failed program was:" >&5
10151 cat conftest.$ac_ext >&5
10152 cf_cv_struct_dirent64=no
10153 fi
10154 rm -f conftest.$ac_objext conftest.$ac_ext
10155
10156 fi
10157 echo "$as_me:10157: result: $cf_cv_struct_dirent64" >&5
10158 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10159         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10160 #define HAVE_STRUCT_DIRENT64 1
10161 EOF
10162
10163     fi
10164
10165 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10166 echo "$as_me:10166: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10167 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10168
10169 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10170 if test "${enable_tparm_varargs+set}" = set; then
10171   enableval="$enable_tparm_varargs"
10172   with_tparm_varargs=$enableval
10173 else
10174   with_tparm_varargs=yes
10175 fi;
10176 echo "$as_me:10176: result: $with_tparm_varargs" >&5
10177 echo "${ECHO_T}$with_tparm_varargs" >&6
10178 NCURSES_TPARM_VARARGS=0
10179 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10180
10181 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10182 if test "$with_ticlib" != no ; then
10183 echo "$as_me:10183: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10184 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10185
10186 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10187 if test "${enable_tic_depends+set}" = set; then
10188   enableval="$enable_tic_depends"
10189   with_tic_depends=$enableval
10190 else
10191   with_tic_depends=yes
10192 fi;
10193 echo "$as_me:10193: result: $with_tic_depends" >&5
10194 echo "${ECHO_T}$with_tic_depends" >&6
10195 else
10196         with_tic_depends=no
10197 fi
10198
10199 ###   use option --with-bool to override bool's type
10200 echo "$as_me:10200: checking for type of bool" >&5
10201 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10202
10203 # Check whether --with-bool or --without-bool was given.
10204 if test "${with_bool+set}" = set; then
10205   withval="$with_bool"
10206   NCURSES_BOOL="$withval"
10207 else
10208   NCURSES_BOOL=auto
10209 fi;
10210 echo "$as_me:10210: result: $NCURSES_BOOL" >&5
10211 echo "${ECHO_T}$NCURSES_BOOL" >&6
10212
10213 echo "$as_me:10213: checking for alternate terminal capabilities file" >&5
10214 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10215
10216 # Check whether --with-caps or --without-caps was given.
10217 if test "${with_caps+set}" = set; then
10218   withval="$with_caps"
10219   TERMINFO_CAPS=Caps.$withval
10220 else
10221   TERMINFO_CAPS=Caps
10222 fi;
10223 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10224 echo "$as_me:10224: result: $TERMINFO_CAPS" >&5
10225 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10226
10227 ###   use option --with-chtype to override chtype's type
10228 echo "$as_me:10228: checking for type of chtype" >&5
10229 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10230
10231 # Check whether --with-chtype or --without-chtype was given.
10232 if test "${with_chtype+set}" = set; then
10233   withval="$with_chtype"
10234   NCURSES_CHTYPE="$withval"
10235 else
10236   NCURSES_CHTYPE=auto
10237 fi;
10238 echo "$as_me:10238: result: $NCURSES_CHTYPE" >&5
10239 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10240
10241 ###   use option --with-ospeed to override ospeed's type
10242 echo "$as_me:10242: checking for type of ospeed" >&5
10243 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10244
10245 # Check whether --with-ospeed or --without-ospeed was given.
10246 if test "${with_ospeed+set}" = set; then
10247   withval="$with_ospeed"
10248   NCURSES_OSPEED="$withval"
10249 else
10250   NCURSES_OSPEED=short
10251 fi;
10252 echo "$as_me:10252: result: $NCURSES_OSPEED" >&5
10253 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10254
10255 ###   use option --with-mmask-t to override mmask_t's type
10256 echo "$as_me:10256: checking for type of mmask_t" >&5
10257 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10258
10259 # Check whether --with-mmask-t or --without-mmask-t was given.
10260 if test "${with_mmask_t+set}" = set; then
10261   withval="$with_mmask_t"
10262   NCURSES_MMASK_T="$withval"
10263 else
10264   NCURSES_MMASK_T=auto
10265 fi;
10266 echo "$as_me:10266: result: $NCURSES_MMASK_T" >&5
10267 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10268
10269 ###   use option --with-ccharw-max to override CCHARW_MAX size
10270 echo "$as_me:10270: checking for size CCHARW_MAX" >&5
10271 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10272
10273 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10274 if test "${with_ccharw_max+set}" = set; then
10275   withval="$with_ccharw_max"
10276   NCURSES_CCHARW_MAX="$withval"
10277 else
10278   NCURSES_CCHARW_MAX=5
10279 fi;
10280 echo "$as_me:10280: result: $NCURSES_CCHARW_MAX" >&5
10281 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10282
10283 ### Enable compiling-in rcs id's
10284 echo "$as_me:10284: checking if RCS identifiers should be compiled-in" >&5
10285 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10286
10287 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10288 if test "${with_rcs_ids+set}" = set; then
10289   withval="$with_rcs_ids"
10290   with_rcs_ids=$withval
10291 else
10292   with_rcs_ids=no
10293 fi;
10294 echo "$as_me:10294: result: $with_rcs_ids" >&5
10295 echo "${ECHO_T}$with_rcs_ids" >&6
10296 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10297 #define USE_RCS_IDS 1
10298 EOF
10299
10300 ###############################################################################
10301
10302 echo "$as_me:10302: checking format of man-pages" >&5
10303 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10304
10305 # Check whether --with-manpage-format or --without-manpage-format was given.
10306 if test "${with_manpage_format+set}" = set; then
10307   withval="$with_manpage_format"
10308   MANPAGE_FORMAT=$withval
10309 else
10310   MANPAGE_FORMAT=unknown
10311 fi;
10312
10313 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10314 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10315
10316 cf_unknown=
10317
10318 case $MANPAGE_FORMAT in
10319 unknown)
10320   if test -z "$MANPATH" ; then
10321     MANPATH="/usr/man:/usr/share/man"
10322   fi
10323
10324   # look for the 'date' man-page (it's most likely to be installed!)
10325   MANPAGE_FORMAT=
10326   cf_preform=no
10327   cf_catonly=yes
10328   cf_example=date
10329
10330   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10331   for cf_dir in $MANPATH; do
10332     test -z "$cf_dir" && cf_dir=/usr/man
10333     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
10334     do
10335       cf_test=`echo $cf_name | sed -e 's/*//'`
10336       if test "x$cf_test" = "x$cf_name" ; then
10337
10338         case "$cf_name" in
10339         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10340         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10341         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10342         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10343         esac
10344
10345         case "$cf_name" in
10346         $cf_dir/man*)
10347           cf_catonly=no
10348           ;;
10349         $cf_dir/cat*)
10350           cf_preform=yes
10351           ;;
10352         esac
10353         break
10354       fi
10355
10356       # if we found a match in either man* or cat*, stop looking
10357       if test -n "$MANPAGE_FORMAT" ; then
10358         cf_found=no
10359         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10360         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10361         case "$cf_name" in
10362         $cf_dir/cat*)
10363           cf_found=yes
10364           ;;
10365         esac
10366         test $cf_found=yes && break
10367       fi
10368     done
10369     # only check the first directory in $MANPATH where we find manpages
10370     if test -n "$MANPAGE_FORMAT" ; then
10371        break
10372     fi
10373   done
10374   # if we did not find the example, just assume it is normal
10375   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10376   IFS="$ac_save_ifs"
10377   ;;
10378 *)
10379   for cf_option in $MANPAGE_FORMAT; do
10380      case $cf_option in #(vi
10381      gzip|compress|BSDI|normal|formatted|catonly)
10382        ;;
10383      *)
10384        cf_unknown="$cf_unknown $cf_option"
10385        ;;
10386      esac
10387   done
10388   ;;
10389 esac
10390
10391 echo "$as_me:10391: result: $MANPAGE_FORMAT" >&5
10392 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10393 if test -n "$cf_unknown" ; then
10394   { echo "$as_me:10394: WARNING: Unexpected manpage-format $cf_unknown" >&5
10395 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10396 fi
10397
10398 echo "$as_me:10398: checking for manpage renaming" >&5
10399 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10400
10401 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10402 if test "${with_manpage_renames+set}" = set; then
10403   withval="$with_manpage_renames"
10404   MANPAGE_RENAMES=$withval
10405 else
10406   MANPAGE_RENAMES=yes
10407 fi;
10408
10409 case ".$MANPAGE_RENAMES" in #(vi
10410 .no) #(vi
10411   ;;
10412 .|.yes)
10413   # Debian 'man' program?
10414   if test -f /etc/debian_version ; then
10415     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10416   else
10417     MANPAGE_RENAMES=no
10418   fi
10419   ;;
10420 esac
10421
10422 if test "$MANPAGE_RENAMES" != no ; then
10423   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10424     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10425   elif test ! -f $MANPAGE_RENAMES ; then
10426     { { echo "$as_me:10426: error: not a filename: $MANPAGE_RENAMES" >&5
10427 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10428    { (exit 1); exit 1; }; }
10429   fi
10430
10431   test ! -d man && mkdir man
10432
10433   # Construct a sed-script to perform renaming within man-pages
10434   if test -n "$MANPAGE_RENAMES" ; then
10435     test ! -d man && mkdir man
10436     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10437   fi
10438 fi
10439
10440 echo "$as_me:10440: result: $MANPAGE_RENAMES" >&5
10441 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10442
10443 echo "$as_me:10443: checking if manpage aliases will be installed" >&5
10444 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10445
10446 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10447 if test "${with_manpage_aliases+set}" = set; then
10448   withval="$with_manpage_aliases"
10449   MANPAGE_ALIASES=$withval
10450 else
10451   MANPAGE_ALIASES=yes
10452 fi;
10453
10454 echo "$as_me:10454: result: $MANPAGE_ALIASES" >&5
10455 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10456
10457 case "x$LN_S" in #(vi
10458 xln*) #(vi
10459         cf_use_symlinks=yes
10460         ;;
10461 *)
10462         cf_use_symlinks=no
10463         ;;
10464 esac
10465
10466 MANPAGE_SYMLINKS=no
10467 if test "$MANPAGE_ALIASES" = yes ; then
10468 echo "$as_me:10468: checking if manpage symlinks should be used" >&5
10469 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10470
10471 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10472 if test "${with_manpage_symlinks+set}" = set; then
10473   withval="$with_manpage_symlinks"
10474   MANPAGE_SYMLINKS=$withval
10475 else
10476   MANPAGE_SYMLINKS=$cf_use_symlinks
10477 fi;
10478
10479 if test "$$cf_use_symlinks" = no; then
10480 if test "$MANPAGE_SYMLINKS" = yes ; then
10481         { echo "$as_me:10481: WARNING: cannot make symlinks" >&5
10482 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10483         MANPAGE_SYMLINKS=no
10484 fi
10485 fi
10486
10487 echo "$as_me:10487: result: $MANPAGE_SYMLINKS" >&5
10488 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10489 fi
10490
10491 echo "$as_me:10491: checking for manpage tbl" >&5
10492 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10493
10494 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10495 if test "${with_manpage_tbl+set}" = set; then
10496   withval="$with_manpage_tbl"
10497   MANPAGE_TBL=$withval
10498 else
10499   MANPAGE_TBL=no
10500 fi;
10501
10502 echo "$as_me:10502: result: $MANPAGE_TBL" >&5
10503 echo "${ECHO_T}$MANPAGE_TBL" >&6
10504
10505   if test "$prefix" = "NONE" ; then
10506      cf_prefix="$ac_default_prefix"
10507   else
10508      cf_prefix="$prefix"
10509   fi
10510
10511   case "$MANPAGE_FORMAT" in # (vi
10512   *catonly*) # (vi
10513     cf_format=yes
10514     cf_inboth=no
10515     ;;
10516   *formatted*) # (vi
10517     cf_format=yes
10518     cf_inboth=yes
10519     ;;
10520   *)
10521     cf_format=no
10522     cf_inboth=no
10523     ;;
10524   esac
10525
10526 test ! -d man && mkdir man
10527
10528 cf_so_strip=
10529 cf_compress=
10530 case "$MANPAGE_FORMAT" in #(vi
10531 *compress*) #(vi
10532         cf_so_strip="Z"
10533         cf_compress=compress
10534   ;;
10535 *gzip*)
10536         cf_so_strip="gz"
10537         cf_compress=gzip
10538   ;;
10539 esac
10540
10541 cf_edit_man=./edit_man.sh
10542 cf_man_alias=`pwd`/man_alias.sed
10543
10544 cat >$cf_edit_man <<CF_EOF
10545 #! /bin/sh
10546 # this script is generated by the configure-script CF_MAN_PAGES macro.
10547
10548 prefix="$cf_prefix"
10549 datadir="$datadir"
10550
10551 NCURSES_MAJOR="$NCURSES_MAJOR"
10552 NCURSES_MINOR="$NCURSES_MINOR"
10553 NCURSES_PATCH="$NCURSES_PATCH"
10554
10555 NCURSES_OSPEED="$NCURSES_OSPEED"
10556 TERMINFO="$TERMINFO"
10557
10558 INSTALL="$INSTALL"
10559 INSTALL_DATA="$INSTALL_DATA"
10560
10561 transform="$program_transform_name"
10562
10563 TMP=\${TMPDIR:=/tmp}/man\$\$
10564 trap "rm -f \$TMP" 0 1 2 5 15
10565
10566 form=\$1
10567 shift || exit 1
10568
10569 verb=\$1
10570 shift || exit 1
10571
10572 mandir=\$1
10573 shift || exit 1
10574
10575 srcdir=\$1
10576 top_srcdir=\$srcdir/..
10577 shift || exit 1
10578
10579 if test "\$form" = normal ; then
10580         if test "$cf_format" = yes ; then
10581         if test "$cf_inboth" = no ; then
10582                 sh \$0 format \$verb \$mandir \$srcdir \$*
10583                 exit $?
10584         fi
10585         fi
10586         cf_subdir=\$mandir/man
10587         cf_tables=$MANPAGE_TBL
10588 else
10589         cf_subdir=\$mandir/cat
10590         cf_tables=yes
10591 fi
10592
10593 # process the list of source-files
10594 for i in \$* ; do
10595 case \$i in #(vi
10596 *.orig|*.rej) ;; #(vi
10597 *.[0-9]*)
10598         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10599         if test \$verb = installing ; then
10600         if test ! -d \$cf_subdir\${section} ; then
10601                 mkdir -p \$cf_subdir\$section
10602         fi
10603         fi
10604
10605         # replace variables in man page
10606         if test ! -f $cf_man_alias ; then
10607 cat >>$cf_man_alias <<-CF_EOF2
10608                 s,@DATADIR@,\$datadir,g
10609                 s,@TERMINFO@,\$TERMINFO,g
10610                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10611                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10612                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10613                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10614 CF_EOF
10615
10616         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10617         do
10618                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10619                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10620 cat >>$cf_edit_man <<-CF_EOF
10621                 s,@$cf_NAME@,$cf_name,g
10622 CF_EOF
10623         done
10624
10625 cat >>$cf_edit_man <<CF_EOF
10626 CF_EOF2
10627                 echo "...made $cf_man_alias"
10628         fi
10629
10630         aliases=
10631         cf_source=\`basename \$i\`
10632         inalias=\$cf_source
10633         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10634         if test ! -f \$inalias ; then
10635                 echo .. skipped \$cf_source
10636                 continue
10637         fi
10638 CF_EOF
10639
10640 if test "$MANPAGE_ALIASES" != no ; then
10641 cat >>$cf_edit_man <<CF_EOF
10642         nCurses=ignore.3x
10643         test $with_curses_h = yes && nCurses=ncurses.3x
10644         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10645 CF_EOF
10646 fi
10647
10648 if test "$MANPAGE_RENAMES" = no ; then
10649 cat >>$cf_edit_man <<CF_EOF
10650         # perform program transformations for section 1 man pages
10651         if test \$section = 1 ; then
10652                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10653         else
10654                 cf_target=\$cf_subdir\${section}/\$cf_source
10655         fi
10656 CF_EOF
10657 else
10658 cat >>$cf_edit_man <<CF_EOF
10659         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10660         if test -z "\$cf_target" ; then
10661                 echo '? missing rename for '\$cf_source
10662                 cf_target="\$cf_source"
10663         fi
10664         cf_target="\$cf_subdir\${section}/\${cf_target}"
10665
10666 CF_EOF
10667 fi
10668
10669 cat >>$cf_edit_man <<CF_EOF
10670         sed     -f $cf_man_alias \\
10671 CF_EOF
10672
10673 if test -f $MANPAGE_RENAMES ; then
10674 cat >>$cf_edit_man <<CF_EOF
10675                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10676 CF_EOF
10677 else
10678 cat >>$cf_edit_man <<CF_EOF
10679                 < \$i >\$TMP
10680 CF_EOF
10681 fi
10682
10683 cat >>$cf_edit_man <<CF_EOF
10684 if test \$cf_tables = yes ; then
10685         tbl \$TMP >\$TMP.out
10686         mv \$TMP.out \$TMP
10687 fi
10688 CF_EOF
10689
10690 if test $with_overwrite != yes ; then
10691 cat >>$cf_edit_man <<CF_EOF
10692         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10693         mv \$TMP.out \$TMP
10694 CF_EOF
10695 fi
10696
10697 if test $with_curses_h != yes ; then
10698 cat >>$cf_edit_man <<CF_EOF
10699         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10700         mv \$TMP.out \$TMP
10701 CF_EOF
10702 fi
10703
10704 cat >>$cf_edit_man <<CF_EOF
10705         if test \$form = format ; then
10706                 nroff -man \$TMP >\$TMP.out
10707                 mv \$TMP.out \$TMP
10708         fi
10709 CF_EOF
10710
10711 if test -n "$cf_compress" ; then
10712 cat >>$cf_edit_man <<CF_EOF
10713         if test \$verb = installing ; then
10714         if ( $cf_compress -f \$TMP )
10715         then
10716                 mv \$TMP.$cf_so_strip \$TMP
10717         fi
10718         fi
10719         cf_target="\$cf_target.$cf_so_strip"
10720 CF_EOF
10721 fi
10722
10723 case "$MANPAGE_FORMAT" in #(vi
10724 *BSDI*)
10725 cat >>$cf_edit_man <<CF_EOF
10726         if test \$form = format ; then
10727                 # BSDI installs only .0 suffixes in the cat directories
10728                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10729         fi
10730 CF_EOF
10731   ;;
10732 esac
10733
10734 cat >>$cf_edit_man <<CF_EOF
10735         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10736         if test \$verb = installing ; then
10737                 echo \$verb \$cf_target
10738                 \$INSTALL_DATA \$TMP \$cf_target
10739                 test -d \$cf_subdir\${section} &&
10740                 test -n "\$aliases" && (
10741                         cd \$cf_subdir\${section} && (
10742                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10743                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10744                                 cf_target=\`basename \$cf_target\`
10745                                 for cf_alias in \$aliases
10746                                 do
10747                                         if test \$section = 1 ; then
10748                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10749                                         fi
10750
10751                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10752                                                 if test -f \$cf_alias\${suffix} ; then
10753                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10754                                                         then
10755                                                                 continue
10756                                                         fi
10757                                                 fi
10758                                                 echo .. \$verb alias \$cf_alias\${suffix}
10759 CF_EOF
10760 case "x$LN_S" in #(vi
10761 *-f) #(vi
10762 cat >>$cf_edit_man <<CF_EOF
10763                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10764 CF_EOF
10765         ;;
10766 *)
10767 cat >>$cf_edit_man <<CF_EOF
10768                                                 rm -f \$cf_alias\${suffix}
10769                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10770 CF_EOF
10771         ;;
10772 esac
10773 cat >>$cf_edit_man <<CF_EOF
10774                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10775                                                 echo ".so \$cf_source" >\$TMP
10776 CF_EOF
10777 if test -n "$cf_compress" ; then
10778 cat >>$cf_edit_man <<CF_EOF
10779                                                 if test -n "$cf_so_strip" ; then
10780                                                         $cf_compress -f \$TMP
10781                                                         mv \$TMP.$cf_so_strip \$TMP
10782                                                 fi
10783 CF_EOF
10784 fi
10785 cat >>$cf_edit_man <<CF_EOF
10786                                                 echo .. \$verb alias \$cf_alias\${suffix}
10787                                                 rm -f \$cf_alias\${suffix}
10788                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10789                                         fi
10790                                 done
10791                         )
10792                 )
10793         elif test \$verb = removing ; then
10794                 test -f \$cf_target && (
10795                         echo \$verb \$cf_target
10796                         rm -f \$cf_target
10797                 )
10798                 test -d \$cf_subdir\${section} &&
10799                 test -n "\$aliases" && (
10800                         cd \$cf_subdir\${section} && (
10801                                 for cf_alias in \$aliases
10802                                 do
10803                                         if test \$section = 1 ; then
10804                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10805                                         fi
10806
10807                                         echo .. \$verb alias \$cf_alias\${suffix}
10808                                         rm -f \$cf_alias\${suffix}
10809                                 done
10810                         )
10811                 )
10812         else
10813 #               echo ".hy 0"
10814                 cat \$TMP
10815         fi
10816         ;;
10817 esac
10818 done
10819
10820 if test $cf_inboth = yes ; then
10821 if test \$form != format ; then
10822         sh \$0 format \$verb \$mandir \$srcdir \$*
10823 fi
10824 fi
10825
10826 exit 0
10827 CF_EOF
10828 chmod 755 $cf_edit_man
10829
10830 ###############################################################################
10831
10832 ### Note that some functions (such as const) are normally disabled anyway.
10833 echo "$as_me:10833: checking if you want to build with function extensions" >&5
10834 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10835
10836 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10837 if test "${enable_ext_funcs+set}" = set; then
10838   enableval="$enable_ext_funcs"
10839   with_ext_funcs=$enableval
10840 else
10841   with_ext_funcs=yes
10842 fi;
10843 echo "$as_me:10843: result: $with_ext_funcs" >&5
10844 echo "${ECHO_T}$with_ext_funcs" >&6
10845 if test "$with_ext_funcs" = yes ; then
10846         NCURSES_EXT_FUNCS=1
10847         cat >>confdefs.h <<\EOF
10848 #define HAVE_ASSUME_DEFAULT_COLORS 1
10849 EOF
10850
10851         cat >>confdefs.h <<\EOF
10852 #define HAVE_CURSES_VERSION 1
10853 EOF
10854
10855         cat >>confdefs.h <<\EOF
10856 #define HAVE_HAS_KEY 1
10857 EOF
10858
10859         cat >>confdefs.h <<\EOF
10860 #define HAVE_RESIZETERM 1
10861 EOF
10862
10863         cat >>confdefs.h <<\EOF
10864 #define HAVE_RESIZE_TERM 1
10865 EOF
10866
10867         cat >>confdefs.h <<\EOF
10868 #define HAVE_TERM_ENTRY_H 1
10869 EOF
10870
10871         cat >>confdefs.h <<\EOF
10872 #define HAVE_USE_DEFAULT_COLORS 1
10873 EOF
10874
10875         cat >>confdefs.h <<\EOF
10876 #define HAVE_USE_SCREEN 1
10877 EOF
10878
10879         cat >>confdefs.h <<\EOF
10880 #define HAVE_USE_WINDOW 1
10881 EOF
10882
10883         cat >>confdefs.h <<\EOF
10884 #define HAVE_WRESIZE 1
10885 EOF
10886
10887         cat >>confdefs.h <<\EOF
10888 #define NCURSES_EXT_FUNCS 1
10889 EOF
10890
10891         GENERATED_EXT_FUNCS=generated
10892 else
10893         NCURSES_EXT_FUNCS=0
10894         GENERATED_EXT_FUNCS=
10895 fi
10896
10897 echo "$as_me:10897: checking if you want to build with experimental SCREEN extensions" >&5
10898 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10899
10900 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10901 if test "${enable_sp_funcs+set}" = set; then
10902   enableval="$enable_sp_funcs"
10903   with_sp_funcs=$enableval
10904 else
10905   with_sp_funcs=no
10906 fi;
10907 echo "$as_me:10907: result: $with_sp_funcs" >&5
10908 echo "${ECHO_T}$with_sp_funcs" >&6
10909 if test "$with_sp_funcs" = yes ; then
10910         NCURSES_SP_FUNCS=1
10911         cat >>confdefs.h <<\EOF
10912 #define NCURSES_SP_FUNCS 1
10913 EOF
10914
10915         GENERATED_SP_FUNCS=generated
10916 else
10917         NCURSES_SP_FUNCS=0
10918         GENERATED_SP_FUNCS=
10919 fi
10920
10921 echo "$as_me:10921: checking if you want to build with experimental terminal-driver" >&5
10922 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10923
10924 # Check whether --enable-term-driver or --disable-term-driver was given.
10925 if test "${enable_term_driver+set}" = set; then
10926   enableval="$enable_term_driver"
10927   with_term_driver=$enableval
10928 else
10929   with_term_driver=no
10930 fi;
10931 echo "$as_me:10931: result: $with_term_driver" >&5
10932 echo "${ECHO_T}$with_term_driver" >&6
10933 if test "$with_term_driver" = yes ; then
10934         cat >>confdefs.h <<\EOF
10935 #define USE_TERM_DRIVER 1
10936 EOF
10937
10938         if test "$with_sp_funcs" != yes ; then
10939                 { { echo "$as_me:10939: error: The term-driver option relies upon sp-funcs" >&5
10940 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10941    { (exit 1); exit 1; }; }
10942         fi
10943 fi
10944
10945 ###   use option --enable-const to turn on use of const beyond that in XSI.
10946 echo "$as_me:10946: checking for extended use of const keyword" >&5
10947 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10948
10949 # Check whether --enable-const or --disable-const was given.
10950 if test "${enable_const+set}" = set; then
10951   enableval="$enable_const"
10952   with_ext_const=$enableval
10953 else
10954   with_ext_const=no
10955 fi;
10956 echo "$as_me:10956: result: $with_ext_const" >&5
10957 echo "${ECHO_T}$with_ext_const" >&6
10958 NCURSES_CONST='/*nothing*/'
10959 if test "$with_ext_const" = yes ; then
10960         NCURSES_CONST=const
10961 fi
10962
10963 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10964 echo "$as_me:10964: checking if you want to use extended colors" >&5
10965 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10966
10967 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10968 if test "${enable_ext_colors+set}" = set; then
10969   enableval="$enable_ext_colors"
10970   with_ext_colors=$enableval
10971 else
10972   with_ext_colors=no
10973 fi;
10974 echo "$as_me:10974: result: $with_ext_colors" >&5
10975 echo "${ECHO_T}$with_ext_colors" >&6
10976 NCURSES_EXT_COLORS=0
10977 if test "$with_ext_colors" = yes ; then
10978         if test "$with_widec" != yes ; then
10979                 { { echo "$as_me:10979: error: This option applies only to wide-character library" >&5
10980 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10981    { (exit 1); exit 1; }; }
10982         else
10983                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10984
10985 if test "${with_abi_version+set}" != set; then
10986         case $cf_cv_rel_version in
10987         5.*)
10988                 cf_cv_rel_version=6.0
10989                 cf_cv_abi_version=6
10990                 { echo "$as_me:10990: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10991 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10992                 ;;
10993         esac
10994 fi
10995
10996         fi
10997         NCURSES_EXT_COLORS=1
10998         cat >>confdefs.h <<\EOF
10999 #define NCURSES_EXT_COLORS 1
11000 EOF
11001
11002 fi
11003
11004 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11005 echo "$as_me:11005: checking if you want to use extended mouse encoding" >&5
11006 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11007
11008 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11009 if test "${enable_ext_mouse+set}" = set; then
11010   enableval="$enable_ext_mouse"
11011   with_ext_mouse=$enableval
11012 else
11013   with_ext_mouse=no
11014 fi;
11015 echo "$as_me:11015: result: $with_ext_mouse" >&5
11016 echo "${ECHO_T}$with_ext_mouse" >&6
11017 NCURSES_MOUSE_VERSION=1
11018 if test "$with_ext_mouse" = yes ; then
11019         NCURSES_MOUSE_VERSION=2
11020
11021 if test "${with_abi_version+set}" != set; then
11022         case $cf_cv_rel_version in
11023         5.*)
11024                 cf_cv_rel_version=6.0
11025                 cf_cv_abi_version=6
11026                 { echo "$as_me:11026: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11027 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11028                 ;;
11029         esac
11030 fi
11031
11032 fi
11033
11034 echo "$as_me:11034: checking if you want \$NCURSES_NO_PADDING code" >&5
11035 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11036
11037 # Check whether --enable-no-padding or --disable-no-padding was given.
11038 if test "${enable_no_padding+set}" = set; then
11039   enableval="$enable_no_padding"
11040   with_no_padding=$enableval
11041 else
11042   with_no_padding=$with_ext_funcs
11043 fi;
11044 echo "$as_me:11044: result: $with_no_padding" >&5
11045 echo "${ECHO_T}$with_no_padding" >&6
11046 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
11047 #define NCURSES_NO_PADDING 1
11048 EOF
11049
11050 echo "$as_me:11050: checking for ANSI C header files" >&5
11051 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11052 if test "${ac_cv_header_stdc+set}" = set; then
11053   echo $ECHO_N "(cached) $ECHO_C" >&6
11054 else
11055   cat >conftest.$ac_ext <<_ACEOF
11056 #line 11056 "configure"
11057 #include "confdefs.h"
11058 #include <stdlib.h>
11059 #include <stdarg.h>
11060 #include <string.h>
11061 #include <float.h>
11062
11063 _ACEOF
11064 if { (eval echo "$as_me:11064: \"$ac_cpp conftest.$ac_ext\"") >&5
11065   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11066   ac_status=$?
11067   egrep -v '^ *\+' conftest.er1 >conftest.err
11068   rm -f conftest.er1
11069   cat conftest.err >&5
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit $ac_status); } >/dev/null; then
11072   if test -s conftest.err; then
11073     ac_cpp_err=$ac_c_preproc_warn_flag
11074   else
11075     ac_cpp_err=
11076   fi
11077 else
11078   ac_cpp_err=yes
11079 fi
11080 if test -z "$ac_cpp_err"; then
11081   ac_cv_header_stdc=yes
11082 else
11083   echo "$as_me: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   ac_cv_header_stdc=no
11086 fi
11087 rm -f conftest.err conftest.$ac_ext
11088
11089 if test $ac_cv_header_stdc = yes; then
11090   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11091   cat >conftest.$ac_ext <<_ACEOF
11092 #line 11092 "configure"
11093 #include "confdefs.h"
11094 #include <string.h>
11095
11096 _ACEOF
11097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11098   egrep "memchr" >/dev/null 2>&1; then
11099   :
11100 else
11101   ac_cv_header_stdc=no
11102 fi
11103 rm -rf conftest*
11104
11105 fi
11106
11107 if test $ac_cv_header_stdc = yes; then
11108   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11109   cat >conftest.$ac_ext <<_ACEOF
11110 #line 11110 "configure"
11111 #include "confdefs.h"
11112 #include <stdlib.h>
11113
11114 _ACEOF
11115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11116   egrep "free" >/dev/null 2>&1; then
11117   :
11118 else
11119   ac_cv_header_stdc=no
11120 fi
11121 rm -rf conftest*
11122
11123 fi
11124
11125 if test $ac_cv_header_stdc = yes; then
11126   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11127   if test "$cross_compiling" = yes; then
11128   :
11129 else
11130   cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133 #include <ctype.h>
11134 #if ((' ' & 0x0FF) == 0x020)
11135 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11136 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11137 #else
11138 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11139                      || ('j' <= (c) && (c) <= 'r') \
11140                      || ('s' <= (c) && (c) <= 'z'))
11141 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11142 #endif
11143
11144 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11145 int
11146 main ()
11147 {
11148   int i;
11149   for (i = 0; i < 256; i++)
11150     if (XOR (islower (i), ISLOWER (i))
11151         || toupper (i) != TOUPPER (i))
11152       $ac_main_return(2);
11153   $ac_main_return (0);
11154 }
11155 _ACEOF
11156 rm -f conftest$ac_exeext
11157 if { (eval echo "$as_me:11157: \"$ac_link\"") >&5
11158   (eval $ac_link) 2>&5
11159   ac_status=$?
11160   echo "$as_me:11160: \$? = $ac_status" >&5
11161   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11162   { (eval echo "$as_me:11162: \"$ac_try\"") >&5
11163   (eval $ac_try) 2>&5
11164   ac_status=$?
11165   echo "$as_me:11165: \$? = $ac_status" >&5
11166   (exit $ac_status); }; }; then
11167   :
11168 else
11169   echo "$as_me: program exited with status $ac_status" >&5
11170 echo "$as_me: failed program was:" >&5
11171 cat conftest.$ac_ext >&5
11172 ac_cv_header_stdc=no
11173 fi
11174 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11175 fi
11176 fi
11177 fi
11178 echo "$as_me:11178: result: $ac_cv_header_stdc" >&5
11179 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11180 if test $ac_cv_header_stdc = yes; then
11181
11182 cat >>confdefs.h <<\EOF
11183 #define STDC_HEADERS 1
11184 EOF
11185
11186 fi
11187
11188 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11189
11190 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11191                   inttypes.h stdint.h unistd.h
11192 do
11193 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11194 echo "$as_me:11194: checking for $ac_header" >&5
11195 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11196 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11197   echo $ECHO_N "(cached) $ECHO_C" >&6
11198 else
11199   cat >conftest.$ac_ext <<_ACEOF
11200 #line 11200 "configure"
11201 #include "confdefs.h"
11202 $ac_includes_default
11203 #include <$ac_header>
11204 _ACEOF
11205 rm -f conftest.$ac_objext
11206 if { (eval echo "$as_me:11206: \"$ac_compile\"") >&5
11207   (eval $ac_compile) 2>&5
11208   ac_status=$?
11209   echo "$as_me:11209: \$? = $ac_status" >&5
11210   (exit $ac_status); } &&
11211          { ac_try='test -s conftest.$ac_objext'
11212   { (eval echo "$as_me:11212: \"$ac_try\"") >&5
11213   (eval $ac_try) 2>&5
11214   ac_status=$?
11215   echo "$as_me:11215: \$? = $ac_status" >&5
11216   (exit $ac_status); }; }; then
11217   eval "$as_ac_Header=yes"
11218 else
11219   echo "$as_me: failed program was:" >&5
11220 cat conftest.$ac_ext >&5
11221 eval "$as_ac_Header=no"
11222 fi
11223 rm -f conftest.$ac_objext conftest.$ac_ext
11224 fi
11225 echo "$as_me:11225: result: `eval echo '${'$as_ac_Header'}'`" >&5
11226 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11227 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11228   cat >>confdefs.h <<EOF
11229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11230 EOF
11231
11232 fi
11233 done
11234
11235 echo "$as_me:11235: checking for signed char" >&5
11236 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11237 if test "${ac_cv_type_signed_char+set}" = set; then
11238   echo $ECHO_N "(cached) $ECHO_C" >&6
11239 else
11240   cat >conftest.$ac_ext <<_ACEOF
11241 #line 11241 "configure"
11242 #include "confdefs.h"
11243 $ac_includes_default
11244 int
11245 main ()
11246 {
11247 if ((signed char *) 0)
11248   return 0;
11249 if (sizeof (signed char))
11250   return 0;
11251   ;
11252   return 0;
11253 }
11254 _ACEOF
11255 rm -f conftest.$ac_objext
11256 if { (eval echo "$as_me:11256: \"$ac_compile\"") >&5
11257   (eval $ac_compile) 2>&5
11258   ac_status=$?
11259   echo "$as_me:11259: \$? = $ac_status" >&5
11260   (exit $ac_status); } &&
11261          { ac_try='test -s conftest.$ac_objext'
11262   { (eval echo "$as_me:11262: \"$ac_try\"") >&5
11263   (eval $ac_try) 2>&5
11264   ac_status=$?
11265   echo "$as_me:11265: \$? = $ac_status" >&5
11266   (exit $ac_status); }; }; then
11267   ac_cv_type_signed_char=yes
11268 else
11269   echo "$as_me: failed program was:" >&5
11270 cat conftest.$ac_ext >&5
11271 ac_cv_type_signed_char=no
11272 fi
11273 rm -f conftest.$ac_objext conftest.$ac_ext
11274 fi
11275 echo "$as_me:11275: result: $ac_cv_type_signed_char" >&5
11276 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11277
11278 echo "$as_me:11278: checking size of signed char" >&5
11279 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11280 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11281   echo $ECHO_N "(cached) $ECHO_C" >&6
11282 else
11283   if test "$ac_cv_type_signed_char" = yes; then
11284   if test "$cross_compiling" = yes; then
11285   # Depending upon the size, compute the lo and hi bounds.
11286 cat >conftest.$ac_ext <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289 $ac_includes_default
11290 int
11291 main ()
11292 {
11293 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f conftest.$ac_objext
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); } &&
11304          { ac_try='test -s conftest.$ac_objext'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); }; }; then
11310   ac_lo=0 ac_mid=0
11311   while :; do
11312     cat >conftest.$ac_ext <<_ACEOF
11313 #line 11313 "configure"
11314 #include "confdefs.h"
11315 $ac_includes_default
11316 int
11317 main ()
11318 {
11319 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11320   ;
11321   return 0;
11322 }
11323 _ACEOF
11324 rm -f conftest.$ac_objext
11325 if { (eval echo "$as_me:11325: \"$ac_compile\"") >&5
11326   (eval $ac_compile) 2>&5
11327   ac_status=$?
11328   echo "$as_me:11328: \$? = $ac_status" >&5
11329   (exit $ac_status); } &&
11330          { ac_try='test -s conftest.$ac_objext'
11331   { (eval echo "$as_me:11331: \"$ac_try\"") >&5
11332   (eval $ac_try) 2>&5
11333   ac_status=$?
11334   echo "$as_me:11334: \$? = $ac_status" >&5
11335   (exit $ac_status); }; }; then
11336   ac_hi=$ac_mid; break
11337 else
11338   echo "$as_me: failed program was:" >&5
11339 cat conftest.$ac_ext >&5
11340 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11341 fi
11342 rm -f conftest.$ac_objext conftest.$ac_ext
11343   done
11344 else
11345   echo "$as_me: failed program was:" >&5
11346 cat conftest.$ac_ext >&5
11347 ac_hi=-1 ac_mid=-1
11348   while :; do
11349     cat >conftest.$ac_ext <<_ACEOF
11350 #line 11350 "configure"
11351 #include "confdefs.h"
11352 $ac_includes_default
11353 int
11354 main ()
11355 {
11356 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11357   ;
11358   return 0;
11359 }
11360 _ACEOF
11361 rm -f conftest.$ac_objext
11362 if { (eval echo "$as_me:11362: \"$ac_compile\"") >&5
11363   (eval $ac_compile) 2>&5
11364   ac_status=$?
11365   echo "$as_me:11365: \$? = $ac_status" >&5
11366   (exit $ac_status); } &&
11367          { ac_try='test -s conftest.$ac_objext'
11368   { (eval echo "$as_me:11368: \"$ac_try\"") >&5
11369   (eval $ac_try) 2>&5
11370   ac_status=$?
11371   echo "$as_me:11371: \$? = $ac_status" >&5
11372   (exit $ac_status); }; }; then
11373   ac_lo=$ac_mid; break
11374 else
11375   echo "$as_me: failed program was:" >&5
11376 cat conftest.$ac_ext >&5
11377 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11378 fi
11379 rm -f conftest.$ac_objext conftest.$ac_ext
11380   done
11381 fi
11382 rm -f conftest.$ac_objext conftest.$ac_ext
11383 # Binary search between lo and hi bounds.
11384 while test "x$ac_lo" != "x$ac_hi"; do
11385   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11386   cat >conftest.$ac_ext <<_ACEOF
11387 #line 11387 "configure"
11388 #include "confdefs.h"
11389 $ac_includes_default
11390 int
11391 main ()
11392 {
11393 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11394   ;
11395   return 0;
11396 }
11397 _ACEOF
11398 rm -f conftest.$ac_objext
11399 if { (eval echo "$as_me:11399: \"$ac_compile\"") >&5
11400   (eval $ac_compile) 2>&5
11401   ac_status=$?
11402   echo "$as_me:11402: \$? = $ac_status" >&5
11403   (exit $ac_status); } &&
11404          { ac_try='test -s conftest.$ac_objext'
11405   { (eval echo "$as_me:11405: \"$ac_try\"") >&5
11406   (eval $ac_try) 2>&5
11407   ac_status=$?
11408   echo "$as_me:11408: \$? = $ac_status" >&5
11409   (exit $ac_status); }; }; then
11410   ac_hi=$ac_mid
11411 else
11412   echo "$as_me: failed program was:" >&5
11413 cat conftest.$ac_ext >&5
11414 ac_lo=`expr $ac_mid + 1`
11415 fi
11416 rm -f conftest.$ac_objext conftest.$ac_ext
11417 done
11418 ac_cv_sizeof_signed_char=$ac_lo
11419 else
11420   if test "$cross_compiling" = yes; then
11421   { { echo "$as_me:11421: error: cannot run test program while cross compiling" >&5
11422 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11423    { (exit 1); exit 1; }; }
11424 else
11425   cat >conftest.$ac_ext <<_ACEOF
11426 #line 11426 "configure"
11427 #include "confdefs.h"
11428 $ac_includes_default
11429 int
11430 main ()
11431 {
11432 FILE *f = fopen ("conftest.val", "w");
11433 if (!f)
11434   $ac_main_return (1);
11435 fprintf (f, "%d", (sizeof (signed char)));
11436 fclose (f);
11437   ;
11438   return 0;
11439 }
11440 _ACEOF
11441 rm -f conftest$ac_exeext
11442 if { (eval echo "$as_me:11442: \"$ac_link\"") >&5
11443   (eval $ac_link) 2>&5
11444   ac_status=$?
11445   echo "$as_me:11445: \$? = $ac_status" >&5
11446   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11447   { (eval echo "$as_me:11447: \"$ac_try\"") >&5
11448   (eval $ac_try) 2>&5
11449   ac_status=$?
11450   echo "$as_me:11450: \$? = $ac_status" >&5
11451   (exit $ac_status); }; }; then
11452   ac_cv_sizeof_signed_char=`cat conftest.val`
11453 else
11454   echo "$as_me: program exited with status $ac_status" >&5
11455 echo "$as_me: failed program was:" >&5
11456 cat conftest.$ac_ext >&5
11457 fi
11458 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11459 fi
11460 fi
11461 rm -f conftest.val
11462 else
11463   ac_cv_sizeof_signed_char=0
11464 fi
11465 fi
11466 echo "$as_me:11466: result: $ac_cv_sizeof_signed_char" >&5
11467 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11468 cat >>confdefs.h <<EOF
11469 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11470 EOF
11471
11472 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11473         NCURSES_SBOOL="signed char"
11474 else
11475         NCURSES_SBOOL="char"
11476 fi
11477 echo "$as_me:11477: checking if you want to use signed Boolean array in term.h" >&5
11478 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11479
11480 # Check whether --enable-signed-char or --disable-signed-char was given.
11481 if test "${enable_signed_char+set}" = set; then
11482   enableval="$enable_signed_char"
11483   with_signed_char=$enableval
11484 else
11485   with_signed_char=no
11486 fi;
11487 echo "$as_me:11487: result: $with_signed_char" >&5
11488 echo "${ECHO_T}$with_signed_char" >&6
11489 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11490
11491 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11492 echo "$as_me:11492: checking if you want SIGWINCH handler" >&5
11493 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11494
11495 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11496 if test "${enable_sigwinch+set}" = set; then
11497   enableval="$enable_sigwinch"
11498   with_sigwinch=$enableval
11499 else
11500   with_sigwinch=$with_ext_funcs
11501 fi;
11502 echo "$as_me:11502: result: $with_sigwinch" >&5
11503 echo "${ECHO_T}$with_sigwinch" >&6
11504 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11505 #define USE_SIGWINCH 1
11506 EOF
11507
11508 ###   use option --enable-tcap-names to allow user to define new capabilities
11509 echo "$as_me:11509: checking if you want user-definable terminal capabilities like termcap" >&5
11510 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11511
11512 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11513 if test "${enable_tcap_names+set}" = set; then
11514   enableval="$enable_tcap_names"
11515   with_tcap_names=$enableval
11516 else
11517   with_tcap_names=$with_ext_funcs
11518 fi;
11519 echo "$as_me:11519: result: $with_tcap_names" >&5
11520 echo "${ECHO_T}$with_tcap_names" >&6
11521 NCURSES_XNAMES=0
11522 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11523
11524 ###############################################################################
11525 # These options are relatively safe to experiment with.
11526
11527 echo "$as_me:11527: checking if you want all development code" >&5
11528 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11529
11530 # Check whether --with-develop or --without-develop was given.
11531 if test "${with_develop+set}" = set; then
11532   withval="$with_develop"
11533   with_develop=$withval
11534 else
11535   with_develop=no
11536 fi;
11537 echo "$as_me:11537: result: $with_develop" >&5
11538 echo "${ECHO_T}$with_develop" >&6
11539
11540 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11541 echo "$as_me:11541: checking if you want hard-tabs code" >&5
11542 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11543
11544 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11545 if test "${enable_hard_tabs+set}" = set; then
11546   enableval="$enable_hard_tabs"
11547
11548 else
11549   enable_hard_tabs=$with_develop
11550 fi;
11551 echo "$as_me:11551: result: $enable_hard_tabs" >&5
11552 echo "${ECHO_T}$enable_hard_tabs" >&6
11553 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11554 #define USE_HARD_TABS 1
11555 EOF
11556
11557 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11558 echo "$as_me:11558: checking if you want limited support for xmc" >&5
11559 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11560
11561 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11562 if test "${enable_xmc_glitch+set}" = set; then
11563   enableval="$enable_xmc_glitch"
11564
11565 else
11566   enable_xmc_glitch=$with_develop
11567 fi;
11568 echo "$as_me:11568: result: $enable_xmc_glitch" >&5
11569 echo "${ECHO_T}$enable_xmc_glitch" >&6
11570 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11571 #define USE_XMC_SUPPORT 1
11572 EOF
11573
11574 ###############################################################################
11575 # These are just experimental, probably should not be in a package:
11576
11577 echo "$as_me:11577: checking if you do not want to assume colors are white-on-black" >&5
11578 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11579
11580 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11581 if test "${enable_assumed_color+set}" = set; then
11582   enableval="$enable_assumed_color"
11583   with_assumed_color=$enableval
11584 else
11585   with_assumed_color=yes
11586 fi;
11587 echo "$as_me:11587: result: $with_assumed_color" >&5
11588 echo "${ECHO_T}$with_assumed_color" >&6
11589 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11590 #define USE_ASSUMED_COLOR 1
11591 EOF
11592
11593 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11594 echo "$as_me:11594: checking if you want hashmap scrolling-optimization code" >&5
11595 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11596
11597 # Check whether --enable-hashmap or --disable-hashmap was given.
11598 if test "${enable_hashmap+set}" = set; then
11599   enableval="$enable_hashmap"
11600   with_hashmap=$enableval
11601 else
11602   with_hashmap=yes
11603 fi;
11604 echo "$as_me:11604: result: $with_hashmap" >&5
11605 echo "${ECHO_T}$with_hashmap" >&6
11606 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11607 #define USE_HASHMAP 1
11608 EOF
11609
11610 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11611 echo "$as_me:11611: checking if you want colorfgbg code" >&5
11612 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11613
11614 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11615 if test "${enable_colorfgbg+set}" = set; then
11616   enableval="$enable_colorfgbg"
11617   with_colorfgbg=$enableval
11618 else
11619   with_colorfgbg=no
11620 fi;
11621 echo "$as_me:11621: result: $with_colorfgbg" >&5
11622 echo "${ECHO_T}$with_colorfgbg" >&6
11623 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11624 #define USE_COLORFGBG 1
11625 EOF
11626
11627 ###   use option --enable-interop to turn on use of bindings used for interop
11628 echo "$as_me:11628: checking if you want interop bindings" >&5
11629 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11630
11631 # Check whether --enable-interop or --disable-interop was given.
11632 if test "${enable_interop+set}" = set; then
11633   enableval="$enable_interop"
11634   with_exp_interop=$enableval
11635 else
11636   with_exp_interop=no
11637 fi;
11638 echo "$as_me:11638: result: $with_exp_interop" >&5
11639 echo "${ECHO_T}$with_exp_interop" >&6
11640
11641 NCURSES_INTEROP_FUNCS=0
11642 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11643
11644 # This is still experimental (20080329), but should ultimately be moved to
11645 # the script-block --with-normal, etc.
11646
11647 echo "$as_me:11647: checking if you want to link with the pthread library" >&5
11648 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11649
11650 # Check whether --with-pthread or --without-pthread was given.
11651 if test "${with_pthread+set}" = set; then
11652   withval="$with_pthread"
11653   with_pthread=$withval
11654 else
11655   with_pthread=no
11656 fi;
11657 echo "$as_me:11657: result: $with_pthread" >&5
11658 echo "${ECHO_T}$with_pthread" >&6
11659
11660 if test "$with_pthread" != no ; then
11661     echo "$as_me:11661: checking for pthread.h" >&5
11662 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11663 if test "${ac_cv_header_pthread_h+set}" = set; then
11664   echo $ECHO_N "(cached) $ECHO_C" >&6
11665 else
11666   cat >conftest.$ac_ext <<_ACEOF
11667 #line 11667 "configure"
11668 #include "confdefs.h"
11669 #include <pthread.h>
11670 _ACEOF
11671 if { (eval echo "$as_me:11671: \"$ac_cpp conftest.$ac_ext\"") >&5
11672   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11673   ac_status=$?
11674   egrep -v '^ *\+' conftest.er1 >conftest.err
11675   rm -f conftest.er1
11676   cat conftest.err >&5
11677   echo "$as_me:11677: \$? = $ac_status" >&5
11678   (exit $ac_status); } >/dev/null; then
11679   if test -s conftest.err; then
11680     ac_cpp_err=$ac_c_preproc_warn_flag
11681   else
11682     ac_cpp_err=
11683   fi
11684 else
11685   ac_cpp_err=yes
11686 fi
11687 if test -z "$ac_cpp_err"; then
11688   ac_cv_header_pthread_h=yes
11689 else
11690   echo "$as_me: failed program was:" >&5
11691   cat conftest.$ac_ext >&5
11692   ac_cv_header_pthread_h=no
11693 fi
11694 rm -f conftest.err conftest.$ac_ext
11695 fi
11696 echo "$as_me:11696: result: $ac_cv_header_pthread_h" >&5
11697 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11698 if test $ac_cv_header_pthread_h = yes; then
11699
11700         cat >>confdefs.h <<\EOF
11701 #define HAVE_PTHREADS_H 1
11702 EOF
11703
11704         for cf_lib_pthread in pthread c_r
11705         do
11706             echo "$as_me:11706: checking if we can link with the $cf_lib_pthread library" >&5
11707 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11708             cf_save_LIBS="$LIBS"
11709             LIBS="-l$cf_lib_pthread $LIBS"
11710             cat >conftest.$ac_ext <<_ACEOF
11711 #line 11711 "configure"
11712 #include "confdefs.h"
11713
11714 #include <pthread.h>
11715
11716 int
11717 main ()
11718 {
11719
11720                 int rc = pthread_create(0,0,0,0);
11721                 int r2 = pthread_mutexattr_settype(0, 0);
11722
11723   ;
11724   return 0;
11725 }
11726 _ACEOF
11727 rm -f conftest.$ac_objext conftest$ac_exeext
11728 if { (eval echo "$as_me:11728: \"$ac_link\"") >&5
11729   (eval $ac_link) 2>&5
11730   ac_status=$?
11731   echo "$as_me:11731: \$? = $ac_status" >&5
11732   (exit $ac_status); } &&
11733          { ac_try='test -s conftest$ac_exeext'
11734   { (eval echo "$as_me:11734: \"$ac_try\"") >&5
11735   (eval $ac_try) 2>&5
11736   ac_status=$?
11737   echo "$as_me:11737: \$? = $ac_status" >&5
11738   (exit $ac_status); }; }; then
11739   with_pthread=yes
11740 else
11741   echo "$as_me: failed program was:" >&5
11742 cat conftest.$ac_ext >&5
11743 with_pthread=no
11744 fi
11745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11746             LIBS="$cf_save_LIBS"
11747             echo "$as_me:11747: result: $with_pthread" >&5
11748 echo "${ECHO_T}$with_pthread" >&6
11749             test "$with_pthread" = yes && break
11750         done
11751
11752         if test "$with_pthread" = yes ; then
11753             LIBS="-l$cf_lib_pthread $LIBS"
11754             cat >>confdefs.h <<\EOF
11755 #define HAVE_LIBPTHREADS 1
11756 EOF
11757
11758         else
11759             { { echo "$as_me:11759: error: Cannot link with pthread library" >&5
11760 echo "$as_me: error: Cannot link with pthread library" >&2;}
11761    { (exit 1); exit 1; }; }
11762         fi
11763
11764 fi
11765
11766 fi
11767
11768 if test "x$with_pthread" != xno; then
11769         echo "$as_me:11769: checking for pthread_kill" >&5
11770 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11771 if test "${ac_cv_func_pthread_kill+set}" = set; then
11772   echo $ECHO_N "(cached) $ECHO_C" >&6
11773 else
11774   cat >conftest.$ac_ext <<_ACEOF
11775 #line 11775 "configure"
11776 #include "confdefs.h"
11777 /* System header to define __stub macros and hopefully few prototypes,
11778     which can conflict with char pthread_kill (); below.  */
11779 #include <assert.h>
11780 /* Override any gcc2 internal prototype to avoid an error.  */
11781 #ifdef __cplusplus
11782 extern "C"
11783 #endif
11784 /* We use char because int might match the return type of a gcc2
11785    builtin and then its argument prototype would still apply.  */
11786 char pthread_kill ();
11787 char (*f) ();
11788
11789 int
11790 main ()
11791 {
11792 /* The GNU C library defines this for functions which it implements
11793     to always fail with ENOSYS.  Some functions are actually named
11794     something starting with __ and the normal name is an alias.  */
11795 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11796 choke me
11797 #else
11798 f = pthread_kill;
11799 #endif
11800
11801   ;
11802   return 0;
11803 }
11804 _ACEOF
11805 rm -f conftest.$ac_objext conftest$ac_exeext
11806 if { (eval echo "$as_me:11806: \"$ac_link\"") >&5
11807   (eval $ac_link) 2>&5
11808   ac_status=$?
11809   echo "$as_me:11809: \$? = $ac_status" >&5
11810   (exit $ac_status); } &&
11811          { ac_try='test -s conftest$ac_exeext'
11812   { (eval echo "$as_me:11812: \"$ac_try\"") >&5
11813   (eval $ac_try) 2>&5
11814   ac_status=$?
11815   echo "$as_me:11815: \$? = $ac_status" >&5
11816   (exit $ac_status); }; }; then
11817   ac_cv_func_pthread_kill=yes
11818 else
11819   echo "$as_me: failed program was:" >&5
11820 cat conftest.$ac_ext >&5
11821 ac_cv_func_pthread_kill=no
11822 fi
11823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11824 fi
11825 echo "$as_me:11825: result: $ac_cv_func_pthread_kill" >&5
11826 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11827 if test $ac_cv_func_pthread_kill = yes; then
11828
11829                 echo "$as_me:11829: checking if you want to allow EINTR in wgetch with pthreads" >&5
11830 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11831
11832 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11833 if test "${enable_pthreads_eintr+set}" = set; then
11834   enableval="$enable_pthreads_eintr"
11835   use_pthreads_eintr=$enableval
11836 else
11837   use_pthreads_eintr=no
11838 fi;
11839                 echo "$as_me:11839: result: $use_pthreads_eintr" >&5
11840 echo "${ECHO_T}$use_pthreads_eintr" >&6
11841                 if test $use_pthreads_eintr = yes ; then
11842                         cat >>confdefs.h <<\EOF
11843 #define USE_PTHREADS_EINTR 1
11844 EOF
11845
11846                 fi
11847 fi
11848
11849         echo "$as_me:11849: checking if you want to use weak-symbols for pthreads" >&5
11850 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11851
11852 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11853 if test "${enable_weak_symbols+set}" = set; then
11854   enableval="$enable_weak_symbols"
11855   use_weak_symbols=$enableval
11856 else
11857   use_weak_symbols=no
11858 fi;
11859         echo "$as_me:11859: result: $use_weak_symbols" >&5
11860 echo "${ECHO_T}$use_weak_symbols" >&6
11861         if test "$use_weak_symbols" = yes ; then
11862
11863 echo "$as_me:11863: checking if $CC supports weak symbols" >&5
11864 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11865 if test "${cf_cv_weak_symbols+set}" = set; then
11866   echo $ECHO_N "(cached) $ECHO_C" >&6
11867 else
11868
11869 cat >conftest.$ac_ext <<_ACEOF
11870 #line 11870 "configure"
11871 #include "confdefs.h"
11872
11873 #include <stdio.h>
11874 int
11875 main ()
11876 {
11877
11878 #if defined(__GNUC__)
11879 #  if defined __USE_ISOC99
11880 #    define _cat_pragma(exp)    _Pragma(#exp)
11881 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11882 #  else
11883 #    define _weak_pragma(exp)
11884 #  endif
11885 #  define _declare(name)        __extension__ extern __typeof__(name) name
11886 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11887 #endif
11888
11889 weak_symbol(fopen);
11890
11891   ;
11892   return 0;
11893 }
11894 _ACEOF
11895 rm -f conftest.$ac_objext
11896 if { (eval echo "$as_me:11896: \"$ac_compile\"") >&5
11897   (eval $ac_compile) 2>&5
11898   ac_status=$?
11899   echo "$as_me:11899: \$? = $ac_status" >&5
11900   (exit $ac_status); } &&
11901          { ac_try='test -s conftest.$ac_objext'
11902   { (eval echo "$as_me:11902: \"$ac_try\"") >&5
11903   (eval $ac_try) 2>&5
11904   ac_status=$?
11905   echo "$as_me:11905: \$? = $ac_status" >&5
11906   (exit $ac_status); }; }; then
11907   cf_cv_weak_symbols=yes
11908 else
11909   echo "$as_me: failed program was:" >&5
11910 cat conftest.$ac_ext >&5
11911 cf_cv_weak_symbols=no
11912 fi
11913 rm -f conftest.$ac_objext conftest.$ac_ext
11914
11915 fi
11916 echo "$as_me:11916: result: $cf_cv_weak_symbols" >&5
11917 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11918
11919         else
11920                 cf_cv_weak_symbols=no
11921         fi
11922
11923         if test $cf_cv_weak_symbols = yes ; then
11924                 cat >>confdefs.h <<\EOF
11925 #define USE_WEAK_SYMBOLS 1
11926 EOF
11927
11928         fi
11929 fi
11930
11931 PTHREAD=
11932 if test "$with_pthread" = "yes" ; then
11933     cat >>confdefs.h <<\EOF
11934 #define USE_PTHREADS 1
11935 EOF
11936
11937     enable_reentrant=yes
11938     if test $cf_cv_weak_symbols = yes ; then
11939         PTHREAD=-lpthread
11940     fi
11941 fi
11942
11943 # Reentrant code has to be opaque; there's little advantage to making ncurses
11944 # opaque outside of that, so there is no --enable-opaque option.  We can use
11945 # this option without --with-pthreads, but this will be always set for
11946 # pthreads.
11947 echo "$as_me:11947: checking if you want experimental reentrant code" >&5
11948 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11949
11950 # Check whether --enable-reentrant or --disable-reentrant was given.
11951 if test "${enable_reentrant+set}" = set; then
11952   enableval="$enable_reentrant"
11953   with_reentrant=$enableval
11954 else
11955   with_reentrant=no
11956 fi;
11957 echo "$as_me:11957: result: $with_reentrant" >&5
11958 echo "${ECHO_T}$with_reentrant" >&6
11959 if test "$with_reentrant" = yes ; then
11960         cf_cv_enable_reentrant=1
11961         cf_cv_enable_opaque="NCURSES_INTERNALS"
11962         NCURSES_OPAQUE=1
11963         NCURSES_SIZE_T=int
11964         if test $cf_cv_weak_symbols = yes ; then
11965
11966 # remove pthread library from $LIBS
11967 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11968
11969                 TEST_LIBS="-lpthread $TEST_LIBS"
11970                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11971         else
11972                 LIB_SUFFIX="t${LIB_SUFFIX}"
11973         fi
11974         cat >>confdefs.h <<\EOF
11975 #define USE_REENTRANT 1
11976 EOF
11977
11978 if test "${with_abi_version+set}" != set; then
11979         case $cf_cv_rel_version in
11980         5.*)
11981                 cf_cv_rel_version=6.0
11982                 cf_cv_abi_version=6
11983                 { echo "$as_me:11983: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11984 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11985                 ;;
11986         esac
11987 fi
11988
11989 else
11990         cf_cv_enable_reentrant=0
11991         cf_cv_enable_opaque="NCURSES_OPAQUE"
11992         NCURSES_OPAQUE=0
11993         NCURSES_SIZE_T=short
11994 fi
11995
11996 ### Allow using a different wrap-prefix
11997 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11998         echo "$as_me:11998: checking for prefix used to wrap public variables" >&5
11999 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12000
12001 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12002 if test "${with_wrap_prefix+set}" = set; then
12003   withval="$with_wrap_prefix"
12004   NCURSES_WRAP_PREFIX=$withval
12005 else
12006   NCURSES_WRAP_PREFIX=_nc_
12007 fi;
12008         echo "$as_me:12008: result: $NCURSES_WRAP_PREFIX" >&5
12009 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12010 else
12011         NCURSES_WRAP_PREFIX=_nc_
12012 fi
12013
12014 cat >>confdefs.h <<EOF
12015 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12016 EOF
12017
12018 echo "$as_me:12018: checking if you want experimental safe-sprintf code" >&5
12019 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12020
12021 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12022 if test "${enable_safe_sprintf+set}" = set; then
12023   enableval="$enable_safe_sprintf"
12024   with_safe_sprintf=$enableval
12025 else
12026   with_safe_sprintf=no
12027 fi;
12028 echo "$as_me:12028: result: $with_safe_sprintf" >&5
12029 echo "${ECHO_T}$with_safe_sprintf" >&6
12030 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
12031 #define USE_SAFE_SPRINTF 1
12032 EOF
12033
12034 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12035 # when hashmap is used scroll hints are useless
12036 if test "$with_hashmap" = no ; then
12037 echo "$as_me:12037: checking if you want to experiment without scrolling-hints code" >&5
12038 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12039
12040 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12041 if test "${enable_scroll_hints+set}" = set; then
12042   enableval="$enable_scroll_hints"
12043   with_scroll_hints=$enableval
12044 else
12045   with_scroll_hints=yes
12046 fi;
12047 echo "$as_me:12047: result: $with_scroll_hints" >&5
12048 echo "${ECHO_T}$with_scroll_hints" >&6
12049 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12050 #define USE_SCROLL_HINTS 1
12051 EOF
12052
12053 fi
12054
12055 echo "$as_me:12055: checking if you want experimental wgetch-events code" >&5
12056 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12057
12058 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12059 if test "${enable_wgetch_events+set}" = set; then
12060   enableval="$enable_wgetch_events"
12061   with_wgetch_events=$enableval
12062 else
12063   with_wgetch_events=no
12064 fi;
12065 echo "$as_me:12065: result: $with_wgetch_events" >&5
12066 echo "${ECHO_T}$with_wgetch_events" >&6
12067 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12068 #define NCURSES_WGETCH_EVENTS 1
12069 EOF
12070
12071 ###############################################################################
12072
12073 ###     use option --disable-echo to suppress full display compiling commands
12074 echo "$as_me:12074: checking if you want to display full commands during build" >&5
12075 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12076
12077 # Check whether --enable-echo or --disable-echo was given.
12078 if test "${enable_echo+set}" = set; then
12079   enableval="$enable_echo"
12080   with_echo=$enableval
12081 else
12082   with_echo=yes
12083 fi;
12084 if test "$with_echo" = yes; then
12085         ECHO_LINK=
12086 else
12087         ECHO_LINK='@ echo linking $@ ... ;'
12088         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12089         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12090 fi
12091 echo "$as_me:12091: result: $with_echo" >&5
12092 echo "${ECHO_T}$with_echo" >&6
12093
12094 ###     use option --enable-warnings to turn on all gcc warnings
12095 echo "$as_me:12095: checking if you want to see compiler warnings" >&5
12096 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12097
12098 # Check whether --enable-warnings or --disable-warnings was given.
12099 if test "${enable_warnings+set}" = set; then
12100   enableval="$enable_warnings"
12101   with_warnings=$enableval
12102 fi;
12103 echo "$as_me:12103: result: $with_warnings" >&5
12104 echo "${ECHO_T}$with_warnings" >&6
12105
12106 if test "x$with_warnings" = "xyes"; then
12107
12108         ADAFLAGS="$ADAFLAGS -gnatg"
12109
12110 INTEL_COMPILER=no
12111
12112 if test "$GCC" = yes ; then
12113         case $host_os in
12114         linux*|gnu*)
12115                 echo "$as_me:12115: checking if this is really Intel C compiler" >&5
12116 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12117                 cf_save_CFLAGS="$CFLAGS"
12118                 CFLAGS="$CFLAGS -no-gcc"
12119                 cat >conftest.$ac_ext <<_ACEOF
12120 #line 12120 "configure"
12121 #include "confdefs.h"
12122
12123 int
12124 main ()
12125 {
12126
12127 #ifdef __INTEL_COMPILER
12128 #else
12129 make an error
12130 #endif
12131
12132   ;
12133   return 0;
12134 }
12135 _ACEOF
12136 rm -f conftest.$ac_objext
12137 if { (eval echo "$as_me:12137: \"$ac_compile\"") >&5
12138   (eval $ac_compile) 2>&5
12139   ac_status=$?
12140   echo "$as_me:12140: \$? = $ac_status" >&5
12141   (exit $ac_status); } &&
12142          { ac_try='test -s conftest.$ac_objext'
12143   { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144   (eval $ac_try) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); }; }; then
12148   INTEL_COMPILER=yes
12149 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12150
12151 else
12152   echo "$as_me: failed program was:" >&5
12153 cat conftest.$ac_ext >&5
12154 fi
12155 rm -f conftest.$ac_objext conftest.$ac_ext
12156                 CFLAGS="$cf_save_CFLAGS"
12157                 echo "$as_me:12157: result: $INTEL_COMPILER" >&5
12158 echo "${ECHO_T}$INTEL_COMPILER" >&6
12159                 ;;
12160         esac
12161 fi
12162
12163 cat > conftest.$ac_ext <<EOF
12164 #line 12164 "${as_me:-configure}"
12165 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12166 EOF
12167
12168 if test "$INTEL_COMPILER" = yes
12169 then
12170 # The "-wdXXX" options suppress warnings:
12171 # remark #1419: external declaration in primary source file
12172 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12173 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12174 # remark #193: zero used for undefined preprocessing identifier
12175 # remark #593: variable "curs_sb_left_arrow" was set but never used
12176 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12177 # remark #869: parameter "tw" was never referenced
12178 # remark #981: operands are evaluated in unspecified order
12179 # warning #279: controlling expression is constant
12180
12181         { echo "$as_me:12181: checking for $CC warning options..." >&5
12182 echo "$as_me: checking for $CC warning options..." >&6;}
12183         cf_save_CFLAGS="$CFLAGS"
12184         EXTRA_CFLAGS="-Wall"
12185         for cf_opt in \
12186                 wd1419 \
12187                 wd1683 \
12188                 wd1684 \
12189                 wd193 \
12190                 wd593 \
12191                 wd279 \
12192                 wd810 \
12193                 wd869 \
12194                 wd981
12195         do
12196                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12197                 if { (eval echo "$as_me:12197: \"$ac_compile\"") >&5
12198   (eval $ac_compile) 2>&5
12199   ac_status=$?
12200   echo "$as_me:12200: \$? = $ac_status" >&5
12201   (exit $ac_status); }; then
12202                         test -n "$verbose" && echo "$as_me:12202: result: ... -$cf_opt" >&5
12203 echo "${ECHO_T}... -$cf_opt" >&6
12204                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12205                 fi
12206         done
12207         CFLAGS="$cf_save_CFLAGS"
12208
12209 elif test "$GCC" = yes
12210 then
12211         { echo "$as_me:12211: checking for $CC warning options..." >&5
12212 echo "$as_me: checking for $CC warning options..." >&6;}
12213         cf_save_CFLAGS="$CFLAGS"
12214         EXTRA_CFLAGS=
12215         cf_warn_CONST=""
12216         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12217         for cf_opt in W Wall \
12218                 Wbad-function-cast \
12219                 Wcast-align \
12220                 Wcast-qual \
12221                 Winline \
12222                 Wmissing-declarations \
12223                 Wmissing-prototypes \
12224                 Wnested-externs \
12225                 Wpointer-arith \
12226                 Wshadow \
12227                 Wstrict-prototypes \
12228                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12229         do
12230                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12231                 if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5
12232   (eval $ac_compile) 2>&5
12233   ac_status=$?
12234   echo "$as_me:12234: \$? = $ac_status" >&5
12235   (exit $ac_status); }; then
12236                         test -n "$verbose" && echo "$as_me:12236: result: ... -$cf_opt" >&5
12237 echo "${ECHO_T}... -$cf_opt" >&6
12238                         case $cf_opt in #(vi
12239                         Wcast-qual) #(vi
12240                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12241                                 ;;
12242                         Winline) #(vi
12243                                 case $GCC_VERSION in
12244                                 [34].*)
12245                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12246
12247 echo "${as_me:-configure}:12247: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12248
12249                                         continue;;
12250                                 esac
12251                                 ;;
12252                         esac
12253                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12254                 fi
12255         done
12256         CFLAGS="$cf_save_CFLAGS"
12257 fi
12258 rm -rf conftest*
12259
12260         if test "$cf_with_cxx" = yes ; then
12261
12262 INTEL_CPLUSPLUS=no
12263
12264 if test "$GCC" = yes ; then
12265         case $host_os in
12266         linux*|gnu*)
12267                 echo "$as_me:12267: checking if this is really Intel C++ compiler" >&5
12268 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12269                 cf_save_CFLAGS="$CXXFLAGS"
12270                 CXXFLAGS="$CXXFLAGS -no-gcc"
12271                 cat >conftest.$ac_ext <<_ACEOF
12272 #line 12272 "configure"
12273 #include "confdefs.h"
12274
12275 int
12276 main ()
12277 {
12278
12279 #ifdef __INTEL_COMPILER
12280 #else
12281 make an error
12282 #endif
12283
12284   ;
12285   return 0;
12286 }
12287 _ACEOF
12288 rm -f conftest.$ac_objext
12289 if { (eval echo "$as_me:12289: \"$ac_compile\"") >&5
12290   (eval $ac_compile) 2>&5
12291   ac_status=$?
12292   echo "$as_me:12292: \$? = $ac_status" >&5
12293   (exit $ac_status); } &&
12294          { ac_try='test -s conftest.$ac_objext'
12295   { (eval echo "$as_me:12295: \"$ac_try\"") >&5
12296   (eval $ac_try) 2>&5
12297   ac_status=$?
12298   echo "$as_me:12298: \$? = $ac_status" >&5
12299   (exit $ac_status); }; }; then
12300   INTEL_CPLUSPLUS=yes
12301 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12302
12303 else
12304   echo "$as_me: failed program was:" >&5
12305 cat conftest.$ac_ext >&5
12306 fi
12307 rm -f conftest.$ac_objext conftest.$ac_ext
12308                 CXXFLAGS="$cf_save_CFLAGS"
12309                 echo "$as_me:12309: result: $INTEL_CPLUSPLUS" >&5
12310 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12311                 ;;
12312         esac
12313 fi
12314
12315 ac_ext=cc
12316 ac_cpp='$CXXCPP $CPPFLAGS'
12317 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12318 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12319 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12320 ac_main_return=return
12321
12322 cat > conftest.$ac_ext <<EOF
12323 #line 12323 "configure"
12324 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12325 EOF
12326
12327 if test "$INTEL_CPLUSPLUS" = yes
12328 then
12329 # The "-wdXXX" options suppress warnings:
12330 # remark #1419: external declaration in primary source file
12331 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12332 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12333 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12334 # remark #193: zero used for undefined preprocessing identifier
12335 # remark #593: variable "curs_sb_left_arrow" was set but never used
12336 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12337 # remark #869: parameter "tw" was never referenced
12338 # remark #981: operands are evaluated in unspecified order
12339 # warning #269: invalid format string conversion
12340
12341         { echo "$as_me:12341: checking for $CC warning options..." >&5
12342 echo "$as_me: checking for $CC warning options..." >&6;}
12343         cf_save_CXXFLAGS="$CXXFLAGS"
12344         EXTRA_CXXFLAGS="-Wall"
12345         for cf_opt in \
12346                 wd1419 \
12347                 wd1682 \
12348                 wd1683 \
12349                 wd1684 \
12350                 wd193 \
12351                 wd279 \
12352                 wd593 \
12353                 wd810 \
12354                 wd869 \
12355                 wd981
12356         do
12357                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12358                 if { (eval echo "$as_me:12358: \"$ac_compile\"") >&5
12359   (eval $ac_compile) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); }; then
12363                         test -n "$verbose" && echo "$as_me:12363: result: ... -$cf_opt" >&5
12364 echo "${ECHO_T}... -$cf_opt" >&6
12365                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12366                 fi
12367         done
12368         CXXFLAGS="$cf_save_CXXFLAGS"
12369
12370 elif test "$GXX" = yes
12371 then
12372         { echo "$as_me:12372: checking for $CXX warning options..." >&5
12373 echo "$as_me: checking for $CXX warning options..." >&6;}
12374         cf_save_CXXFLAGS="$CXXFLAGS"
12375         EXTRA_CXXFLAGS="-W -Wall"
12376         cf_gxx_extra_warnings=""
12377         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12378         case "$GCC_VERSION" in
12379         [1-2].*)
12380                 ;;
12381         *)
12382                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12383                 ;;
12384         esac
12385         for cf_opt in \
12386                 Wabi \
12387                 fabi-version=0 \
12388                 Woverloaded-virtual \
12389                 Wsign-promo \
12390                 Wsynth \
12391                 Wold-style-cast \
12392                 Wcast-align \
12393                 Wcast-qual \
12394                 Wmissing-prototypes \
12395                 Wpointer-arith \
12396                 Wshadow \
12397                 Wstrict-prototypes \
12398                 Wundef $cf_gxx_extra_warnings Wno-unused
12399         do
12400                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12401                 if { (eval echo "$as_me:12401: \"$ac_compile\"") >&5
12402   (eval $ac_compile) 2>&5
12403   ac_status=$?
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); }; then
12406                         test -n "$verbose" && echo "$as_me:12406: result: ... -$cf_opt" >&5
12407 echo "${ECHO_T}... -$cf_opt" >&6
12408                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12409                 else
12410                         test -n "$verbose" && echo "$as_me:12410: result: ... no -$cf_opt" >&5
12411 echo "${ECHO_T}... no -$cf_opt" >&6
12412                 fi
12413         done
12414         CXXFLAGS="$cf_save_CXXFLAGS"
12415 fi
12416
12417 rm -rf conftest*
12418 ac_ext=c
12419 ac_cpp='$CPP $CPPFLAGS'
12420 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12421 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12422 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12423 ac_main_return=return
12424
12425         fi
12426 fi
12427
12428 if test "$GCC" = yes
12429 then
12430 cat > conftest.i <<EOF
12431 #ifndef GCC_PRINTF
12432 #define GCC_PRINTF 0
12433 #endif
12434 #ifndef GCC_SCANF
12435 #define GCC_SCANF 0
12436 #endif
12437 #ifndef GCC_NORETURN
12438 #define GCC_NORETURN /* nothing */
12439 #endif
12440 #ifndef GCC_UNUSED
12441 #define GCC_UNUSED /* nothing */
12442 #endif
12443 EOF
12444 if test "$GCC" = yes
12445 then
12446         { echo "$as_me:12446: checking for $CC __attribute__ directives..." >&5
12447 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12448 cat > conftest.$ac_ext <<EOF
12449 #line 12449 "${as_me:-configure}"
12450 #include "confdefs.h"
12451 #include "conftest.h"
12452 #include "conftest.i"
12453 #if     GCC_PRINTF
12454 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12455 #else
12456 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12457 #endif
12458 #if     GCC_SCANF
12459 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12460 #else
12461 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12462 #endif
12463 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12464 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12465 extern void foo(void) GCC_NORETURN;
12466 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12467 EOF
12468         cf_printf_attribute=no
12469         cf_scanf_attribute=no
12470         for cf_attribute in scanf printf unused noreturn
12471         do
12472
12473 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12474
12475                 cf_directive="__attribute__(($cf_attribute))"
12476                 echo "checking for $CC $cf_directive" 1>&5
12477
12478                 case $cf_attribute in #(vi
12479                 printf) #(vi
12480                         cf_printf_attribute=yes
12481                         cat >conftest.h <<EOF
12482 #define GCC_$cf_ATTRIBUTE 1
12483 EOF
12484                         ;;
12485                 scanf) #(vi
12486                         cf_scanf_attribute=yes
12487                         cat >conftest.h <<EOF
12488 #define GCC_$cf_ATTRIBUTE 1
12489 EOF
12490                         ;;
12491                 *) #(vi
12492                         cat >conftest.h <<EOF
12493 #define GCC_$cf_ATTRIBUTE $cf_directive
12494 EOF
12495                         ;;
12496                 esac
12497
12498                 if { (eval echo "$as_me:12498: \"$ac_compile\"") >&5
12499   (eval $ac_compile) 2>&5
12500   ac_status=$?
12501   echo "$as_me:12501: \$? = $ac_status" >&5
12502   (exit $ac_status); }; then
12503                         test -n "$verbose" && echo "$as_me:12503: result: ... $cf_attribute" >&5
12504 echo "${ECHO_T}... $cf_attribute" >&6
12505                         cat conftest.h >>confdefs.h
12506                         case $cf_attribute in #(vi
12507                         printf) #(vi
12508                                 if test "$cf_printf_attribute" = no ; then
12509                                         cat >>confdefs.h <<EOF
12510 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12511 EOF
12512                                 else
12513                                         cat >>confdefs.h <<EOF
12514 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12515 EOF
12516                                 fi
12517                                 ;;
12518                         scanf) #(vi
12519                                 if test "$cf_scanf_attribute" = no ; then
12520                                         cat >>confdefs.h <<EOF
12521 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12522 EOF
12523                                 else
12524                                         cat >>confdefs.h <<EOF
12525 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12526 EOF
12527                                 fi
12528                                 ;;
12529                         esac
12530                 fi
12531         done
12532 else
12533         fgrep define conftest.i >>confdefs.h
12534 fi
12535 rm -rf conftest*
12536 fi
12537
12538 ###     use option --enable-assertions to turn on generation of assertion code
12539 echo "$as_me:12539: checking if you want to enable runtime assertions" >&5
12540 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12541
12542 # Check whether --enable-assertions or --disable-assertions was given.
12543 if test "${enable_assertions+set}" = set; then
12544   enableval="$enable_assertions"
12545   with_assertions=$enableval
12546 else
12547   with_assertions=no
12548 fi;
12549 echo "$as_me:12549: result: $with_assertions" >&5
12550 echo "${ECHO_T}$with_assertions" >&6
12551 if test -n "$GCC"
12552 then
12553         if test "$with_assertions" = no
12554         then
12555                 cat >>confdefs.h <<\EOF
12556 #define NDEBUG 1
12557 EOF
12558
12559                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12560         else
12561
12562         ADAFLAGS="$ADAFLAGS -gnata"
12563
12564         fi
12565 fi
12566
12567 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12568
12569 echo "$as_me:12569: checking if you want to use dmalloc for testing" >&5
12570 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12571
12572 # Check whether --with-dmalloc or --without-dmalloc was given.
12573 if test "${with_dmalloc+set}" = set; then
12574   withval="$with_dmalloc"
12575   cat >>confdefs.h <<\EOF
12576 #define USE_DMALLOC 1
12577 EOF
12578
12579         : ${with_cflags:=-g}
12580         : ${with_no_leaks:=yes}
12581          with_dmalloc=yes
12582 else
12583   with_dmalloc=
12584 fi;
12585 echo "$as_me:12585: result: ${with_dmalloc:-no}" >&5
12586 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12587
12588 case .$with_cflags in #(vi
12589 .*-g*)
12590         case .$CFLAGS in #(vi
12591         .*-g*) #(vi
12592                 ;;
12593         *)
12594
12595 cf_fix_cppflags=no
12596 cf_new_cflags=
12597 cf_new_cppflags=
12598 cf_new_extra_cppflags=
12599
12600 for cf_add_cflags in -g
12601 do
12602 case $cf_fix_cppflags in
12603 no)
12604         case $cf_add_cflags in #(vi
12605         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12606                 case $cf_add_cflags in
12607                 -D*)
12608                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12609
12610                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12611                                 && test -z "${cf_tst_cflags}" \
12612                                 && cf_fix_cppflags=yes
12613
12614                         if test $cf_fix_cppflags = yes ; then
12615                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12616                                 continue
12617                         elif test "${cf_tst_cflags}" = "\"'" ; then
12618                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12619                                 continue
12620                         fi
12621                         ;;
12622                 esac
12623                 case "$CPPFLAGS" in
12624                 *$cf_add_cflags) #(vi
12625                         ;;
12626                 *) #(vi
12627                         case $cf_add_cflags in #(vi
12628                         -D*)
12629                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12630
12631 CPPFLAGS=`echo "$CPPFLAGS" | \
12632         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12633                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12634
12635                                 ;;
12636                         esac
12637                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12638                         ;;
12639                 esac
12640                 ;;
12641         *)
12642                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12643                 ;;
12644         esac
12645         ;;
12646 yes)
12647         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12648
12649         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12650
12651         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12652                 && test -z "${cf_tst_cflags}" \
12653                 && cf_fix_cppflags=no
12654         ;;
12655 esac
12656 done
12657
12658 if test -n "$cf_new_cflags" ; then
12659
12660         CFLAGS="$CFLAGS $cf_new_cflags"
12661 fi
12662
12663 if test -n "$cf_new_cppflags" ; then
12664
12665         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12666 fi
12667
12668 if test -n "$cf_new_extra_cppflags" ; then
12669
12670         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12671 fi
12672
12673                 ;;
12674         esac
12675         ;;
12676 esac
12677
12678 if test "$with_dmalloc" = yes ; then
12679         echo "$as_me:12679: checking for dmalloc.h" >&5
12680 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12681 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12682   echo $ECHO_N "(cached) $ECHO_C" >&6
12683 else
12684   cat >conftest.$ac_ext <<_ACEOF
12685 #line 12685 "configure"
12686 #include "confdefs.h"
12687 #include <dmalloc.h>
12688 _ACEOF
12689 if { (eval echo "$as_me:12689: \"$ac_cpp conftest.$ac_ext\"") >&5
12690   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12691   ac_status=$?
12692   egrep -v '^ *\+' conftest.er1 >conftest.err
12693   rm -f conftest.er1
12694   cat conftest.err >&5
12695   echo "$as_me:12695: \$? = $ac_status" >&5
12696   (exit $ac_status); } >/dev/null; then
12697   if test -s conftest.err; then
12698     ac_cpp_err=$ac_c_preproc_warn_flag
12699   else
12700     ac_cpp_err=
12701   fi
12702 else
12703   ac_cpp_err=yes
12704 fi
12705 if test -z "$ac_cpp_err"; then
12706   ac_cv_header_dmalloc_h=yes
12707 else
12708   echo "$as_me: failed program was:" >&5
12709   cat conftest.$ac_ext >&5
12710   ac_cv_header_dmalloc_h=no
12711 fi
12712 rm -f conftest.err conftest.$ac_ext
12713 fi
12714 echo "$as_me:12714: result: $ac_cv_header_dmalloc_h" >&5
12715 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12716 if test $ac_cv_header_dmalloc_h = yes; then
12717
12718 echo "$as_me:12718: checking for dmalloc_debug in -ldmalloc" >&5
12719 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12720 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12721   echo $ECHO_N "(cached) $ECHO_C" >&6
12722 else
12723   ac_check_lib_save_LIBS=$LIBS
12724 LIBS="-ldmalloc  $LIBS"
12725 cat >conftest.$ac_ext <<_ACEOF
12726 #line 12726 "configure"
12727 #include "confdefs.h"
12728
12729 /* Override any gcc2 internal prototype to avoid an error.  */
12730 #ifdef __cplusplus
12731 extern "C"
12732 #endif
12733 /* We use char because int might match the return type of a gcc2
12734    builtin and then its argument prototype would still apply.  */
12735 char dmalloc_debug ();
12736 int
12737 main ()
12738 {
12739 dmalloc_debug ();
12740   ;
12741   return 0;
12742 }
12743 _ACEOF
12744 rm -f conftest.$ac_objext conftest$ac_exeext
12745 if { (eval echo "$as_me:12745: \"$ac_link\"") >&5
12746   (eval $ac_link) 2>&5
12747   ac_status=$?
12748   echo "$as_me:12748: \$? = $ac_status" >&5
12749   (exit $ac_status); } &&
12750          { ac_try='test -s conftest$ac_exeext'
12751   { (eval echo "$as_me:12751: \"$ac_try\"") >&5
12752   (eval $ac_try) 2>&5
12753   ac_status=$?
12754   echo "$as_me:12754: \$? = $ac_status" >&5
12755   (exit $ac_status); }; }; then
12756   ac_cv_lib_dmalloc_dmalloc_debug=yes
12757 else
12758   echo "$as_me: failed program was:" >&5
12759 cat conftest.$ac_ext >&5
12760 ac_cv_lib_dmalloc_dmalloc_debug=no
12761 fi
12762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12763 LIBS=$ac_check_lib_save_LIBS
12764 fi
12765 echo "$as_me:12765: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12766 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12767 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12768   cat >>confdefs.h <<EOF
12769 #define HAVE_LIBDMALLOC 1
12770 EOF
12771
12772   LIBS="-ldmalloc $LIBS"
12773
12774 fi
12775
12776 fi
12777
12778 fi
12779
12780 echo "$as_me:12780: checking if you want to use dbmalloc for testing" >&5
12781 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12782
12783 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12784 if test "${with_dbmalloc+set}" = set; then
12785   withval="$with_dbmalloc"
12786   cat >>confdefs.h <<\EOF
12787 #define USE_DBMALLOC 1
12788 EOF
12789
12790         : ${with_cflags:=-g}
12791         : ${with_no_leaks:=yes}
12792          with_dbmalloc=yes
12793 else
12794   with_dbmalloc=
12795 fi;
12796 echo "$as_me:12796: result: ${with_dbmalloc:-no}" >&5
12797 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12798
12799 case .$with_cflags in #(vi
12800 .*-g*)
12801         case .$CFLAGS in #(vi
12802         .*-g*) #(vi
12803                 ;;
12804         *)
12805
12806 cf_fix_cppflags=no
12807 cf_new_cflags=
12808 cf_new_cppflags=
12809 cf_new_extra_cppflags=
12810
12811 for cf_add_cflags in -g
12812 do
12813 case $cf_fix_cppflags in
12814 no)
12815         case $cf_add_cflags in #(vi
12816         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12817                 case $cf_add_cflags in
12818                 -D*)
12819                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12820
12821                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12822                                 && test -z "${cf_tst_cflags}" \
12823                                 && cf_fix_cppflags=yes
12824
12825                         if test $cf_fix_cppflags = yes ; then
12826                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12827                                 continue
12828                         elif test "${cf_tst_cflags}" = "\"'" ; then
12829                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12830                                 continue
12831                         fi
12832                         ;;
12833                 esac
12834                 case "$CPPFLAGS" in
12835                 *$cf_add_cflags) #(vi
12836                         ;;
12837                 *) #(vi
12838                         case $cf_add_cflags in #(vi
12839                         -D*)
12840                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12841
12842 CPPFLAGS=`echo "$CPPFLAGS" | \
12843         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12844                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12845
12846                                 ;;
12847                         esac
12848                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12849                         ;;
12850                 esac
12851                 ;;
12852         *)
12853                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12854                 ;;
12855         esac
12856         ;;
12857 yes)
12858         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12859
12860         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12861
12862         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12863                 && test -z "${cf_tst_cflags}" \
12864                 && cf_fix_cppflags=no
12865         ;;
12866 esac
12867 done
12868
12869 if test -n "$cf_new_cflags" ; then
12870
12871         CFLAGS="$CFLAGS $cf_new_cflags"
12872 fi
12873
12874 if test -n "$cf_new_cppflags" ; then
12875
12876         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12877 fi
12878
12879 if test -n "$cf_new_extra_cppflags" ; then
12880
12881         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12882 fi
12883
12884                 ;;
12885         esac
12886         ;;
12887 esac
12888
12889 if test "$with_dbmalloc" = yes ; then
12890         echo "$as_me:12890: checking for dbmalloc.h" >&5
12891 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12892 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12893   echo $ECHO_N "(cached) $ECHO_C" >&6
12894 else
12895   cat >conftest.$ac_ext <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12898 #include <dbmalloc.h>
12899 _ACEOF
12900 if { (eval echo "$as_me:12900: \"$ac_cpp conftest.$ac_ext\"") >&5
12901   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12902   ac_status=$?
12903   egrep -v '^ *\+' conftest.er1 >conftest.err
12904   rm -f conftest.er1
12905   cat conftest.err >&5
12906   echo "$as_me:12906: \$? = $ac_status" >&5
12907   (exit $ac_status); } >/dev/null; then
12908   if test -s conftest.err; then
12909     ac_cpp_err=$ac_c_preproc_warn_flag
12910   else
12911     ac_cpp_err=
12912   fi
12913 else
12914   ac_cpp_err=yes
12915 fi
12916 if test -z "$ac_cpp_err"; then
12917   ac_cv_header_dbmalloc_h=yes
12918 else
12919   echo "$as_me: failed program was:" >&5
12920   cat conftest.$ac_ext >&5
12921   ac_cv_header_dbmalloc_h=no
12922 fi
12923 rm -f conftest.err conftest.$ac_ext
12924 fi
12925 echo "$as_me:12925: result: $ac_cv_header_dbmalloc_h" >&5
12926 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12927 if test $ac_cv_header_dbmalloc_h = yes; then
12928
12929 echo "$as_me:12929: checking for debug_malloc in -ldbmalloc" >&5
12930 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12931 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934   ac_check_lib_save_LIBS=$LIBS
12935 LIBS="-ldbmalloc  $LIBS"
12936 cat >conftest.$ac_ext <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939
12940 /* Override any gcc2 internal prototype to avoid an error.  */
12941 #ifdef __cplusplus
12942 extern "C"
12943 #endif
12944 /* We use char because int might match the return type of a gcc2
12945    builtin and then its argument prototype would still apply.  */
12946 char debug_malloc ();
12947 int
12948 main ()
12949 {
12950 debug_malloc ();
12951   ;
12952   return 0;
12953 }
12954 _ACEOF
12955 rm -f conftest.$ac_objext conftest$ac_exeext
12956 if { (eval echo "$as_me:12956: \"$ac_link\"") >&5
12957   (eval $ac_link) 2>&5
12958   ac_status=$?
12959   echo "$as_me:12959: \$? = $ac_status" >&5
12960   (exit $ac_status); } &&
12961          { ac_try='test -s conftest$ac_exeext'
12962   { (eval echo "$as_me:12962: \"$ac_try\"") >&5
12963   (eval $ac_try) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); }; }; then
12967   ac_cv_lib_dbmalloc_debug_malloc=yes
12968 else
12969   echo "$as_me: failed program was:" >&5
12970 cat conftest.$ac_ext >&5
12971 ac_cv_lib_dbmalloc_debug_malloc=no
12972 fi
12973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12974 LIBS=$ac_check_lib_save_LIBS
12975 fi
12976 echo "$as_me:12976: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12977 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12978 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12979   cat >>confdefs.h <<EOF
12980 #define HAVE_LIBDBMALLOC 1
12981 EOF
12982
12983   LIBS="-ldbmalloc $LIBS"
12984
12985 fi
12986
12987 fi
12988
12989 fi
12990
12991 echo "$as_me:12991: checking if you want to use valgrind for testing" >&5
12992 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12993
12994 # Check whether --with-valgrind or --without-valgrind was given.
12995 if test "${with_valgrind+set}" = set; then
12996   withval="$with_valgrind"
12997   cat >>confdefs.h <<\EOF
12998 #define USE_VALGRIND 1
12999 EOF
13000
13001         : ${with_cflags:=-g}
13002         : ${with_no_leaks:=yes}
13003          with_valgrind=yes
13004 else
13005   with_valgrind=
13006 fi;
13007 echo "$as_me:13007: result: ${with_valgrind:-no}" >&5
13008 echo "${ECHO_T}${with_valgrind:-no}" >&6
13009
13010 case .$with_cflags in #(vi
13011 .*-g*)
13012         case .$CFLAGS in #(vi
13013         .*-g*) #(vi
13014                 ;;
13015         *)
13016
13017 cf_fix_cppflags=no
13018 cf_new_cflags=
13019 cf_new_cppflags=
13020 cf_new_extra_cppflags=
13021
13022 for cf_add_cflags in -g
13023 do
13024 case $cf_fix_cppflags in
13025 no)
13026         case $cf_add_cflags in #(vi
13027         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13028                 case $cf_add_cflags in
13029                 -D*)
13030                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13031
13032                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13033                                 && test -z "${cf_tst_cflags}" \
13034                                 && cf_fix_cppflags=yes
13035
13036                         if test $cf_fix_cppflags = yes ; then
13037                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13038                                 continue
13039                         elif test "${cf_tst_cflags}" = "\"'" ; then
13040                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13041                                 continue
13042                         fi
13043                         ;;
13044                 esac
13045                 case "$CPPFLAGS" in
13046                 *$cf_add_cflags) #(vi
13047                         ;;
13048                 *) #(vi
13049                         case $cf_add_cflags in #(vi
13050                         -D*)
13051                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13052
13053 CPPFLAGS=`echo "$CPPFLAGS" | \
13054         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13055                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13056
13057                                 ;;
13058                         esac
13059                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13060                         ;;
13061                 esac
13062                 ;;
13063         *)
13064                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13065                 ;;
13066         esac
13067         ;;
13068 yes)
13069         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13070
13071         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13072
13073         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13074                 && test -z "${cf_tst_cflags}" \
13075                 && cf_fix_cppflags=no
13076         ;;
13077 esac
13078 done
13079
13080 if test -n "$cf_new_cflags" ; then
13081
13082         CFLAGS="$CFLAGS $cf_new_cflags"
13083 fi
13084
13085 if test -n "$cf_new_cppflags" ; then
13086
13087         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13088 fi
13089
13090 if test -n "$cf_new_extra_cppflags" ; then
13091
13092         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13093 fi
13094
13095                 ;;
13096         esac
13097         ;;
13098 esac
13099
13100 echo "$as_me:13100: checking if you want to perform memory-leak testing" >&5
13101 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13102
13103 # Check whether --enable-leaks or --disable-leaks was given.
13104 if test "${enable_leaks+set}" = set; then
13105   enableval="$enable_leaks"
13106   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13107 else
13108   : ${with_no_leaks:=no}
13109 fi;
13110 echo "$as_me:13110: result: $with_no_leaks" >&5
13111 echo "${ECHO_T}$with_no_leaks" >&6
13112
13113 if test "$with_no_leaks" = yes ; then
13114         cat >>confdefs.h <<\EOF
13115 #define NO_LEAKS 1
13116 EOF
13117
13118         cat >>confdefs.h <<\EOF
13119 #define YY_NO_LEAKS 1
13120 EOF
13121
13122 fi
13123
13124 cat >>confdefs.h <<\EOF
13125 #define HAVE_NC_ALLOC_H 1
13126 EOF
13127
13128 ###     use option --enable-expanded to generate certain macros as functions
13129
13130 # Check whether --enable-expanded or --disable-expanded was given.
13131 if test "${enable_expanded+set}" = set; then
13132   enableval="$enable_expanded"
13133   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13134 #define NCURSES_EXPANDED 1
13135 EOF
13136
13137 fi;
13138
13139 ###     use option --disable-macros to suppress macros in favor of functions
13140
13141 # Check whether --enable-macros or --disable-macros was given.
13142 if test "${enable_macros+set}" = set; then
13143   enableval="$enable_macros"
13144   test "$enableval" = no && cat >>confdefs.h <<\EOF
13145 #define NCURSES_NOMACROS 1
13146 EOF
13147
13148 fi;
13149
13150 # Normally we only add trace() to the debug-library.  Allow this to be
13151 # extended to all models of the ncurses library:
13152 cf_all_traces=no
13153 case "$CFLAGS $CPPFLAGS" in
13154 *-DTRACE*)
13155         cf_all_traces=yes
13156         ;;
13157 esac
13158
13159 echo "$as_me:13159: checking whether to add trace feature to all models" >&5
13160 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13161
13162 # Check whether --with-trace or --without-trace was given.
13163 if test "${with_trace+set}" = set; then
13164   withval="$with_trace"
13165   cf_with_trace=$withval
13166 else
13167   cf_with_trace=$cf_all_traces
13168 fi;
13169 echo "$as_me:13169: result: $cf_with_trace" >&5
13170 echo "${ECHO_T}$cf_with_trace" >&6
13171
13172 if test "$cf_with_trace" = yes ; then
13173         LIB_TRACING=all
13174         ADA_TRACE=TRUE
13175
13176 cf_fix_cppflags=no
13177 cf_new_cflags=
13178 cf_new_cppflags=
13179 cf_new_extra_cppflags=
13180
13181 for cf_add_cflags in -DTRACE
13182 do
13183 case $cf_fix_cppflags in
13184 no)
13185         case $cf_add_cflags in #(vi
13186         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13187                 case $cf_add_cflags in
13188                 -D*)
13189                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13190
13191                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13192                                 && test -z "${cf_tst_cflags}" \
13193                                 && cf_fix_cppflags=yes
13194
13195                         if test $cf_fix_cppflags = yes ; then
13196                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13197                                 continue
13198                         elif test "${cf_tst_cflags}" = "\"'" ; then
13199                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13200                                 continue
13201                         fi
13202                         ;;
13203                 esac
13204                 case "$CPPFLAGS" in
13205                 *$cf_add_cflags) #(vi
13206                         ;;
13207                 *) #(vi
13208                         case $cf_add_cflags in #(vi
13209                         -D*)
13210                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13211
13212 CPPFLAGS=`echo "$CPPFLAGS" | \
13213         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13214                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13215
13216                                 ;;
13217                         esac
13218                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13219                         ;;
13220                 esac
13221                 ;;
13222         *)
13223                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13224                 ;;
13225         esac
13226         ;;
13227 yes)
13228         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13229
13230         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13231
13232         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13233                 && test -z "${cf_tst_cflags}" \
13234                 && cf_fix_cppflags=no
13235         ;;
13236 esac
13237 done
13238
13239 if test -n "$cf_new_cflags" ; then
13240
13241         CFLAGS="$CFLAGS $cf_new_cflags"
13242 fi
13243
13244 if test -n "$cf_new_cppflags" ; then
13245
13246         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13247 fi
13248
13249 if test -n "$cf_new_extra_cppflags" ; then
13250
13251         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13252 fi
13253
13254 else
13255         LIB_TRACING=DEBUG
13256         ADA_TRACE=FALSE
13257 fi
13258
13259 ###     Checks for libraries.
13260 case $cf_cv_system_name in #(vi
13261 *mingw32*) #(vi
13262         ;;
13263 *)
13264 echo "$as_me:13264: checking for gettimeofday" >&5
13265 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13266 if test "${ac_cv_func_gettimeofday+set}" = set; then
13267   echo $ECHO_N "(cached) $ECHO_C" >&6
13268 else
13269   cat >conftest.$ac_ext <<_ACEOF
13270 #line 13270 "configure"
13271 #include "confdefs.h"
13272 /* System header to define __stub macros and hopefully few prototypes,
13273     which can conflict with char gettimeofday (); below.  */
13274 #include <assert.h>
13275 /* Override any gcc2 internal prototype to avoid an error.  */
13276 #ifdef __cplusplus
13277 extern "C"
13278 #endif
13279 /* We use char because int might match the return type of a gcc2
13280    builtin and then its argument prototype would still apply.  */
13281 char gettimeofday ();
13282 char (*f) ();
13283
13284 int
13285 main ()
13286 {
13287 /* The GNU C library defines this for functions which it implements
13288     to always fail with ENOSYS.  Some functions are actually named
13289     something starting with __ and the normal name is an alias.  */
13290 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13291 choke me
13292 #else
13293 f = gettimeofday;
13294 #endif
13295
13296   ;
13297   return 0;
13298 }
13299 _ACEOF
13300 rm -f conftest.$ac_objext conftest$ac_exeext
13301 if { (eval echo "$as_me:13301: \"$ac_link\"") >&5
13302   (eval $ac_link) 2>&5
13303   ac_status=$?
13304   echo "$as_me:13304: \$? = $ac_status" >&5
13305   (exit $ac_status); } &&
13306          { ac_try='test -s conftest$ac_exeext'
13307   { (eval echo "$as_me:13307: \"$ac_try\"") >&5
13308   (eval $ac_try) 2>&5
13309   ac_status=$?
13310   echo "$as_me:13310: \$? = $ac_status" >&5
13311   (exit $ac_status); }; }; then
13312   ac_cv_func_gettimeofday=yes
13313 else
13314   echo "$as_me: failed program was:" >&5
13315 cat conftest.$ac_ext >&5
13316 ac_cv_func_gettimeofday=no
13317 fi
13318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13319 fi
13320 echo "$as_me:13320: result: $ac_cv_func_gettimeofday" >&5
13321 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13322 if test $ac_cv_func_gettimeofday = yes; then
13323   cat >>confdefs.h <<\EOF
13324 #define HAVE_GETTIMEOFDAY 1
13325 EOF
13326
13327 else
13328
13329 echo "$as_me:13329: checking for gettimeofday in -lbsd" >&5
13330 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13331 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13332   echo $ECHO_N "(cached) $ECHO_C" >&6
13333 else
13334   ac_check_lib_save_LIBS=$LIBS
13335 LIBS="-lbsd  $LIBS"
13336 cat >conftest.$ac_ext <<_ACEOF
13337 #line 13337 "configure"
13338 #include "confdefs.h"
13339
13340 /* Override any gcc2 internal prototype to avoid an error.  */
13341 #ifdef __cplusplus
13342 extern "C"
13343 #endif
13344 /* We use char because int might match the return type of a gcc2
13345    builtin and then its argument prototype would still apply.  */
13346 char gettimeofday ();
13347 int
13348 main ()
13349 {
13350 gettimeofday ();
13351   ;
13352   return 0;
13353 }
13354 _ACEOF
13355 rm -f conftest.$ac_objext conftest$ac_exeext
13356 if { (eval echo "$as_me:13356: \"$ac_link\"") >&5
13357   (eval $ac_link) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); } &&
13361          { ac_try='test -s conftest$ac_exeext'
13362   { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); }; }; then
13367   ac_cv_lib_bsd_gettimeofday=yes
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 ac_cv_lib_bsd_gettimeofday=no
13372 fi
13373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13374 LIBS=$ac_check_lib_save_LIBS
13375 fi
13376 echo "$as_me:13376: result: $ac_cv_lib_bsd_gettimeofday" >&5
13377 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13378 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13379   cat >>confdefs.h <<\EOF
13380 #define HAVE_GETTIMEOFDAY 1
13381 EOF
13382
13383         LIBS="-lbsd $LIBS"
13384 fi
13385
13386 fi
13387         ;;
13388 esac
13389
13390 echo "$as_me:13390: checking if -lm needed for math functions" >&5
13391 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13392 if test "${cf_cv_need_libm+set}" = set; then
13393   echo $ECHO_N "(cached) $ECHO_C" >&6
13394 else
13395
13396         cat >conftest.$ac_ext <<_ACEOF
13397 #line 13397 "configure"
13398 #include "confdefs.h"
13399
13400         #include <stdio.h>
13401         #include <math.h>
13402
13403 int
13404 main ()
13405 {
13406 double x = rand(); printf("result = %g\n", sin(x))
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 rm -f conftest.$ac_objext conftest$ac_exeext
13412 if { (eval echo "$as_me:13412: \"$ac_link\"") >&5
13413   (eval $ac_link) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); } &&
13417          { ac_try='test -s conftest$ac_exeext'
13418   { (eval echo "$as_me:13418: \"$ac_try\"") >&5
13419   (eval $ac_try) 2>&5
13420   ac_status=$?
13421   echo "$as_me:13421: \$? = $ac_status" >&5
13422   (exit $ac_status); }; }; then
13423   cf_cv_need_libm=no
13424 else
13425   echo "$as_me: failed program was:" >&5
13426 cat conftest.$ac_ext >&5
13427 cf_cv_need_libm=yes
13428 fi
13429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13430 fi
13431 echo "$as_me:13431: result: $cf_cv_need_libm" >&5
13432 echo "${ECHO_T}$cf_cv_need_libm" >&6
13433 if test "$cf_cv_need_libm" = yes
13434 then
13435 MATH_LIB=-lm
13436 fi
13437
13438 ###     Checks for header files.
13439 echo "$as_me:13439: checking for ANSI C header files" >&5
13440 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13441 if test "${ac_cv_header_stdc+set}" = set; then
13442   echo $ECHO_N "(cached) $ECHO_C" >&6
13443 else
13444   cat >conftest.$ac_ext <<_ACEOF
13445 #line 13445 "configure"
13446 #include "confdefs.h"
13447 #include <stdlib.h>
13448 #include <stdarg.h>
13449 #include <string.h>
13450 #include <float.h>
13451
13452 _ACEOF
13453 if { (eval echo "$as_me:13453: \"$ac_cpp conftest.$ac_ext\"") >&5
13454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13455   ac_status=$?
13456   egrep -v '^ *\+' conftest.er1 >conftest.err
13457   rm -f conftest.er1
13458   cat conftest.err >&5
13459   echo "$as_me:13459: \$? = $ac_status" >&5
13460   (exit $ac_status); } >/dev/null; then
13461   if test -s conftest.err; then
13462     ac_cpp_err=$ac_c_preproc_warn_flag
13463   else
13464     ac_cpp_err=
13465   fi
13466 else
13467   ac_cpp_err=yes
13468 fi
13469 if test -z "$ac_cpp_err"; then
13470   ac_cv_header_stdc=yes
13471 else
13472   echo "$as_me: failed program was:" >&5
13473   cat conftest.$ac_ext >&5
13474   ac_cv_header_stdc=no
13475 fi
13476 rm -f conftest.err conftest.$ac_ext
13477
13478 if test $ac_cv_header_stdc = yes; then
13479   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13480   cat >conftest.$ac_ext <<_ACEOF
13481 #line 13481 "configure"
13482 #include "confdefs.h"
13483 #include <string.h>
13484
13485 _ACEOF
13486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13487   egrep "memchr" >/dev/null 2>&1; then
13488   :
13489 else
13490   ac_cv_header_stdc=no
13491 fi
13492 rm -rf conftest*
13493
13494 fi
13495
13496 if test $ac_cv_header_stdc = yes; then
13497   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13498   cat >conftest.$ac_ext <<_ACEOF
13499 #line 13499 "configure"
13500 #include "confdefs.h"
13501 #include <stdlib.h>
13502
13503 _ACEOF
13504 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13505   egrep "free" >/dev/null 2>&1; then
13506   :
13507 else
13508   ac_cv_header_stdc=no
13509 fi
13510 rm -rf conftest*
13511
13512 fi
13513
13514 if test $ac_cv_header_stdc = yes; then
13515   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13516   if test "$cross_compiling" = yes; then
13517   :
13518 else
13519   cat >conftest.$ac_ext <<_ACEOF
13520 #line 13520 "configure"
13521 #include "confdefs.h"
13522 #include <ctype.h>
13523 #if ((' ' & 0x0FF) == 0x020)
13524 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13525 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13526 #else
13527 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13528                      || ('j' <= (c) && (c) <= 'r') \
13529                      || ('s' <= (c) && (c) <= 'z'))
13530 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13531 #endif
13532
13533 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13534 int
13535 main ()
13536 {
13537   int i;
13538   for (i = 0; i < 256; i++)
13539     if (XOR (islower (i), ISLOWER (i))
13540         || toupper (i) != TOUPPER (i))
13541       $ac_main_return(2);
13542   $ac_main_return (0);
13543 }
13544 _ACEOF
13545 rm -f conftest$ac_exeext
13546 if { (eval echo "$as_me:13546: \"$ac_link\"") >&5
13547   (eval $ac_link) 2>&5
13548   ac_status=$?
13549   echo "$as_me:13549: \$? = $ac_status" >&5
13550   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13551   { (eval echo "$as_me:13551: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); }; }; then
13556   :
13557 else
13558   echo "$as_me: program exited with status $ac_status" >&5
13559 echo "$as_me: failed program was:" >&5
13560 cat conftest.$ac_ext >&5
13561 ac_cv_header_stdc=no
13562 fi
13563 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13564 fi
13565 fi
13566 fi
13567 echo "$as_me:13567: result: $ac_cv_header_stdc" >&5
13568 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13569 if test $ac_cv_header_stdc = yes; then
13570
13571 cat >>confdefs.h <<\EOF
13572 #define STDC_HEADERS 1
13573 EOF
13574
13575 fi
13576
13577 ac_header_dirent=no
13578 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13579   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13580 echo "$as_me:13580: checking for $ac_hdr that defines DIR" >&5
13581 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13582 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13583   echo $ECHO_N "(cached) $ECHO_C" >&6
13584 else
13585   cat >conftest.$ac_ext <<_ACEOF
13586 #line 13586 "configure"
13587 #include "confdefs.h"
13588 #include <sys/types.h>
13589 #include <$ac_hdr>
13590
13591 int
13592 main ()
13593 {
13594 if ((DIR *) 0)
13595 return 0;
13596   ;
13597   return 0;
13598 }
13599 _ACEOF
13600 rm -f conftest.$ac_objext
13601 if { (eval echo "$as_me:13601: \"$ac_compile\"") >&5
13602   (eval $ac_compile) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); } &&
13606          { ac_try='test -s conftest.$ac_objext'
13607   { (eval echo "$as_me:13607: \"$ac_try\"") >&5
13608   (eval $ac_try) 2>&5
13609   ac_status=$?
13610   echo "$as_me:13610: \$? = $ac_status" >&5
13611   (exit $ac_status); }; }; then
13612   eval "$as_ac_Header=yes"
13613 else
13614   echo "$as_me: failed program was:" >&5
13615 cat conftest.$ac_ext >&5
13616 eval "$as_ac_Header=no"
13617 fi
13618 rm -f conftest.$ac_objext conftest.$ac_ext
13619 fi
13620 echo "$as_me:13620: result: `eval echo '${'$as_ac_Header'}'`" >&5
13621 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13622 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13623   cat >>confdefs.h <<EOF
13624 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13625 EOF
13626
13627 ac_header_dirent=$ac_hdr; break
13628 fi
13629
13630 done
13631 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13632 if test $ac_header_dirent = dirent.h; then
13633   echo "$as_me:13633: checking for opendir in -ldir" >&5
13634 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13635 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13636   echo $ECHO_N "(cached) $ECHO_C" >&6
13637 else
13638   ac_check_lib_save_LIBS=$LIBS
13639 LIBS="-ldir  $LIBS"
13640 cat >conftest.$ac_ext <<_ACEOF
13641 #line 13641 "configure"
13642 #include "confdefs.h"
13643
13644 /* Override any gcc2 internal prototype to avoid an error.  */
13645 #ifdef __cplusplus
13646 extern "C"
13647 #endif
13648 /* We use char because int might match the return type of a gcc2
13649    builtin and then its argument prototype would still apply.  */
13650 char opendir ();
13651 int
13652 main ()
13653 {
13654 opendir ();
13655   ;
13656   return 0;
13657 }
13658 _ACEOF
13659 rm -f conftest.$ac_objext conftest$ac_exeext
13660 if { (eval echo "$as_me:13660: \"$ac_link\"") >&5
13661   (eval $ac_link) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); } &&
13665          { ac_try='test -s conftest$ac_exeext'
13666   { (eval echo "$as_me:13666: \"$ac_try\"") >&5
13667   (eval $ac_try) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); }; }; then
13671   ac_cv_lib_dir_opendir=yes
13672 else
13673   echo "$as_me: failed program was:" >&5
13674 cat conftest.$ac_ext >&5
13675 ac_cv_lib_dir_opendir=no
13676 fi
13677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13678 LIBS=$ac_check_lib_save_LIBS
13679 fi
13680 echo "$as_me:13680: result: $ac_cv_lib_dir_opendir" >&5
13681 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13682 if test $ac_cv_lib_dir_opendir = yes; then
13683   LIBS="$LIBS -ldir"
13684 fi
13685
13686 else
13687   echo "$as_me:13687: checking for opendir in -lx" >&5
13688 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13689 if test "${ac_cv_lib_x_opendir+set}" = set; then
13690   echo $ECHO_N "(cached) $ECHO_C" >&6
13691 else
13692   ac_check_lib_save_LIBS=$LIBS
13693 LIBS="-lx  $LIBS"
13694 cat >conftest.$ac_ext <<_ACEOF
13695 #line 13695 "configure"
13696 #include "confdefs.h"
13697
13698 /* Override any gcc2 internal prototype to avoid an error.  */
13699 #ifdef __cplusplus
13700 extern "C"
13701 #endif
13702 /* We use char because int might match the return type of a gcc2
13703    builtin and then its argument prototype would still apply.  */
13704 char opendir ();
13705 int
13706 main ()
13707 {
13708 opendir ();
13709   ;
13710   return 0;
13711 }
13712 _ACEOF
13713 rm -f conftest.$ac_objext conftest$ac_exeext
13714 if { (eval echo "$as_me:13714: \"$ac_link\"") >&5
13715   (eval $ac_link) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); } &&
13719          { ac_try='test -s conftest$ac_exeext'
13720   { (eval echo "$as_me:13720: \"$ac_try\"") >&5
13721   (eval $ac_try) 2>&5
13722   ac_status=$?
13723   echo "$as_me:13723: \$? = $ac_status" >&5
13724   (exit $ac_status); }; }; then
13725   ac_cv_lib_x_opendir=yes
13726 else
13727   echo "$as_me: failed program was:" >&5
13728 cat conftest.$ac_ext >&5
13729 ac_cv_lib_x_opendir=no
13730 fi
13731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13732 LIBS=$ac_check_lib_save_LIBS
13733 fi
13734 echo "$as_me:13734: result: $ac_cv_lib_x_opendir" >&5
13735 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13736 if test $ac_cv_lib_x_opendir = yes; then
13737   LIBS="$LIBS -lx"
13738 fi
13739
13740 fi
13741
13742 echo "$as_me:13742: checking whether time.h and sys/time.h may both be included" >&5
13743 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13744 if test "${ac_cv_header_time+set}" = set; then
13745   echo $ECHO_N "(cached) $ECHO_C" >&6
13746 else
13747   cat >conftest.$ac_ext <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13750 #include <sys/types.h>
13751 #include <sys/time.h>
13752 #include <time.h>
13753
13754 int
13755 main ()
13756 {
13757 if ((struct tm *) 0)
13758 return 0;
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext
13764 if { (eval echo "$as_me:13764: \"$ac_compile\"") >&5
13765   (eval $ac_compile) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } &&
13769          { ac_try='test -s conftest.$ac_objext'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit $ac_status); }; }; then
13775   ac_cv_header_time=yes
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779 ac_cv_header_time=no
13780 fi
13781 rm -f conftest.$ac_objext conftest.$ac_ext
13782 fi
13783 echo "$as_me:13783: result: $ac_cv_header_time" >&5
13784 echo "${ECHO_T}$ac_cv_header_time" >&6
13785 if test $ac_cv_header_time = yes; then
13786
13787 cat >>confdefs.h <<\EOF
13788 #define TIME_WITH_SYS_TIME 1
13789 EOF
13790
13791 fi
13792
13793 cf_regex_func=no
13794
13795 cf_regex_libs="regex re"
13796 case $host_os in #(vi
13797 mingw*)
13798         cf_regex_libs="gnurx $cf_regex_libs"
13799         ;;
13800 esac
13801
13802 echo "$as_me:13802: checking for regcomp" >&5
13803 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13804 if test "${ac_cv_func_regcomp+set}" = set; then
13805   echo $ECHO_N "(cached) $ECHO_C" >&6
13806 else
13807   cat >conftest.$ac_ext <<_ACEOF
13808 #line 13808 "configure"
13809 #include "confdefs.h"
13810 /* System header to define __stub macros and hopefully few prototypes,
13811     which can conflict with char regcomp (); below.  */
13812 #include <assert.h>
13813 /* Override any gcc2 internal prototype to avoid an error.  */
13814 #ifdef __cplusplus
13815 extern "C"
13816 #endif
13817 /* We use char because int might match the return type of a gcc2
13818    builtin and then its argument prototype would still apply.  */
13819 char regcomp ();
13820 char (*f) ();
13821
13822 int
13823 main ()
13824 {
13825 /* The GNU C library defines this for functions which it implements
13826     to always fail with ENOSYS.  Some functions are actually named
13827     something starting with __ and the normal name is an alias.  */
13828 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13829 choke me
13830 #else
13831 f = regcomp;
13832 #endif
13833
13834   ;
13835   return 0;
13836 }
13837 _ACEOF
13838 rm -f conftest.$ac_objext conftest$ac_exeext
13839 if { (eval echo "$as_me:13839: \"$ac_link\"") >&5
13840   (eval $ac_link) 2>&5
13841   ac_status=$?
13842   echo "$as_me:13842: \$? = $ac_status" >&5
13843   (exit $ac_status); } &&
13844          { ac_try='test -s conftest$ac_exeext'
13845   { (eval echo "$as_me:13845: \"$ac_try\"") >&5
13846   (eval $ac_try) 2>&5
13847   ac_status=$?
13848   echo "$as_me:13848: \$? = $ac_status" >&5
13849   (exit $ac_status); }; }; then
13850   ac_cv_func_regcomp=yes
13851 else
13852   echo "$as_me: failed program was:" >&5
13853 cat conftest.$ac_ext >&5
13854 ac_cv_func_regcomp=no
13855 fi
13856 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13857 fi
13858 echo "$as_me:13858: result: $ac_cv_func_regcomp" >&5
13859 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13860 if test $ac_cv_func_regcomp = yes; then
13861   cf_regex_func=regcomp
13862 else
13863
13864         for cf_regex_lib in $cf_regex_libs
13865         do
13866                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13867 echo "$as_me:13867: checking for regcomp in -l$cf_regex_lib" >&5
13868 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13869 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13870   echo $ECHO_N "(cached) $ECHO_C" >&6
13871 else
13872   ac_check_lib_save_LIBS=$LIBS
13873 LIBS="-l$cf_regex_lib  $LIBS"
13874 cat >conftest.$ac_ext <<_ACEOF
13875 #line 13875 "configure"
13876 #include "confdefs.h"
13877
13878 /* Override any gcc2 internal prototype to avoid an error.  */
13879 #ifdef __cplusplus
13880 extern "C"
13881 #endif
13882 /* We use char because int might match the return type of a gcc2
13883    builtin and then its argument prototype would still apply.  */
13884 char regcomp ();
13885 int
13886 main ()
13887 {
13888 regcomp ();
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893 rm -f conftest.$ac_objext conftest$ac_exeext
13894 if { (eval echo "$as_me:13894: \"$ac_link\"") >&5
13895   (eval $ac_link) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit $ac_status); } &&
13899          { ac_try='test -s conftest$ac_exeext'
13900   { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit $ac_status); }; }; then
13905   eval "$as_ac_Lib=yes"
13906 else
13907   echo "$as_me: failed program was:" >&5
13908 cat conftest.$ac_ext >&5
13909 eval "$as_ac_Lib=no"
13910 fi
13911 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13912 LIBS=$ac_check_lib_save_LIBS
13913 fi
13914 echo "$as_me:13914: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13915 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13916 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13917
13918                                 LIBS="-l$cf_regex_lib $LIBS"
13919                                 cf_regex_func=regcomp
13920                                 break
13921 fi
13922
13923         done
13924
13925 fi
13926
13927 if test "$cf_regex_func" = no ; then
13928         echo "$as_me:13928: checking for compile" >&5
13929 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13930 if test "${ac_cv_func_compile+set}" = set; then
13931   echo $ECHO_N "(cached) $ECHO_C" >&6
13932 else
13933   cat >conftest.$ac_ext <<_ACEOF
13934 #line 13934 "configure"
13935 #include "confdefs.h"
13936 /* System header to define __stub macros and hopefully few prototypes,
13937     which can conflict with char compile (); below.  */
13938 #include <assert.h>
13939 /* Override any gcc2 internal prototype to avoid an error.  */
13940 #ifdef __cplusplus
13941 extern "C"
13942 #endif
13943 /* We use char because int might match the return type of a gcc2
13944    builtin and then its argument prototype would still apply.  */
13945 char compile ();
13946 char (*f) ();
13947
13948 int
13949 main ()
13950 {
13951 /* The GNU C library defines this for functions which it implements
13952     to always fail with ENOSYS.  Some functions are actually named
13953     something starting with __ and the normal name is an alias.  */
13954 #if defined (__stub_compile) || defined (__stub___compile)
13955 choke me
13956 #else
13957 f = compile;
13958 #endif
13959
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 rm -f conftest.$ac_objext conftest$ac_exeext
13965 if { (eval echo "$as_me:13965: \"$ac_link\"") >&5
13966   (eval $ac_link) 2>&5
13967   ac_status=$?
13968   echo "$as_me:13968: \$? = $ac_status" >&5
13969   (exit $ac_status); } &&
13970          { ac_try='test -s conftest$ac_exeext'
13971   { (eval echo "$as_me:13971: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit $ac_status); }; }; then
13976   ac_cv_func_compile=yes
13977 else
13978   echo "$as_me: failed program was:" >&5
13979 cat conftest.$ac_ext >&5
13980 ac_cv_func_compile=no
13981 fi
13982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13983 fi
13984 echo "$as_me:13984: result: $ac_cv_func_compile" >&5
13985 echo "${ECHO_T}$ac_cv_func_compile" >&6
13986 if test $ac_cv_func_compile = yes; then
13987   cf_regex_func=compile
13988 else
13989
13990                 echo "$as_me:13990: checking for compile in -lgen" >&5
13991 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13992 if test "${ac_cv_lib_gen_compile+set}" = set; then
13993   echo $ECHO_N "(cached) $ECHO_C" >&6
13994 else
13995   ac_check_lib_save_LIBS=$LIBS
13996 LIBS="-lgen  $LIBS"
13997 cat >conftest.$ac_ext <<_ACEOF
13998 #line 13998 "configure"
13999 #include "confdefs.h"
14000
14001 /* Override any gcc2 internal prototype to avoid an error.  */
14002 #ifdef __cplusplus
14003 extern "C"
14004 #endif
14005 /* We use char because int might match the return type of a gcc2
14006    builtin and then its argument prototype would still apply.  */
14007 char compile ();
14008 int
14009 main ()
14010 {
14011 compile ();
14012   ;
14013   return 0;
14014 }
14015 _ACEOF
14016 rm -f conftest.$ac_objext conftest$ac_exeext
14017 if { (eval echo "$as_me:14017: \"$ac_link\"") >&5
14018   (eval $ac_link) 2>&5
14019   ac_status=$?
14020   echo "$as_me:14020: \$? = $ac_status" >&5
14021   (exit $ac_status); } &&
14022          { ac_try='test -s conftest$ac_exeext'
14023   { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024   (eval $ac_try) 2>&5
14025   ac_status=$?
14026   echo "$as_me:14026: \$? = $ac_status" >&5
14027   (exit $ac_status); }; }; then
14028   ac_cv_lib_gen_compile=yes
14029 else
14030   echo "$as_me: failed program was:" >&5
14031 cat conftest.$ac_ext >&5
14032 ac_cv_lib_gen_compile=no
14033 fi
14034 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14035 LIBS=$ac_check_lib_save_LIBS
14036 fi
14037 echo "$as_me:14037: result: $ac_cv_lib_gen_compile" >&5
14038 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14039 if test $ac_cv_lib_gen_compile = yes; then
14040
14041                                 LIBS="-lgen $LIBS"
14042                                 cf_regex_func=compile
14043 fi
14044
14045 fi
14046
14047 fi
14048
14049 if test "$cf_regex_func" = no ; then
14050         { echo "$as_me:14050: WARNING: cannot find regular expression library" >&5
14051 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14052 fi
14053
14054 echo "$as_me:14054: checking for regular-expression headers" >&5
14055 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14056 if test "${cf_cv_regex_hdrs+set}" = set; then
14057   echo $ECHO_N "(cached) $ECHO_C" >&6
14058 else
14059
14060 cf_cv_regex_hdrs=no
14061 case $cf_regex_func in #(vi
14062 compile) #(vi
14063         for cf_regex_hdr in regexp.h regexpr.h
14064         do
14065                 cat >conftest.$ac_ext <<_ACEOF
14066 #line 14066 "configure"
14067 #include "confdefs.h"
14068 #include <$cf_regex_hdr>
14069 int
14070 main ()
14071 {
14072
14073                         char *p = compile("", "", "", 0);
14074                         int x = step("", "");
14075
14076   ;
14077   return 0;
14078 }
14079 _ACEOF
14080 rm -f conftest.$ac_objext conftest$ac_exeext
14081 if { (eval echo "$as_me:14081: \"$ac_link\"") >&5
14082   (eval $ac_link) 2>&5
14083   ac_status=$?
14084   echo "$as_me:14084: \$? = $ac_status" >&5
14085   (exit $ac_status); } &&
14086          { ac_try='test -s conftest$ac_exeext'
14087   { (eval echo "$as_me:14087: \"$ac_try\"") >&5
14088   (eval $ac_try) 2>&5
14089   ac_status=$?
14090   echo "$as_me:14090: \$? = $ac_status" >&5
14091   (exit $ac_status); }; }; then
14092
14093                         cf_cv_regex_hdrs=$cf_regex_hdr
14094                         break
14095
14096 else
14097   echo "$as_me: failed program was:" >&5
14098 cat conftest.$ac_ext >&5
14099 fi
14100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14101         done
14102         ;;
14103 *)
14104         for cf_regex_hdr in regex.h
14105         do
14106                 cat >conftest.$ac_ext <<_ACEOF
14107 #line 14107 "configure"
14108 #include "confdefs.h"
14109 #include <sys/types.h>
14110 #include <$cf_regex_hdr>
14111 int
14112 main ()
14113 {
14114
14115                         regex_t *p;
14116                         int x = regcomp(p, "", 0);
14117                         int y = regexec(p, "", 0, 0, 0);
14118                         regfree(p);
14119
14120   ;
14121   return 0;
14122 }
14123 _ACEOF
14124 rm -f conftest.$ac_objext conftest$ac_exeext
14125 if { (eval echo "$as_me:14125: \"$ac_link\"") >&5
14126   (eval $ac_link) 2>&5
14127   ac_status=$?
14128   echo "$as_me:14128: \$? = $ac_status" >&5
14129   (exit $ac_status); } &&
14130          { ac_try='test -s conftest$ac_exeext'
14131   { (eval echo "$as_me:14131: \"$ac_try\"") >&5
14132   (eval $ac_try) 2>&5
14133   ac_status=$?
14134   echo "$as_me:14134: \$? = $ac_status" >&5
14135   (exit $ac_status); }; }; then
14136
14137                         cf_cv_regex_hdrs=$cf_regex_hdr
14138                         break
14139
14140 else
14141   echo "$as_me: failed program was:" >&5
14142 cat conftest.$ac_ext >&5
14143 fi
14144 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14145         done
14146         ;;
14147 esac
14148
14149 fi
14150 echo "$as_me:14150: result: $cf_cv_regex_hdrs" >&5
14151 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14152
14153 case $cf_cv_regex_hdrs in #(vi
14154     no)        { echo "$as_me:14154: WARNING: no regular expression header found" >&5
14155 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14156     regex.h)   cat >>confdefs.h <<\EOF
14157 #define HAVE_REGEX_H_FUNCS 1
14158 EOF
14159  ;; #(vi
14160     regexp.h)  cat >>confdefs.h <<\EOF
14161 #define HAVE_REGEXP_H_FUNCS 1
14162 EOF
14163  ;; #(vi
14164     regexpr.h) cat >>confdefs.h <<\EOF
14165 #define HAVE_REGEXPR_H_FUNCS 1
14166 EOF
14167  ;;
14168 esac
14169
14170 for ac_header in \
14171 fcntl.h \
14172 getopt.h \
14173 limits.h \
14174 locale.h \
14175 math.h \
14176 poll.h \
14177 sys/bsdtypes.h \
14178 sys/ioctl.h \
14179 sys/param.h \
14180 sys/poll.h \
14181 sys/select.h \
14182 sys/time.h \
14183 sys/times.h \
14184 ttyent.h \
14185 unistd.h \
14186 wctype.h \
14187
14188 do
14189 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14190 echo "$as_me:14190: checking for $ac_header" >&5
14191 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14192 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14193   echo $ECHO_N "(cached) $ECHO_C" >&6
14194 else
14195   cat >conftest.$ac_ext <<_ACEOF
14196 #line 14196 "configure"
14197 #include "confdefs.h"
14198 #include <$ac_header>
14199 _ACEOF
14200 if { (eval echo "$as_me:14200: \"$ac_cpp conftest.$ac_ext\"") >&5
14201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14202   ac_status=$?
14203   egrep -v '^ *\+' conftest.er1 >conftest.err
14204   rm -f conftest.er1
14205   cat conftest.err >&5
14206   echo "$as_me:14206: \$? = $ac_status" >&5
14207   (exit $ac_status); } >/dev/null; then
14208   if test -s conftest.err; then
14209     ac_cpp_err=$ac_c_preproc_warn_flag
14210   else
14211     ac_cpp_err=
14212   fi
14213 else
14214   ac_cpp_err=yes
14215 fi
14216 if test -z "$ac_cpp_err"; then
14217   eval "$as_ac_Header=yes"
14218 else
14219   echo "$as_me: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   eval "$as_ac_Header=no"
14222 fi
14223 rm -f conftest.err conftest.$ac_ext
14224 fi
14225 echo "$as_me:14225: result: `eval echo '${'$as_ac_Header'}'`" >&5
14226 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14227 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14228   cat >>confdefs.h <<EOF
14229 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14230 EOF
14231
14232 fi
14233 done
14234
14235 for ac_header in unistd.h getopt.h
14236 do
14237 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14238 echo "$as_me:14238: checking for $ac_header" >&5
14239 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14240 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14241   echo $ECHO_N "(cached) $ECHO_C" >&6
14242 else
14243   cat >conftest.$ac_ext <<_ACEOF
14244 #line 14244 "configure"
14245 #include "confdefs.h"
14246 #include <$ac_header>
14247 _ACEOF
14248 if { (eval echo "$as_me:14248: \"$ac_cpp conftest.$ac_ext\"") >&5
14249   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14250   ac_status=$?
14251   egrep -v '^ *\+' conftest.er1 >conftest.err
14252   rm -f conftest.er1
14253   cat conftest.err >&5
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit $ac_status); } >/dev/null; then
14256   if test -s conftest.err; then
14257     ac_cpp_err=$ac_c_preproc_warn_flag
14258   else
14259     ac_cpp_err=
14260   fi
14261 else
14262   ac_cpp_err=yes
14263 fi
14264 if test -z "$ac_cpp_err"; then
14265   eval "$as_ac_Header=yes"
14266 else
14267   echo "$as_me: failed program was:" >&5
14268   cat conftest.$ac_ext >&5
14269   eval "$as_ac_Header=no"
14270 fi
14271 rm -f conftest.err conftest.$ac_ext
14272 fi
14273 echo "$as_me:14273: result: `eval echo '${'$as_ac_Header'}'`" >&5
14274 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14275 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14276   cat >>confdefs.h <<EOF
14277 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14278 EOF
14279
14280 fi
14281 done
14282
14283 echo "$as_me:14283: checking for header declaring getopt variables" >&5
14284 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14285 if test "${cf_cv_getopt_header+set}" = set; then
14286   echo $ECHO_N "(cached) $ECHO_C" >&6
14287 else
14288
14289 cf_cv_getopt_header=none
14290 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14291 do
14292 cat >conftest.$ac_ext <<_ACEOF
14293 #line 14293 "configure"
14294 #include "confdefs.h"
14295
14296 #include <$cf_header>
14297 int
14298 main ()
14299 {
14300 int x = optind; char *y = optarg
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -f conftest.$ac_objext
14306 if { (eval echo "$as_me:14306: \"$ac_compile\"") >&5
14307   (eval $ac_compile) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -s conftest.$ac_objext'
14312   { (eval echo "$as_me:14312: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); }; }; then
14317   cf_cv_getopt_header=$cf_header
14318  break
14319 else
14320   echo "$as_me: failed program was:" >&5
14321 cat conftest.$ac_ext >&5
14322 fi
14323 rm -f conftest.$ac_objext conftest.$ac_ext
14324 done
14325
14326 fi
14327 echo "$as_me:14327: result: $cf_cv_getopt_header" >&5
14328 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14329 if test $cf_cv_getopt_header != none ; then
14330         cat >>confdefs.h <<\EOF
14331 #define HAVE_GETOPT_HEADER 1
14332 EOF
14333
14334 fi
14335
14336 # check for ISC (this may also define _POSIX_SOURCE)
14337 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14338 if test "$ISC" = yes ; then
14339
14340 echo "$as_me:14340: checking for main in -lcposix" >&5
14341 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14342 if test "${ac_cv_lib_cposix_main+set}" = set; then
14343   echo $ECHO_N "(cached) $ECHO_C" >&6
14344 else
14345   ac_check_lib_save_LIBS=$LIBS
14346 LIBS="-lcposix  $LIBS"
14347 cat >conftest.$ac_ext <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14350
14351 int
14352 main ()
14353 {
14354 main ();
14355   ;
14356   return 0;
14357 }
14358 _ACEOF
14359 rm -f conftest.$ac_objext conftest$ac_exeext
14360 if { (eval echo "$as_me:14360: \"$ac_link\"") >&5
14361   (eval $ac_link) 2>&5
14362   ac_status=$?
14363   echo "$as_me:14363: \$? = $ac_status" >&5
14364   (exit $ac_status); } &&
14365          { ac_try='test -s conftest$ac_exeext'
14366   { (eval echo "$as_me:14366: \"$ac_try\"") >&5
14367   (eval $ac_try) 2>&5
14368   ac_status=$?
14369   echo "$as_me:14369: \$? = $ac_status" >&5
14370   (exit $ac_status); }; }; then
14371   ac_cv_lib_cposix_main=yes
14372 else
14373   echo "$as_me: failed program was:" >&5
14374 cat conftest.$ac_ext >&5
14375 ac_cv_lib_cposix_main=no
14376 fi
14377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14378 LIBS=$ac_check_lib_save_LIBS
14379 fi
14380 echo "$as_me:14380: result: $ac_cv_lib_cposix_main" >&5
14381 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14382 if test $ac_cv_lib_cposix_main = yes; then
14383   cat >>confdefs.h <<EOF
14384 #define HAVE_LIBCPOSIX 1
14385 EOF
14386
14387   LIBS="-lcposix $LIBS"
14388
14389 fi
14390
14391         echo "$as_me:14391: checking for bzero in -linet" >&5
14392 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14393 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14394   echo $ECHO_N "(cached) $ECHO_C" >&6
14395 else
14396   ac_check_lib_save_LIBS=$LIBS
14397 LIBS="-linet  $LIBS"
14398 cat >conftest.$ac_ext <<_ACEOF
14399 #line 14399 "configure"
14400 #include "confdefs.h"
14401
14402 /* Override any gcc2 internal prototype to avoid an error.  */
14403 #ifdef __cplusplus
14404 extern "C"
14405 #endif
14406 /* We use char because int might match the return type of a gcc2
14407    builtin and then its argument prototype would still apply.  */
14408 char bzero ();
14409 int
14410 main ()
14411 {
14412 bzero ();
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f conftest.$ac_objext conftest$ac_exeext
14418 if { (eval echo "$as_me:14418: \"$ac_link\"") >&5
14419   (eval $ac_link) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit $ac_status); } &&
14423          { ac_try='test -s conftest$ac_exeext'
14424   { (eval echo "$as_me:14424: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:14427: \$? = $ac_status" >&5
14428   (exit $ac_status); }; }; then
14429   ac_cv_lib_inet_bzero=yes
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 cat conftest.$ac_ext >&5
14433 ac_cv_lib_inet_bzero=no
14434 fi
14435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14436 LIBS=$ac_check_lib_save_LIBS
14437 fi
14438 echo "$as_me:14438: result: $ac_cv_lib_inet_bzero" >&5
14439 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14440 if test $ac_cv_lib_inet_bzero = yes; then
14441   LIBS="-linet $LIBS"
14442 fi
14443 fi
14444
14445 echo "$as_me:14445: checking if sys/time.h works with sys/select.h" >&5
14446 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14447 if test "${cf_cv_sys_time_select+set}" = set; then
14448   echo $ECHO_N "(cached) $ECHO_C" >&6
14449 else
14450
14451 cat >conftest.$ac_ext <<_ACEOF
14452 #line 14452 "configure"
14453 #include "confdefs.h"
14454
14455 #include <sys/types.h>
14456 #ifdef HAVE_SYS_TIME_H
14457 #include <sys/time.h>
14458 #endif
14459 #ifdef HAVE_SYS_SELECT_H
14460 #include <sys/select.h>
14461 #endif
14462
14463 int
14464 main ()
14465 {
14466
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_sys_time_select=yes
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 cf_cv_sys_time_select=no
14488 fi
14489 rm -f conftest.$ac_objext conftest.$ac_ext
14490
14491 fi
14492
14493 echo "$as_me:14493: result: $cf_cv_sys_time_select" >&5
14494 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14495 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14496 #define HAVE_SYS_TIME_SELECT 1
14497 EOF
14498
14499 ###     checks for compiler characteristics
14500 ac_ext=c
14501 ac_cpp='$CPP $CPPFLAGS'
14502 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14503 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14505 ac_main_return=return
14506
14507 echo "$as_me:14507: checking for $CC option to accept ANSI C" >&5
14508 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14509 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512   ac_cv_prog_cc_stdc=no
14513 ac_save_CC=$CC
14514 cat >conftest.$ac_ext <<_ACEOF
14515 #line 14515 "configure"
14516 #include "confdefs.h"
14517 #include <stdarg.h>
14518 #include <stdio.h>
14519 #include <sys/types.h>
14520 #include <sys/stat.h>
14521 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14522 struct buf { int x; };
14523 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14524 static char *e (p, i)
14525      char **p;
14526      int i;
14527 {
14528   return p[i];
14529 }
14530 static char *f (char * (*g) (char **, int), char **p, ...)
14531 {
14532   char *s;
14533   va_list v;
14534   va_start (v,p);
14535   s = g (p, va_arg (v,int));
14536   va_end (v);
14537   return s;
14538 }
14539 int test (int i, double x);
14540 struct s1 {int (*f) (int a);};
14541 struct s2 {int (*f) (double a);};
14542 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14543 int argc;
14544 char **argv;
14545 int
14546 main ()
14547 {
14548 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14549   ;
14550   return 0;
14551 }
14552 _ACEOF
14553 # Don't try gcc -ansi; that turns off useful extensions and
14554 # breaks some systems' header files.
14555 # AIX                   -qlanglvl=ansi
14556 # Ultrix and OSF/1      -std1
14557 # HP-UX 10.20 and later -Ae
14558 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14559 # SVR4                  -Xc -D__EXTENSIONS__
14560 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14561 do
14562   CC="$ac_save_CC $ac_arg"
14563   rm -f conftest.$ac_objext
14564 if { (eval echo "$as_me:14564: \"$ac_compile\"") >&5
14565   (eval $ac_compile) 2>&5
14566   ac_status=$?
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); } &&
14569          { ac_try='test -s conftest.$ac_objext'
14570   { (eval echo "$as_me:14570: \"$ac_try\"") >&5
14571   (eval $ac_try) 2>&5
14572   ac_status=$?
14573   echo "$as_me:14573: \$? = $ac_status" >&5
14574   (exit $ac_status); }; }; then
14575   ac_cv_prog_cc_stdc=$ac_arg
14576 break
14577 else
14578   echo "$as_me: failed program was:" >&5
14579 cat conftest.$ac_ext >&5
14580 fi
14581 rm -f conftest.$ac_objext
14582 done
14583 rm -f conftest.$ac_ext conftest.$ac_objext
14584 CC=$ac_save_CC
14585
14586 fi
14587
14588 case "x$ac_cv_prog_cc_stdc" in
14589   x|xno)
14590     echo "$as_me:14590: result: none needed" >&5
14591 echo "${ECHO_T}none needed" >&6 ;;
14592   *)
14593     echo "$as_me:14593: result: $ac_cv_prog_cc_stdc" >&5
14594 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14595     CC="$CC $ac_cv_prog_cc_stdc" ;;
14596 esac
14597
14598 echo "$as_me:14598: checking for an ANSI C-conforming const" >&5
14599 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14600 if test "${ac_cv_c_const+set}" = set; then
14601   echo $ECHO_N "(cached) $ECHO_C" >&6
14602 else
14603   cat >conftest.$ac_ext <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606
14607 int
14608 main ()
14609 {
14610 /* FIXME: Include the comments suggested by Paul. */
14611 #ifndef __cplusplus
14612   /* Ultrix mips cc rejects this.  */
14613   typedef int charset[2];
14614   const charset x;
14615   /* SunOS 4.1.1 cc rejects this.  */
14616   char const *const *ccp;
14617   char **p;
14618   /* NEC SVR4.0.2 mips cc rejects this.  */
14619   struct point {int x, y;};
14620   static struct point const zero = {0,0};
14621   /* AIX XL C 1.02.0.0 rejects this.
14622      It does not let you subtract one const X* pointer from another in
14623      an arm of an if-expression whose if-part is not a constant
14624      expression */
14625   const char *g = "string";
14626   ccp = &g + (g ? g-g : 0);
14627   /* HPUX 7.0 cc rejects these. */
14628   ++ccp;
14629   p = (char**) ccp;
14630   ccp = (char const *const *) p;
14631   { /* SCO 3.2v4 cc rejects this.  */
14632     char *t;
14633     char const *s = 0 ? (char *) 0 : (char const *) 0;
14634
14635     *t++ = 0;
14636   }
14637   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14638     int x[] = {25, 17};
14639     const int *foo = &x[0];
14640     ++foo;
14641   }
14642   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14643     typedef const int *iptr;
14644     iptr p = 0;
14645     ++p;
14646   }
14647   { /* AIX XL C 1.02.0.0 rejects this saying
14648        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14649     struct s { int j; const int *ap[3]; };
14650     struct s *b; b->j = 5;
14651   }
14652   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14653     const int foo = 10;
14654   }
14655 #endif
14656
14657   ;
14658   return 0;
14659 }
14660 _ACEOF
14661 rm -f conftest.$ac_objext
14662 if { (eval echo "$as_me:14662: \"$ac_compile\"") >&5
14663   (eval $ac_compile) 2>&5
14664   ac_status=$?
14665   echo "$as_me:14665: \$? = $ac_status" >&5
14666   (exit $ac_status); } &&
14667          { ac_try='test -s conftest.$ac_objext'
14668   { (eval echo "$as_me:14668: \"$ac_try\"") >&5
14669   (eval $ac_try) 2>&5
14670   ac_status=$?
14671   echo "$as_me:14671: \$? = $ac_status" >&5
14672   (exit $ac_status); }; }; then
14673   ac_cv_c_const=yes
14674 else
14675   echo "$as_me: failed program was:" >&5
14676 cat conftest.$ac_ext >&5
14677 ac_cv_c_const=no
14678 fi
14679 rm -f conftest.$ac_objext conftest.$ac_ext
14680 fi
14681 echo "$as_me:14681: result: $ac_cv_c_const" >&5
14682 echo "${ECHO_T}$ac_cv_c_const" >&6
14683 if test $ac_cv_c_const = no; then
14684
14685 cat >>confdefs.h <<\EOF
14686 #define const
14687 EOF
14688
14689 fi
14690
14691 echo "$as_me:14691: checking for inline" >&5
14692 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14693 if test "${ac_cv_c_inline+set}" = set; then
14694   echo $ECHO_N "(cached) $ECHO_C" >&6
14695 else
14696   ac_cv_c_inline=no
14697 for ac_kw in inline __inline__ __inline; do
14698   cat >conftest.$ac_ext <<_ACEOF
14699 #line 14699 "configure"
14700 #include "confdefs.h"
14701 #ifndef __cplusplus
14702 static $ac_kw int static_foo () {return 0; }
14703 $ac_kw int foo () {return 0; }
14704 #endif
14705
14706 _ACEOF
14707 rm -f conftest.$ac_objext
14708 if { (eval echo "$as_me:14708: \"$ac_compile\"") >&5
14709   (eval $ac_compile) 2>&5
14710   ac_status=$?
14711   echo "$as_me:14711: \$? = $ac_status" >&5
14712   (exit $ac_status); } &&
14713          { ac_try='test -s conftest.$ac_objext'
14714   { (eval echo "$as_me:14714: \"$ac_try\"") >&5
14715   (eval $ac_try) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit $ac_status); }; }; then
14719   ac_cv_c_inline=$ac_kw; break
14720 else
14721   echo "$as_me: failed program was:" >&5
14722 cat conftest.$ac_ext >&5
14723 fi
14724 rm -f conftest.$ac_objext conftest.$ac_ext
14725 done
14726
14727 fi
14728 echo "$as_me:14728: result: $ac_cv_c_inline" >&5
14729 echo "${ECHO_T}$ac_cv_c_inline" >&6
14730 case $ac_cv_c_inline in
14731   inline | yes) ;;
14732   no)
14733 cat >>confdefs.h <<\EOF
14734 #define inline
14735 EOF
14736  ;;
14737   *)  cat >>confdefs.h <<EOF
14738 #define inline $ac_cv_c_inline
14739 EOF
14740  ;;
14741 esac
14742
14743 NCURSES_INLINE=
14744 if test "$ac_cv_c_inline" != no ; then
14745   NCURSES_INLINE=inline
14746   if test "$INTEL_COMPILER" = yes
14747   then
14748     :
14749   elif test "$GCC" = yes
14750   then
14751     echo "$as_me:14751: checking if $CC supports options to tune inlining" >&5
14752 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14753 if test "${cf_cv_gcc_inline+set}" = set; then
14754   echo $ECHO_N "(cached) $ECHO_C" >&6
14755 else
14756
14757       cf_save_CFLAGS=$CFLAGS
14758       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14759       cat >conftest.$ac_ext <<_ACEOF
14760 #line 14760 "configure"
14761 #include "confdefs.h"
14762 inline int foo(void) { return 1; }
14763 int
14764 main ()
14765 {
14766 ${cf_cv_main_return:-return} foo()
14767   ;
14768   return 0;
14769 }
14770 _ACEOF
14771 rm -f conftest.$ac_objext
14772 if { (eval echo "$as_me:14772: \"$ac_compile\"") >&5
14773   (eval $ac_compile) 2>&5
14774   ac_status=$?
14775   echo "$as_me:14775: \$? = $ac_status" >&5
14776   (exit $ac_status); } &&
14777          { ac_try='test -s conftest.$ac_objext'
14778   { (eval echo "$as_me:14778: \"$ac_try\"") >&5
14779   (eval $ac_try) 2>&5
14780   ac_status=$?
14781   echo "$as_me:14781: \$? = $ac_status" >&5
14782   (exit $ac_status); }; }; then
14783   cf_cv_gcc_inline=yes
14784 else
14785   echo "$as_me: failed program was:" >&5
14786 cat conftest.$ac_ext >&5
14787 cf_cv_gcc_inline=no
14788 fi
14789 rm -f conftest.$ac_objext conftest.$ac_ext
14790       CFLAGS=$cf_save_CFLAGS
14791
14792 fi
14793 echo "$as_me:14793: result: $cf_cv_gcc_inline" >&5
14794 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14795     if test "$cf_cv_gcc_inline" = yes ; then
14796
14797 cf_fix_cppflags=no
14798 cf_new_cflags=
14799 cf_new_cppflags=
14800 cf_new_extra_cppflags=
14801
14802 for cf_add_cflags in --param max-inline-insns-single=1200
14803 do
14804 case $cf_fix_cppflags in
14805 no)
14806         case $cf_add_cflags in #(vi
14807         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14808                 case $cf_add_cflags in
14809                 -D*)
14810                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14811
14812                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14813                                 && test -z "${cf_tst_cflags}" \
14814                                 && cf_fix_cppflags=yes
14815
14816                         if test $cf_fix_cppflags = yes ; then
14817                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14818                                 continue
14819                         elif test "${cf_tst_cflags}" = "\"'" ; then
14820                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14821                                 continue
14822                         fi
14823                         ;;
14824                 esac
14825                 case "$CPPFLAGS" in
14826                 *$cf_add_cflags) #(vi
14827                         ;;
14828                 *) #(vi
14829                         case $cf_add_cflags in #(vi
14830                         -D*)
14831                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14832
14833 CPPFLAGS=`echo "$CPPFLAGS" | \
14834         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14835                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14836
14837                                 ;;
14838                         esac
14839                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14840                         ;;
14841                 esac
14842                 ;;
14843         *)
14844                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14845                 ;;
14846         esac
14847         ;;
14848 yes)
14849         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14850
14851         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14852
14853         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14854                 && test -z "${cf_tst_cflags}" \
14855                 && cf_fix_cppflags=no
14856         ;;
14857 esac
14858 done
14859
14860 if test -n "$cf_new_cflags" ; then
14861
14862         CFLAGS="$CFLAGS $cf_new_cflags"
14863 fi
14864
14865 if test -n "$cf_new_cppflags" ; then
14866
14867         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14868 fi
14869
14870 if test -n "$cf_new_extra_cppflags" ; then
14871
14872         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14873 fi
14874
14875     fi
14876   fi
14877 fi
14878
14879 echo "$as_me:14879: checking for signal global datatype" >&5
14880 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14881 if test "${cf_cv_sig_atomic_t+set}" = set; then
14882   echo $ECHO_N "(cached) $ECHO_C" >&6
14883 else
14884
14885         for cf_type in \
14886                 "volatile sig_atomic_t" \
14887                 "sig_atomic_t" \
14888                 "int"
14889         do
14890         cat >conftest.$ac_ext <<_ACEOF
14891 #line 14891 "configure"
14892 #include "confdefs.h"
14893
14894 #include <sys/types.h>
14895 #include <signal.h>
14896 #include <stdio.h>
14897
14898 extern $cf_type x;
14899 $cf_type x;
14900 static void handler(int sig)
14901 {
14902         x = 5;
14903 }
14904 int
14905 main ()
14906 {
14907 signal(SIGINT, handler);
14908                  x = 1
14909   ;
14910   return 0;
14911 }
14912 _ACEOF
14913 rm -f conftest.$ac_objext
14914 if { (eval echo "$as_me:14914: \"$ac_compile\"") >&5
14915   (eval $ac_compile) 2>&5
14916   ac_status=$?
14917   echo "$as_me:14917: \$? = $ac_status" >&5
14918   (exit $ac_status); } &&
14919          { ac_try='test -s conftest.$ac_objext'
14920   { (eval echo "$as_me:14920: \"$ac_try\"") >&5
14921   (eval $ac_try) 2>&5
14922   ac_status=$?
14923   echo "$as_me:14923: \$? = $ac_status" >&5
14924   (exit $ac_status); }; }; then
14925   cf_cv_sig_atomic_t=$cf_type
14926 else
14927   echo "$as_me: failed program was:" >&5
14928 cat conftest.$ac_ext >&5
14929 cf_cv_sig_atomic_t=no
14930 fi
14931 rm -f conftest.$ac_objext conftest.$ac_ext
14932                 test "$cf_cv_sig_atomic_t" != no && break
14933         done
14934
14935 fi
14936
14937 echo "$as_me:14937: result: $cf_cv_sig_atomic_t" >&5
14938 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14939 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14940 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14941 EOF
14942
14943 if test $NCURSES_CHTYPE = auto ; then
14944
14945 echo "$as_me:14945: checking for type of chtype" >&5
14946 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14947 if test "${cf_cv_typeof_chtype+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950
14951                 if test "$cross_compiling" = yes; then
14952   cf_cv_typeof_chtype=long
14953 else
14954   cat >conftest.$ac_ext <<_ACEOF
14955 #line 14955 "configure"
14956 #include "confdefs.h"
14957
14958 #define WANT_BITS 31
14959 #include <stdio.h>
14960 int main()
14961 {
14962         FILE *fp = fopen("cf_test.out", "w");
14963         if (fp != 0) {
14964                 char *result = "long";
14965                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14966                         int n;
14967                         unsigned int x, y;
14968                         for (n = 0; n < WANT_BITS; n++) {
14969                                 x = (1 << n);
14970                                 y = (x >> n);
14971                                 if (y != 1 || x == 0) {
14972                                         x = 0;
14973                                         break;
14974                                 }
14975                         }
14976                         /*
14977                          * If x is nonzero, an int is big enough for the bits
14978                          * that we want.
14979                          */
14980                         result = (x != 0) ? "int" : "long";
14981                 }
14982                 fputs(result, fp);
14983                 fclose(fp);
14984         }
14985         ${cf_cv_main_return:-return}(0);
14986 }
14987
14988 _ACEOF
14989 rm -f conftest$ac_exeext
14990 if { (eval echo "$as_me:14990: \"$ac_link\"") >&5
14991   (eval $ac_link) 2>&5
14992   ac_status=$?
14993   echo "$as_me:14993: \$? = $ac_status" >&5
14994   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14995   { (eval echo "$as_me:14995: \"$ac_try\"") >&5
14996   (eval $ac_try) 2>&5
14997   ac_status=$?
14998   echo "$as_me:14998: \$? = $ac_status" >&5
14999   (exit $ac_status); }; }; then
15000   cf_cv_typeof_chtype=`cat cf_test.out`
15001 else
15002   echo "$as_me: program exited with status $ac_status" >&5
15003 echo "$as_me: failed program was:" >&5
15004 cat conftest.$ac_ext >&5
15005 cf_cv_typeof_chtype=long
15006 fi
15007 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15008 fi
15009                 rm -f cf_test.out
15010
15011 fi
15012
15013 echo "$as_me:15013: result: $cf_cv_typeof_chtype" >&5
15014 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15015
15016 cat >>confdefs.h <<EOF
15017 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15018 EOF
15019
15020 else
15021         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15022 fi
15023 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15024
15025 echo "$as_me:15025: checking if unsigned literals are legal" >&5
15026 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15027 if test "${cf_cv_unsigned_literals+set}" = set; then
15028   echo $ECHO_N "(cached) $ECHO_C" >&6
15029 else
15030
15031         cat >conftest.$ac_ext <<_ACEOF
15032 #line 15032 "configure"
15033 #include "confdefs.h"
15034
15035 int
15036 main ()
15037 {
15038 long x = 1L + 1UL + 1U + 1
15039   ;
15040   return 0;
15041 }
15042 _ACEOF
15043 rm -f conftest.$ac_objext
15044 if { (eval echo "$as_me:15044: \"$ac_compile\"") >&5
15045   (eval $ac_compile) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); } &&
15049          { ac_try='test -s conftest.$ac_objext'
15050   { (eval echo "$as_me:15050: \"$ac_try\"") >&5
15051   (eval $ac_try) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); }; }; then
15055   cf_cv_unsigned_literals=yes
15056 else
15057   echo "$as_me: failed program was:" >&5
15058 cat conftest.$ac_ext >&5
15059 cf_cv_unsigned_literals=no
15060 fi
15061 rm -f conftest.$ac_objext conftest.$ac_ext
15062
15063 fi
15064
15065 echo "$as_me:15065: result: $cf_cv_unsigned_literals" >&5
15066 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15067
15068 cf_cv_1UL="1"
15069 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15070 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15071
15072 if test $NCURSES_MMASK_T = auto ; then
15073         cf_cv_typeof_mmask_t=long
15074 else
15075         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15076 fi
15077 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15078
15079 ###     Checks for external-data
15080
15081 echo "$as_me:15081: checking if external errno is declared" >&5
15082 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15083 if test "${cf_cv_dcl_errno+set}" = set; then
15084   echo $ECHO_N "(cached) $ECHO_C" >&6
15085 else
15086
15087     cat >conftest.$ac_ext <<_ACEOF
15088 #line 15088 "configure"
15089 #include "confdefs.h"
15090
15091 #ifdef HAVE_STDLIB_H
15092 #include <stdlib.h>
15093 #endif
15094 #include <stdio.h>
15095 #include <sys/types.h>
15096 #include <errno.h>
15097 int
15098 main ()
15099 {
15100 int x = (int) errno
15101   ;
15102   return 0;
15103 }
15104 _ACEOF
15105 rm -f conftest.$ac_objext
15106 if { (eval echo "$as_me:15106: \"$ac_compile\"") >&5
15107   (eval $ac_compile) 2>&5
15108   ac_status=$?
15109   echo "$as_me:15109: \$? = $ac_status" >&5
15110   (exit $ac_status); } &&
15111          { ac_try='test -s conftest.$ac_objext'
15112   { (eval echo "$as_me:15112: \"$ac_try\"") >&5
15113   (eval $ac_try) 2>&5
15114   ac_status=$?
15115   echo "$as_me:15115: \$? = $ac_status" >&5
15116   (exit $ac_status); }; }; then
15117   cf_cv_dcl_errno=yes
15118 else
15119   echo "$as_me: failed program was:" >&5
15120 cat conftest.$ac_ext >&5
15121 cf_cv_dcl_errno=no
15122 fi
15123 rm -f conftest.$ac_objext conftest.$ac_ext
15124
15125 fi
15126 echo "$as_me:15126: result: $cf_cv_dcl_errno" >&5
15127 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15128
15129 if test "$cf_cv_dcl_errno" = no ; then
15130
15131 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15132
15133     cat >>confdefs.h <<EOF
15134 #define $cf_result 1
15135 EOF
15136
15137 fi
15138
15139 # It's possible (for near-UNIX clones) that the data doesn't exist
15140
15141 echo "$as_me:15141: checking if external errno exists" >&5
15142 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15143 if test "${cf_cv_have_errno+set}" = set; then
15144   echo $ECHO_N "(cached) $ECHO_C" >&6
15145 else
15146
15147     cat >conftest.$ac_ext <<_ACEOF
15148 #line 15148 "configure"
15149 #include "confdefs.h"
15150
15151 #undef errno
15152 extern int errno;
15153
15154 int
15155 main ()
15156 {
15157 errno = 2
15158   ;
15159   return 0;
15160 }
15161 _ACEOF
15162 rm -f conftest.$ac_objext conftest$ac_exeext
15163 if { (eval echo "$as_me:15163: \"$ac_link\"") >&5
15164   (eval $ac_link) 2>&5
15165   ac_status=$?
15166   echo "$as_me:15166: \$? = $ac_status" >&5
15167   (exit $ac_status); } &&
15168          { ac_try='test -s conftest$ac_exeext'
15169   { (eval echo "$as_me:15169: \"$ac_try\"") >&5
15170   (eval $ac_try) 2>&5
15171   ac_status=$?
15172   echo "$as_me:15172: \$? = $ac_status" >&5
15173   (exit $ac_status); }; }; then
15174   cf_cv_have_errno=yes
15175 else
15176   echo "$as_me: failed program was:" >&5
15177 cat conftest.$ac_ext >&5
15178 cf_cv_have_errno=no
15179 fi
15180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15181
15182 fi
15183 echo "$as_me:15183: result: $cf_cv_have_errno" >&5
15184 echo "${ECHO_T}$cf_cv_have_errno" >&6
15185
15186 if test "$cf_cv_have_errno" = yes ; then
15187
15188 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15189
15190     cat >>confdefs.h <<EOF
15191 #define $cf_result 1
15192 EOF
15193
15194 fi
15195
15196 echo "$as_me:15196: checking if data-only library module links" >&5
15197 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15198 if test "${cf_cv_link_dataonly+set}" = set; then
15199   echo $ECHO_N "(cached) $ECHO_C" >&6
15200 else
15201
15202         rm -f conftest.a
15203         cat >conftest.$ac_ext <<EOF
15204 #line 15204 "configure"
15205 int     testdata[3] = { 123, 456, 789 };
15206 EOF
15207         if { (eval echo "$as_me:15207: \"$ac_compile\"") >&5
15208   (eval $ac_compile) 2>&5
15209   ac_status=$?
15210   echo "$as_me:15210: \$? = $ac_status" >&5
15211   (exit $ac_status); } ; then
15212                 mv conftest.o data.o && \
15213                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15214         fi
15215         rm -f conftest.$ac_ext data.o
15216         cat >conftest.$ac_ext <<EOF
15217 #line 15217 "configure"
15218 int     testfunc()
15219 {
15220 #if defined(NeXT)
15221         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15222 #else
15223         extern int testdata[3];
15224         return testdata[0] == 123
15225            &&  testdata[1] == 456
15226            &&  testdata[2] == 789;
15227 #endif
15228 }
15229 EOF
15230         if { (eval echo "$as_me:15230: \"$ac_compile\"") >&5
15231   (eval $ac_compile) 2>&5
15232   ac_status=$?
15233   echo "$as_me:15233: \$? = $ac_status" >&5
15234   (exit $ac_status); }; then
15235                 mv conftest.o func.o && \
15236                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15237         fi
15238         rm -f conftest.$ac_ext func.o
15239         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15240         cf_saveLIBS="$LIBS"
15241         LIBS="conftest.a $LIBS"
15242         if test "$cross_compiling" = yes; then
15243   cf_cv_link_dataonly=unknown
15244 else
15245   cat >conftest.$ac_ext <<_ACEOF
15246 #line 15246 "configure"
15247 #include "confdefs.h"
15248
15249         int main()
15250         {
15251                 extern int testfunc();
15252                 ${cf_cv_main_return:-return} (!testfunc());
15253         }
15254
15255 _ACEOF
15256 rm -f conftest$ac_exeext
15257 if { (eval echo "$as_me:15257: \"$ac_link\"") >&5
15258   (eval $ac_link) 2>&5
15259   ac_status=$?
15260   echo "$as_me:15260: \$? = $ac_status" >&5
15261   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15262   { (eval echo "$as_me:15262: \"$ac_try\"") >&5
15263   (eval $ac_try) 2>&5
15264   ac_status=$?
15265   echo "$as_me:15265: \$? = $ac_status" >&5
15266   (exit $ac_status); }; }; then
15267   cf_cv_link_dataonly=yes
15268 else
15269   echo "$as_me: program exited with status $ac_status" >&5
15270 echo "$as_me: failed program was:" >&5
15271 cat conftest.$ac_ext >&5
15272 cf_cv_link_dataonly=no
15273 fi
15274 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15275 fi
15276         LIBS="$cf_saveLIBS"
15277
15278 fi
15279
15280 echo "$as_me:15280: result: $cf_cv_link_dataonly" >&5
15281 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15282
15283 if test "$cf_cv_link_dataonly" = no ; then
15284         cat >>confdefs.h <<\EOF
15285 #define BROKEN_LINKER 1
15286 EOF
15287
15288         BROKEN_LINKER=1
15289 fi
15290
15291 ###     Checks for library functions.
15292
15293 for ac_func in \
15294 getcwd \
15295 getegid \
15296 geteuid \
15297 getttynam \
15298 issetugid \
15299 poll \
15300 remove \
15301 select \
15302 setbuf \
15303 setbuffer \
15304 setvbuf \
15305 sigaction \
15306 sigvec \
15307 strdup \
15308 strstr \
15309 tcgetpgrp \
15310 times \
15311 vsnprintf \
15312
15313 do
15314 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15315 echo "$as_me:15315: checking for $ac_func" >&5
15316 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15317 if eval "test \"\${$as_ac_var+set}\" = set"; then
15318   echo $ECHO_N "(cached) $ECHO_C" >&6
15319 else
15320   cat >conftest.$ac_ext <<_ACEOF
15321 #line 15321 "configure"
15322 #include "confdefs.h"
15323 /* System header to define __stub macros and hopefully few prototypes,
15324     which can conflict with char $ac_func (); below.  */
15325 #include <assert.h>
15326 /* Override any gcc2 internal prototype to avoid an error.  */
15327 #ifdef __cplusplus
15328 extern "C"
15329 #endif
15330 /* We use char because int might match the return type of a gcc2
15331    builtin and then its argument prototype would still apply.  */
15332 char $ac_func ();
15333 char (*f) ();
15334
15335 int
15336 main ()
15337 {
15338 /* The GNU C library defines this for functions which it implements
15339     to always fail with ENOSYS.  Some functions are actually named
15340     something starting with __ and the normal name is an alias.  */
15341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15342 choke me
15343 #else
15344 f = $ac_func;
15345 #endif
15346
15347   ;
15348   return 0;
15349 }
15350 _ACEOF
15351 rm -f conftest.$ac_objext conftest$ac_exeext
15352 if { (eval echo "$as_me:15352: \"$ac_link\"") >&5
15353   (eval $ac_link) 2>&5
15354   ac_status=$?
15355   echo "$as_me:15355: \$? = $ac_status" >&5
15356   (exit $ac_status); } &&
15357          { ac_try='test -s conftest$ac_exeext'
15358   { (eval echo "$as_me:15358: \"$ac_try\"") >&5
15359   (eval $ac_try) 2>&5
15360   ac_status=$?
15361   echo "$as_me:15361: \$? = $ac_status" >&5
15362   (exit $ac_status); }; }; then
15363   eval "$as_ac_var=yes"
15364 else
15365   echo "$as_me: failed program was:" >&5
15366 cat conftest.$ac_ext >&5
15367 eval "$as_ac_var=no"
15368 fi
15369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15370 fi
15371 echo "$as_me:15371: result: `eval echo '${'$as_ac_var'}'`" >&5
15372 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15373 if test `eval echo '${'$as_ac_var'}'` = yes; then
15374   cat >>confdefs.h <<EOF
15375 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15376 EOF
15377
15378 fi
15379 done
15380
15381 if test "$with_getcap" = "yes" ; then
15382
15383 echo "$as_me:15383: checking for terminal-capability database functions" >&5
15384 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15385 if test "${cf_cv_cgetent+set}" = set; then
15386   echo $ECHO_N "(cached) $ECHO_C" >&6
15387 else
15388
15389 cat >conftest.$ac_ext <<_ACEOF
15390 #line 15390 "configure"
15391 #include "confdefs.h"
15392
15393 #include <stdlib.h>
15394 int
15395 main ()
15396 {
15397
15398         char temp[128];
15399         char *buf = temp;
15400         char *db_array = temp;
15401         cgetent(&buf, &db_array, "vt100");
15402         cgetcap(buf, "tc", '=');
15403         cgetmatch(buf, "tc");
15404
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext conftest$ac_exeext
15410 if { (eval echo "$as_me:15410: \"$ac_link\"") >&5
15411   (eval $ac_link) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest$ac_exeext'
15416   { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   cf_cv_cgetent=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_cgetent=no
15426 fi
15427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15428
15429 fi
15430 echo "$as_me:15430: result: $cf_cv_cgetent" >&5
15431 echo "${ECHO_T}$cf_cv_cgetent" >&6
15432
15433 if test "$cf_cv_cgetent" = yes
15434 then
15435         cat >>confdefs.h <<\EOF
15436 #define HAVE_BSD_CGETENT 1
15437 EOF
15438
15439 echo "$as_me:15439: checking if cgetent uses const parameter" >&5
15440 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15441 if test "${cf_cv_cgetent_const+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444
15445 cat >conftest.$ac_ext <<_ACEOF
15446 #line 15446 "configure"
15447 #include "confdefs.h"
15448
15449 #include <stdlib.h>
15450 int
15451 main ()
15452 {
15453
15454         char temp[128];
15455         char *buf = temp;
15456 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15457         const char *db_array = temp;
15458         cgetent(&buf, &db_array, "vt100");
15459 #endif
15460         cgetcap(buf, "tc", '=');
15461         cgetmatch(buf, "tc");
15462
15463   ;
15464   return 0;
15465 }
15466 _ACEOF
15467 rm -f conftest.$ac_objext conftest$ac_exeext
15468 if { (eval echo "$as_me:15468: \"$ac_link\"") >&5
15469   (eval $ac_link) 2>&5
15470   ac_status=$?
15471   echo "$as_me:15471: \$? = $ac_status" >&5
15472   (exit $ac_status); } &&
15473          { ac_try='test -s conftest$ac_exeext'
15474   { (eval echo "$as_me:15474: \"$ac_try\"") >&5
15475   (eval $ac_try) 2>&5
15476   ac_status=$?
15477   echo "$as_me:15477: \$? = $ac_status" >&5
15478   (exit $ac_status); }; }; then
15479   cf_cv_cgetent_const=yes
15480 else
15481   echo "$as_me: failed program was:" >&5
15482 cat conftest.$ac_ext >&5
15483 cf_cv_cgetent_const=no
15484 fi
15485 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15486
15487 fi
15488 echo "$as_me:15488: result: $cf_cv_cgetent_const" >&5
15489 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15490         if test "$cf_cv_cgetent_const" = yes
15491         then
15492                 cat >>confdefs.h <<EOF
15493 #define CGETENT_CONST const
15494 EOF
15495
15496         fi
15497 fi
15498
15499 fi
15500
15501 echo "$as_me:15501: checking for isascii" >&5
15502 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15503 if test "${cf_cv_have_isascii+set}" = set; then
15504   echo $ECHO_N "(cached) $ECHO_C" >&6
15505 else
15506
15507         cat >conftest.$ac_ext <<_ACEOF
15508 #line 15508 "configure"
15509 #include "confdefs.h"
15510 #include <ctype.h>
15511 int
15512 main ()
15513 {
15514 int x = isascii(' ')
15515   ;
15516   return 0;
15517 }
15518 _ACEOF
15519 rm -f conftest.$ac_objext conftest$ac_exeext
15520 if { (eval echo "$as_me:15520: \"$ac_link\"") >&5
15521   (eval $ac_link) 2>&5
15522   ac_status=$?
15523   echo "$as_me:15523: \$? = $ac_status" >&5
15524   (exit $ac_status); } &&
15525          { ac_try='test -s conftest$ac_exeext'
15526   { (eval echo "$as_me:15526: \"$ac_try\"") >&5
15527   (eval $ac_try) 2>&5
15528   ac_status=$?
15529   echo "$as_me:15529: \$? = $ac_status" >&5
15530   (exit $ac_status); }; }; then
15531   cf_cv_have_isascii=yes
15532 else
15533   echo "$as_me: failed program was:" >&5
15534 cat conftest.$ac_ext >&5
15535 cf_cv_have_isascii=no
15536 fi
15537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15538
15539 fi
15540 echo "$as_me:15540: result: $cf_cv_have_isascii" >&5
15541 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15542 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15543 #define HAVE_ISASCII 1
15544 EOF
15545
15546 if test "$ac_cv_func_sigaction" = yes; then
15547 echo "$as_me:15547: checking whether sigaction needs _POSIX_SOURCE" >&5
15548 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15549 cat >conftest.$ac_ext <<_ACEOF
15550 #line 15550 "configure"
15551 #include "confdefs.h"
15552
15553 #include <sys/types.h>
15554 #include <signal.h>
15555 int
15556 main ()
15557 {
15558 struct sigaction act
15559   ;
15560   return 0;
15561 }
15562 _ACEOF
15563 rm -f conftest.$ac_objext
15564 if { (eval echo "$as_me:15564: \"$ac_compile\"") >&5
15565   (eval $ac_compile) 2>&5
15566   ac_status=$?
15567   echo "$as_me:15567: \$? = $ac_status" >&5
15568   (exit $ac_status); } &&
15569          { ac_try='test -s conftest.$ac_objext'
15570   { (eval echo "$as_me:15570: \"$ac_try\"") >&5
15571   (eval $ac_try) 2>&5
15572   ac_status=$?
15573   echo "$as_me:15573: \$? = $ac_status" >&5
15574   (exit $ac_status); }; }; then
15575   sigact_bad=no
15576 else
15577   echo "$as_me: failed program was:" >&5
15578 cat conftest.$ac_ext >&5
15579
15580 cat >conftest.$ac_ext <<_ACEOF
15581 #line 15581 "configure"
15582 #include "confdefs.h"
15583
15584 #define _POSIX_SOURCE
15585 #include <sys/types.h>
15586 #include <signal.h>
15587 int
15588 main ()
15589 {
15590 struct sigaction act
15591   ;
15592   return 0;
15593 }
15594 _ACEOF
15595 rm -f conftest.$ac_objext
15596 if { (eval echo "$as_me:15596: \"$ac_compile\"") >&5
15597   (eval $ac_compile) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } &&
15601          { ac_try='test -s conftest.$ac_objext'
15602   { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:15605: \$? = $ac_status" >&5
15606   (exit $ac_status); }; }; then
15607   sigact_bad=yes
15608          cat >>confdefs.h <<\EOF
15609 #define _POSIX_SOURCE 1
15610 EOF
15611
15612 else
15613   echo "$as_me: failed program was:" >&5
15614 cat conftest.$ac_ext >&5
15615 sigact_bad=unknown
15616 fi
15617 rm -f conftest.$ac_objext conftest.$ac_ext
15618 fi
15619 rm -f conftest.$ac_objext conftest.$ac_ext
15620 echo "$as_me:15620: result: $sigact_bad" >&5
15621 echo "${ECHO_T}$sigact_bad" >&6
15622 fi
15623
15624 echo "$as_me:15624: checking if nanosleep really works" >&5
15625 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15626 if test "${cf_cv_func_nanosleep+set}" = set; then
15627   echo $ECHO_N "(cached) $ECHO_C" >&6
15628 else
15629
15630 if test "$cross_compiling" = yes; then
15631   cf_cv_func_nanosleep=unknown
15632 else
15633   cat >conftest.$ac_ext <<_ACEOF
15634 #line 15634 "configure"
15635 #include "confdefs.h"
15636
15637 #include <stdio.h>
15638 #include <errno.h>
15639 #include <time.h>
15640
15641 #ifdef HAVE_SYS_TIME_H
15642 #include <sys/time.h>
15643 #endif
15644
15645 int main() {
15646         struct timespec ts1, ts2;
15647         int code;
15648         ts1.tv_sec  = 0;
15649         ts1.tv_nsec = 750000000;
15650         ts2.tv_sec  = 0;
15651         ts2.tv_nsec = 0;
15652         errno = 0;
15653         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15654         ${cf_cv_main_return:-return}(code != 0);
15655 }
15656
15657 _ACEOF
15658 rm -f conftest$ac_exeext
15659 if { (eval echo "$as_me:15659: \"$ac_link\"") >&5
15660   (eval $ac_link) 2>&5
15661   ac_status=$?
15662   echo "$as_me:15662: \$? = $ac_status" >&5
15663   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15664   { (eval echo "$as_me:15664: \"$ac_try\"") >&5
15665   (eval $ac_try) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit $ac_status); }; }; then
15669   cf_cv_func_nanosleep=yes
15670 else
15671   echo "$as_me: program exited with status $ac_status" >&5
15672 echo "$as_me: failed program was:" >&5
15673 cat conftest.$ac_ext >&5
15674 cf_cv_func_nanosleep=no
15675 fi
15676 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15677 fi
15678 fi
15679 echo "$as_me:15679: result: $cf_cv_func_nanosleep" >&5
15680 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15681
15682 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15683 #define HAVE_NANOSLEEP 1
15684 EOF
15685
15686 for ac_header in \
15687 termio.h \
15688 termios.h \
15689 unistd.h \
15690
15691 do
15692 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15693 echo "$as_me:15693: checking for $ac_header" >&5
15694 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15695 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15696   echo $ECHO_N "(cached) $ECHO_C" >&6
15697 else
15698   cat >conftest.$ac_ext <<_ACEOF
15699 #line 15699 "configure"
15700 #include "confdefs.h"
15701 #include <$ac_header>
15702 _ACEOF
15703 if { (eval echo "$as_me:15703: \"$ac_cpp conftest.$ac_ext\"") >&5
15704   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15705   ac_status=$?
15706   egrep -v '^ *\+' conftest.er1 >conftest.err
15707   rm -f conftest.er1
15708   cat conftest.err >&5
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); } >/dev/null; then
15711   if test -s conftest.err; then
15712     ac_cpp_err=$ac_c_preproc_warn_flag
15713   else
15714     ac_cpp_err=
15715   fi
15716 else
15717   ac_cpp_err=yes
15718 fi
15719 if test -z "$ac_cpp_err"; then
15720   eval "$as_ac_Header=yes"
15721 else
15722   echo "$as_me: failed program was:" >&5
15723   cat conftest.$ac_ext >&5
15724   eval "$as_ac_Header=no"
15725 fi
15726 rm -f conftest.err conftest.$ac_ext
15727 fi
15728 echo "$as_me:15728: result: `eval echo '${'$as_ac_Header'}'`" >&5
15729 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15730 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15731   cat >>confdefs.h <<EOF
15732 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15733 EOF
15734
15735 fi
15736 done
15737
15738 if test "$ISC" = yes ; then
15739
15740 for ac_header in sys/termio.h
15741 do
15742 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15743 echo "$as_me:15743: checking for $ac_header" >&5
15744 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15745 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15746   echo $ECHO_N "(cached) $ECHO_C" >&6
15747 else
15748   cat >conftest.$ac_ext <<_ACEOF
15749 #line 15749 "configure"
15750 #include "confdefs.h"
15751 #include <$ac_header>
15752 _ACEOF
15753 if { (eval echo "$as_me:15753: \"$ac_cpp conftest.$ac_ext\"") >&5
15754   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15755   ac_status=$?
15756   egrep -v '^ *\+' conftest.er1 >conftest.err
15757   rm -f conftest.er1
15758   cat conftest.err >&5
15759   echo "$as_me:15759: \$? = $ac_status" >&5
15760   (exit $ac_status); } >/dev/null; then
15761   if test -s conftest.err; then
15762     ac_cpp_err=$ac_c_preproc_warn_flag
15763   else
15764     ac_cpp_err=
15765   fi
15766 else
15767   ac_cpp_err=yes
15768 fi
15769 if test -z "$ac_cpp_err"; then
15770   eval "$as_ac_Header=yes"
15771 else
15772   echo "$as_me: failed program was:" >&5
15773   cat conftest.$ac_ext >&5
15774   eval "$as_ac_Header=no"
15775 fi
15776 rm -f conftest.err conftest.$ac_ext
15777 fi
15778 echo "$as_me:15778: result: `eval echo '${'$as_ac_Header'}'`" >&5
15779 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15780 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15781   cat >>confdefs.h <<EOF
15782 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15783 EOF
15784
15785 fi
15786 done
15787
15788 fi
15789 if test "$ac_cv_header_termios_h" = yes ; then
15790         case "$CFLAGS $CPPFLAGS" in
15791         *-D_POSIX_SOURCE*)
15792                 termios_bad=dunno ;;
15793         *)      termios_bad=maybe ;;
15794         esac
15795         if test "$termios_bad" = maybe ; then
15796         echo "$as_me:15796: checking whether termios.h needs _POSIX_SOURCE" >&5
15797 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15798         cat >conftest.$ac_ext <<_ACEOF
15799 #line 15799 "configure"
15800 #include "confdefs.h"
15801 #include <termios.h>
15802 int
15803 main ()
15804 {
15805 struct termios foo; int x = foo.c_iflag
15806   ;
15807   return 0;
15808 }
15809 _ACEOF
15810 rm -f conftest.$ac_objext
15811 if { (eval echo "$as_me:15811: \"$ac_compile\"") >&5
15812   (eval $ac_compile) 2>&5
15813   ac_status=$?
15814   echo "$as_me:15814: \$? = $ac_status" >&5
15815   (exit $ac_status); } &&
15816          { ac_try='test -s conftest.$ac_objext'
15817   { (eval echo "$as_me:15817: \"$ac_try\"") >&5
15818   (eval $ac_try) 2>&5
15819   ac_status=$?
15820   echo "$as_me:15820: \$? = $ac_status" >&5
15821   (exit $ac_status); }; }; then
15822   termios_bad=no
15823 else
15824   echo "$as_me: failed program was:" >&5
15825 cat conftest.$ac_ext >&5
15826
15827                 cat >conftest.$ac_ext <<_ACEOF
15828 #line 15828 "configure"
15829 #include "confdefs.h"
15830
15831 #define _POSIX_SOURCE
15832 #include <termios.h>
15833 int
15834 main ()
15835 {
15836 struct termios foo; int x = foo.c_iflag
15837   ;
15838   return 0;
15839 }
15840 _ACEOF
15841 rm -f conftest.$ac_objext
15842 if { (eval echo "$as_me:15842: \"$ac_compile\"") >&5
15843   (eval $ac_compile) 2>&5
15844   ac_status=$?
15845   echo "$as_me:15845: \$? = $ac_status" >&5
15846   (exit $ac_status); } &&
15847          { ac_try='test -s conftest.$ac_objext'
15848   { (eval echo "$as_me:15848: \"$ac_try\"") >&5
15849   (eval $ac_try) 2>&5
15850   ac_status=$?
15851   echo "$as_me:15851: \$? = $ac_status" >&5
15852   (exit $ac_status); }; }; then
15853   termios_bad=unknown
15854 else
15855   echo "$as_me: failed program was:" >&5
15856 cat conftest.$ac_ext >&5
15857 termios_bad=yes cat >>confdefs.h <<\EOF
15858 #define _POSIX_SOURCE 1
15859 EOF
15860
15861 fi
15862 rm -f conftest.$ac_objext conftest.$ac_ext
15863
15864 fi
15865 rm -f conftest.$ac_objext conftest.$ac_ext
15866         echo "$as_me:15866: result: $termios_bad" >&5
15867 echo "${ECHO_T}$termios_bad" >&6
15868         fi
15869 fi
15870
15871 echo "$as_me:15871: checking for tcgetattr" >&5
15872 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15873 if test "${cf_cv_have_tcgetattr+set}" = set; then
15874   echo $ECHO_N "(cached) $ECHO_C" >&6
15875 else
15876
15877 cat >conftest.$ac_ext <<_ACEOF
15878 #line 15878 "configure"
15879 #include "confdefs.h"
15880
15881 #include <sys/types.h>
15882 #ifdef HAVE_UNISTD_H
15883 #include <unistd.h>
15884 #endif
15885 #ifdef HAVE_TERMIOS_H
15886 #include <termios.h>
15887 #define TTY struct termios
15888 #else
15889 #ifdef HAVE_TERMIO_H
15890 #include <termio.h>
15891 #define TTY struct termio
15892 #endif
15893 #endif
15894
15895 int
15896 main ()
15897 {
15898
15899 TTY foo;
15900 tcgetattr(1, &foo);
15901   ;
15902   return 0;
15903 }
15904 _ACEOF
15905 rm -f conftest.$ac_objext conftest$ac_exeext
15906 if { (eval echo "$as_me:15906: \"$ac_link\"") >&5
15907   (eval $ac_link) 2>&5
15908   ac_status=$?
15909   echo "$as_me:15909: \$? = $ac_status" >&5
15910   (exit $ac_status); } &&
15911          { ac_try='test -s conftest$ac_exeext'
15912   { (eval echo "$as_me:15912: \"$ac_try\"") >&5
15913   (eval $ac_try) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); }; }; then
15917   cf_cv_have_tcgetattr=yes
15918 else
15919   echo "$as_me: failed program was:" >&5
15920 cat conftest.$ac_ext >&5
15921 cf_cv_have_tcgetattr=no
15922 fi
15923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15924 fi
15925 echo "$as_me:15925: result: $cf_cv_have_tcgetattr" >&5
15926 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15927 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15928 #define HAVE_TCGETATTR 1
15929 EOF
15930
15931 echo "$as_me:15931: checking for vsscanf function or workaround" >&5
15932 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15933 if test "${cf_cv_func_vsscanf+set}" = set; then
15934   echo $ECHO_N "(cached) $ECHO_C" >&6
15935 else
15936
15937 cat >conftest.$ac_ext <<_ACEOF
15938 #line 15938 "configure"
15939 #include "confdefs.h"
15940
15941 #include <stdarg.h>
15942 #include <stdio.h>
15943 int
15944 main ()
15945 {
15946
15947         va_list ap;
15948         vsscanf("from", "%d", ap)
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   cf_cv_func_vsscanf=vsscanf
15966 else
15967   echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969
15970 cat >conftest.$ac_ext <<_ACEOF
15971 #line 15971 "configure"
15972 #include "confdefs.h"
15973
15974 #include <stdarg.h>
15975 #include <stdio.h>
15976 int
15977 main ()
15978 {
15979
15980     FILE strbuf;
15981     char *str = "from";
15982
15983     strbuf._flag = _IOREAD;
15984     strbuf._ptr = strbuf._base = (unsigned char *) str;
15985     strbuf._cnt = strlen(str);
15986     strbuf._file = _NFILE;
15987     return (vfscanf(&strbuf, "%d", ap))
15988   ;
15989   return 0;
15990 }
15991 _ACEOF
15992 rm -f conftest.$ac_objext conftest$ac_exeext
15993 if { (eval echo "$as_me:15993: \"$ac_link\"") >&5
15994   (eval $ac_link) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); } &&
15998          { ac_try='test -s conftest$ac_exeext'
15999   { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000   (eval $ac_try) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); }; }; then
16004   cf_cv_func_vsscanf=vfscanf
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 cat conftest.$ac_ext >&5
16008
16009 cat >conftest.$ac_ext <<_ACEOF
16010 #line 16010 "configure"
16011 #include "confdefs.h"
16012
16013 #include <stdarg.h>
16014 #include <stdio.h>
16015 int
16016 main ()
16017 {
16018
16019     FILE strbuf;
16020     char *str = "from";
16021
16022     strbuf._flag = _IOREAD;
16023     strbuf._ptr = strbuf._base = (unsigned char *) str;
16024     strbuf._cnt = strlen(str);
16025     strbuf._file = _NFILE;
16026     return (_doscan(&strbuf, "%d", ap))
16027   ;
16028   return 0;
16029 }
16030 _ACEOF
16031 rm -f conftest.$ac_objext conftest$ac_exeext
16032 if { (eval echo "$as_me:16032: \"$ac_link\"") >&5
16033   (eval $ac_link) 2>&5
16034   ac_status=$?
16035   echo "$as_me:16035: \$? = $ac_status" >&5
16036   (exit $ac_status); } &&
16037          { ac_try='test -s conftest$ac_exeext'
16038   { (eval echo "$as_me:16038: \"$ac_try\"") >&5
16039   (eval $ac_try) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); }; }; then
16043   cf_cv_func_vsscanf=_doscan
16044 else
16045   echo "$as_me: failed program was:" >&5
16046 cat conftest.$ac_ext >&5
16047
16048 cf_cv_func_vsscanf=no
16049 fi
16050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16051 fi
16052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16053 fi
16054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16055 fi
16056 echo "$as_me:16056: result: $cf_cv_func_vsscanf" >&5
16057 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16058
16059 case $cf_cv_func_vsscanf in #(vi
16060 vsscanf) cat >>confdefs.h <<\EOF
16061 #define HAVE_VSSCANF 1
16062 EOF
16063 ;; #(vi
16064 vfscanf) cat >>confdefs.h <<\EOF
16065 #define HAVE_VFSCANF 1
16066 EOF
16067 ;; #(vi
16068 _doscan) cat >>confdefs.h <<\EOF
16069 #define HAVE__DOSCAN 1
16070 EOF
16071 ;;
16072 esac
16073
16074 echo "$as_me:16074: checking for working mkstemp" >&5
16075 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16076 if test "${cf_cv_func_mkstemp+set}" = set; then
16077   echo $ECHO_N "(cached) $ECHO_C" >&6
16078 else
16079
16080 rm -rf conftest*
16081 if test "$cross_compiling" = yes; then
16082   echo "$as_me:16082: checking for mkstemp" >&5
16083 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16084 if test "${ac_cv_func_mkstemp+set}" = set; then
16085   echo $ECHO_N "(cached) $ECHO_C" >&6
16086 else
16087   cat >conftest.$ac_ext <<_ACEOF
16088 #line 16088 "configure"
16089 #include "confdefs.h"
16090 /* System header to define __stub macros and hopefully few prototypes,
16091     which can conflict with char mkstemp (); below.  */
16092 #include <assert.h>
16093 /* Override any gcc2 internal prototype to avoid an error.  */
16094 #ifdef __cplusplus
16095 extern "C"
16096 #endif
16097 /* We use char because int might match the return type of a gcc2
16098    builtin and then its argument prototype would still apply.  */
16099 char mkstemp ();
16100 char (*f) ();
16101
16102 int
16103 main ()
16104 {
16105 /* The GNU C library defines this for functions which it implements
16106     to always fail with ENOSYS.  Some functions are actually named
16107     something starting with __ and the normal name is an alias.  */
16108 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16109 choke me
16110 #else
16111 f = mkstemp;
16112 #endif
16113
16114   ;
16115   return 0;
16116 }
16117 _ACEOF
16118 rm -f conftest.$ac_objext conftest$ac_exeext
16119 if { (eval echo "$as_me:16119: \"$ac_link\"") >&5
16120   (eval $ac_link) 2>&5
16121   ac_status=$?
16122   echo "$as_me:16122: \$? = $ac_status" >&5
16123   (exit $ac_status); } &&
16124          { ac_try='test -s conftest$ac_exeext'
16125   { (eval echo "$as_me:16125: \"$ac_try\"") >&5
16126   (eval $ac_try) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); }; }; then
16130   ac_cv_func_mkstemp=yes
16131 else
16132   echo "$as_me: failed program was:" >&5
16133 cat conftest.$ac_ext >&5
16134 ac_cv_func_mkstemp=no
16135 fi
16136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16137 fi
16138 echo "$as_me:16138: result: $ac_cv_func_mkstemp" >&5
16139 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16140
16141 else
16142   cat >conftest.$ac_ext <<_ACEOF
16143 #line 16143 "configure"
16144 #include "confdefs.h"
16145
16146 #include <sys/types.h>
16147 #include <stdlib.h>
16148 #include <stdio.h>
16149 #include <string.h>
16150 #include <sys/stat.h>
16151 int main()
16152 {
16153         char *tmpl = "conftestXXXXXX";
16154         char name[2][80];
16155         int n;
16156         int result = 0;
16157         int fd;
16158         struct stat sb;
16159
16160         umask(077);
16161         for (n = 0; n < 2; ++n) {
16162                 strcpy(name[n], tmpl);
16163                 if ((fd = mkstemp(name[n])) >= 0) {
16164                         if (!strcmp(name[n], tmpl)
16165                          || stat(name[n], &sb) != 0
16166                          || (sb.st_mode & S_IFMT) != S_IFREG
16167                          || (sb.st_mode & 077) != 0) {
16168                                 result = 1;
16169                         }
16170                         close(fd);
16171                 }
16172         }
16173         if (result == 0
16174          && !strcmp(name[0], name[1]))
16175                 result = 1;
16176         ${cf_cv_main_return:-return}(result);
16177 }
16178
16179 _ACEOF
16180 rm -f conftest$ac_exeext
16181 if { (eval echo "$as_me:16181: \"$ac_link\"") >&5
16182   (eval $ac_link) 2>&5
16183   ac_status=$?
16184   echo "$as_me:16184: \$? = $ac_status" >&5
16185   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16186   { (eval echo "$as_me:16186: \"$ac_try\"") >&5
16187   (eval $ac_try) 2>&5
16188   ac_status=$?
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); }; }; then
16191   cf_cv_func_mkstemp=yes
16192
16193 else
16194   echo "$as_me: program exited with status $ac_status" >&5
16195 echo "$as_me: failed program was:" >&5
16196 cat conftest.$ac_ext >&5
16197 cf_cv_func_mkstemp=no
16198
16199 fi
16200 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16201 fi
16202
16203 fi
16204 echo "$as_me:16204: result: $cf_cv_func_mkstemp" >&5
16205 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16206 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16207         cat >>confdefs.h <<\EOF
16208 #define HAVE_MKSTEMP 1
16209 EOF
16210
16211 fi
16212
16213 # setup for prototype of fallback for vsscanf()
16214
16215 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16216         HAVE_VSSCANF=1
16217 else
16218         HAVE_VSSCANF=0
16219 fi
16220
16221 if test "$cross_compiling" = yes ; then
16222         { echo "$as_me:16222: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16223 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16224 else
16225         echo "$as_me:16225: checking whether setvbuf arguments are reversed" >&5
16226 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16227 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16228   echo $ECHO_N "(cached) $ECHO_C" >&6
16229 else
16230   if test "$cross_compiling" = yes; then
16231   { { echo "$as_me:16231: error: cannot run test program while cross compiling" >&5
16232 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16233    { (exit 1); exit 1; }; }
16234 else
16235   cat >conftest.$ac_ext <<_ACEOF
16236 #line 16236 "configure"
16237 #include "confdefs.h"
16238 #include <stdio.h>
16239 /* If setvbuf has the reversed format, exit 0. */
16240 int
16241 main ()
16242 {
16243   /* This call has the arguments reversed.
16244      A reversed system may check and see that the address of main
16245      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16246   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16247     $ac_main_return(1);
16248   putc('\r', stdout);
16249   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16250 }
16251 _ACEOF
16252 rm -f conftest$ac_exeext
16253 if { (eval echo "$as_me:16253: \"$ac_link\"") >&5
16254   (eval $ac_link) 2>&5
16255   ac_status=$?
16256   echo "$as_me:16256: \$? = $ac_status" >&5
16257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16258   { (eval echo "$as_me:16258: \"$ac_try\"") >&5
16259   (eval $ac_try) 2>&5
16260   ac_status=$?
16261   echo "$as_me:16261: \$? = $ac_status" >&5
16262   (exit $ac_status); }; }; then
16263   ac_cv_func_setvbuf_reversed=yes
16264 else
16265   echo "$as_me: program exited with status $ac_status" >&5
16266 echo "$as_me: failed program was:" >&5
16267 cat conftest.$ac_ext >&5
16268 ac_cv_func_setvbuf_reversed=no
16269 fi
16270 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16271 fi
16272 rm -f core core.* *.core
16273 fi
16274 echo "$as_me:16274: result: $ac_cv_func_setvbuf_reversed" >&5
16275 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16276 if test $ac_cv_func_setvbuf_reversed = yes; then
16277
16278 cat >>confdefs.h <<\EOF
16279 #define SETVBUF_REVERSED 1
16280 EOF
16281
16282 fi
16283
16284 fi
16285 echo "$as_me:16285: checking return type of signal handlers" >&5
16286 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16287 if test "${ac_cv_type_signal+set}" = set; then
16288   echo $ECHO_N "(cached) $ECHO_C" >&6
16289 else
16290   cat >conftest.$ac_ext <<_ACEOF
16291 #line 16291 "configure"
16292 #include "confdefs.h"
16293 #include <sys/types.h>
16294 #include <signal.h>
16295 #ifdef signal
16296 # undef signal
16297 #endif
16298 #ifdef __cplusplus
16299 extern "C" void (*signal (int, void (*)(int)))(int);
16300 #else
16301 void (*signal ()) ();
16302 #endif
16303
16304 int
16305 main ()
16306 {
16307 int i;
16308   ;
16309   return 0;
16310 }
16311 _ACEOF
16312 rm -f conftest.$ac_objext
16313 if { (eval echo "$as_me:16313: \"$ac_compile\"") >&5
16314   (eval $ac_compile) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); } &&
16318          { ac_try='test -s conftest.$ac_objext'
16319   { (eval echo "$as_me:16319: \"$ac_try\"") >&5
16320   (eval $ac_try) 2>&5
16321   ac_status=$?
16322   echo "$as_me:16322: \$? = $ac_status" >&5
16323   (exit $ac_status); }; }; then
16324   ac_cv_type_signal=void
16325 else
16326   echo "$as_me: failed program was:" >&5
16327 cat conftest.$ac_ext >&5
16328 ac_cv_type_signal=int
16329 fi
16330 rm -f conftest.$ac_objext conftest.$ac_ext
16331 fi
16332 echo "$as_me:16332: result: $ac_cv_type_signal" >&5
16333 echo "${ECHO_T}$ac_cv_type_signal" >&6
16334
16335 cat >>confdefs.h <<EOF
16336 #define RETSIGTYPE $ac_cv_type_signal
16337 EOF
16338
16339 echo "$as_me:16339: checking for intptr_t" >&5
16340 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16341 if test "${ac_cv_type_intptr_t+set}" = set; then
16342   echo $ECHO_N "(cached) $ECHO_C" >&6
16343 else
16344   cat >conftest.$ac_ext <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16347 $ac_includes_default
16348 int
16349 main ()
16350 {
16351 if ((intptr_t *) 0)
16352   return 0;
16353 if (sizeof (intptr_t))
16354   return 0;
16355   ;
16356   return 0;
16357 }
16358 _ACEOF
16359 rm -f conftest.$ac_objext
16360 if { (eval echo "$as_me:16360: \"$ac_compile\"") >&5
16361   (eval $ac_compile) 2>&5
16362   ac_status=$?
16363   echo "$as_me:16363: \$? = $ac_status" >&5
16364   (exit $ac_status); } &&
16365          { ac_try='test -s conftest.$ac_objext'
16366   { (eval echo "$as_me:16366: \"$ac_try\"") >&5
16367   (eval $ac_try) 2>&5
16368   ac_status=$?
16369   echo "$as_me:16369: \$? = $ac_status" >&5
16370   (exit $ac_status); }; }; then
16371   ac_cv_type_intptr_t=yes
16372 else
16373   echo "$as_me: failed program was:" >&5
16374 cat conftest.$ac_ext >&5
16375 ac_cv_type_intptr_t=no
16376 fi
16377 rm -f conftest.$ac_objext conftest.$ac_ext
16378 fi
16379 echo "$as_me:16379: result: $ac_cv_type_intptr_t" >&5
16380 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16381 if test $ac_cv_type_intptr_t = yes; then
16382   :
16383 else
16384
16385 cat >>confdefs.h <<EOF
16386 #define intptr_t long
16387 EOF
16388
16389 fi
16390
16391 echo "$as_me:16391: checking for type sigaction_t" >&5
16392 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16393 if test "${cf_cv_type_sigaction+set}" = set; then
16394   echo $ECHO_N "(cached) $ECHO_C" >&6
16395 else
16396
16397         cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16400
16401 #include <signal.h>
16402 int
16403 main ()
16404 {
16405 sigaction_t x
16406   ;
16407   return 0;
16408 }
16409 _ACEOF
16410 rm -f conftest.$ac_objext
16411 if { (eval echo "$as_me:16411: \"$ac_compile\"") >&5
16412   (eval $ac_compile) 2>&5
16413   ac_status=$?
16414   echo "$as_me:16414: \$? = $ac_status" >&5
16415   (exit $ac_status); } &&
16416          { ac_try='test -s conftest.$ac_objext'
16417   { (eval echo "$as_me:16417: \"$ac_try\"") >&5
16418   (eval $ac_try) 2>&5
16419   ac_status=$?
16420   echo "$as_me:16420: \$? = $ac_status" >&5
16421   (exit $ac_status); }; }; then
16422   cf_cv_type_sigaction=yes
16423 else
16424   echo "$as_me: failed program was:" >&5
16425 cat conftest.$ac_ext >&5
16426 cf_cv_type_sigaction=no
16427 fi
16428 rm -f conftest.$ac_objext conftest.$ac_ext
16429 fi
16430
16431 echo "$as_me:16431: result: $cf_cv_type_sigaction" >&5
16432 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16433 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16434 #define HAVE_TYPE_SIGACTION 1
16435 EOF
16436
16437 echo "$as_me:16437: checking declaration of size-change" >&5
16438 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16439 if test "${cf_cv_sizechange+set}" = set; then
16440   echo $ECHO_N "(cached) $ECHO_C" >&6
16441 else
16442
16443     cf_cv_sizechange=unknown
16444     cf_save_CPPFLAGS="$CPPFLAGS"
16445
16446 for cf_opts in "" "NEED_PTEM_H"
16447 do
16448
16449     CPPFLAGS="$cf_save_CPPFLAGS"
16450     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16451     cat >conftest.$ac_ext <<_ACEOF
16452 #line 16452 "configure"
16453 #include "confdefs.h"
16454 #include <sys/types.h>
16455 #ifdef HAVE_TERMIOS_H
16456 #include <termios.h>
16457 #else
16458 #ifdef HAVE_TERMIO_H
16459 #include <termio.h>
16460 #endif
16461 #endif
16462 #ifdef NEED_PTEM_H
16463 /* This is a workaround for SCO:  they neglected to define struct winsize in
16464  * termios.h -- it's only in termio.h and ptem.h
16465  */
16466 #include        <sys/stream.h>
16467 #include        <sys/ptem.h>
16468 #endif
16469 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16470 #include <sys/ioctl.h>
16471 #endif
16472
16473 int
16474 main ()
16475 {
16476
16477 #ifdef TIOCGSIZE
16478         struct ttysize win;     /* FIXME: what system is this? */
16479         int y = win.ts_lines;
16480         int x = win.ts_cols;
16481 #else
16482 #ifdef TIOCGWINSZ
16483         struct winsize win;
16484         int y = win.ws_row;
16485         int x = win.ws_col;
16486 #else
16487         no TIOCGSIZE or TIOCGWINSZ
16488 #endif /* TIOCGWINSZ */
16489 #endif /* TIOCGSIZE */
16490
16491   ;
16492   return 0;
16493 }
16494 _ACEOF
16495 rm -f conftest.$ac_objext
16496 if { (eval echo "$as_me:16496: \"$ac_compile\"") >&5
16497   (eval $ac_compile) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); } &&
16501          { ac_try='test -s conftest.$ac_objext'
16502   { (eval echo "$as_me:16502: \"$ac_try\"") >&5
16503   (eval $ac_try) 2>&5
16504   ac_status=$?
16505   echo "$as_me:16505: \$? = $ac_status" >&5
16506   (exit $ac_status); }; }; then
16507   cf_cv_sizechange=yes
16508 else
16509   echo "$as_me: failed program was:" >&5
16510 cat conftest.$ac_ext >&5
16511 cf_cv_sizechange=no
16512 fi
16513 rm -f conftest.$ac_objext conftest.$ac_ext
16514
16515         CPPFLAGS="$cf_save_CPPFLAGS"
16516         if test "$cf_cv_sizechange" = yes ; then
16517                 echo "size-change succeeded ($cf_opts)" >&5
16518                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16519                 break
16520         fi
16521 done
16522
16523 fi
16524 echo "$as_me:16524: result: $cf_cv_sizechange" >&5
16525 echo "${ECHO_T}$cf_cv_sizechange" >&6
16526 if test "$cf_cv_sizechange" != no ; then
16527         cat >>confdefs.h <<\EOF
16528 #define HAVE_SIZECHANGE 1
16529 EOF
16530
16531         case $cf_cv_sizechange in #(vi
16532         NEED*)
16533                 cat >>confdefs.h <<EOF
16534 #define $cf_cv_sizechange  1
16535 EOF
16536
16537                 ;;
16538         esac
16539 fi
16540
16541 echo "$as_me:16541: checking for memmove" >&5
16542 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16543 if test "${ac_cv_func_memmove+set}" = set; then
16544   echo $ECHO_N "(cached) $ECHO_C" >&6
16545 else
16546   cat >conftest.$ac_ext <<_ACEOF
16547 #line 16547 "configure"
16548 #include "confdefs.h"
16549 /* System header to define __stub macros and hopefully few prototypes,
16550     which can conflict with char memmove (); below.  */
16551 #include <assert.h>
16552 /* Override any gcc2 internal prototype to avoid an error.  */
16553 #ifdef __cplusplus
16554 extern "C"
16555 #endif
16556 /* We use char because int might match the return type of a gcc2
16557    builtin and then its argument prototype would still apply.  */
16558 char memmove ();
16559 char (*f) ();
16560
16561 int
16562 main ()
16563 {
16564 /* The GNU C library defines this for functions which it implements
16565     to always fail with ENOSYS.  Some functions are actually named
16566     something starting with __ and the normal name is an alias.  */
16567 #if defined (__stub_memmove) || defined (__stub___memmove)
16568 choke me
16569 #else
16570 f = memmove;
16571 #endif
16572
16573   ;
16574   return 0;
16575 }
16576 _ACEOF
16577 rm -f conftest.$ac_objext conftest$ac_exeext
16578 if { (eval echo "$as_me:16578: \"$ac_link\"") >&5
16579   (eval $ac_link) 2>&5
16580   ac_status=$?
16581   echo "$as_me:16581: \$? = $ac_status" >&5
16582   (exit $ac_status); } &&
16583          { ac_try='test -s conftest$ac_exeext'
16584   { (eval echo "$as_me:16584: \"$ac_try\"") >&5
16585   (eval $ac_try) 2>&5
16586   ac_status=$?
16587   echo "$as_me:16587: \$? = $ac_status" >&5
16588   (exit $ac_status); }; }; then
16589   ac_cv_func_memmove=yes
16590 else
16591   echo "$as_me: failed program was:" >&5
16592 cat conftest.$ac_ext >&5
16593 ac_cv_func_memmove=no
16594 fi
16595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16596 fi
16597 echo "$as_me:16597: result: $ac_cv_func_memmove" >&5
16598 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16599 if test $ac_cv_func_memmove = yes; then
16600   :
16601 else
16602
16603 echo "$as_me:16603: checking for bcopy" >&5
16604 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16605 if test "${ac_cv_func_bcopy+set}" = set; then
16606   echo $ECHO_N "(cached) $ECHO_C" >&6
16607 else
16608   cat >conftest.$ac_ext <<_ACEOF
16609 #line 16609 "configure"
16610 #include "confdefs.h"
16611 /* System header to define __stub macros and hopefully few prototypes,
16612     which can conflict with char bcopy (); below.  */
16613 #include <assert.h>
16614 /* Override any gcc2 internal prototype to avoid an error.  */
16615 #ifdef __cplusplus
16616 extern "C"
16617 #endif
16618 /* We use char because int might match the return type of a gcc2
16619    builtin and then its argument prototype would still apply.  */
16620 char bcopy ();
16621 char (*f) ();
16622
16623 int
16624 main ()
16625 {
16626 /* The GNU C library defines this for functions which it implements
16627     to always fail with ENOSYS.  Some functions are actually named
16628     something starting with __ and the normal name is an alias.  */
16629 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16630 choke me
16631 #else
16632 f = bcopy;
16633 #endif
16634
16635   ;
16636   return 0;
16637 }
16638 _ACEOF
16639 rm -f conftest.$ac_objext conftest$ac_exeext
16640 if { (eval echo "$as_me:16640: \"$ac_link\"") >&5
16641   (eval $ac_link) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -s conftest$ac_exeext'
16646   { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647   (eval $ac_try) 2>&5
16648   ac_status=$?
16649   echo "$as_me:16649: \$? = $ac_status" >&5
16650   (exit $ac_status); }; }; then
16651   ac_cv_func_bcopy=yes
16652 else
16653   echo "$as_me: failed program was:" >&5
16654 cat conftest.$ac_ext >&5
16655 ac_cv_func_bcopy=no
16656 fi
16657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16658 fi
16659 echo "$as_me:16659: result: $ac_cv_func_bcopy" >&5
16660 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16661 if test $ac_cv_func_bcopy = yes; then
16662
16663         echo "$as_me:16663: checking if bcopy does overlapping moves" >&5
16664 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16665 if test "${cf_cv_good_bcopy+set}" = set; then
16666   echo $ECHO_N "(cached) $ECHO_C" >&6
16667 else
16668
16669                 if test "$cross_compiling" = yes; then
16670   cf_cv_good_bcopy=unknown
16671 else
16672   cat >conftest.$ac_ext <<_ACEOF
16673 #line 16673 "configure"
16674 #include "confdefs.h"
16675
16676 int main() {
16677         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16678         char temp[40];
16679         bcopy(data, temp, sizeof(data));
16680         bcopy(temp+10, temp, 15);
16681         bcopy(temp+5, temp+15, 10);
16682         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16683 }
16684
16685 _ACEOF
16686 rm -f conftest$ac_exeext
16687 if { (eval echo "$as_me:16687: \"$ac_link\"") >&5
16688   (eval $ac_link) 2>&5
16689   ac_status=$?
16690   echo "$as_me:16690: \$? = $ac_status" >&5
16691   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16692   { (eval echo "$as_me:16692: \"$ac_try\"") >&5
16693   (eval $ac_try) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); }; }; then
16697   cf_cv_good_bcopy=yes
16698 else
16699   echo "$as_me: program exited with status $ac_status" >&5
16700 echo "$as_me: failed program was:" >&5
16701 cat conftest.$ac_ext >&5
16702 cf_cv_good_bcopy=no
16703 fi
16704 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16705 fi
16706
16707 fi
16708 echo "$as_me:16708: result: $cf_cv_good_bcopy" >&5
16709 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16710
16711 else
16712   cf_cv_good_bcopy=no
16713 fi
16714
16715         if test "$cf_cv_good_bcopy" = yes ; then
16716                 cat >>confdefs.h <<\EOF
16717 #define USE_OK_BCOPY 1
16718 EOF
16719
16720         else
16721                 cat >>confdefs.h <<\EOF
16722 #define USE_MY_MEMMOVE 1
16723 EOF
16724
16725         fi
16726
16727 fi
16728
16729 echo "$as_me:16729: checking if poll really works" >&5
16730 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16731 if test "${cf_cv_working_poll+set}" = set; then
16732   echo $ECHO_N "(cached) $ECHO_C" >&6
16733 else
16734
16735 if test "$cross_compiling" = yes; then
16736   cf_cv_working_poll=unknown
16737 else
16738   cat >conftest.$ac_ext <<_ACEOF
16739 #line 16739 "configure"
16740 #include "confdefs.h"
16741
16742 #include <stdio.h>
16743 #ifdef HAVE_POLL_H
16744 #include <poll.h>
16745 #else
16746 #include <sys/poll.h>
16747 #endif
16748 int main() {
16749         struct pollfd myfds;
16750         int ret;
16751
16752         myfds.fd = 0;
16753         myfds.events = POLLIN;
16754
16755         ret = poll(&myfds, 1, 100);
16756         ${cf_cv_main_return:-return}(ret != 0);
16757 }
16758 _ACEOF
16759 rm -f conftest$ac_exeext
16760 if { (eval echo "$as_me:16760: \"$ac_link\"") >&5
16761   (eval $ac_link) 2>&5
16762   ac_status=$?
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16765   { (eval echo "$as_me:16765: \"$ac_try\"") >&5
16766   (eval $ac_try) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); }; }; then
16770   cf_cv_working_poll=yes
16771 else
16772   echo "$as_me: program exited with status $ac_status" >&5
16773 echo "$as_me: failed program was:" >&5
16774 cat conftest.$ac_ext >&5
16775 cf_cv_working_poll=no
16776 fi
16777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16778 fi
16779 fi
16780 echo "$as_me:16780: result: $cf_cv_working_poll" >&5
16781 echo "${ECHO_T}$cf_cv_working_poll" >&6
16782 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16783 #define HAVE_WORKING_POLL 1
16784 EOF
16785
16786 echo "$as_me:16786: checking for va_copy" >&5
16787 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16788 if test "${cf_cv_have_va_copy+set}" = set; then
16789   echo $ECHO_N "(cached) $ECHO_C" >&6
16790 else
16791
16792 cat >conftest.$ac_ext <<_ACEOF
16793 #line 16793 "configure"
16794 #include "confdefs.h"
16795
16796 #include <stdarg.h>
16797
16798 int
16799 main ()
16800 {
16801
16802         static va_list dst;
16803         static va_list src;
16804         va_copy(dst, src)
16805   ;
16806   return 0;
16807 }
16808 _ACEOF
16809 rm -f conftest.$ac_objext conftest$ac_exeext
16810 if { (eval echo "$as_me:16810: \"$ac_link\"") >&5
16811   (eval $ac_link) 2>&5
16812   ac_status=$?
16813   echo "$as_me:16813: \$? = $ac_status" >&5
16814   (exit $ac_status); } &&
16815          { ac_try='test -s conftest$ac_exeext'
16816   { (eval echo "$as_me:16816: \"$ac_try\"") >&5
16817   (eval $ac_try) 2>&5
16818   ac_status=$?
16819   echo "$as_me:16819: \$? = $ac_status" >&5
16820   (exit $ac_status); }; }; then
16821   cf_cv_have_va_copy=yes
16822 else
16823   echo "$as_me: failed program was:" >&5
16824 cat conftest.$ac_ext >&5
16825 cf_cv_have_va_copy=no
16826 fi
16827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16828 fi
16829 echo "$as_me:16829: result: $cf_cv_have_va_copy" >&5
16830 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16831
16832 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16833 #define HAVE_VA_COPY 1
16834 EOF
16835
16836 echo "$as_me:16836: checking for __va_copy" >&5
16837 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16838 if test "${cf_cv_have___va_copy+set}" = set; then
16839   echo $ECHO_N "(cached) $ECHO_C" >&6
16840 else
16841
16842 cat >conftest.$ac_ext <<_ACEOF
16843 #line 16843 "configure"
16844 #include "confdefs.h"
16845
16846 #include <stdarg.h>
16847
16848 int
16849 main ()
16850 {
16851
16852         static va_list dst;
16853         static va_list src;
16854         __va_copy(dst, src)
16855   ;
16856   return 0;
16857 }
16858 _ACEOF
16859 rm -f conftest.$ac_objext conftest$ac_exeext
16860 if { (eval echo "$as_me:16860: \"$ac_link\"") >&5
16861   (eval $ac_link) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit $ac_status); } &&
16865          { ac_try='test -s conftest$ac_exeext'
16866   { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867   (eval $ac_try) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit $ac_status); }; }; then
16871   cf_cv_have___va_copy=yes
16872 else
16873   echo "$as_me: failed program was:" >&5
16874 cat conftest.$ac_ext >&5
16875 cf_cv_have___va_copy=no
16876 fi
16877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16878 fi
16879 echo "$as_me:16879: result: $cf_cv_have___va_copy" >&5
16880 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16881
16882 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16883 #define HAVE___VA_COPY 1
16884 EOF
16885
16886 echo "$as_me:16886: checking for pid_t" >&5
16887 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16888 if test "${ac_cv_type_pid_t+set}" = set; then
16889   echo $ECHO_N "(cached) $ECHO_C" >&6
16890 else
16891   cat >conftest.$ac_ext <<_ACEOF
16892 #line 16892 "configure"
16893 #include "confdefs.h"
16894 $ac_includes_default
16895 int
16896 main ()
16897 {
16898 if ((pid_t *) 0)
16899   return 0;
16900 if (sizeof (pid_t))
16901   return 0;
16902   ;
16903   return 0;
16904 }
16905 _ACEOF
16906 rm -f conftest.$ac_objext
16907 if { (eval echo "$as_me:16907: \"$ac_compile\"") >&5
16908   (eval $ac_compile) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit $ac_status); } &&
16912          { ac_try='test -s conftest.$ac_objext'
16913   { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914   (eval $ac_try) 2>&5
16915   ac_status=$?
16916   echo "$as_me:16916: \$? = $ac_status" >&5
16917   (exit $ac_status); }; }; then
16918   ac_cv_type_pid_t=yes
16919 else
16920   echo "$as_me: failed program was:" >&5
16921 cat conftest.$ac_ext >&5
16922 ac_cv_type_pid_t=no
16923 fi
16924 rm -f conftest.$ac_objext conftest.$ac_ext
16925 fi
16926 echo "$as_me:16926: result: $ac_cv_type_pid_t" >&5
16927 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16928 if test $ac_cv_type_pid_t = yes; then
16929   :
16930 else
16931
16932 cat >>confdefs.h <<EOF
16933 #define pid_t int
16934 EOF
16935
16936 fi
16937
16938 for ac_header in unistd.h vfork.h
16939 do
16940 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16941 echo "$as_me:16941: checking for $ac_header" >&5
16942 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16943 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16944   echo $ECHO_N "(cached) $ECHO_C" >&6
16945 else
16946   cat >conftest.$ac_ext <<_ACEOF
16947 #line 16947 "configure"
16948 #include "confdefs.h"
16949 #include <$ac_header>
16950 _ACEOF
16951 if { (eval echo "$as_me:16951: \"$ac_cpp conftest.$ac_ext\"") >&5
16952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16953   ac_status=$?
16954   egrep -v '^ *\+' conftest.er1 >conftest.err
16955   rm -f conftest.er1
16956   cat conftest.err >&5
16957   echo "$as_me:16957: \$? = $ac_status" >&5
16958   (exit $ac_status); } >/dev/null; then
16959   if test -s conftest.err; then
16960     ac_cpp_err=$ac_c_preproc_warn_flag
16961   else
16962     ac_cpp_err=
16963   fi
16964 else
16965   ac_cpp_err=yes
16966 fi
16967 if test -z "$ac_cpp_err"; then
16968   eval "$as_ac_Header=yes"
16969 else
16970   echo "$as_me: failed program was:" >&5
16971   cat conftest.$ac_ext >&5
16972   eval "$as_ac_Header=no"
16973 fi
16974 rm -f conftest.err conftest.$ac_ext
16975 fi
16976 echo "$as_me:16976: result: `eval echo '${'$as_ac_Header'}'`" >&5
16977 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16978 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16979   cat >>confdefs.h <<EOF
16980 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16981 EOF
16982
16983 fi
16984 done
16985
16986 for ac_func in fork vfork
16987 do
16988 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16989 echo "$as_me:16989: checking for $ac_func" >&5
16990 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16991 if eval "test \"\${$as_ac_var+set}\" = set"; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994   cat >conftest.$ac_ext <<_ACEOF
16995 #line 16995 "configure"
16996 #include "confdefs.h"
16997 /* System header to define __stub macros and hopefully few prototypes,
16998     which can conflict with char $ac_func (); below.  */
16999 #include <assert.h>
17000 /* Override any gcc2 internal prototype to avoid an error.  */
17001 #ifdef __cplusplus
17002 extern "C"
17003 #endif
17004 /* We use char because int might match the return type of a gcc2
17005    builtin and then its argument prototype would still apply.  */
17006 char $ac_func ();
17007 char (*f) ();
17008
17009 int
17010 main ()
17011 {
17012 /* The GNU C library defines this for functions which it implements
17013     to always fail with ENOSYS.  Some functions are actually named
17014     something starting with __ and the normal name is an alias.  */
17015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17016 choke me
17017 #else
17018 f = $ac_func;
17019 #endif
17020
17021   ;
17022   return 0;
17023 }
17024 _ACEOF
17025 rm -f conftest.$ac_objext conftest$ac_exeext
17026 if { (eval echo "$as_me:17026: \"$ac_link\"") >&5
17027   (eval $ac_link) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); } &&
17031          { ac_try='test -s conftest$ac_exeext'
17032   { (eval echo "$as_me:17032: \"$ac_try\"") >&5
17033   (eval $ac_try) 2>&5
17034   ac_status=$?
17035   echo "$as_me:17035: \$? = $ac_status" >&5
17036   (exit $ac_status); }; }; then
17037   eval "$as_ac_var=yes"
17038 else
17039   echo "$as_me: failed program was:" >&5
17040 cat conftest.$ac_ext >&5
17041 eval "$as_ac_var=no"
17042 fi
17043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17044 fi
17045 echo "$as_me:17045: result: `eval echo '${'$as_ac_var'}'`" >&5
17046 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17047 if test `eval echo '${'$as_ac_var'}'` = yes; then
17048   cat >>confdefs.h <<EOF
17049 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17050 EOF
17051
17052 fi
17053 done
17054
17055 ac_cv_func_fork_works=$ac_cv_func_fork
17056 if test "x$ac_cv_func_fork" = xyes; then
17057   echo "$as_me:17057: checking for working fork" >&5
17058 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17059 if test "${ac_cv_func_fork_works+set}" = set; then
17060   echo $ECHO_N "(cached) $ECHO_C" >&6
17061 else
17062   if test "$cross_compiling" = yes; then
17063   ac_cv_func_fork_works=cross
17064 else
17065   cat >conftest.$ac_ext <<_ACEOF
17066 /* By Rüdiger Kuhlmann. */
17067       #include <sys/types.h>
17068       #if HAVE_UNISTD_H
17069       # include <unistd.h>
17070       #endif
17071       /* Some systems only have a dummy stub for fork() */
17072       int main ()
17073       {
17074         if (fork() < 0)
17075           $ac_main_return (1);
17076         $ac_main_return (0);
17077       }
17078 _ACEOF
17079 rm -f conftest$ac_exeext
17080 if { (eval echo "$as_me:17080: \"$ac_link\"") >&5
17081   (eval $ac_link) 2>&5
17082   ac_status=$?
17083   echo "$as_me:17083: \$? = $ac_status" >&5
17084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17085   { (eval echo "$as_me:17085: \"$ac_try\"") >&5
17086   (eval $ac_try) 2>&5
17087   ac_status=$?
17088   echo "$as_me:17088: \$? = $ac_status" >&5
17089   (exit $ac_status); }; }; then
17090   ac_cv_func_fork_works=yes
17091 else
17092   echo "$as_me: program exited with status $ac_status" >&5
17093 echo "$as_me: failed program was:" >&5
17094 cat conftest.$ac_ext >&5
17095 ac_cv_func_fork_works=no
17096 fi
17097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17098 fi
17099 fi
17100 echo "$as_me:17100: result: $ac_cv_func_fork_works" >&5
17101 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17102
17103 fi
17104 if test "x$ac_cv_func_fork_works" = xcross; then
17105   case $host in
17106     *-*-amigaos* | *-*-msdosdjgpp*)
17107       # Override, as these systems have only a dummy fork() stub
17108       ac_cv_func_fork_works=no
17109       ;;
17110     *)
17111       ac_cv_func_fork_works=yes
17112       ;;
17113   esac
17114   { echo "$as_me:17114: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17115 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17116 fi
17117 ac_cv_func_vfork_works=$ac_cv_func_vfork
17118 if test "x$ac_cv_func_vfork" = xyes; then
17119   echo "$as_me:17119: checking for working vfork" >&5
17120 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17121 if test "${ac_cv_func_vfork_works+set}" = set; then
17122   echo $ECHO_N "(cached) $ECHO_C" >&6
17123 else
17124   if test "$cross_compiling" = yes; then
17125   ac_cv_func_vfork_works=cross
17126 else
17127   cat >conftest.$ac_ext <<_ACEOF
17128 #line 17128 "configure"
17129 #include "confdefs.h"
17130 /* Thanks to Paul Eggert for this test.  */
17131 #include <stdio.h>
17132 #include <sys/types.h>
17133 #include <sys/stat.h>
17134 #if HAVE_UNISTD_H
17135 # include <unistd.h>
17136 #endif
17137 #if HAVE_VFORK_H
17138 # include <vfork.h>
17139 #endif
17140 /* On some sparc systems, changes by the child to local and incoming
17141    argument registers are propagated back to the parent.  The compiler
17142    is told about this with #include <vfork.h>, but some compilers
17143    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17144    static variable whose address is put into a register that is
17145    clobbered by the vfork.  */
17146 static
17147 #ifdef __cplusplus
17148 sparc_address_test (int arg)
17149 # else
17150 sparc_address_test (arg) int arg;
17151 #endif
17152 {
17153   static pid_t child;
17154   if (!child) {
17155     child = vfork ();
17156     if (child < 0) {
17157       perror ("vfork");
17158       _exit(2);
17159     }
17160     if (!child) {
17161       arg = getpid();
17162       write(-1, "", 0);
17163       _exit (arg);
17164     }
17165   }
17166 }
17167
17168 int
17169 main ()
17170 {
17171   pid_t parent = getpid ();
17172   pid_t child;
17173
17174   sparc_address_test ();
17175
17176   child = vfork ();
17177
17178   if (child == 0) {
17179     /* Here is another test for sparc vfork register problems.  This
17180        test uses lots of local variables, at least as many local
17181        variables as main has allocated so far including compiler
17182        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17183        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17184        reuse the register of parent for one of the local variables,
17185        since it will think that parent can't possibly be used any more
17186        in this routine.  Assigning to the local variable will thus
17187        munge parent in the parent process.  */
17188     pid_t
17189       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17190       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17191     /* Convince the compiler that p..p7 are live; otherwise, it might
17192        use the same hardware register for all 8 local variables.  */
17193     if (p != p1 || p != p2 || p != p3 || p != p4
17194         || p != p5 || p != p6 || p != p7)
17195       _exit(1);
17196
17197     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17198        from child file descriptors.  If the child closes a descriptor
17199        before it execs or exits, this munges the parent's descriptor
17200        as well.  Test for this by closing stdout in the child.  */
17201     _exit(close(fileno(stdout)) != 0);
17202   } else {
17203     int status;
17204     struct stat st;
17205
17206     while (wait(&status) != child)
17207       ;
17208     $ac_main_return(
17209          /* Was there some problem with vforking?  */
17210          child < 0
17211
17212          /* Did the child fail?  (This shouldn't happen.)  */
17213          || status
17214
17215          /* Did the vfork/compiler bug occur?  */
17216          || parent != getpid()
17217
17218          /* Did the file descriptor bug occur?  */
17219          || fstat(fileno(stdout), &st) != 0
17220          );
17221   }
17222 }
17223 _ACEOF
17224 rm -f conftest$ac_exeext
17225 if { (eval echo "$as_me:17225: \"$ac_link\"") >&5
17226   (eval $ac_link) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit $ac_status); }; }; then
17235   ac_cv_func_vfork_works=yes
17236 else
17237   echo "$as_me: program exited with status $ac_status" >&5
17238 echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 ac_cv_func_vfork_works=no
17241 fi
17242 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17243 fi
17244 fi
17245 echo "$as_me:17245: result: $ac_cv_func_vfork_works" >&5
17246 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17247
17248 fi;
17249 if test "x$ac_cv_func_fork_works" = xcross; then
17250   ac_cv_func_vfork_works=ac_cv_func_vfork
17251   { echo "$as_me:17251: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17252 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17253 fi
17254
17255 if test "x$ac_cv_func_vfork_works" = xyes; then
17256
17257 cat >>confdefs.h <<\EOF
17258 #define HAVE_WORKING_VFORK 1
17259 EOF
17260
17261 else
17262
17263 cat >>confdefs.h <<\EOF
17264 #define vfork fork
17265 EOF
17266
17267 fi
17268 if test "x$ac_cv_func_fork_works" = xyes; then
17269
17270 cat >>confdefs.h <<\EOF
17271 #define HAVE_WORKING_FORK 1
17272 EOF
17273
17274 fi
17275
17276 # special check for test/ditto.c
17277
17278 echo "$as_me:17278: checking for openpty in -lutil" >&5
17279 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17280 if test "${ac_cv_lib_util_openpty+set}" = set; then
17281   echo $ECHO_N "(cached) $ECHO_C" >&6
17282 else
17283   ac_check_lib_save_LIBS=$LIBS
17284 LIBS="-lutil  $LIBS"
17285 cat >conftest.$ac_ext <<_ACEOF
17286 #line 17286 "configure"
17287 #include "confdefs.h"
17288
17289 /* Override any gcc2 internal prototype to avoid an error.  */
17290 #ifdef __cplusplus
17291 extern "C"
17292 #endif
17293 /* We use char because int might match the return type of a gcc2
17294    builtin and then its argument prototype would still apply.  */
17295 char openpty ();
17296 int
17297 main ()
17298 {
17299 openpty ();
17300   ;
17301   return 0;
17302 }
17303 _ACEOF
17304 rm -f conftest.$ac_objext conftest$ac_exeext
17305 if { (eval echo "$as_me:17305: \"$ac_link\"") >&5
17306   (eval $ac_link) 2>&5
17307   ac_status=$?
17308   echo "$as_me:17308: \$? = $ac_status" >&5
17309   (exit $ac_status); } &&
17310          { ac_try='test -s conftest$ac_exeext'
17311   { (eval echo "$as_me:17311: \"$ac_try\"") >&5
17312   (eval $ac_try) 2>&5
17313   ac_status=$?
17314   echo "$as_me:17314: \$? = $ac_status" >&5
17315   (exit $ac_status); }; }; then
17316   ac_cv_lib_util_openpty=yes
17317 else
17318   echo "$as_me: failed program was:" >&5
17319 cat conftest.$ac_ext >&5
17320 ac_cv_lib_util_openpty=no
17321 fi
17322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17323 LIBS=$ac_check_lib_save_LIBS
17324 fi
17325 echo "$as_me:17325: result: $ac_cv_lib_util_openpty" >&5
17326 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17327 if test $ac_cv_lib_util_openpty = yes; then
17328   cf_cv_lib_util=yes
17329 else
17330   cf_cv_lib_util=no
17331 fi
17332
17333 echo "$as_me:17333: checking for openpty header" >&5
17334 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17335 if test "${cf_cv_func_openpty+set}" = set; then
17336   echo $ECHO_N "(cached) $ECHO_C" >&6
17337 else
17338
17339     cf_save_LIBS="$LIBS"
17340     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17341     for cf_header in pty.h libutil.h util.h
17342     do
17343     cat >conftest.$ac_ext <<_ACEOF
17344 #line 17344 "configure"
17345 #include "confdefs.h"
17346
17347 #include <$cf_header>
17348
17349 int
17350 main ()
17351 {
17352
17353     int x = openpty((int *)0, (int *)0, (char *)0,
17354                    (struct termios *)0, (struct winsize *)0);
17355
17356   ;
17357   return 0;
17358 }
17359 _ACEOF
17360 rm -f conftest.$ac_objext conftest$ac_exeext
17361 if { (eval echo "$as_me:17361: \"$ac_link\"") >&5
17362   (eval $ac_link) 2>&5
17363   ac_status=$?
17364   echo "$as_me:17364: \$? = $ac_status" >&5
17365   (exit $ac_status); } &&
17366          { ac_try='test -s conftest$ac_exeext'
17367   { (eval echo "$as_me:17367: \"$ac_try\"") >&5
17368   (eval $ac_try) 2>&5
17369   ac_status=$?
17370   echo "$as_me:17370: \$? = $ac_status" >&5
17371   (exit $ac_status); }; }; then
17372
17373         cf_cv_func_openpty=$cf_header
17374         break
17375
17376 else
17377   echo "$as_me: failed program was:" >&5
17378 cat conftest.$ac_ext >&5
17379
17380         cf_cv_func_openpty=no
17381
17382 fi
17383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17384     done
17385     LIBS="$cf_save_LIBS"
17386
17387 fi
17388 echo "$as_me:17388: result: $cf_cv_func_openpty" >&5
17389 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17390
17391 if test "$cf_cv_func_openpty" != no ; then
17392     cat >>confdefs.h <<EOF
17393 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17394 EOF
17395
17396     cat >>confdefs.h <<\EOF
17397 #define USE_XTERM_PTY 1
17398 EOF
17399
17400     if test "$cf_cv_lib_util" = yes ; then
17401         TEST_LIBS="-lutil $TEST_LIBS"
17402     fi
17403 fi
17404
17405 if test "$with_hashed_db" != no ; then
17406         cat >>confdefs.h <<\EOF
17407 #define USE_HASHED_DB 1
17408 EOF
17409
17410 case $with_hashed_db in #(vi
17411 yes|*able*) #(vi
17412     ;;
17413 *)
17414     if test -d "$with_hashed_db" ; then
17415
17416 if test -n "$with_hashed_db/include" ; then
17417   for cf_add_incdir in $with_hashed_db/include
17418   do
17419         while test $cf_add_incdir != /usr/include
17420         do
17421           if test -d $cf_add_incdir
17422           then
17423                 cf_have_incdir=no
17424                 if test -n "$CFLAGS$CPPFLAGS" ; then
17425                   # a loop is needed to ensure we can add subdirs of existing dirs
17426                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17427                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17428                           cf_have_incdir=yes; break
17429                         fi
17430                   done
17431                 fi
17432
17433                 if test "$cf_have_incdir" = no ; then
17434                   if test "$cf_add_incdir" = /usr/local/include ; then
17435                         if test "$GCC" = yes
17436                         then
17437                           cf_save_CPPFLAGS=$CPPFLAGS
17438                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17439                           cat >conftest.$ac_ext <<_ACEOF
17440 #line 17440 "configure"
17441 #include "confdefs.h"
17442 #include <stdio.h>
17443 int
17444 main ()
17445 {
17446 printf("Hello")
17447   ;
17448   return 0;
17449 }
17450 _ACEOF
17451 rm -f conftest.$ac_objext
17452 if { (eval echo "$as_me:17452: \"$ac_compile\"") >&5
17453   (eval $ac_compile) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); } &&
17457          { ac_try='test -s conftest.$ac_objext'
17458   { (eval echo "$as_me:17458: \"$ac_try\"") >&5
17459   (eval $ac_try) 2>&5
17460   ac_status=$?
17461   echo "$as_me:17461: \$? = $ac_status" >&5
17462   (exit $ac_status); }; }; then
17463   :
17464 else
17465   echo "$as_me: failed program was:" >&5
17466 cat conftest.$ac_ext >&5
17467 cf_have_incdir=yes
17468 fi
17469 rm -f conftest.$ac_objext conftest.$ac_ext
17470                           CPPFLAGS=$cf_save_CPPFLAGS
17471                         fi
17472                   fi
17473                 fi
17474
17475                 if test "$cf_have_incdir" = no ; then
17476                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17477
17478 echo "${as_me:-configure}:17478: testing adding $cf_add_incdir to include-path ..." 1>&5
17479
17480                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17481
17482                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17483                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17484                   cf_add_incdir="$cf_top_incdir"
17485                 else
17486                   break
17487                 fi
17488           fi
17489         done
17490   done
17491 fi
17492
17493 if test -n "$with_hashed_db/lib" ; then
17494   for cf_add_libdir in $with_hashed_db/lib
17495   do
17496     if test $cf_add_libdir = /usr/lib ; then
17497       :
17498     elif test -d $cf_add_libdir
17499     then
17500       cf_have_libdir=no
17501       if test -n "$LDFLAGS$LIBS" ; then
17502         # a loop is needed to ensure we can add subdirs of existing dirs
17503         for cf_test_libdir in $LDFLAGS $LIBS ; do
17504           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17505             cf_have_libdir=yes; break
17506           fi
17507         done
17508       fi
17509       if test "$cf_have_libdir" = no ; then
17510         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17511
17512 echo "${as_me:-configure}:17512: testing adding $cf_add_libdir to library-path ..." 1>&5
17513
17514         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17515       fi
17516     fi
17517   done
17518 fi
17519
17520     fi
17521 esac
17522
17523 echo "$as_me:17523: checking for db.h" >&5
17524 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17525 if test "${ac_cv_header_db_h+set}" = set; then
17526   echo $ECHO_N "(cached) $ECHO_C" >&6
17527 else
17528   cat >conftest.$ac_ext <<_ACEOF
17529 #line 17529 "configure"
17530 #include "confdefs.h"
17531 #include <db.h>
17532 _ACEOF
17533 if { (eval echo "$as_me:17533: \"$ac_cpp conftest.$ac_ext\"") >&5
17534   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17535   ac_status=$?
17536   egrep -v '^ *\+' conftest.er1 >conftest.err
17537   rm -f conftest.er1
17538   cat conftest.err >&5
17539   echo "$as_me:17539: \$? = $ac_status" >&5
17540   (exit $ac_status); } >/dev/null; then
17541   if test -s conftest.err; then
17542     ac_cpp_err=$ac_c_preproc_warn_flag
17543   else
17544     ac_cpp_err=
17545   fi
17546 else
17547   ac_cpp_err=yes
17548 fi
17549 if test -z "$ac_cpp_err"; then
17550   ac_cv_header_db_h=yes
17551 else
17552   echo "$as_me: failed program was:" >&5
17553   cat conftest.$ac_ext >&5
17554   ac_cv_header_db_h=no
17555 fi
17556 rm -f conftest.err conftest.$ac_ext
17557 fi
17558 echo "$as_me:17558: result: $ac_cv_header_db_h" >&5
17559 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17560 if test $ac_cv_header_db_h = yes; then
17561
17562 echo "$as_me:17562: checking for version of db" >&5
17563 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17564 if test "${cf_cv_hashed_db_version+set}" = set; then
17565   echo $ECHO_N "(cached) $ECHO_C" >&6
17566 else
17567
17568 cf_cv_hashed_db_version=unknown
17569
17570 for cf_db_version in 1 2 3 4 5
17571 do
17572
17573 echo "${as_me:-configure}:17573: testing checking for db version $cf_db_version ..." 1>&5
17574
17575         cat >conftest.$ac_ext <<_ACEOF
17576 #line 17576 "configure"
17577 #include "confdefs.h"
17578
17579 $ac_includes_default
17580 #include <db.h>
17581
17582 #ifdef DB_VERSION_MAJOR
17583         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17584 #if $cf_db_version == DB_VERSION_MAJOR
17585         /* ok */
17586 #else
17587         make an error
17588 #endif
17589 #else
17590 #if $cf_db_version == 1
17591         /* ok: assuming this is DB 1.8.5 */
17592 #else
17593         make an error
17594 #endif
17595 #endif
17596
17597 int
17598 main ()
17599 {
17600 DBT *foo = 0
17601   ;
17602   return 0;
17603 }
17604 _ACEOF
17605 rm -f conftest.$ac_objext
17606 if { (eval echo "$as_me:17606: \"$ac_compile\"") >&5
17607   (eval $ac_compile) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); } &&
17611          { ac_try='test -s conftest.$ac_objext'
17612   { (eval echo "$as_me:17612: \"$ac_try\"") >&5
17613   (eval $ac_try) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); }; }; then
17617
17618         cf_cv_hashed_db_version=$cf_db_version
17619         break
17620
17621 else
17622   echo "$as_me: failed program was:" >&5
17623 cat conftest.$ac_ext >&5
17624 fi
17625 rm -f conftest.$ac_objext conftest.$ac_ext
17626 done
17627
17628 fi
17629 echo "$as_me:17629: result: $cf_cv_hashed_db_version" >&5
17630 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17631
17632 if test "$cf_cv_hashed_db_version" = unknown ; then
17633         { { echo "$as_me:17633: error: Cannot determine version of db" >&5
17634 echo "$as_me: error: Cannot determine version of db" >&2;}
17635    { (exit 1); exit 1; }; }
17636 else
17637
17638 echo "$as_me:17638: checking for db libraries" >&5
17639 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17640 if test "${cf_cv_hashed_db_libs+set}" = set; then
17641   echo $ECHO_N "(cached) $ECHO_C" >&6
17642 else
17643
17644 cf_cv_hashed_db_libs=unknown
17645 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17646 do
17647         cf_save_libs="$LIBS"
17648         if test -n "$cf_db_libs"; then
17649                 LIBS="-l$cf_db_libs $LIBS"
17650         fi
17651
17652 echo "${as_me:-configure}:17652: testing checking for library "$cf_db_libs" ..." 1>&5
17653
17654         cat >conftest.$ac_ext <<_ACEOF
17655 #line 17655 "configure"
17656 #include "confdefs.h"
17657
17658 $ac_includes_default
17659 #include <db.h>
17660
17661 int
17662 main ()
17663 {
17664
17665         char *path = "/tmp/foo";
17666 #ifdef DB_VERSION_MAJOR
17667 #if DB_VERSION_MAJOR >= 4
17668         DB *result = 0;
17669         db_create(&result, NULL, 0);
17670         result->open(result,
17671                 NULL,
17672                 path,
17673                 path,
17674                 DB_HASH,
17675                 DB_CREATE,
17676                 0644);
17677 #elif DB_VERSION_MAJOR >= 3
17678         DB *result = 0;
17679         db_create(&result, NULL, 0);
17680         result->open(result,
17681                 path,
17682                 path,
17683                 DB_HASH,
17684                 DB_CREATE,
17685                 0644);
17686 #elif DB_VERSION_MAJOR >= 2
17687         DB *result = 0;
17688         db_open(path,
17689                 DB_HASH,
17690                 DB_CREATE,
17691                 0644,
17692                 (DB_ENV *) 0,
17693                 (DB_INFO *) 0,
17694                 &result);
17695 #endif /* DB_VERSION_MAJOR */
17696 #else
17697         DB *result = dbopen(path,
17698                      2,
17699                      0644,
17700                      DB_HASH,
17701                      0);
17702 #endif
17703         ${cf_cv_main_return:-return}(result != 0)
17704
17705   ;
17706   return 0;
17707 }
17708 _ACEOF
17709 rm -f conftest.$ac_objext conftest$ac_exeext
17710 if { (eval echo "$as_me:17710: \"$ac_link\"") >&5
17711   (eval $ac_link) 2>&5
17712   ac_status=$?
17713   echo "$as_me:17713: \$? = $ac_status" >&5
17714   (exit $ac_status); } &&
17715          { ac_try='test -s conftest$ac_exeext'
17716   { (eval echo "$as_me:17716: \"$ac_try\"") >&5
17717   (eval $ac_try) 2>&5
17718   ac_status=$?
17719   echo "$as_me:17719: \$? = $ac_status" >&5
17720   (exit $ac_status); }; }; then
17721
17722         if test -n "$cf_db_libs" ; then
17723                 cf_cv_hashed_db_libs=$cf_db_libs
17724         else
17725                 cf_cv_hashed_db_libs=default
17726         fi
17727         LIBS="$cf_save_libs"
17728         break
17729
17730 else
17731   echo "$as_me: failed program was:" >&5
17732 cat conftest.$ac_ext >&5
17733 fi
17734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17735         LIBS="$cf_save_libs"
17736 done
17737
17738 fi
17739 echo "$as_me:17739: result: $cf_cv_hashed_db_libs" >&5
17740 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17741
17742         if test "$cf_cv_hashed_db_libs" = unknown ; then
17743                 { { echo "$as_me:17743: error: Cannot determine library for db" >&5
17744 echo "$as_me: error: Cannot determine library for db" >&2;}
17745    { (exit 1); exit 1; }; }
17746         elif test "$cf_cv_hashed_db_libs" != default ; then
17747                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17748         fi
17749 fi
17750
17751 else
17752
17753         { { echo "$as_me:17753: error: Cannot find db.h" >&5
17754 echo "$as_me: error: Cannot find db.h" >&2;}
17755    { (exit 1); exit 1; }; }
17756
17757 fi
17758
17759 fi
17760
17761 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17762         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17763         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17764 fi
17765
17766 # Just in case, check if the C compiler has a bool type.
17767
17768 echo "$as_me:17768: checking if we should include stdbool.h" >&5
17769 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17770
17771 if test "${cf_cv_header_stdbool_h+set}" = set; then
17772   echo $ECHO_N "(cached) $ECHO_C" >&6
17773 else
17774
17775         cat >conftest.$ac_ext <<_ACEOF
17776 #line 17776 "configure"
17777 #include "confdefs.h"
17778
17779 int
17780 main ()
17781 {
17782 bool foo = false
17783   ;
17784   return 0;
17785 }
17786 _ACEOF
17787 rm -f conftest.$ac_objext
17788 if { (eval echo "$as_me:17788: \"$ac_compile\"") >&5
17789   (eval $ac_compile) 2>&5
17790   ac_status=$?
17791   echo "$as_me:17791: \$? = $ac_status" >&5
17792   (exit $ac_status); } &&
17793          { ac_try='test -s conftest.$ac_objext'
17794   { (eval echo "$as_me:17794: \"$ac_try\"") >&5
17795   (eval $ac_try) 2>&5
17796   ac_status=$?
17797   echo "$as_me:17797: \$? = $ac_status" >&5
17798   (exit $ac_status); }; }; then
17799   cf_cv_header_stdbool_h=0
17800 else
17801   echo "$as_me: failed program was:" >&5
17802 cat conftest.$ac_ext >&5
17803 cat >conftest.$ac_ext <<_ACEOF
17804 #line 17804 "configure"
17805 #include "confdefs.h"
17806
17807 #ifndef __BEOS__
17808 #include <stdbool.h>
17809 #endif
17810
17811 int
17812 main ()
17813 {
17814 bool foo = false
17815   ;
17816   return 0;
17817 }
17818 _ACEOF
17819 rm -f conftest.$ac_objext
17820 if { (eval echo "$as_me:17820: \"$ac_compile\"") >&5
17821   (eval $ac_compile) 2>&5
17822   ac_status=$?
17823   echo "$as_me:17823: \$? = $ac_status" >&5
17824   (exit $ac_status); } &&
17825          { ac_try='test -s conftest.$ac_objext'
17826   { (eval echo "$as_me:17826: \"$ac_try\"") >&5
17827   (eval $ac_try) 2>&5
17828   ac_status=$?
17829   echo "$as_me:17829: \$? = $ac_status" >&5
17830   (exit $ac_status); }; }; then
17831   cf_cv_header_stdbool_h=1
17832 else
17833   echo "$as_me: failed program was:" >&5
17834 cat conftest.$ac_ext >&5
17835 cf_cv_header_stdbool_h=0
17836 fi
17837 rm -f conftest.$ac_objext conftest.$ac_ext
17838 fi
17839 rm -f conftest.$ac_objext conftest.$ac_ext
17840 fi
17841
17842 if test "$cf_cv_header_stdbool_h" = 1
17843 then    echo "$as_me:17843: result: yes" >&5
17844 echo "${ECHO_T}yes" >&6
17845 else    echo "$as_me:17845: result: no" >&5
17846 echo "${ECHO_T}no" >&6
17847 fi
17848
17849 echo "$as_me:17849: checking for builtin bool type" >&5
17850 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17851
17852 if test "${cf_cv_cc_bool_type+set}" = set; then
17853   echo $ECHO_N "(cached) $ECHO_C" >&6
17854 else
17855
17856         cat >conftest.$ac_ext <<_ACEOF
17857 #line 17857 "configure"
17858 #include "confdefs.h"
17859
17860 #include <stdio.h>
17861 #include <sys/types.h>
17862
17863 int
17864 main ()
17865 {
17866 bool x = false
17867   ;
17868   return 0;
17869 }
17870 _ACEOF
17871 rm -f conftest.$ac_objext
17872 if { (eval echo "$as_me:17872: \"$ac_compile\"") >&5
17873   (eval $ac_compile) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit $ac_status); } &&
17877          { ac_try='test -s conftest.$ac_objext'
17878   { (eval echo "$as_me:17878: \"$ac_try\"") >&5
17879   (eval $ac_try) 2>&5
17880   ac_status=$?
17881   echo "$as_me:17881: \$? = $ac_status" >&5
17882   (exit $ac_status); }; }; then
17883   cf_cv_cc_bool_type=1
17884 else
17885   echo "$as_me: failed program was:" >&5
17886 cat conftest.$ac_ext >&5
17887 cf_cv_cc_bool_type=0
17888 fi
17889 rm -f conftest.$ac_objext conftest.$ac_ext
17890
17891 fi
17892
17893 if test "$cf_cv_cc_bool_type" = 1
17894 then    echo "$as_me:17894: result: yes" >&5
17895 echo "${ECHO_T}yes" >&6
17896 else    echo "$as_me:17896: result: no" >&5
17897 echo "${ECHO_T}no" >&6
17898 fi
17899
17900 # Check for C++ compiler characteristics (and ensure that it's there!)
17901 if test -n "$CXX" ; then
17902         ac_ext=cc
17903 ac_cpp='$CXXCPP $CPPFLAGS'
17904 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17905 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17906 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17907 ac_main_return=return
17908
17909 if test -n "$GXX" ; then
17910 case $cf_cv_system_name in #(vi
17911 os2*) #(vi
17912         cf_stdcpp_libname=stdcpp
17913         ;;
17914 *)
17915         cf_stdcpp_libname=stdc++
17916         ;;
17917 esac
17918 echo "$as_me:17918: checking for library $cf_stdcpp_libname" >&5
17919 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17920 if test "${cf_cv_libstdcpp+set}" = set; then
17921   echo $ECHO_N "(cached) $ECHO_C" >&6
17922 else
17923
17924         cf_save="$LIBS"
17925         LIBS="-l$cf_stdcpp_libname $LIBS"
17926 cat >conftest.$ac_ext <<_ACEOF
17927 #line 17927 "configure"
17928 #include "confdefs.h"
17929
17930 #include <strstream.h>
17931 int
17932 main ()
17933 {
17934
17935 char buf[80];
17936 strstreambuf foo(buf, sizeof(buf))
17937
17938   ;
17939   return 0;
17940 }
17941 _ACEOF
17942 rm -f conftest.$ac_objext conftest$ac_exeext
17943 if { (eval echo "$as_me:17943: \"$ac_link\"") >&5
17944   (eval $ac_link) 2>&5
17945   ac_status=$?
17946   echo "$as_me:17946: \$? = $ac_status" >&5
17947   (exit $ac_status); } &&
17948          { ac_try='test -s conftest$ac_exeext'
17949   { (eval echo "$as_me:17949: \"$ac_try\"") >&5
17950   (eval $ac_try) 2>&5
17951   ac_status=$?
17952   echo "$as_me:17952: \$? = $ac_status" >&5
17953   (exit $ac_status); }; }; then
17954   cf_cv_libstdcpp=yes
17955 else
17956   echo "$as_me: failed program was:" >&5
17957 cat conftest.$ac_ext >&5
17958 cf_cv_libstdcpp=no
17959 fi
17960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17961         LIBS="$cf_save"
17962
17963 fi
17964 echo "$as_me:17964: result: $cf_cv_libstdcpp" >&5
17965 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17966 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17967 fi
17968
17969         echo "$as_me:17969: checking whether $CXX understands -c and -o together" >&5
17970 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17971 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17972   echo $ECHO_N "(cached) $ECHO_C" >&6
17973 else
17974
17975 cat > conftest.$ac_ext <<CF_EOF
17976 #include <stdio.h>
17977 int main()
17978 {
17979         ${cf_cv_main_return:-return}(0);
17980 }
17981 CF_EOF
17982 # We do the test twice because some compilers refuse to overwrite an
17983 # existing .o file with -o, though they will create one.
17984 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17985 if { (eval echo "$as_me:17985: \"$ac_try\"") >&5
17986   (eval $ac_try) 2>&5
17987   ac_status=$?
17988   echo "$as_me:17988: \$? = $ac_status" >&5
17989   (exit $ac_status); } &&
17990   test -f conftest2.$ac_objext && { (eval echo "$as_me:17990: \"$ac_try\"") >&5
17991   (eval $ac_try) 2>&5
17992   ac_status=$?
17993   echo "$as_me:17993: \$? = $ac_status" >&5
17994   (exit $ac_status); };
17995 then
17996   eval cf_cv_prog_CXX_c_o=yes
17997 else
17998   eval cf_cv_prog_CXX_c_o=no
17999 fi
18000 rm -rf conftest*
18001
18002 fi
18003 if test $cf_cv_prog_CXX_c_o = yes; then
18004   echo "$as_me:18004: result: yes" >&5
18005 echo "${ECHO_T}yes" >&6
18006 else
18007   echo "$as_me:18007: result: no" >&5
18008 echo "${ECHO_T}no" >&6
18009 fi
18010
18011         case $GXX_VERSION in
18012         1*|2.0-6*)
18013                 cf_cxx_library=yes
18014                 ;;
18015         *-2.7*|2.7*)
18016
18017 cf_cxx_library=unknown
18018 case $cf_cv_system_name in #(vi
18019 os2*) #(vi
18020         cf_gpp_libname=gpp
18021         ;;
18022 *)
18023         cf_gpp_libname=g++
18024         ;;
18025 esac
18026 if test "$GXX" = yes; then
18027         echo "$as_me:18027: checking for lib$cf_gpp_libname" >&5
18028 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18029         cf_save="$LIBS"
18030         LIBS="-l$cf_gpp_libname $LIBS"
18031         cat >conftest.$ac_ext <<_ACEOF
18032 #line 18032 "configure"
18033 #include "confdefs.h"
18034
18035 #include <$cf_gpp_libname/builtin.h>
18036
18037 int
18038 main ()
18039 {
18040 two_arg_error_handler_t foo2 = lib_error_handler
18041   ;
18042   return 0;
18043 }
18044 _ACEOF
18045 rm -f conftest.$ac_objext conftest$ac_exeext
18046 if { (eval echo "$as_me:18046: \"$ac_link\"") >&5
18047   (eval $ac_link) 2>&5
18048   ac_status=$?
18049   echo "$as_me:18049: \$? = $ac_status" >&5
18050   (exit $ac_status); } &&
18051          { ac_try='test -s conftest$ac_exeext'
18052   { (eval echo "$as_me:18052: \"$ac_try\"") >&5
18053   (eval $ac_try) 2>&5
18054   ac_status=$?
18055   echo "$as_me:18055: \$? = $ac_status" >&5
18056   (exit $ac_status); }; }; then
18057   cf_cxx_library=yes
18058          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18059          if test "$cf_gpp_libname" = cpp ; then
18060             cat >>confdefs.h <<\EOF
18061 #define HAVE_GPP_BUILTIN_H 1
18062 EOF
18063
18064          else
18065             cat >>confdefs.h <<\EOF
18066 #define HAVE_GXX_BUILTIN_H 1
18067 EOF
18068
18069          fi
18070 else
18071   echo "$as_me: failed program was:" >&5
18072 cat conftest.$ac_ext >&5
18073 cat >conftest.$ac_ext <<_ACEOF
18074 #line 18074 "configure"
18075 #include "confdefs.h"
18076
18077 #include <builtin.h>
18078
18079 int
18080 main ()
18081 {
18082 two_arg_error_handler_t foo2 = lib_error_handler
18083   ;
18084   return 0;
18085 }
18086 _ACEOF
18087 rm -f conftest.$ac_objext conftest$ac_exeext
18088 if { (eval echo "$as_me:18088: \"$ac_link\"") >&5
18089   (eval $ac_link) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); } &&
18093          { ac_try='test -s conftest$ac_exeext'
18094   { (eval echo "$as_me:18094: \"$ac_try\"") >&5
18095   (eval $ac_try) 2>&5
18096   ac_status=$?
18097   echo "$as_me:18097: \$? = $ac_status" >&5
18098   (exit $ac_status); }; }; then
18099   cf_cxx_library=yes
18100          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18101          cat >>confdefs.h <<\EOF
18102 #define HAVE_BUILTIN_H 1
18103 EOF
18104
18105 else
18106   echo "$as_me: failed program was:" >&5
18107 cat conftest.$ac_ext >&5
18108 cf_cxx_library=no
18109 fi
18110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18111 fi
18112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18113         LIBS="$cf_save"
18114         echo "$as_me:18114: result: $cf_cxx_library" >&5
18115 echo "${ECHO_T}$cf_cxx_library" >&6
18116 fi
18117
18118                 ;;
18119         *)
18120                 cf_cxx_library=no
18121                 ;;
18122         esac
18123
18124         ac_ext=cc
18125 ac_cpp='$CXXCPP $CPPFLAGS'
18126 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18127 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18128 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18129 ac_main_return=return
18130 echo "$as_me:18130: checking how to run the C++ preprocessor" >&5
18131 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18132 if test -z "$CXXCPP"; then
18133   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18134   echo $ECHO_N "(cached) $ECHO_C" >&6
18135 else
18136       # Double quotes because CXXCPP needs to be expanded
18137     for CXXCPP in "$CXX -E" "/lib/cpp"
18138     do
18139       ac_preproc_ok=false
18140 for ac_cxx_preproc_warn_flag in '' yes
18141 do
18142   # Use a header file that comes with gcc, so configuring glibc
18143   # with a fresh cross-compiler works.
18144   # On the NeXT, cc -E runs the code through the compiler's parser,
18145   # not just through cpp. "Syntax error" is here to catch this case.
18146   cat >conftest.$ac_ext <<_ACEOF
18147 #line 18147 "configure"
18148 #include "confdefs.h"
18149 #include <assert.h>
18150                      Syntax error
18151 _ACEOF
18152 if { (eval echo "$as_me:18152: \"$ac_cpp conftest.$ac_ext\"") >&5
18153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18154   ac_status=$?
18155   egrep -v '^ *\+' conftest.er1 >conftest.err
18156   rm -f conftest.er1
18157   cat conftest.err >&5
18158   echo "$as_me:18158: \$? = $ac_status" >&5
18159   (exit $ac_status); } >/dev/null; then
18160   if test -s conftest.err; then
18161     ac_cpp_err=$ac_cxx_preproc_warn_flag
18162   else
18163     ac_cpp_err=
18164   fi
18165 else
18166   ac_cpp_err=yes
18167 fi
18168 if test -z "$ac_cpp_err"; then
18169   :
18170 else
18171   echo "$as_me: failed program was:" >&5
18172   cat conftest.$ac_ext >&5
18173   # Broken: fails on valid input.
18174 continue
18175 fi
18176 rm -f conftest.err conftest.$ac_ext
18177
18178   # OK, works on sane cases.  Now check whether non-existent headers
18179   # can be detected and how.
18180   cat >conftest.$ac_ext <<_ACEOF
18181 #line 18181 "configure"
18182 #include "confdefs.h"
18183 #include <ac_nonexistent.h>
18184 _ACEOF
18185 if { (eval echo "$as_me:18185: \"$ac_cpp conftest.$ac_ext\"") >&5
18186   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18187   ac_status=$?
18188   egrep -v '^ *\+' conftest.er1 >conftest.err
18189   rm -f conftest.er1
18190   cat conftest.err >&5
18191   echo "$as_me:18191: \$? = $ac_status" >&5
18192   (exit $ac_status); } >/dev/null; then
18193   if test -s conftest.err; then
18194     ac_cpp_err=$ac_cxx_preproc_warn_flag
18195   else
18196     ac_cpp_err=
18197   fi
18198 else
18199   ac_cpp_err=yes
18200 fi
18201 if test -z "$ac_cpp_err"; then
18202   # Broken: success on invalid input.
18203 continue
18204 else
18205   echo "$as_me: failed program was:" >&5
18206   cat conftest.$ac_ext >&5
18207   # Passes both tests.
18208 ac_preproc_ok=:
18209 break
18210 fi
18211 rm -f conftest.err conftest.$ac_ext
18212
18213 done
18214 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18215 rm -f conftest.err conftest.$ac_ext
18216 if $ac_preproc_ok; then
18217   break
18218 fi
18219
18220     done
18221     ac_cv_prog_CXXCPP=$CXXCPP
18222
18223 fi
18224   CXXCPP=$ac_cv_prog_CXXCPP
18225 else
18226   ac_cv_prog_CXXCPP=$CXXCPP
18227 fi
18228 echo "$as_me:18228: result: $CXXCPP" >&5
18229 echo "${ECHO_T}$CXXCPP" >&6
18230 ac_preproc_ok=false
18231 for ac_cxx_preproc_warn_flag in '' yes
18232 do
18233   # Use a header file that comes with gcc, so configuring glibc
18234   # with a fresh cross-compiler works.
18235   # On the NeXT, cc -E runs the code through the compiler's parser,
18236   # not just through cpp. "Syntax error" is here to catch this case.
18237   cat >conftest.$ac_ext <<_ACEOF
18238 #line 18238 "configure"
18239 #include "confdefs.h"
18240 #include <assert.h>
18241                      Syntax error
18242 _ACEOF
18243 if { (eval echo "$as_me:18243: \"$ac_cpp conftest.$ac_ext\"") >&5
18244   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18245   ac_status=$?
18246   egrep -v '^ *\+' conftest.er1 >conftest.err
18247   rm -f conftest.er1
18248   cat conftest.err >&5
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit $ac_status); } >/dev/null; then
18251   if test -s conftest.err; then
18252     ac_cpp_err=$ac_cxx_preproc_warn_flag
18253   else
18254     ac_cpp_err=
18255   fi
18256 else
18257   ac_cpp_err=yes
18258 fi
18259 if test -z "$ac_cpp_err"; then
18260   :
18261 else
18262   echo "$as_me: failed program was:" >&5
18263   cat conftest.$ac_ext >&5
18264   # Broken: fails on valid input.
18265 continue
18266 fi
18267 rm -f conftest.err conftest.$ac_ext
18268
18269   # OK, works on sane cases.  Now check whether non-existent headers
18270   # can be detected and how.
18271   cat >conftest.$ac_ext <<_ACEOF
18272 #line 18272 "configure"
18273 #include "confdefs.h"
18274 #include <ac_nonexistent.h>
18275 _ACEOF
18276 if { (eval echo "$as_me:18276: \"$ac_cpp conftest.$ac_ext\"") >&5
18277   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18278   ac_status=$?
18279   egrep -v '^ *\+' conftest.er1 >conftest.err
18280   rm -f conftest.er1
18281   cat conftest.err >&5
18282   echo "$as_me:18282: \$? = $ac_status" >&5
18283   (exit $ac_status); } >/dev/null; then
18284   if test -s conftest.err; then
18285     ac_cpp_err=$ac_cxx_preproc_warn_flag
18286   else
18287     ac_cpp_err=
18288   fi
18289 else
18290   ac_cpp_err=yes
18291 fi
18292 if test -z "$ac_cpp_err"; then
18293   # Broken: success on invalid input.
18294 continue
18295 else
18296   echo "$as_me: failed program was:" >&5
18297   cat conftest.$ac_ext >&5
18298   # Passes both tests.
18299 ac_preproc_ok=:
18300 break
18301 fi
18302 rm -f conftest.err conftest.$ac_ext
18303
18304 done
18305 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18306 rm -f conftest.err conftest.$ac_ext
18307 if $ac_preproc_ok; then
18308   :
18309 else
18310   { { echo "$as_me:18310: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18311 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18312    { (exit 1); exit 1; }; }
18313 fi
18314
18315 ac_ext=cc
18316 ac_cpp='$CXXCPP $CPPFLAGS'
18317 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18318 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18319 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18320 ac_main_return=return
18321
18322 for ac_header in typeinfo
18323 do
18324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18325 echo "$as_me:18325: checking for $ac_header" >&5
18326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18328   echo $ECHO_N "(cached) $ECHO_C" >&6
18329 else
18330   cat >conftest.$ac_ext <<_ACEOF
18331 #line 18331 "configure"
18332 #include "confdefs.h"
18333 #include <$ac_header>
18334 _ACEOF
18335 if { (eval echo "$as_me:18335: \"$ac_cpp conftest.$ac_ext\"") >&5
18336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18337   ac_status=$?
18338   egrep -v '^ *\+' conftest.er1 >conftest.err
18339   rm -f conftest.er1
18340   cat conftest.err >&5
18341   echo "$as_me:18341: \$? = $ac_status" >&5
18342   (exit $ac_status); } >/dev/null; then
18343   if test -s conftest.err; then
18344     ac_cpp_err=$ac_cxx_preproc_warn_flag
18345   else
18346     ac_cpp_err=
18347   fi
18348 else
18349   ac_cpp_err=yes
18350 fi
18351 if test -z "$ac_cpp_err"; then
18352   eval "$as_ac_Header=yes"
18353 else
18354   echo "$as_me: failed program was:" >&5
18355   cat conftest.$ac_ext >&5
18356   eval "$as_ac_Header=no"
18357 fi
18358 rm -f conftest.err conftest.$ac_ext
18359 fi
18360 echo "$as_me:18360: result: `eval echo '${'$as_ac_Header'}'`" >&5
18361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18363   cat >>confdefs.h <<EOF
18364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18365 EOF
18366
18367 fi
18368 done
18369
18370 for ac_header in iostream
18371 do
18372 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18373 echo "$as_me:18373: checking for $ac_header" >&5
18374 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18375 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18376   echo $ECHO_N "(cached) $ECHO_C" >&6
18377 else
18378   cat >conftest.$ac_ext <<_ACEOF
18379 #line 18379 "configure"
18380 #include "confdefs.h"
18381 #include <$ac_header>
18382 _ACEOF
18383 if { (eval echo "$as_me:18383: \"$ac_cpp conftest.$ac_ext\"") >&5
18384   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18385   ac_status=$?
18386   egrep -v '^ *\+' conftest.er1 >conftest.err
18387   rm -f conftest.er1
18388   cat conftest.err >&5
18389   echo "$as_me:18389: \$? = $ac_status" >&5
18390   (exit $ac_status); } >/dev/null; then
18391   if test -s conftest.err; then
18392     ac_cpp_err=$ac_cxx_preproc_warn_flag
18393   else
18394     ac_cpp_err=
18395   fi
18396 else
18397   ac_cpp_err=yes
18398 fi
18399 if test -z "$ac_cpp_err"; then
18400   eval "$as_ac_Header=yes"
18401 else
18402   echo "$as_me: failed program was:" >&5
18403   cat conftest.$ac_ext >&5
18404   eval "$as_ac_Header=no"
18405 fi
18406 rm -f conftest.err conftest.$ac_ext
18407 fi
18408 echo "$as_me:18408: result: `eval echo '${'$as_ac_Header'}'`" >&5
18409 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18410 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18411   cat >>confdefs.h <<EOF
18412 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18413 EOF
18414
18415 fi
18416 done
18417
18418 if test x"$ac_cv_header_iostream" = xyes ; then
18419         echo "$as_me:18419: checking if iostream uses std-namespace" >&5
18420 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18421         cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424
18425 #include <iostream>
18426 using std::endl;
18427 using std::cerr;
18428 int
18429 main ()
18430 {
18431
18432 cerr << "testing" << endl;
18433
18434   ;
18435   return 0;
18436 }
18437 _ACEOF
18438 rm -f conftest.$ac_objext
18439 if { (eval echo "$as_me:18439: \"$ac_compile\"") >&5
18440   (eval $ac_compile) 2>&5
18441   ac_status=$?
18442   echo "$as_me:18442: \$? = $ac_status" >&5
18443   (exit $ac_status); } &&
18444          { ac_try='test -s conftest.$ac_objext'
18445   { (eval echo "$as_me:18445: \"$ac_try\"") >&5
18446   (eval $ac_try) 2>&5
18447   ac_status=$?
18448   echo "$as_me:18448: \$? = $ac_status" >&5
18449   (exit $ac_status); }; }; then
18450   cf_iostream_namespace=yes
18451 else
18452   echo "$as_me: failed program was:" >&5
18453 cat conftest.$ac_ext >&5
18454 cf_iostream_namespace=no
18455 fi
18456 rm -f conftest.$ac_objext conftest.$ac_ext
18457         echo "$as_me:18457: result: $cf_iostream_namespace" >&5
18458 echo "${ECHO_T}$cf_iostream_namespace" >&6
18459         if test "$cf_iostream_namespace" = yes ; then
18460                 cat >>confdefs.h <<\EOF
18461 #define IOSTREAM_NAMESPACE 1
18462 EOF
18463
18464         fi
18465 fi
18466
18467 echo "$as_me:18467: checking if we should include stdbool.h" >&5
18468 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18469
18470 if test "${cf_cv_header_stdbool_h+set}" = set; then
18471   echo $ECHO_N "(cached) $ECHO_C" >&6
18472 else
18473
18474         cat >conftest.$ac_ext <<_ACEOF
18475 #line 18475 "configure"
18476 #include "confdefs.h"
18477
18478 int
18479 main ()
18480 {
18481 bool foo = false
18482   ;
18483   return 0;
18484 }
18485 _ACEOF
18486 rm -f conftest.$ac_objext
18487 if { (eval echo "$as_me:18487: \"$ac_compile\"") >&5
18488   (eval $ac_compile) 2>&5
18489   ac_status=$?
18490   echo "$as_me:18490: \$? = $ac_status" >&5
18491   (exit $ac_status); } &&
18492          { ac_try='test -s conftest.$ac_objext'
18493   { (eval echo "$as_me:18493: \"$ac_try\"") >&5
18494   (eval $ac_try) 2>&5
18495   ac_status=$?
18496   echo "$as_me:18496: \$? = $ac_status" >&5
18497   (exit $ac_status); }; }; then
18498   cf_cv_header_stdbool_h=0
18499 else
18500   echo "$as_me: failed program was:" >&5
18501 cat conftest.$ac_ext >&5
18502 cat >conftest.$ac_ext <<_ACEOF
18503 #line 18503 "configure"
18504 #include "confdefs.h"
18505
18506 #ifndef __BEOS__
18507 #include <stdbool.h>
18508 #endif
18509
18510 int
18511 main ()
18512 {
18513 bool foo = false
18514   ;
18515   return 0;
18516 }
18517 _ACEOF
18518 rm -f conftest.$ac_objext
18519 if { (eval echo "$as_me:18519: \"$ac_compile\"") >&5
18520   (eval $ac_compile) 2>&5
18521   ac_status=$?
18522   echo "$as_me:18522: \$? = $ac_status" >&5
18523   (exit $ac_status); } &&
18524          { ac_try='test -s conftest.$ac_objext'
18525   { (eval echo "$as_me:18525: \"$ac_try\"") >&5
18526   (eval $ac_try) 2>&5
18527   ac_status=$?
18528   echo "$as_me:18528: \$? = $ac_status" >&5
18529   (exit $ac_status); }; }; then
18530   cf_cv_header_stdbool_h=1
18531 else
18532   echo "$as_me: failed program was:" >&5
18533 cat conftest.$ac_ext >&5
18534 cf_cv_header_stdbool_h=0
18535 fi
18536 rm -f conftest.$ac_objext conftest.$ac_ext
18537 fi
18538 rm -f conftest.$ac_objext conftest.$ac_ext
18539 fi
18540
18541 if test "$cf_cv_header_stdbool_h" = 1
18542 then    echo "$as_me:18542: result: yes" >&5
18543 echo "${ECHO_T}yes" >&6
18544 else    echo "$as_me:18544: result: no" >&5
18545 echo "${ECHO_T}no" >&6
18546 fi
18547
18548 echo "$as_me:18548: checking for builtin bool type" >&5
18549 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18550
18551 if test "${cf_cv_builtin_bool+set}" = set; then
18552   echo $ECHO_N "(cached) $ECHO_C" >&6
18553 else
18554
18555         cat >conftest.$ac_ext <<_ACEOF
18556 #line 18556 "configure"
18557 #include "confdefs.h"
18558
18559 #include <stdio.h>
18560 #include <sys/types.h>
18561
18562 int
18563 main ()
18564 {
18565 bool x = false
18566   ;
18567   return 0;
18568 }
18569 _ACEOF
18570 rm -f conftest.$ac_objext
18571 if { (eval echo "$as_me:18571: \"$ac_compile\"") >&5
18572   (eval $ac_compile) 2>&5
18573   ac_status=$?
18574   echo "$as_me:18574: \$? = $ac_status" >&5
18575   (exit $ac_status); } &&
18576          { ac_try='test -s conftest.$ac_objext'
18577   { (eval echo "$as_me:18577: \"$ac_try\"") >&5
18578   (eval $ac_try) 2>&5
18579   ac_status=$?
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); }; }; then
18582   cf_cv_builtin_bool=1
18583 else
18584   echo "$as_me: failed program was:" >&5
18585 cat conftest.$ac_ext >&5
18586 cf_cv_builtin_bool=0
18587 fi
18588 rm -f conftest.$ac_objext conftest.$ac_ext
18589
18590 fi
18591
18592 if test "$cf_cv_builtin_bool" = 1
18593 then    echo "$as_me:18593: result: yes" >&5
18594 echo "${ECHO_T}yes" >&6
18595 else    echo "$as_me:18595: result: no" >&5
18596 echo "${ECHO_T}no" >&6
18597 fi
18598
18599 echo "$as_me:18599: checking for size of bool" >&5
18600 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18601 if test "${cf_cv_type_of_bool+set}" = set; then
18602   echo $ECHO_N "(cached) $ECHO_C" >&6
18603 else
18604
18605         rm -f cf_test.out
18606         if test "$cross_compiling" = yes; then
18607   cf_cv_type_of_bool=unknown
18608 else
18609   cat >conftest.$ac_ext <<_ACEOF
18610 #line 18610 "configure"
18611 #include "confdefs.h"
18612
18613 #include <stdlib.h>
18614 #include <stdio.h>
18615
18616 #if defined(__cplusplus)
18617
18618 #ifdef HAVE_GXX_BUILTIN_H
18619 #include <g++/builtin.h>
18620 #elif HAVE_GPP_BUILTIN_H
18621 #include <gpp/builtin.h>
18622 #elif HAVE_BUILTIN_H
18623 #include <builtin.h>
18624 #endif
18625
18626 #else
18627
18628 #if $cf_cv_header_stdbool_h
18629 #include <stdbool.h>
18630 #endif
18631
18632 #endif
18633
18634 main()
18635 {
18636         FILE *fp = fopen("cf_test.out", "w");
18637         if (fp != 0) {
18638                 bool x = true;
18639                 if ((bool)(-x) >= 0)
18640                         fputs("unsigned ", fp);
18641                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18642                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18643                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18644                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18645                 fclose(fp);
18646         }
18647         ${cf_cv_main_return:-return}(0);
18648 }
18649
18650 _ACEOF
18651 rm -f conftest$ac_exeext
18652 if { (eval echo "$as_me:18652: \"$ac_link\"") >&5
18653   (eval $ac_link) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18657   { (eval echo "$as_me:18657: \"$ac_try\"") >&5
18658   (eval $ac_try) 2>&5
18659   ac_status=$?
18660   echo "$as_me:18660: \$? = $ac_status" >&5
18661   (exit $ac_status); }; }; then
18662   cf_cv_type_of_bool=`cat cf_test.out`
18663                  if test -z "$cf_cv_type_of_bool"; then
18664                    cf_cv_type_of_bool=unknown
18665                  fi
18666 else
18667   echo "$as_me: program exited with status $ac_status" >&5
18668 echo "$as_me: failed program was:" >&5
18669 cat conftest.$ac_ext >&5
18670 cf_cv_type_of_bool=unknown
18671 fi
18672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18673 fi
18674
18675 fi
18676
18677         rm -f cf_test.out
18678 echo "$as_me:18678: result: $cf_cv_type_of_bool" >&5
18679 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18680 if test "$cf_cv_type_of_bool" = unknown ; then
18681         case .$NCURSES_BOOL in #(vi
18682         .auto|.) NCURSES_BOOL=unsigned;;
18683         esac
18684         { echo "$as_me:18684: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18685 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18686         cf_cv_type_of_bool=$NCURSES_BOOL
18687 fi
18688
18689 echo "$as_me:18689: checking for special defines needed for etip.h" >&5
18690 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18691 cf_save_CXXFLAGS="$CXXFLAGS"
18692 cf_result="none"
18693
18694 # etip.h includes ncurses.h which includes ncurses_dll.h
18695 # But ncurses_dll.h is generated - fix here.
18696 test -d include || mkdir include
18697 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' ${srcdir}/include/ncurses_dll.h.in >include/ncurses_dll.h
18698
18699 for cf_math in "" MATH_H
18700 do
18701 for cf_excp in "" MATH_EXCEPTION
18702 do
18703         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18704         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18705         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18706 cat >conftest.$ac_ext <<_ACEOF
18707 #line 18707 "configure"
18708 #include "confdefs.h"
18709
18710 #include <etip.h.in>
18711
18712 int
18713 main ()
18714 {
18715
18716   ;
18717   return 0;
18718 }
18719 _ACEOF
18720 rm -f conftest.$ac_objext
18721 if { (eval echo "$as_me:18721: \"$ac_compile\"") >&5
18722   (eval $ac_compile) 2>&5
18723   ac_status=$?
18724   echo "$as_me:18724: \$? = $ac_status" >&5
18725   (exit $ac_status); } &&
18726          { ac_try='test -s conftest.$ac_objext'
18727   { (eval echo "$as_me:18727: \"$ac_try\"") >&5
18728   (eval $ac_try) 2>&5
18729   ac_status=$?
18730   echo "$as_me:18730: \$? = $ac_status" >&5
18731   (exit $ac_status); }; }; then
18732
18733         test -n "$cf_math" && cat >>confdefs.h <<EOF
18734 #define ETIP_NEEDS_${cf_math} 1
18735 EOF
18736
18737         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18738 #define ETIP_NEEDS_${cf_excp} 1
18739 EOF
18740
18741         cf_result="$cf_math $cf_excp"
18742         break
18743
18744 else
18745   echo "$as_me: failed program was:" >&5
18746 cat conftest.$ac_ext >&5
18747 fi
18748 rm -f conftest.$ac_objext conftest.$ac_ext
18749 done
18750 done
18751 echo "$as_me:18751: result: $cf_result" >&5
18752 echo "${ECHO_T}$cf_result" >&6
18753 CXXFLAGS="$cf_save_CXXFLAGS"
18754
18755 if test -n "$CXX"; then
18756 echo "$as_me:18756: checking if $CXX accepts parameter initialization" >&5
18757 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18758 if test "${cf_cv_cpp_param_init+set}" = set; then
18759   echo $ECHO_N "(cached) $ECHO_C" >&6
18760 else
18761
18762         ac_ext=cc
18763 ac_cpp='$CXXCPP $CPPFLAGS'
18764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18767 ac_main_return=return
18768
18769         if test "$cross_compiling" = yes; then
18770   cf_cv_cpp_param_init=unknown
18771 else
18772   cat >conftest.$ac_ext <<_ACEOF
18773 #line 18773 "configure"
18774 #include "confdefs.h"
18775
18776 class TEST {
18777 private:
18778         int value;
18779 public:
18780         TEST(int x = 1);
18781         ~TEST();
18782 };
18783
18784 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18785 {
18786         value = x;
18787 }
18788 int main() { }
18789
18790 _ACEOF
18791 rm -f conftest$ac_exeext
18792 if { (eval echo "$as_me:18792: \"$ac_link\"") >&5
18793   (eval $ac_link) 2>&5
18794   ac_status=$?
18795   echo "$as_me:18795: \$? = $ac_status" >&5
18796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18797   { (eval echo "$as_me:18797: \"$ac_try\"") >&5
18798   (eval $ac_try) 2>&5
18799   ac_status=$?
18800   echo "$as_me:18800: \$? = $ac_status" >&5
18801   (exit $ac_status); }; }; then
18802   cf_cv_cpp_param_init=yes
18803 else
18804   echo "$as_me: program exited with status $ac_status" >&5
18805 echo "$as_me: failed program was:" >&5
18806 cat conftest.$ac_ext >&5
18807 cf_cv_cpp_param_init=no
18808 fi
18809 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18810 fi
18811         ac_ext=cc
18812 ac_cpp='$CXXCPP $CPPFLAGS'
18813 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18814 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18815 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18816 ac_main_return=return
18817
18818 fi
18819 echo "$as_me:18819: result: $cf_cv_cpp_param_init" >&5
18820 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18821 fi
18822 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18823 #define CPP_HAS_PARAM_INIT 1
18824 EOF
18825
18826 if test -n "$CXX"; then
18827
18828 echo "$as_me:18828: checking if $CXX accepts static_cast" >&5
18829 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18830 if test "${cf_cv_cpp_static_cast+set}" = set; then
18831   echo $ECHO_N "(cached) $ECHO_C" >&6
18832 else
18833
18834         ac_ext=cc
18835 ac_cpp='$CXXCPP $CPPFLAGS'
18836 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18837 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18838 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18839 ac_main_return=return
18840
18841         cat >conftest.$ac_ext <<_ACEOF
18842 #line 18842 "configure"
18843 #include "confdefs.h"
18844
18845 class NCursesPanel
18846 {
18847 public:
18848   NCursesPanel(int nlines,
18849                int ncols,
18850                int begin_y = 0,
18851                int begin_x = 0)
18852   {
18853   }
18854
18855   ~NCursesPanel();
18856 };
18857
18858 template<class T> class NCursesUserPanel : public NCursesPanel
18859 {
18860 public:
18861   NCursesUserPanel (int nlines,
18862                     int ncols,
18863                     int begin_y = 0,
18864                     int begin_x = 0,
18865                     const T* p_UserData = static_cast<T*>(0))
18866     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18867   {
18868   };
18869   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18870   {
18871   };
18872
18873   virtual ~NCursesUserPanel() {};
18874 };
18875
18876 int
18877 main ()
18878 {
18879
18880         const char* p_UserData = static_cast<char*>(0)
18881   ;
18882   return 0;
18883 }
18884 _ACEOF
18885 rm -f conftest.$ac_objext
18886 if { (eval echo "$as_me:18886: \"$ac_compile\"") >&5
18887   (eval $ac_compile) 2>&5
18888   ac_status=$?
18889   echo "$as_me:18889: \$? = $ac_status" >&5
18890   (exit $ac_status); } &&
18891          { ac_try='test -s conftest.$ac_objext'
18892   { (eval echo "$as_me:18892: \"$ac_try\"") >&5
18893   (eval $ac_try) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit $ac_status); }; }; then
18897   cf_cv_cpp_static_cast=yes
18898 else
18899   echo "$as_me: failed program was:" >&5
18900 cat conftest.$ac_ext >&5
18901 cf_cv_cpp_static_cast=no
18902 fi
18903 rm -f conftest.$ac_objext conftest.$ac_ext
18904
18905         ac_ext=cc
18906 ac_cpp='$CXXCPP $CPPFLAGS'
18907 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18908 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18909 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18910 ac_main_return=return
18911
18912 fi
18913 echo "$as_me:18913: result: $cf_cv_cpp_static_cast" >&5
18914 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18915
18916 fi
18917
18918 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18919 #define CPP_HAS_STATIC_CAST 1
18920 EOF
18921
18922         CXX_AR='$(AR)'
18923         CXX_ARFLAGS='$(ARFLAGS)'
18924         case $cf_cv_system_name in #(vi
18925         irix*) #(vi
18926             if test "$GXX" != yes ; then
18927                 CXX_AR='$(CXX)'
18928                 CXX_ARFLAGS='-ar -o'
18929             fi
18930             ;;
18931         sco3.2v5*) #(vi
18932             CXXLDFLAGS="-u main"
18933             ;;
18934         solaris2*)
18935             if test "$GXX" != yes ; then
18936                 CXX_AR='$(CXX)'
18937                 CXX_ARFLAGS='-xar -o'
18938             fi
18939             ;;
18940         esac
18941
18942 else
18943         cf_cxx_library=no
18944         cf_cv_builtin_bool=1
18945
18946         # Just because we are not configuring against C++ right now does not
18947         # mean that a user will not want to use C++.  Some distributors disable
18948         # the C++ portion of this configuration as a shortcut (or just to avoid
18949         # compiling the demo in the c++ directory).  So we need a reasonable
18950         # default for the 'bool' type.
18951         #
18952         # Caveat: since the storage of the bool type is not standardized, it
18953         # may change.
18954
18955         if test "$NCURSES_BOOL" != auto ; then
18956                 cf_cv_type_of_bool=$NCURSES_BOOL
18957                 cf_cv_header_stdbool_h=0
18958         else
18959                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18960
18961 echo "$as_me:18961: checking for size of bool" >&5
18962 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18963 if test "${cf_cv_type_of_bool+set}" = set; then
18964   echo $ECHO_N "(cached) $ECHO_C" >&6
18965 else
18966
18967         rm -f cf_test.out
18968         if test "$cross_compiling" = yes; then
18969   cf_cv_type_of_bool=unknown
18970 else
18971   cat >conftest.$ac_ext <<_ACEOF
18972 #line 18972 "configure"
18973 #include "confdefs.h"
18974
18975 #include <stdlib.h>
18976 #include <stdio.h>
18977
18978 #if defined(__cplusplus)
18979
18980 #ifdef HAVE_GXX_BUILTIN_H
18981 #include <g++/builtin.h>
18982 #elif HAVE_GPP_BUILTIN_H
18983 #include <gpp/builtin.h>
18984 #elif HAVE_BUILTIN_H
18985 #include <builtin.h>
18986 #endif
18987
18988 #else
18989
18990 #if $cf_cv_header_stdbool_h
18991 #include <stdbool.h>
18992 #endif
18993
18994 #endif
18995
18996 main()
18997 {
18998         FILE *fp = fopen("cf_test.out", "w");
18999         if (fp != 0) {
19000                 bool x = true;
19001                 if ((bool)(-x) >= 0)
19002                         fputs("unsigned ", fp);
19003                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19004                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19005                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19006                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19007                 fclose(fp);
19008         }
19009         ${cf_cv_main_return:-return}(0);
19010 }
19011
19012 _ACEOF
19013 rm -f conftest$ac_exeext
19014 if { (eval echo "$as_me:19014: \"$ac_link\"") >&5
19015   (eval $ac_link) 2>&5
19016   ac_status=$?
19017   echo "$as_me:19017: \$? = $ac_status" >&5
19018   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19019   { (eval echo "$as_me:19019: \"$ac_try\"") >&5
19020   (eval $ac_try) 2>&5
19021   ac_status=$?
19022   echo "$as_me:19022: \$? = $ac_status" >&5
19023   (exit $ac_status); }; }; then
19024   cf_cv_type_of_bool=`cat cf_test.out`
19025                  if test -z "$cf_cv_type_of_bool"; then
19026                    cf_cv_type_of_bool=unknown
19027                  fi
19028 else
19029   echo "$as_me: program exited with status $ac_status" >&5
19030 echo "$as_me: failed program was:" >&5
19031 cat conftest.$ac_ext >&5
19032 cf_cv_type_of_bool=unknown
19033 fi
19034 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19035 fi
19036
19037 fi
19038
19039         rm -f cf_test.out
19040 echo "$as_me:19040: result: $cf_cv_type_of_bool" >&5
19041 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19042 if test "$cf_cv_type_of_bool" = unknown ; then
19043         case .$NCURSES_BOOL in #(vi
19044         .auto|.) NCURSES_BOOL=unsigned;;
19045         esac
19046         { echo "$as_me:19046: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19047 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19048         cf_cv_type_of_bool=$NCURSES_BOOL
19049 fi
19050
19051                 else
19052                         echo "$as_me:19052: checking for fallback type of bool" >&5
19053 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19054                         case "$host_cpu" in #(vi
19055                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19056                         *)      cf_cv_type_of_bool=int  ;;
19057                         esac
19058                         echo "$as_me:19058: result: $cf_cv_type_of_bool" >&5
19059 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19060                 fi
19061         fi
19062 fi
19063
19064 # If the C compiler did not declare bool, and we did not determine that the C++
19065 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19066 # ncurses library use the same type as C++ bool.  Note that this allows one to
19067 # specify the type of bool in a configure-script option and postpone
19068 # integration with the C++ compiler provided that the types are compatible.
19069 USE_CXX_BOOL=1
19070 if test $cf_cv_cc_bool_type = 1
19071 then
19072         # oops: C has a bool.  Unlikely, but C++ could differ.
19073         USE_CXX_BOOL=0
19074 elif test $cf_cv_builtin_bool = 0
19075 then
19076         # C++ has no bool
19077         USE_CXX_BOOL=0
19078 else
19079         # this is the normal case
19080         USE_CXX_BOOL='defined(__cplusplus)'
19081 fi
19082
19083 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19084
19085         if test "$cf_with_ada" != "no" ; then
19086                 if test "$with_libtool" != "no"; then
19087                         { echo "$as_me:19087: WARNING: libtool does not support Ada - disabling feature" >&5
19088 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19089                         cf_with_ada=no
19090                 fi
19091         fi
19092
19093         if test "$cf_with_ada" != "no" ; then
19094
19095 cf_ada_make=gnatmake
19096 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19097 set dummy $cf_ada_make; ac_word=$2
19098 echo "$as_me:19098: checking for $ac_word" >&5
19099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19100 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19101   echo $ECHO_N "(cached) $ECHO_C" >&6
19102 else
19103   if test -n "$gnat_exists"; then
19104   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19105 else
19106   ac_save_IFS=$IFS; IFS=$ac_path_separator
19107 ac_dummy="$PATH"
19108 for ac_dir in $ac_dummy; do
19109   IFS=$ac_save_IFS
19110   test -z "$ac_dir" && ac_dir=.
19111   $as_executable_p "$ac_dir/$ac_word" || continue
19112 ac_cv_prog_gnat_exists="yes"
19113 echo "$as_me:19113: found $ac_dir/$ac_word" >&5
19114 break
19115 done
19116
19117   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19118 fi
19119 fi
19120 gnat_exists=$ac_cv_prog_gnat_exists
19121 if test -n "$gnat_exists"; then
19122   echo "$as_me:19122: result: $gnat_exists" >&5
19123 echo "${ECHO_T}$gnat_exists" >&6
19124 else
19125   echo "$as_me:19125: result: no" >&5
19126 echo "${ECHO_T}no" >&6
19127 fi
19128
19129 if test "$ac_cv_prog_gnat_exists" = no; then
19130    cf_ada_make=
19131    cf_cv_prog_gnat_correct=no
19132 else
19133
19134 echo "$as_me:19134: checking for gnat version" >&5
19135 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19136 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19137         grep '[0-9].[0-9][0-9]*' |\
19138     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19139 echo "$as_me:19139: result: $cf_gnat_version" >&5
19140 echo "${ECHO_T}$cf_gnat_version" >&6
19141
19142 case $cf_gnat_version in #(vi
19143 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19144         cf_cv_prog_gnat_correct=yes
19145         ;;
19146 *)
19147         { echo "$as_me:19147: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19148 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19149         cf_cv_prog_gnat_correct=no
19150         ;;
19151 esac
19152
19153    # Extract the first word of "m4", so it can be a program name with args.
19154 set dummy m4; ac_word=$2
19155 echo "$as_me:19155: checking for $ac_word" >&5
19156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19157 if test "${ac_cv_prog_M4_exists+set}" = set; then
19158   echo $ECHO_N "(cached) $ECHO_C" >&6
19159 else
19160   if test -n "$M4_exists"; then
19161   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19162 else
19163   ac_save_IFS=$IFS; IFS=$ac_path_separator
19164 ac_dummy="$PATH"
19165 for ac_dir in $ac_dummy; do
19166   IFS=$ac_save_IFS
19167   test -z "$ac_dir" && ac_dir=.
19168   $as_executable_p "$ac_dir/$ac_word" || continue
19169 ac_cv_prog_M4_exists="yes"
19170 echo "$as_me:19170: found $ac_dir/$ac_word" >&5
19171 break
19172 done
19173
19174   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19175 fi
19176 fi
19177 M4_exists=$ac_cv_prog_M4_exists
19178 if test -n "$M4_exists"; then
19179   echo "$as_me:19179: result: $M4_exists" >&5
19180 echo "${ECHO_T}$M4_exists" >&6
19181 else
19182   echo "$as_me:19182: result: no" >&5
19183 echo "${ECHO_T}no" >&6
19184 fi
19185
19186    if test "$ac_cv_prog_M4_exists" = no; then
19187       cf_cv_prog_gnat_correct=no
19188       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19189    fi
19190    if test "$cf_cv_prog_gnat_correct" = yes; then
19191       echo "$as_me:19191: checking if GNAT works" >&5
19192 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19193
19194 rm -rf conftest* *~conftest*
19195 cat >>conftest.ads <<CF_EOF
19196 procedure conftest;
19197 CF_EOF
19198 cat >>conftest.adb <<CF_EOF
19199 with Text_IO;
19200 with GNAT.OS_Lib;
19201 procedure conftest is
19202 begin
19203    Text_IO.Put ("Hello World");
19204    Text_IO.New_Line;
19205    GNAT.OS_Lib.OS_Exit (0);
19206 end conftest;
19207 CF_EOF
19208 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19209    if ( ./conftest 1>&5 2>&1 ) ; then
19210       cf_cv_prog_gnat_correct=yes
19211    else
19212       cf_cv_prog_gnat_correct=no
19213    fi
19214 else
19215    cf_cv_prog_gnat_correct=no
19216 fi
19217 rm -rf conftest* *~conftest*
19218
19219       echo "$as_me:19219: result: $cf_cv_prog_gnat_correct" >&5
19220 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19221    fi
19222 fi
19223
19224                 if test "$cf_cv_prog_gnat_correct" = yes; then
19225
19226         ADAFLAGS="$ADAFLAGS -gnatpn"
19227
19228                         # make ADAFLAGS consistent with CFLAGS
19229                         case "$CFLAGS" in
19230                         *-g*)
19231
19232         ADAFLAGS="$ADAFLAGS -g"
19233
19234                                 ;;
19235                         esac
19236                         case "$CFLAGS" in
19237                         *-O*)
19238
19239         ADAFLAGS="$ADAFLAGS -O3"
19240
19241                                 ;;
19242                         esac
19243
19244 echo "$as_me:19244: checking if GNAT supports generics" >&5
19245 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19246 case $cf_gnat_version in #(vi
19247 3.[1-9]*|[4-9].*) #(vi
19248         cf_gnat_generics=yes
19249         ;;
19250 *)
19251         cf_gnat_generics=no
19252         ;;
19253 esac
19254 echo "$as_me:19254: result: $cf_gnat_generics" >&5
19255 echo "${ECHO_T}$cf_gnat_generics" >&6
19256
19257 if test "$cf_gnat_generics" = yes
19258 then
19259         cf_compile_generics=generics
19260         cf_generic_objects="\${GENOBJS}"
19261 else
19262         cf_compile_generics=
19263         cf_generic_objects=
19264 fi
19265
19266 echo "$as_me:19266: checking if GNAT supports SIGINT" >&5
19267 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19268 if test "${cf_cv_gnat_sigint+set}" = set; then
19269   echo $ECHO_N "(cached) $ECHO_C" >&6
19270 else
19271
19272 rm -rf conftest* *~conftest*
19273 cat >>conftest.ads <<CF_EOF
19274 with Ada.Interrupts.Names;
19275
19276 package ConfTest is
19277
19278    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19279    pragma Unreserve_All_Interrupts;
19280    pragma Warnings (On);
19281
19282    protected Process is
19283       procedure Stop;
19284       function Continue return Boolean;
19285       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19286    private
19287       Done : Boolean := False;
19288    end Process;
19289
19290 end ConfTest;
19291 CF_EOF
19292 cat >>conftest.adb <<CF_EOF
19293 package body ConfTest is
19294    protected body Process is
19295       procedure Stop is
19296       begin
19297          Done := True;
19298       end Stop;
19299       function Continue return Boolean is
19300       begin
19301          return not Done;
19302       end Continue;
19303    end Process;
19304 end ConfTest;
19305 CF_EOF
19306 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19307       cf_cv_gnat_sigint=yes
19308 else
19309    cf_cv_gnat_sigint=no
19310 fi
19311 rm -rf conftest* *~conftest*
19312
19313 fi
19314 echo "$as_me:19314: result: $cf_cv_gnat_sigint" >&5
19315 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19316
19317 if test $cf_cv_gnat_sigint = yes ; then
19318         USE_GNAT_SIGINT=""
19319 else
19320         USE_GNAT_SIGINT="#"
19321 fi
19322
19323 echo "$as_me:19323: checking if GNAT pragma Unreferenced works" >&5
19324 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19325 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19326   echo $ECHO_N "(cached) $ECHO_C" >&6
19327 else
19328
19329 rm -rf conftest* *~conftest*
19330 cat >>conftest.ads <<CF_EOF
19331 procedure conftest;
19332 CF_EOF
19333 cat >>conftest.adb <<CF_EOF
19334 with Text_IO;
19335 with GNAT.OS_Lib;
19336 procedure conftest is
19337    test : Integer;
19338    pragma Unreferenced (test);
19339 begin
19340    test := 1;
19341    Text_IO.Put ("Hello World");
19342    Text_IO.New_Line;
19343    GNAT.OS_Lib.OS_Exit (0);
19344 end conftest;
19345 CF_EOF
19346 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19347       cf_cv_pragma_unreferenced=yes
19348 else
19349    cf_cv_pragma_unreferenced=no
19350 fi
19351 rm -rf conftest* *~conftest*
19352
19353 fi
19354 echo "$as_me:19354: result: $cf_cv_pragma_unreferenced" >&5
19355 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19356
19357 # if the pragma is supported, use it (needed in the Trace code).
19358 if test $cf_cv_pragma_unreferenced = yes ; then
19359         PRAGMA_UNREF=TRUE
19360 else
19361         PRAGMA_UNREF=FALSE
19362 fi
19363
19364 cf_gnat_libraries=no
19365 cf_gnat_projects=no
19366
19367 echo "$as_me:19367: checking if GNAT supports project files" >&5
19368 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19369 case $cf_gnat_version in #(vi
19370 3.[0-9]*) #(vi
19371         ;;
19372 *)
19373         case $cf_cv_system_name in #(vi
19374         cygwin*) #(vi
19375                 ;;
19376         *)
19377                 mkdir conftest.src conftest.bin conftest.lib
19378                 cd conftest.src
19379                 rm -rf conftest* *~conftest*
19380                 cat >>library.gpr <<CF_EOF
19381 project Library is
19382   Kind := External ("LIB_KIND");
19383   for Library_Name use "ConfTest";
19384   for Object_Dir use ".";
19385   for Library_ALI_Dir use External("LIBRARY_DIR");
19386   for Library_Version use External ("SONAME");
19387   for Library_Kind use Kind;
19388   for Library_Dir use External("BUILD_DIR");
19389   Source_Dir := External ("SOURCE_DIR");
19390   for Source_Dirs use (Source_Dir);
19391   package Compiler is
19392      for Default_Switches ("Ada") use
19393        ("-g",
19394         "-O2",
19395         "-gnatafno",
19396         "-gnatVa",   -- All validity checks
19397         "-gnatwa");  -- Activate all optional errors
19398   end Compiler;
19399 end Library;
19400 CF_EOF
19401                 cat >>confpackage.ads <<CF_EOF
19402 package ConfPackage is
19403    procedure conftest;
19404 end ConfPackage;
19405 CF_EOF
19406                 cat >>confpackage.adb <<CF_EOF
19407 with Text_IO;
19408 package body ConfPackage is
19409    procedure conftest is
19410    begin
19411       Text_IO.Put ("Hello World");
19412       Text_IO.New_Line;
19413    end conftest;
19414 end ConfPackage;
19415 CF_EOF
19416                 if ( $cf_ada_make $ADAFLAGS \
19417                                 -Plibrary.gpr \
19418                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19419                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19420                                 -XSOURCE_DIR=`pwd` \
19421                                 -XSONAME=libConfTest.so.1 \
19422                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19423                         cf_gnat_projects=yes
19424                 fi
19425                 cd ..
19426                 if test -f conftest.lib/confpackage.ali
19427                 then
19428                         cf_gnat_libraries=yes
19429                 fi
19430                 rm -rf conftest* *~conftest*
19431                 ;;
19432         esac
19433         ;;
19434 esac
19435 echo "$as_me:19435: result: $cf_gnat_projects" >&5
19436 echo "${ECHO_T}$cf_gnat_projects" >&6
19437
19438 if test $cf_gnat_projects = yes
19439 then
19440         echo "$as_me:19440: checking if GNAT supports libraries" >&5
19441 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19442         echo "$as_me:19442: result: $cf_gnat_libraries" >&5
19443 echo "${ECHO_T}$cf_gnat_libraries" >&6
19444 fi
19445
19446 if test "$cf_gnat_projects" = yes
19447 then
19448         USE_OLD_MAKERULES="#"
19449         USE_GNAT_PROJECTS=""
19450 else
19451         USE_OLD_MAKERULES=""
19452         USE_GNAT_PROJECTS="#"
19453 fi
19454
19455 if test "$cf_gnat_libraries" = yes
19456 then
19457         USE_GNAT_LIBRARIES=""
19458 else
19459         USE_GNAT_LIBRARIES="#"
19460 fi
19461
19462 echo "$as_me:19462: checking for ada-compiler" >&5
19463 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19464
19465 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19466 if test "${with_ada_compiler+set}" = set; then
19467   withval="$with_ada_compiler"
19468   cf_ada_compiler=$withval
19469 else
19470   cf_ada_compiler=gnatmake
19471 fi;
19472
19473 echo "$as_me:19473: result: $cf_ada_compiler" >&5
19474 echo "${ECHO_T}$cf_ada_compiler" >&6
19475
19476                         cf_ada_package=terminal_interface
19477
19478 echo "$as_me:19478: checking for ada-include" >&5
19479 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19480
19481 # Check whether --with-ada-include or --without-ada-include was given.
19482 if test "${with_ada_include+set}" = set; then
19483   withval="$with_ada_include"
19484
19485 else
19486   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19487 fi; if test -n "$prefix/share/ada/adainclude" ; then
19488
19489 if test "x$prefix" != xNONE; then
19490   cf_path_syntax="$prefix"
19491 else
19492   cf_path_syntax="$ac_default_prefix"
19493 fi
19494
19495 case ".$withval" in #(vi
19496 .\$\(*\)*|.\'*\'*) #(vi
19497   ;;
19498 ..|./*|.\\*) #(vi
19499   ;;
19500 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19501   ;;
19502 .\${*prefix}*) #(vi
19503   eval withval="$withval"
19504   case ".$withval" in #(vi
19505   .NONE/*)
19506     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19507     ;;
19508   esac
19509   ;; #(vi
19510 .no|.NONE/*)
19511   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19512   ;;
19513 *)
19514   { { echo "$as_me:19514: error: expected a pathname, not \"$withval\"" >&5
19515 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19516    { (exit 1); exit 1; }; }
19517   ;;
19518 esac
19519
19520 fi
19521 ADA_INCLUDE="$withval"
19522
19523 echo "$as_me:19523: result: $ADA_INCLUDE" >&5
19524 echo "${ECHO_T}$ADA_INCLUDE" >&6
19525
19526 echo "$as_me:19526: checking for ada-objects" >&5
19527 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19528
19529 # Check whether --with-ada-objects or --without-ada-objects was given.
19530 if test "${with_ada_objects+set}" = set; then
19531   withval="$with_ada_objects"
19532
19533 else
19534   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19535 fi; if test -n "$prefix/lib/ada/adalib" ; then
19536
19537 if test "x$prefix" != xNONE; then
19538   cf_path_syntax="$prefix"
19539 else
19540   cf_path_syntax="$ac_default_prefix"
19541 fi
19542
19543 case ".$withval" in #(vi
19544 .\$\(*\)*|.\'*\'*) #(vi
19545   ;;
19546 ..|./*|.\\*) #(vi
19547   ;;
19548 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19549   ;;
19550 .\${*prefix}*) #(vi
19551   eval withval="$withval"
19552   case ".$withval" in #(vi
19553   .NONE/*)
19554     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19555     ;;
19556   esac
19557   ;; #(vi
19558 .no|.NONE/*)
19559   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19560   ;;
19561 *)
19562   { { echo "$as_me:19562: error: expected a pathname, not \"$withval\"" >&5
19563 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19564    { (exit 1); exit 1; }; }
19565   ;;
19566 esac
19567
19568 fi
19569 ADA_OBJECTS="$withval"
19570
19571 echo "$as_me:19571: result: $ADA_OBJECTS" >&5
19572 echo "${ECHO_T}$ADA_OBJECTS" >&6
19573
19574 echo "$as_me:19574: checking if an Ada95 shared-library should be built" >&5
19575 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19576
19577 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19578 if test "${with_ada_sharedlib+set}" = set; then
19579   withval="$with_ada_sharedlib"
19580   with_ada_sharedlib=$withval
19581 else
19582   with_ada_sharedlib=no
19583 fi;
19584 echo "$as_me:19584: result: $with_ada_sharedlib" >&5
19585 echo "${ECHO_T}$with_ada_sharedlib" >&6
19586
19587 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19588 MAKE_ADA_SHAREDLIB="#"
19589
19590 if test "x$with_ada_sharedlib" != xno
19591 then
19592         MAKE_ADA_SHAREDLIB=
19593         if test "x$with_ada_sharedlib" != xyes
19594         then
19595                 ADA_SHAREDLIB="$with_ada_sharedlib"
19596         fi
19597 fi
19598
19599                 fi
19600         fi
19601 else
19602         cf_with_ada=no
19603 fi
19604
19605 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19606 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19607 ###
19608 ### ticlib modules may be a separate library, otherwise contained in termlib.
19609 ### termlib modules may be a separate library, otherwise contained in ncurses.
19610 ###
19611 ### The of "+" or " " between the tokens controls the way the script
19612 ### chooses to split module lists into libraries.
19613 ###
19614 ### (see CF_LIB_RULES).
19615 echo "$as_me:19615: checking for library subsets" >&5
19616 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19617 LIB_SUBSETS=
19618
19619 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19620         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19621         if test "$with_ticlib" != no ; then
19622                 LIB_SUBSETS="${LIB_SUBSETS} "
19623         else
19624                 LIB_SUBSETS="${LIB_SUBSETS}+"
19625         fi
19626 fi
19627
19628 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19629 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19630
19631 if test "$with_termlib" != no ; then
19632         LIB_SUBSETS="${LIB_SUBSETS} "
19633 else
19634         LIB_SUBSETS="${LIB_SUBSETS}+"
19635 fi
19636
19637 LIB_SUBSETS="${LIB_SUBSETS}base"
19638
19639 # Most term-driver calls are to tinfo, but some like init_pair are to the
19640 # base library (so it resides in base).
19641 if test "$with_term_driver" != no ; then
19642         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19643         case $cf_cv_system_name in #(vi
19644         *mingw32*) #(vi
19645                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19646                 ;;
19647         *) #(vi
19648                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19649                 ;;
19650         esac
19651 fi
19652
19653 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19654 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19655
19656 echo "$as_me:19656: result: $LIB_SUBSETS" >&5
19657 echo "${ECHO_T}$LIB_SUBSETS" >&6
19658
19659 ### Construct the list of include-directories to be generated
19660
19661 CPPFLAGS="$CPPFLAGS -I. -I../include"
19662 if test "$srcdir" != "."; then
19663         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19664 fi
19665 if test "$GCC" != yes; then
19666         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19667 elif test "$includedir" != "/usr/include"; then
19668         if test "$includedir" = '${prefix}/include' ; then
19669                 if test $prefix != /usr ; then
19670                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19671                 fi
19672         else
19673                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19674         fi
19675 fi
19676
19677 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19678 if test "$srcdir" != "."; then
19679         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19680 fi
19681 if test "$GCC" != yes; then
19682         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19683 elif test "$includedir" != "/usr/include"; then
19684         if test "$includedir" = '${prefix}/include' ; then
19685                 if test $prefix != /usr ; then
19686                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19687                 fi
19688         else
19689                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19690         fi
19691 fi
19692
19693 ### Build up pieces for makefile rules
19694 echo "$as_me:19694: checking default library suffix" >&5
19695 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19696
19697         case $DFT_LWR_MODEL in
19698         libtool) DFT_ARG_SUFFIX=''   ;;
19699         normal)  DFT_ARG_SUFFIX=''   ;;
19700         debug)   DFT_ARG_SUFFIX='_g' ;;
19701         profile) DFT_ARG_SUFFIX='_p' ;;
19702         shared)  DFT_ARG_SUFFIX=''   ;;
19703         esac
19704         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19705 echo "$as_me:19705: result: $DFT_ARG_SUFFIX" >&5
19706 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19707
19708 echo "$as_me:19708: checking default library-dependency suffix" >&5
19709 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19710
19711         case $DFT_LWR_MODEL in #(vi
19712         libtool) #(vi
19713                 DFT_LIB_SUFFIX='.la'
19714                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19715                 ;;
19716         normal) #(vi
19717                 DFT_LIB_SUFFIX='.a'
19718                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19719                 ;;
19720         debug) #(vi
19721                 DFT_LIB_SUFFIX='_g.a'
19722                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19723                 ;;
19724         profile) #(vi
19725                 DFT_LIB_SUFFIX='_p.a'
19726                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19727                 ;;
19728         shared) #(vi
19729                 case $cf_cv_system_name in
19730                 aix[5-7]*) #(vi
19731                         DFT_LIB_SUFFIX='.a'
19732                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19733                         ;;
19734                 cygwin*) #(vi
19735                         DFT_LIB_SUFFIX='.dll'
19736                         DFT_DEP_SUFFIX='.dll.a'
19737                         ;;
19738                 darwin*) #(vi
19739                         DFT_LIB_SUFFIX='.dylib'
19740                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19741                         ;;
19742                 hpux*) #(vi
19743                         case $target in
19744                         ia64*) #(vi
19745                                 DFT_LIB_SUFFIX='.so'
19746                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19747                                 ;;
19748                         *) #(vi
19749                                 DFT_LIB_SUFFIX='.sl'
19750                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19751                                 ;;
19752                         esac
19753                         ;;
19754                 *)      DFT_LIB_SUFFIX='.so'
19755                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19756                         ;;
19757                 esac
19758         esac
19759         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19760         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19761 echo "$as_me:19761: result: $DFT_DEP_SUFFIX" >&5
19762 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19763
19764 echo "$as_me:19764: checking default object directory" >&5
19765 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19766
19767         case $DFT_LWR_MODEL in
19768         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19769         normal)  DFT_OBJ_SUBDIR='objects' ;;
19770         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19771         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19772         shared)
19773                 case $cf_cv_system_name in #(vi
19774                 cygwin) #(vi
19775                         DFT_OBJ_SUBDIR='objects' ;;
19776                 *)
19777                         DFT_OBJ_SUBDIR='obj_s' ;;
19778                 esac
19779         esac
19780 echo "$as_me:19780: result: $DFT_OBJ_SUBDIR" >&5
19781 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19782
19783 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19784 if test "$cf_with_cxx" = yes ; then
19785 echo "$as_me:19785: checking c++ library-dependency suffix" >&5
19786 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19787 if test "$with_libtool" != "no"; then
19788         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19789 else
19790
19791         case normal in #(vi
19792         libtool) #(vi
19793                 CXX_LIB_SUFFIX='.la'
19794                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19795                 ;;
19796         normal) #(vi
19797                 CXX_LIB_SUFFIX='.a'
19798                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19799                 ;;
19800         debug) #(vi
19801                 CXX_LIB_SUFFIX='_g.a'
19802                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19803                 ;;
19804         profile) #(vi
19805                 CXX_LIB_SUFFIX='_p.a'
19806                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19807                 ;;
19808         shared) #(vi
19809                 case $cf_cv_system_name in
19810                 aix[5-7]*) #(vi
19811                         CXX_LIB_SUFFIX='.a'
19812                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19813                         ;;
19814                 cygwin*) #(vi
19815                         CXX_LIB_SUFFIX='.dll'
19816                         CXX_DEP_SUFFIX='.dll.a'
19817                         ;;
19818                 darwin*) #(vi
19819                         CXX_LIB_SUFFIX='.dylib'
19820                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19821                         ;;
19822                 hpux*) #(vi
19823                         case $target in
19824                         ia64*) #(vi
19825                                 CXX_LIB_SUFFIX='.so'
19826                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19827                                 ;;
19828                         *) #(vi
19829                                 CXX_LIB_SUFFIX='.sl'
19830                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19831                                 ;;
19832                         esac
19833                         ;;
19834                 *)      CXX_LIB_SUFFIX='.so'
19835                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19836                         ;;
19837                 esac
19838         esac
19839         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19840         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19841 fi
19842 echo "$as_me:19842: result: $CXX_LIB_SUFFIX" >&5
19843 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19844
19845 fi
19846
19847 # do not want -ldl in build except as needed for -lncurses dependency
19848 if test "$with_dlsym" = yes ; then
19849 if test $DFT_LWR_MODEL = shared || \
19850    test $DFT_LWR_MODEL = libtool ; then
19851
19852 # remove dl library from $LIBS
19853 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19854
19855 fi
19856 fi
19857 ### Set up low-level terminfo dependencies for makefiles.
19858
19859 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19860 # do not need libdl
19861 TICS_LIST=
19862 if test "$with_dlsym" = yes ; then
19863
19864 # remove dl library from $SHLIB_LIST
19865 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19866
19867 fi
19868
19869 if test "$with_ticlib" != no ; then
19870
19871         if test "$with_ticlib" != yes ; then
19872                 TICS_NAME=$with_ticlib
19873                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19874                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19875                 TICS_LIB_SUFFIX="${with_ticlib}"
19876         else
19877                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19878                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19879                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19880         fi
19881         TICS_LDFLAGS="-L${LIB_DIR}"
19882         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19883 else
19884         TICS_LDFLAGS="-L${LIB_DIR}"
19885         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19886 fi
19887
19888 if test "$with_termlib" != no ; then
19889
19890         if test "$with_termlib" != yes ; then
19891                 TINFO_NAME=$with_termlib
19892                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19893                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19894                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19895                 TINFO_LIB_SUFFIX="${with_termlib}"
19896         else
19897                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19898                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19899                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19900                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19901         fi
19902
19903         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19904         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19905         if test "$DFT_LWR_MODEL" = "libtool"; then
19906                 TEST_ARGS="${TEST_DEPS}"
19907                 TEST_ARG2="${TEST_DEP2}"
19908                 TINFO_LDFLAGS="-L${LIB_DIR}"
19909                 TINFO_LIBS="$TEST_ARGS"
19910                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19911                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19912         else
19913                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19914                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19915                 if test "x$with_term_driver" != xno ; then
19916                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19917                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19918                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19919                 else
19920                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19921                         TINFO_LIBS="$TEST_ARGS"
19922                 fi
19923                 TINFO_LDFLAGS="-L${LIB_DIR}"
19924                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19925         fi
19926 else
19927         # the next lines are needed for linking libtic over libncurses
19928         TINFO_NAME=${LIB_NAME}
19929         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19930         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19931         if test "$with_tic_depends" = yes ; then
19932                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19933         else
19934                 TICS_LIST="$SHLIB_LIST"
19935         fi
19936
19937         TINFO_LDFLAGS="-L${LIB_DIR}"
19938         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19939 fi
19940
19941 if test "$DFT_LWR_MODEL" = shared ; then
19942         case $cf_cv_system_name in #(vi
19943         cygwin*)
19944                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19945                 TINFO_SUFFIX=.dll
19946                 ;;
19947         esac
19948 fi
19949
19950 if test "$with_dlsym" = yes ; then
19951
19952 # remove dl library from $TICS_LIST
19953 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19954
19955 fi
19956
19957 if test "$DFT_LWR_MODEL" = "libtool"; then
19958     OBJEXT=lo
19959 fi
19960
19961 # needed for Ada95
19962 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19963
19964 case $DFT_LWR_MODEL in
19965 normal|debug|profile)
19966
19967 if test "$GCC" = yes ; then
19968         case $cf_cv_system_name in #(
19969         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19970                 LDFLAGS_STATIC=
19971                 LDFLAGS_SHARED=
19972                 ;;
19973     *)  #( normally, except when broken
19974         LDFLAGS_STATIC=-static
19975         LDFLAGS_SHARED=-dynamic
19976         ;;
19977     esac
19978 else
19979         case $cf_cv_system_name in #(
19980         aix[4-7]*)      #( from ld manpage
19981                 LDFLAGS_STATIC=-bstatic
19982                 LDFLAGS_SHARED=-bdynamic
19983                 ;;
19984         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19985                 # We could also use just "archive" and "shared".
19986                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19987                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19988                 ;;
19989         irix*)          #( from ld manpage IRIX64
19990                 LDFLAGS_STATIC=-Bstatic
19991                 LDFLAGS_SHARED=-Bdynamic
19992                 ;;
19993         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19994                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19995                 LDFLAGS_STATIC=-noso
19996                 LDFLAGS_SHARED=-so_archive
19997                 ;;
19998         solaris2*)
19999                 LDFLAGS_STATIC=-Bstatic
20000                 LDFLAGS_SHARED=-Bdynamic
20001                 ;;
20002         esac
20003 fi
20004
20005 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20006 then
20007         echo "$as_me:20007: checking if linker supports switching between static/dynamic" >&5
20008 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20009
20010         rm -f libconftest.a
20011         cat >conftest.$ac_ext <<EOF
20012 #line 20012 "configure"
20013 #include <stdio.h>
20014 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20015 EOF
20016         if { (eval echo "$as_me:20016: \"$ac_compile\"") >&5
20017   (eval $ac_compile) 2>&5
20018   ac_status=$?
20019   echo "$as_me:20019: \$? = $ac_status" >&5
20020   (exit $ac_status); } ; then
20021                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20022                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20023         fi
20024         rm -f conftest.*
20025
20026         cf_save_LIBS="$LIBS"
20027
20028         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20029         cat >conftest.$ac_ext <<_ACEOF
20030 #line 20030 "configure"
20031 #include "confdefs.h"
20032
20033 #line 20033 "configure"
20034 #include <stdio.h>
20035 int cf_ldflags_static(FILE *fp);
20036
20037 int
20038 main ()
20039 {
20040
20041         return cf_ldflags_static(stdin);
20042
20043   ;
20044   return 0;
20045 }
20046 _ACEOF
20047 rm -f conftest.$ac_objext conftest$ac_exeext
20048 if { (eval echo "$as_me:20048: \"$ac_link\"") >&5
20049   (eval $ac_link) 2>&5
20050   ac_status=$?
20051   echo "$as_me:20051: \$? = $ac_status" >&5
20052   (exit $ac_status); } &&
20053          { ac_try='test -s conftest$ac_exeext'
20054   { (eval echo "$as_me:20054: \"$ac_try\"") >&5
20055   (eval $ac_try) 2>&5
20056   ac_status=$?
20057   echo "$as_me:20057: \$? = $ac_status" >&5
20058   (exit $ac_status); }; }; then
20059
20060         # some linkers simply ignore the -dynamic
20061         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20062         *static*) # (vi
20063                 cf_ldflags_static=no
20064                 ;;
20065         *)
20066                 cf_ldflags_static=yes
20067                 ;;
20068         esac
20069
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 cat conftest.$ac_ext >&5
20073 cf_ldflags_static=no
20074 fi
20075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20076
20077         rm -f libconftest.*
20078         LIBS="$cf_save_LIBS"
20079
20080         echo "$as_me:20080: result: $cf_ldflags_static" >&5
20081 echo "${ECHO_T}$cf_ldflags_static" >&6
20082
20083         if test $cf_ldflags_static != yes
20084         then
20085                 LDFLAGS_STATIC=
20086                 LDFLAGS_SHARED=
20087         fi
20088 else
20089         LDFLAGS_STATIC=
20090         LDFLAGS_SHARED=
20091 fi
20092
20093         ;;
20094 esac
20095
20096 echo "$as_me:20096: checking where we will install curses.h" >&5
20097 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20098 test "$with_overwrite" = no && \
20099 test "x$includedir" = 'x${prefix}/include' && \
20100         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20101 echo "$as_me:20101: result: $includedir" >&5
20102 echo "${ECHO_T}$includedir" >&6
20103
20104 ### Resolve a conflict between normal and wide-curses by forcing applications
20105 ### that will need libutf8 to add it to their configure script.
20106 if test "$with_overwrite" != no ; then
20107 if test "$NCURSES_LIBUTF8" = 1 ; then
20108         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20109         { echo "$as_me:20109: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20110 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20111 fi
20112 fi
20113 WITH_OVERWRITE=$with_overwrite
20114
20115 # used to separate tack out of the tree
20116 NCURSES_TREE=
20117
20118 ### predefined stuff for the test programs
20119 cat >>confdefs.h <<\EOF
20120 #define HAVE_SLK_COLOR 1
20121 EOF
20122
20123 ### Construct the list of subdirectories for which we'll customize makefiles
20124 ### with the appropriate compile-rules.
20125
20126 echo "$as_me:20126: checking for src modules" >&5
20127 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20128
20129 # dependencies and linker-arguments for test-programs
20130 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20131 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20132 if test "$DFT_LWR_MODEL" = "libtool"; then
20133         TEST_ARGS="${TEST_DEPS}"
20134         TEST_ARG2="${TEST_DEP2}"
20135 else
20136         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20137         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20138 fi
20139
20140 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20141 cf_cv_src_modules=
20142 for cf_dir in $modules_to_build
20143 do
20144         if test -f $srcdir/$cf_dir/modules; then
20145
20146                 # We may/may not have tack in the distribution, though the
20147                 # makefile is.
20148                 if test $cf_dir = tack ; then
20149                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20150                                 continue
20151                         fi
20152                 fi
20153
20154                 if test -z "$cf_cv_src_modules"; then
20155                         cf_cv_src_modules=$cf_dir
20156                 else
20157                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20158                 fi
20159
20160                 # Make the ncurses_cfg.h file record the library interface files as
20161                 # well.  These are header files that are the same name as their
20162                 # directory.  Ncurses is the only library that does not follow
20163                 # that pattern.
20164                 if test $cf_dir = tack ; then
20165                         continue
20166                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20167
20168 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20169
20170                         cat >>confdefs.h <<EOF
20171 #define HAVE_${cf_have_include}_H 1
20172 EOF
20173
20174                         cat >>confdefs.h <<EOF
20175 #define HAVE_LIB${cf_have_include} 1
20176 EOF
20177
20178                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20179                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20180                         if test "$DFT_LWR_MODEL" = "libtool"; then
20181                                 TEST_ARGS="${TEST_DEPS}"
20182                                 TEST_ARG2="${TEST_DEP2}"
20183                         else
20184                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20185                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20186                         fi
20187                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20188                 fi
20189         fi
20190 done
20191 echo "$as_me:20191: result: $cf_cv_src_modules" >&5
20192 echo "${ECHO_T}$cf_cv_src_modules" >&6
20193
20194 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20195 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20196
20197 SRC_SUBDIRS=
20198 if test "x$cf_with_manpages" != xno ; then
20199         SRC_SUBDIRS="$SRC_SUBDIRS man"
20200 fi
20201 SRC_SUBDIRS="$SRC_SUBDIRS include"
20202 for cf_dir in $cf_cv_src_modules
20203 do
20204         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20205 done
20206 if test "x$cf_with_tests" != "xno" ; then
20207         SRC_SUBDIRS="$SRC_SUBDIRS test"
20208 fi
20209 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20210 if test "$cf_with_cxx_binding" != no; then
20211         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20212         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20213 fi
20214
20215 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20216 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20217
20218 ADA_SUBDIRS=
20219 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20220         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20221         ADA_SUBDIRS="gen src"
20222         if test "x$cf_with_tests" != "xno" ; then
20223                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20224         fi
20225 fi
20226
20227 SUB_MAKEFILES=
20228 for cf_dir in $SRC_SUBDIRS
20229 do
20230         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20231 done
20232
20233 if test -n "$ADA_SUBDIRS"; then
20234         for cf_dir in $ADA_SUBDIRS
20235         do
20236                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20237         done
20238
20239 fi
20240
20241 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20242    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20243    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20244 fi
20245
20246 DIRS_TO_MAKE="lib"
20247 for cf_item in $cf_list_models
20248 do
20249
20250         case $cf_item in
20251         libtool) cf_subdir='obj_lo'  ;;
20252         normal)  cf_subdir='objects' ;;
20253         debug)   cf_subdir='obj_g' ;;
20254         profile) cf_subdir='obj_p' ;;
20255         shared)
20256                 case $cf_cv_system_name in #(vi
20257                 cygwin) #(vi
20258                         cf_subdir='objects' ;;
20259                 *)
20260                         cf_subdir='obj_s' ;;
20261                 esac
20262         esac
20263
20264         for cf_item2 in $DIRS_TO_MAKE
20265         do
20266                 test $cf_item2 = $cf_subdir && break
20267         done
20268         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20269 done
20270 for cf_dir in $DIRS_TO_MAKE
20271 do
20272         test ! -d $cf_dir && mkdir $cf_dir
20273 done
20274
20275 # symbols that differ when compiling Ada95 by itself.
20276 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20277
20278 # values to use as strings
20279 cat >>confdefs.h <<EOF
20280 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20281 EOF
20282
20283 cat >>confdefs.h <<EOF
20284 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20285 EOF
20286
20287 ### Now that we're done running tests, add the compiler-warnings, if any
20288
20289 cf_fix_cppflags=no
20290 cf_new_cflags=
20291 cf_new_cppflags=
20292 cf_new_extra_cppflags=
20293
20294 for cf_add_cflags in $EXTRA_CFLAGS
20295 do
20296 case $cf_fix_cppflags in
20297 no)
20298         case $cf_add_cflags in #(vi
20299         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20300                 case $cf_add_cflags in
20301                 -D*)
20302                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20303
20304                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20305                                 && test -z "${cf_tst_cflags}" \
20306                                 && cf_fix_cppflags=yes
20307
20308                         if test $cf_fix_cppflags = yes ; then
20309                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20310                                 continue
20311                         elif test "${cf_tst_cflags}" = "\"'" ; then
20312                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20313                                 continue
20314                         fi
20315                         ;;
20316                 esac
20317                 case "$CPPFLAGS" in
20318                 *$cf_add_cflags) #(vi
20319                         ;;
20320                 *) #(vi
20321                         case $cf_add_cflags in #(vi
20322                         -D*)
20323                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20324
20325 CPPFLAGS=`echo "$CPPFLAGS" | \
20326         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20327                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20328
20329                                 ;;
20330                         esac
20331                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20332                         ;;
20333                 esac
20334                 ;;
20335         *)
20336                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20337                 ;;
20338         esac
20339         ;;
20340 yes)
20341         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20342
20343         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20344
20345         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20346                 && test -z "${cf_tst_cflags}" \
20347                 && cf_fix_cppflags=no
20348         ;;
20349 esac
20350 done
20351
20352 if test -n "$cf_new_cflags" ; then
20353
20354         CFLAGS="$CFLAGS $cf_new_cflags"
20355 fi
20356
20357 if test -n "$cf_new_cppflags" ; then
20358
20359         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20360 fi
20361
20362 if test -n "$cf_new_extra_cppflags" ; then
20363
20364         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20365 fi
20366
20367 ### Define substitutions for header files to avoid name-pollution
20368
20369 if test "$cf_cv_have_tcgetattr" = yes ; then
20370         HAVE_TCGETATTR=1
20371 else
20372         HAVE_TCGETATTR=0
20373 fi
20374
20375 if test "$ac_cv_header_termio_h" = yes ; then
20376         HAVE_TERMIO_H=1
20377 else
20378         HAVE_TERMIO_H=0
20379 fi
20380
20381 if test "$ac_cv_header_termios_h" = yes ; then
20382         HAVE_TERMIOS_H=1
20383 else
20384         HAVE_TERMIOS_H=0
20385 fi
20386
20387 ################################################################################
20388 test "$use_database" = yes && \
20389 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20390
20391 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20392 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20393
20394 if test x"$enable_pc_files" = xyes ; then \
20395 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20396 MAKE_PC_FILES=
20397 else
20398 MAKE_PC_FILES="#"
20399 fi
20400
20401 # Extract the first word of "tic", so it can be a program name with args.
20402 set dummy tic; ac_word=$2
20403 echo "$as_me:20403: checking for $ac_word" >&5
20404 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20405 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20406   echo $ECHO_N "(cached) $ECHO_C" >&6
20407 else
20408   case $TIC_PATH in
20409   [\\/]* | ?:[\\/]*)
20410   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20411   ;;
20412   *)
20413   ac_save_IFS=$IFS; IFS=$ac_path_separator
20414 ac_dummy="$PATH:/usr/local/ncurses/bin"
20415 for ac_dir in $ac_dummy; do
20416   IFS=$ac_save_IFS
20417   test -z "$ac_dir" && ac_dir=.
20418   if $as_executable_p "$ac_dir/$ac_word"; then
20419    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20420    echo "$as_me:20420: found $ac_dir/$ac_word" >&5
20421    break
20422 fi
20423 done
20424
20425   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20426   ;;
20427 esac
20428 fi
20429 TIC_PATH=$ac_cv_path_TIC_PATH
20430
20431 if test -n "$TIC_PATH"; then
20432   echo "$as_me:20432: result: $TIC_PATH" >&5
20433 echo "${ECHO_T}$TIC_PATH" >&6
20434 else
20435   echo "$as_me:20435: result: no" >&5
20436 echo "${ECHO_T}no" >&6
20437 fi
20438
20439 if test -n "$FALLBACK_LIST"
20440 then
20441         if test "$TIC_PATH" = unknown
20442         then
20443                 { echo "$as_me:20443: WARNING: no tic program found for fallbacks" >&5
20444 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20445         fi
20446 fi
20447
20448 if test "x$cf_with_tests" != xno ; then
20449         MAKE_TESTS=
20450 else
20451         MAKE_TESTS="#"
20452 fi
20453
20454 ADAHTML_DIR=../../doc/html/ada
20455
20456 SUB_SCRIPTS=
20457
20458 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"
20459 ac_config_commands="$ac_config_commands default"
20460 cat >confcache <<\_ACEOF
20461 # This file is a shell script that caches the results of configure
20462 # tests run on this system so they can be shared between configure
20463 # scripts and configure runs, see configure's option --config-cache.
20464 # It is not useful on other systems.  If it contains results you don't
20465 # want to keep, you may remove or edit it.
20466 #
20467 # config.status only pays attention to the cache file if you give it
20468 # the --recheck option to rerun configure.
20469 #
20470 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20471 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20472 # following values.
20473
20474 _ACEOF
20475
20476 # The following way of writing the cache mishandles newlines in values,
20477 # but we know of no workaround that is simple, portable, and efficient.
20478 # So, don't put newlines in cache variables' values.
20479 # Ultrix sh set writes to stderr and can't be redirected directly,
20480 # and sets the high bit in the cache file unless we assign to the vars.
20481 {
20482   (set) 2>&1 |
20483     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20484     *ac_space=\ *)
20485       # `set' does not quote correctly, so add quotes (double-quote
20486       # substitution turns \\\\ into \\, and sed turns \\ into \).
20487       sed -n \
20488         "s/'/'\\\\''/g;
20489           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20490       ;;
20491     *)
20492       # `set' quotes correctly as required by POSIX, so do not add quotes.
20493       sed -n \
20494         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20495       ;;
20496     esac;
20497 } |
20498   sed '
20499      t clear
20500      : clear
20501      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20502      t end
20503      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20504      : end' >>confcache
20505 if cmp -s $cache_file confcache; then :; else
20506   if test -w $cache_file; then
20507     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20508     cat confcache >$cache_file
20509   else
20510     echo "not updating unwritable cache $cache_file"
20511   fi
20512 fi
20513 rm -f confcache
20514
20515 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20516 # Let make expand exec_prefix.
20517 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20518
20519 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20520 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20521 # trailing colons and then remove the whole line if VPATH becomes empty
20522 # (actually we leave an empty line to preserve line numbers).
20523 if test "x$srcdir" = x.; then
20524   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20525 s/:*\$(srcdir):*/:/;
20526 s/:*\${srcdir}:*/:/;
20527 s/:*@srcdir@:*/:/;
20528 s/^\([^=]*=[    ]*\):*/\1/;
20529 s/:*$//;
20530 s/^[^=]*=[      ]*$//;
20531 }'
20532 fi
20533
20534 DEFS=-DHAVE_CONFIG_H
20535
20536 : ${CONFIG_STATUS=./config.status}
20537 ac_clean_files_save=$ac_clean_files
20538 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20539 { echo "$as_me:20539: creating $CONFIG_STATUS" >&5
20540 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20541 cat >$CONFIG_STATUS <<_ACEOF
20542 #! $SHELL
20543 # Generated automatically by configure.
20544 # Run this file to recreate the current configuration.
20545 # Compiler output produced by configure, useful for debugging
20546 # configure, is in config.log if it exists.
20547
20548 debug=false
20549 SHELL=\${CONFIG_SHELL-$SHELL}
20550 ac_cs_invocation="\$0 \$@"
20551
20552 _ACEOF
20553
20554 cat >>$CONFIG_STATUS <<\_ACEOF
20555 # Be Bourne compatible
20556 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20557   emulate sh
20558   NULLCMD=:
20559 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20560   set -o posix
20561 fi
20562
20563 # Name of the executable.
20564 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20565
20566 if expr a : '\(a\)' >/dev/null 2>&1; then
20567   as_expr=expr
20568 else
20569   as_expr=false
20570 fi
20571
20572 rm -f conf$$ conf$$.exe conf$$.file
20573 echo >conf$$.file
20574 if ln -s conf$$.file conf$$ 2>/dev/null; then
20575   # We could just check for DJGPP; but this test a) works b) is more generic
20576   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20577   if test -f conf$$.exe; then
20578     # Don't use ln at all; we don't have any links
20579     as_ln_s='cp -p'
20580   else
20581     as_ln_s='ln -s'
20582   fi
20583 elif ln conf$$.file conf$$ 2>/dev/null; then
20584   as_ln_s=ln
20585 else
20586   as_ln_s='cp -p'
20587 fi
20588 rm -f conf$$ conf$$.exe conf$$.file
20589
20590 as_executable_p="test -f"
20591
20592 # Support unset when possible.
20593 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20594   as_unset=unset
20595 else
20596   as_unset=false
20597 fi
20598
20599 # NLS nuisances.
20600 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20601 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20602 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20603 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20604 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20605 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20606 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20607 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20608
20609 # IFS
20610 # We need space, tab and new line, in precisely that order.
20611 as_nl='
20612 '
20613 IFS="   $as_nl"
20614
20615 # CDPATH.
20616 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20617
20618 exec 6>&1
20619
20620 _ACEOF
20621
20622 # Files that config.status was made for.
20623 if test -n "$ac_config_files"; then
20624   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20625 fi
20626
20627 if test -n "$ac_config_headers"; then
20628   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20629 fi
20630
20631 if test -n "$ac_config_links"; then
20632   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20633 fi
20634
20635 if test -n "$ac_config_commands"; then
20636   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20637 fi
20638
20639 cat >>$CONFIG_STATUS <<\EOF
20640
20641 ac_cs_usage="\
20642 \`$as_me' instantiates files from templates according to the
20643 current configuration.
20644
20645 Usage: $0 [OPTIONS] [FILE]...
20646
20647   -h, --help       print this help, then exit
20648   -V, --version    print version number, then exit
20649   -d, --debug      don't remove temporary files
20650       --recheck    update $as_me by reconfiguring in the same conditions
20651   --file=FILE[:TEMPLATE]
20652                    instantiate the configuration file FILE
20653   --header=FILE[:TEMPLATE]
20654                    instantiate the configuration header FILE
20655
20656 Configuration files:
20657 $config_files
20658
20659 Configuration headers:
20660 $config_headers
20661
20662 Configuration commands:
20663 $config_commands
20664
20665 Report bugs to <dickey@invisible-island.net>."
20666 EOF
20667
20668 cat >>$CONFIG_STATUS <<EOF
20669 ac_cs_version="\\
20670 config.status
20671 configured by $0, generated by GNU Autoconf 2.52.20101002,
20672   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20673
20674 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20675 Free Software Foundation, Inc.
20676 This config.status script is free software; the Free Software Foundation
20677 gives unlimited permission to copy, distribute and modify it."
20678 srcdir=$srcdir
20679 INSTALL="$INSTALL"
20680 EOF
20681
20682 cat >>$CONFIG_STATUS <<\EOF
20683 # If no file are specified by the user, then we need to provide default
20684 # value.  By we need to know if files were specified by the user.
20685 ac_need_defaults=:
20686 while test $# != 0
20687 do
20688   case $1 in
20689   --*=*)
20690     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20691     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20692     shift
20693     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20694     shift
20695     ;;
20696   -*);;
20697   *) # This is not an option, so the user has probably given explicit
20698      # arguments.
20699      ac_need_defaults=false;;
20700   esac
20701
20702   case $1 in
20703   # Handling of the options.
20704 EOF
20705 cat >>$CONFIG_STATUS <<EOF
20706   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20707     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20708     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20709 EOF
20710 cat >>$CONFIG_STATUS <<\EOF
20711   --version | --vers* | -V )
20712     echo "$ac_cs_version"; exit 0 ;;
20713   --he | --h)
20714     # Conflict between --help and --header
20715     { { echo "$as_me:20715: error: ambiguous option: $1
20716 Try \`$0 --help' for more information." >&5
20717 echo "$as_me: error: ambiguous option: $1
20718 Try \`$0 --help' for more information." >&2;}
20719    { (exit 1); exit 1; }; };;
20720   --help | --hel | -h )
20721     echo "$ac_cs_usage"; exit 0 ;;
20722   --debug | --d* | -d )
20723     debug=: ;;
20724   --file | --fil | --fi | --f )
20725     shift
20726     CONFIG_FILES="$CONFIG_FILES $1"
20727     ac_need_defaults=false;;
20728   --header | --heade | --head | --hea )
20729     shift
20730     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20731     ac_need_defaults=false;;
20732
20733   # This is an error.
20734   -*) { { echo "$as_me:20734: error: unrecognized option: $1
20735 Try \`$0 --help' for more information." >&5
20736 echo "$as_me: error: unrecognized option: $1
20737 Try \`$0 --help' for more information." >&2;}
20738    { (exit 1); exit 1; }; } ;;
20739
20740   *) ac_config_targets="$ac_config_targets $1" ;;
20741
20742   esac
20743   shift
20744 done
20745
20746 exec 5>>config.log
20747 cat >&5 << _ACEOF
20748
20749 ## ----------------------- ##
20750 ## Running config.status.  ##
20751 ## ----------------------- ##
20752
20753 This file was extended by $as_me 2.52.20101002, executed with
20754   CONFIG_FILES    = $CONFIG_FILES
20755   CONFIG_HEADERS  = $CONFIG_HEADERS
20756   CONFIG_LINKS    = $CONFIG_LINKS
20757   CONFIG_COMMANDS = $CONFIG_COMMANDS
20758   > $ac_cs_invocation
20759 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20760
20761 _ACEOF
20762 EOF
20763
20764 cat >>$CONFIG_STATUS <<EOF
20765 #
20766 # INIT-COMMANDS section.
20767 #
20768
20769 ### Special initialization commands, used to pass information from the
20770 ### configuration-run into config.status
20771
20772 AWK="$AWK"
20773 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20774 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20775 ECHO_LINK="$ECHO_LINK"
20776 LDCONFIG="$LDCONFIG"
20777 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20778 LIB_NAME="$LIB_NAME"
20779 LIB_PREFIX="$LIB_PREFIX"
20780 LIB_SUBSETS="$LIB_SUBSETS"
20781 LIB_SUFFIX="$LIB_SUFFIX"
20782 LIB_TRACING="$LIB_TRACING"
20783 LN_S="$LN_S"
20784 MAKE_TERMINFO="$MAKE_TERMINFO"
20785 NCURSES_MAJOR="$NCURSES_MAJOR"
20786 NCURSES_MINOR="$NCURSES_MINOR"
20787 NCURSES_OSPEED="$NCURSES_OSPEED"
20788 NCURSES_PATCH="$NCURSES_PATCH"
20789 SRC_SUBDIRS="$SRC_SUBDIRS"
20790 TERMINFO="$TERMINFO"
20791 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20792 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20793 TICS_NAME="$TICS_NAME"
20794 TIC_PATH="$TIC_PATH"
20795 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20796 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20797 TINFO_NAME="$TINFO_NAME"
20798 TINFO_SUFFIX="$TINFO_SUFFIX"
20799 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20800 WITH_CURSES_H="$with_curses_h"
20801 WITH_ECHO="$with_echo"
20802 WITH_OVERWRITE="$with_overwrite"
20803 cf_LIST_MODELS="$cf_list_models"
20804 cf_cv_abi_version="$cf_cv_abi_version"
20805 cf_cv_do_relink="$cf_cv_do_relink"
20806 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20807 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20808 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20809 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20810 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20811 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20812 cf_cv_rel_version="$cf_cv_rel_version"
20813 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20814 cf_cv_shared_soname='$cf_cv_shared_soname'
20815 cf_cv_shlib_version="$cf_cv_shlib_version"
20816 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20817 cf_cv_system_name="$cf_cv_system_name"
20818 cf_cv_term_driver="$with_term_driver"
20819 cf_with_ada="$cf_with_ada"
20820 cf_with_cxx_binding="$cf_with_cxx_binding"
20821 cf_with_manpages="$cf_with_manpages"
20822 cf_with_tests="$cf_with_tests"
20823 host="$host"
20824 target="$target"
20825
20826 EOF
20827
20828 cat >>$CONFIG_STATUS <<\EOF
20829 for ac_config_target in $ac_config_targets
20830 do
20831   case "$ac_config_target" in
20832   # Handling of arguments.
20833   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20834   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20835   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20836   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20837   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20838   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20839   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20840   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20841   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20842   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20843   *) { { echo "$as_me:20843: error: invalid argument: $ac_config_target" >&5
20844 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20845    { (exit 1); exit 1; }; };;
20846   esac
20847 done
20848
20849 # If the user did not use the arguments to specify the items to instantiate,
20850 # then the envvar interface is used.  Set only those that are not.
20851 # We use the long form for the default assignment because of an extremely
20852 # bizarre bug on SunOS 4.1.3.
20853 if $ac_need_defaults; then
20854   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20855   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20856   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20857 fi
20858
20859 # Create a temporary directory, and hook for its removal unless debugging.
20860 $debug ||
20861 {
20862   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20863   trap '{ (exit 1); exit 1; }' 1 2 13 15
20864 }
20865
20866 # Create a (secure) tmp directory for tmp files.
20867 : ${TMPDIR=/tmp}
20868 {
20869   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20870   test -n "$tmp" && test -d "$tmp"
20871 }  ||
20872 {
20873   tmp=$TMPDIR/cs$$-$RANDOM
20874   (umask 077 && mkdir $tmp)
20875 } ||
20876 {
20877    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20878    { (exit 1); exit 1; }
20879 }
20880
20881 EOF
20882
20883 cat >>$CONFIG_STATUS <<EOF
20884
20885 #
20886 # CONFIG_FILES section.
20887 #
20888
20889 # No need to generate the scripts if there are no CONFIG_FILES.
20890 # This happens for instance when ./config.status config.h
20891 if test -n "\$CONFIG_FILES"; then
20892   # Protect against being on the right side of a sed subst in config.status.
20893   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20894    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20895 s,@SHELL@,$SHELL,;t t
20896 s,@exec_prefix@,$exec_prefix,;t t
20897 s,@prefix@,$prefix,;t t
20898 s,@program_transform_name@,$program_transform_name,;t t
20899 s,@bindir@,$bindir,;t t
20900 s,@sbindir@,$sbindir,;t t
20901 s,@libexecdir@,$libexecdir,;t t
20902 s,@datadir@,$datadir,;t t
20903 s,@sysconfdir@,$sysconfdir,;t t
20904 s,@sharedstatedir@,$sharedstatedir,;t t
20905 s,@localstatedir@,$localstatedir,;t t
20906 s,@libdir@,$libdir,;t t
20907 s,@includedir@,$includedir,;t t
20908 s,@oldincludedir@,$oldincludedir,;t t
20909 s,@infodir@,$infodir,;t t
20910 s,@mandir@,$mandir,;t t
20911 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20912 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20913 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20914 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20915 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20916 s,@build_alias@,$build_alias,;t t
20917 s,@host_alias@,$host_alias,;t t
20918 s,@target_alias@,$target_alias,;t t
20919 s,@ECHO_C@,$ECHO_C,;t t
20920 s,@ECHO_N@,$ECHO_N,;t t
20921 s,@ECHO_T@,$ECHO_T,;t t
20922 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20923 s,@DEFS@,$DEFS,;t t
20924 s,@LIBS@,$LIBS,;t t
20925 s,@top_builddir@,$top_builddir,;t t
20926 s,@EGREP@,$EGREP,;t t
20927 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20928 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20929 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20930 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20931 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20932 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20933 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20934 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20935 s,@build@,$build,;t t
20936 s,@build_cpu@,$build_cpu,;t t
20937 s,@build_vendor@,$build_vendor,;t t
20938 s,@build_os@,$build_os,;t t
20939 s,@host@,$host,;t t
20940 s,@host_cpu@,$host_cpu,;t t
20941 s,@host_vendor@,$host_vendor,;t t
20942 s,@host_os@,$host_os,;t t
20943 s,@target@,$target,;t t
20944 s,@target_cpu@,$target_cpu,;t t
20945 s,@target_vendor@,$target_vendor,;t t
20946 s,@target_os@,$target_os,;t t
20947 s,@CC@,$CC,;t t
20948 s,@CFLAGS@,$CFLAGS,;t t
20949 s,@LDFLAGS@,$LDFLAGS,;t t
20950 s,@CPPFLAGS@,$CPPFLAGS,;t t
20951 s,@ac_ct_CC@,$ac_ct_CC,;t t
20952 s,@EXEEXT@,$EXEEXT,;t t
20953 s,@OBJEXT@,$OBJEXT,;t t
20954 s,@CPP@,$CPP,;t t
20955 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20956 s,@PROG_EXT@,$PROG_EXT,;t t
20957 s,@LDCONFIG@,$LDCONFIG,;t t
20958 s,@CXX@,$CXX,;t t
20959 s,@CXXFLAGS@,$CXXFLAGS,;t t
20960 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20961 s,@AWK@,$AWK,;t t
20962 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20963 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20964 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20965 s,@LINT@,$LINT,;t t
20966 s,@LINT_OPTS@,$LINT_OPTS,;t t
20967 s,@LN_S@,$LN_S,;t t
20968 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20969 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20970 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20971 s,@SET_MAKE@,$SET_MAKE,;t t
20972 s,@CTAGS@,$CTAGS,;t t
20973 s,@ETAGS@,$ETAGS,;t t
20974 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20975 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20976 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20977 s,@RANLIB@,$RANLIB,;t t
20978 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20979 s,@LD@,$LD,;t t
20980 s,@ac_ct_LD@,$ac_ct_LD,;t t
20981 s,@AR@,$AR,;t t
20982 s,@ac_ct_AR@,$ac_ct_AR,;t t
20983 s,@ARFLAGS@,$ARFLAGS,;t t
20984 s,@DESTDIR@,$DESTDIR,;t t
20985 s,@BUILD_CC@,$BUILD_CC,;t t
20986 s,@BUILD_CPP@,$BUILD_CPP,;t t
20987 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20988 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20989 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20990 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20991 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20992 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20993 s,@cf_list_models@,$cf_list_models,;t t
20994 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20995 s,@LIBTOOL@,$LIBTOOL,;t t
20996 s,@LT_UNDEF@,$LT_UNDEF,;t t
20997 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20998 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20999 s,@LIB_CREATE@,$LIB_CREATE,;t t
21000 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21001 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21002 s,@LIB_PREP@,$LIB_PREP,;t t
21003 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21004 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21005 s,@LIB_LINK@,$LIB_LINK,;t t
21006 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21007 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21008 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21009 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21010 s,@TICS_NAME@,$TICS_NAME,;t t
21011 s,@TINFO_NAME@,$TINFO_NAME,;t t
21012 s,@LIB_NAME@,$LIB_NAME,;t t
21013 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21014 s,@CC_G_OPT@,$CC_G_OPT,;t t
21015 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21016 s,@LD_MODEL@,$LD_MODEL,;t t
21017 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21018 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21019 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21020 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21021 s,@LINK_PROGS@,$LINK_PROGS,;t t
21022 s,@LINK_TESTS@,$LINK_TESTS,;t t
21023 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21024 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21025 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21026 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21027 s,@RPATH_LIST@,$RPATH_LIST,;t t
21028 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21029 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21030 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21031 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21032 s,@XTERM_KBS@,$XTERM_KBS,;t t
21033 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21034 s,@TERMINFO@,$TERMINFO,;t t
21035 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21036 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21037 s,@TERMPATH@,$TERMPATH,;t t
21038 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21039 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21040 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21041 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21042 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21043 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21044 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21045 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21046 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21047 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21048 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21049 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21050 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21051 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21052 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21053 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21054 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21055 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21056 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21057 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21058 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21059 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21060 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21061 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21062 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21063 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21064 s,@PTHREAD@,$PTHREAD,;t t
21065 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21066 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21067 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21068 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21069 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21070 s,@ECHO_LINK@,$ECHO_LINK,;t t
21071 s,@ADAFLAGS@,$ADAFLAGS,;t t
21072 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21073 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21074 s,@ADA_TRACE@,$ADA_TRACE,;t t
21075 s,@MATH_LIB@,$MATH_LIB,;t t
21076 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21077 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21078 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21079 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21080 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21081 s,@TEST_LIBS@,$TEST_LIBS,;t t
21082 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21083 s,@CXXCPP@,$CXXCPP,;t t
21084 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21085 s,@CXX_AR@,$CXX_AR,;t t
21086 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21087 s,@CXXLIBS@,$CXXLIBS,;t t
21088 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21089 s,@gnat_exists@,$gnat_exists,;t t
21090 s,@M4_exists@,$M4_exists,;t t
21091 s,@cf_ada_make@,$cf_ada_make,;t t
21092 s,@cf_compile_generics@,$cf_compile_generics,;t t
21093 s,@cf_generic_objects@,$cf_generic_objects,;t t
21094 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21095 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21096 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21097 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21098 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21099 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21100 s,@cf_ada_package@,$cf_ada_package,;t t
21101 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21102 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21103 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21104 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21105 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21106 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21107 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21108 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21109 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21110 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21111 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21112 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21113 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21114 s,@TICS_LIBS@,$TICS_LIBS,;t t
21115 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21116 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21117 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21118 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21119 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21120 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21121 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21122 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21123 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21124 s,@TICS_LIST@,$TICS_LIST,;t t
21125 s,@TINFO_LIST@,$TINFO_LIST,;t t
21126 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21127 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21128 s,@TEST_ARGS@,$TEST_ARGS,;t t
21129 s,@TEST_DEPS@,$TEST_DEPS,;t t
21130 s,@TEST_ARG2@,$TEST_ARG2,;t t
21131 s,@TEST_DEP2@,$TEST_DEP2,;t t
21132 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21133 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21134 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21135 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21136 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21137 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21138 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21139 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21140 s,@cross_compiling@,$cross_compiling,;t t
21141 s,@TIC_PATH@,$TIC_PATH,;t t
21142 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21143 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21144 CEOF
21145
21146 EOF
21147
21148   cat >>$CONFIG_STATUS <<\EOF
21149   # Split the substitutions into bite-sized pieces for seds with
21150   # small command number limits, like on Digital OSF/1 and HP-UX.
21151   ac_max_sed_lines=48
21152   ac_sed_frag=1 # Number of current file.
21153   ac_beg=1 # First line for current file.
21154   ac_end=$ac_max_sed_lines # Line after last line for current file.
21155   ac_more_lines=:
21156   ac_sed_cmds=
21157   while $ac_more_lines; do
21158     if test $ac_beg -gt 1; then
21159       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21160     else
21161       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21162     fi
21163     if test ! -s $tmp/subs.frag; then
21164       ac_more_lines=false
21165     else
21166       # The purpose of the label and of the branching condition is to
21167       # speed up the sed processing (if there are no `@' at all, there
21168       # is no need to browse any of the substitutions).
21169       # These are the two extra sed commands mentioned above.
21170       (echo ':t
21171   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21172       if test -z "$ac_sed_cmds"; then
21173         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21174       else
21175         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21176       fi
21177       ac_sed_frag=`expr $ac_sed_frag + 1`
21178       ac_beg=$ac_end
21179       ac_end=`expr $ac_end + $ac_max_sed_lines`
21180     fi
21181   done
21182   if test -z "$ac_sed_cmds"; then
21183     ac_sed_cmds=cat
21184   fi
21185 fi # test -n "$CONFIG_FILES"
21186
21187 EOF
21188 cat >>$CONFIG_STATUS <<\EOF
21189 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21190   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21191   case $ac_file in
21192   - | *:- | *:-:* ) # input from stdin
21193         cat >$tmp/stdin
21194         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21195         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21196   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21197         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21198   * )   ac_file_in=$ac_file.in ;;
21199   esac
21200
21201   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21202   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21203          X"$ac_file" : 'X\(//\)[^/]' \| \
21204          X"$ac_file" : 'X\(//\)$' \| \
21205          X"$ac_file" : 'X\(/\)' \| \
21206          .     : '\(.\)' 2>/dev/null ||
21207 echo X"$ac_file" |
21208     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21209           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21210           /^X\(\/\/\)$/{ s//\1/; q; }
21211           /^X\(\/\).*/{ s//\1/; q; }
21212           s/.*/./; q'`
21213   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21214     { case "$ac_dir" in
21215   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21216   *)                      as_incr_dir=.;;
21217 esac
21218 as_dummy="$ac_dir"
21219 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21220   case $as_mkdir_dir in
21221     # Skip DOS drivespec
21222     ?:) as_incr_dir=$as_mkdir_dir ;;
21223     *)
21224       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21225       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21226     ;;
21227   esac
21228 done; }
21229
21230     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21231     # A "../" for each directory in $ac_dir_suffix.
21232     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21233   else
21234     ac_dir_suffix= ac_dots=
21235   fi
21236
21237   case $srcdir in
21238   .)  ac_srcdir=.
21239       if test -z "$ac_dots"; then
21240          ac_top_srcdir=.
21241       else
21242          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21243       fi ;;
21244   [\\/]* | ?:[\\/]* )
21245       ac_srcdir=$srcdir$ac_dir_suffix;
21246       ac_top_srcdir=$srcdir ;;
21247   *) # Relative path.
21248     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21249     ac_top_srcdir=$ac_dots$srcdir ;;
21250   esac
21251
21252   case $INSTALL in
21253   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21254   *) ac_INSTALL=$ac_dots$INSTALL ;;
21255   esac
21256
21257   if test x"$ac_file" != x-; then
21258     { echo "$as_me:21258: creating $ac_file" >&5
21259 echo "$as_me: creating $ac_file" >&6;}
21260     rm -f "$ac_file"
21261   fi
21262   # Let's still pretend it is `configure' which instantiates (i.e., don't
21263   # use $as_me), people would be surprised to read:
21264   #    /* config.h.  Generated automatically by config.status.  */
21265   configure_input="Generated automatically from `echo $ac_file_in |
21266                                                  sed 's,.*/,,'` by configure."
21267
21268   # First look for the input files in the build tree, otherwise in the
21269   # src tree.
21270   ac_file_inputs=`IFS=:
21271     for f in $ac_file_in; do
21272       case $f in
21273       -) echo $tmp/stdin ;;
21274       [\\/$]*)
21275          # Absolute (can't be DOS-style, as IFS=:)
21276          test -f "$f" || { { echo "$as_me:21276: error: cannot find input file: $f" >&5
21277 echo "$as_me: error: cannot find input file: $f" >&2;}
21278    { (exit 1); exit 1; }; }
21279          echo $f;;
21280       *) # Relative
21281          if test -f "$f"; then
21282            # Build tree
21283            echo $f
21284          elif test -f "$srcdir/$f"; then
21285            # Source tree
21286            echo $srcdir/$f
21287          else
21288            # /dev/null tree
21289            { { echo "$as_me:21289: error: cannot find input file: $f" >&5
21290 echo "$as_me: error: cannot find input file: $f" >&2;}
21291    { (exit 1); exit 1; }; }
21292          fi;;
21293       esac
21294     done` || { (exit 1); exit 1; }
21295 EOF
21296 cat >>$CONFIG_STATUS <<EOF
21297   sed "$ac_vpsub
21298 $extrasub
21299 EOF
21300 cat >>$CONFIG_STATUS <<\EOF
21301 :t
21302 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21303 s,@configure_input@,$configure_input,;t t
21304 s,@srcdir@,$ac_srcdir,;t t
21305 s,@top_srcdir@,$ac_top_srcdir,;t t
21306 s,@INSTALL@,$ac_INSTALL,;t t
21307 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21308   rm -f $tmp/stdin
21309   if test x"$ac_file" != x-; then
21310     mv $tmp/out $ac_file
21311   else
21312     cat $tmp/out
21313     rm -f $tmp/out
21314   fi
21315
21316 done
21317 EOF
21318 cat >>$CONFIG_STATUS <<\EOF
21319
21320 #
21321 # CONFIG_HEADER section.
21322 #
21323
21324 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21325 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21326 #
21327 # ac_d sets the value in "#define NAME VALUE" lines.
21328 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21329 ac_dB='[        ].*$,\1#\2'
21330 ac_dC=' '
21331 ac_dD=',;t'
21332 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21333 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21334 ac_iB='\([      ]\),\1#\2define\3'
21335 ac_iC=' '
21336 ac_iD='\4,;t'
21337 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21338 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21339 ac_uB='$,\1#\2define\3'
21340 ac_uC=' '
21341 ac_uD=',;t'
21342
21343 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21344   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21345   case $ac_file in
21346   - | *:- | *:-:* ) # input from stdin
21347         cat >$tmp/stdin
21348         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21349         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21350   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21351         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21352   * )   ac_file_in=$ac_file.in ;;
21353   esac
21354
21355   test x"$ac_file" != x- && { echo "$as_me:21355: creating $ac_file" >&5
21356 echo "$as_me: creating $ac_file" >&6;}
21357
21358   # First look for the input files in the build tree, otherwise in the
21359   # src tree.
21360   ac_file_inputs=`IFS=:
21361     for f in $ac_file_in; do
21362       case $f in
21363       -) echo $tmp/stdin ;;
21364       [\\/$]*)
21365          # Absolute (can't be DOS-style, as IFS=:)
21366          test -f "$f" || { { echo "$as_me:21366: error: cannot find input file: $f" >&5
21367 echo "$as_me: error: cannot find input file: $f" >&2;}
21368    { (exit 1); exit 1; }; }
21369          echo $f;;
21370       *) # Relative
21371          if test -f "$f"; then
21372            # Build tree
21373            echo $f
21374          elif test -f "$srcdir/$f"; then
21375            # Source tree
21376            echo $srcdir/$f
21377          else
21378            # /dev/null tree
21379            { { echo "$as_me:21379: error: cannot find input file: $f" >&5
21380 echo "$as_me: error: cannot find input file: $f" >&2;}
21381    { (exit 1); exit 1; }; }
21382          fi;;
21383       esac
21384     done` || { (exit 1); exit 1; }
21385   # Remove the trailing spaces.
21386   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21387
21388 EOF
21389
21390 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21391 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21392 # be either 'cat' or 'sort'.
21393 cat confdefs.h | uniq >conftest.vals
21394
21395 # Break up conftest.vals because some shells have a limit on
21396 # the size of here documents, and old seds have small limits too.
21397
21398 rm -f conftest.tail
21399 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21400 while grep . conftest.vals >/dev/null
21401 do
21402   # Write chunks of a limited-size here document to conftest.frag.
21403   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21404   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21405   echo 'CEOF' >> $CONFIG_STATUS
21406   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21407   rm -f conftest.vals
21408   mv conftest.tail conftest.vals
21409 done
21410 rm -f conftest.vals
21411
21412 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21413 # marker @DEFS@.
21414 echo '  cat >> conftest.edit <<CEOF
21415 /@DEFS@/r conftest.frag
21416 /@DEFS@/d
21417 CEOF
21418 sed -f conftest.edit $tmp/in > $tmp/out
21419 rm -f $tmp/in
21420 mv $tmp/out $tmp/in
21421 rm -f conftest.edit conftest.frag
21422 ' >> $CONFIG_STATUS
21423
21424 cat >>$CONFIG_STATUS <<\EOF
21425   # Let's still pretend it is `configure' which instantiates (i.e., don't
21426   # use $as_me), people would be surprised to read:
21427   #    /* config.h.  Generated automatically by config.status.  */
21428   if test x"$ac_file" = x-; then
21429     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21430   else
21431     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21432   fi
21433   cat $tmp/in >>$tmp/config.h
21434   rm -f $tmp/in
21435   if test x"$ac_file" != x-; then
21436     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21437       { echo "$as_me:21437: $ac_file is unchanged" >&5
21438 echo "$as_me: $ac_file is unchanged" >&6;}
21439     else
21440       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21441          X"$ac_file" : 'X\(//\)[^/]' \| \
21442          X"$ac_file" : 'X\(//\)$' \| \
21443          X"$ac_file" : 'X\(/\)' \| \
21444          .     : '\(.\)' 2>/dev/null ||
21445 echo X"$ac_file" |
21446     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21447           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21448           /^X\(\/\/\)$/{ s//\1/; q; }
21449           /^X\(\/\).*/{ s//\1/; q; }
21450           s/.*/./; q'`
21451       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21452         { case "$ac_dir" in
21453   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21454   *)                      as_incr_dir=.;;
21455 esac
21456 as_dummy="$ac_dir"
21457 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21458   case $as_mkdir_dir in
21459     # Skip DOS drivespec
21460     ?:) as_incr_dir=$as_mkdir_dir ;;
21461     *)
21462       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21463       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21464     ;;
21465   esac
21466 done; }
21467
21468       fi
21469       rm -f $ac_file
21470       mv $tmp/config.h $ac_file
21471     fi
21472   else
21473     cat $tmp/config.h
21474     rm -f $tmp/config.h
21475   fi
21476 done
21477 EOF
21478 cat >>$CONFIG_STATUS <<\EOF
21479 #
21480 # CONFIG_COMMANDS section.
21481 #
21482 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21483   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21484   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21485
21486   case $ac_dest in
21487     default )
21488 if test "x$cf_with_tests" != xno ; then
21489
21490 for cf_dir in test
21491 do
21492         if test ! -d $srcdir/$cf_dir; then
21493                 continue
21494         elif test -f $srcdir/$cf_dir/programs; then
21495                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21496         fi
21497 done
21498
21499 fi
21500
21501 cf_prefix=$LIB_PREFIX
21502
21503 if test $cf_cv_shlib_version = cygdll ; then
21504         TINFO_NAME=$TINFO_ARG_SUFFIX
21505         TINFO_SUFFIX=.dll
21506 fi
21507
21508 if test -n "$TINFO_SUFFIX" ; then
21509         case $TINFO_SUFFIX in
21510         tw*)
21511                 TINFO_NAME="${TINFO_NAME}tw"
21512                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21513                 ;;
21514         t*)
21515                 TINFO_NAME="${TINFO_NAME}t"
21516                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21517                 ;;
21518         w*)
21519                 TINFO_NAME="${TINFO_NAME}w"
21520                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21521                 ;;
21522         esac
21523 fi
21524
21525 for cf_dir in $SRC_SUBDIRS
21526 do
21527         if test ! -d $srcdir/$cf_dir ; then
21528                 continue
21529         elif test -f $srcdir/$cf_dir/modules; then
21530
21531                 SHARED_LIB=
21532                 LIBS_TO_MAKE=
21533                 for cf_item in $cf_LIST_MODELS
21534                 do
21535
21536         case $cf_item in #(vi
21537         libtool) #(vi
21538                 cf_suffix='.la'
21539                 cf_depsuf=$cf_suffix
21540                 ;;
21541         normal) #(vi
21542                 cf_suffix='.a'
21543                 cf_depsuf=$cf_suffix
21544                 ;;
21545         debug) #(vi
21546                 cf_suffix='_g.a'
21547                 cf_depsuf=$cf_suffix
21548                 ;;
21549         profile) #(vi
21550                 cf_suffix='_p.a'
21551                 cf_depsuf=$cf_suffix
21552                 ;;
21553         shared) #(vi
21554                 case $cf_cv_system_name in
21555                 aix[5-7]*) #(vi
21556                         cf_suffix='.a'
21557                         cf_depsuf=$cf_suffix
21558                         ;;
21559                 cygwin*) #(vi
21560                         cf_suffix='.dll'
21561                         cf_depsuf='.dll.a'
21562                         ;;
21563                 darwin*) #(vi
21564                         cf_suffix='.dylib'
21565                         cf_depsuf=$cf_suffix
21566                         ;;
21567                 hpux*) #(vi
21568                         case $target in
21569                         ia64*) #(vi
21570                                 cf_suffix='.so'
21571                                 cf_depsuf=$cf_suffix
21572                                 ;;
21573                         *) #(vi
21574                                 cf_suffix='.sl'
21575                                 cf_depsuf=$cf_suffix
21576                                 ;;
21577                         esac
21578                         ;;
21579                 *)      cf_suffix='.so'
21580                         cf_depsuf=$cf_suffix
21581                         ;;
21582                 esac
21583         esac
21584         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21585         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21586
21587                         if test $cf_item = shared ; then
21588                         if test "$cf_cv_do_symlinks" = yes ; then
21589                                 case "$cf_cv_shlib_version" in #(vi
21590                                 rel) #(vi
21591                                         case "$cf_cv_system_name" in #(vi
21592                                         darwin*)
21593                                         case .${LIB_SUFFIX} in
21594                                         .tw*)
21595                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21596                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21597                                                 ;;
21598                                         .t*)
21599                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21600                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21601                                                 ;;
21602                                         .w*)
21603                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21604                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21605                                                 ;;
21606                                         *)
21607                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21608                                                 ;;
21609                                         esac
21610                                         ;; #(vi
21611                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21612                                         esac
21613                                         ;;
21614                                 abi)
21615                                         case "$cf_cv_system_name" in #(vi
21616                                         darwin*)
21617                                         case .${LIB_SUFFIX} in
21618                                         .tw*)
21619                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21620                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21621                                                 ;;
21622                                         .t*)
21623                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21624                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21625                                                 ;;
21626                                         .w*)
21627                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21628                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21629                                                 ;;
21630                                         *)
21631                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21632                                                 ;;
21633                                         esac
21634                                         ;; #(vi
21635                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21636                                         esac
21637                                         ;;
21638                                 esac
21639                         fi
21640                         # cygwin needs import library, and has unique naming convention
21641                         # use autodetected ${cf_prefix} for import lib and static lib, but
21642                         # use 'cyg' prefix for shared lib.
21643                         if test $cf_cv_shlib_version = cygdll ; then
21644                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21645                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21646                                 continue
21647                         fi
21648                         fi
21649                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21650                 done
21651
21652                 if test $cf_dir = ncurses ; then
21653                         cf_subsets="$LIB_SUBSETS"
21654                         cf_r_parts="$cf_subsets"
21655                         cf_liblist="$LIBS_TO_MAKE"
21656
21657                         while test -n "$cf_r_parts"
21658                         do
21659                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21660                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21661                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21662                                         cf_item=
21663                                         case $cf_l_parts in #(vi
21664                                         *termlib*) #(vi
21665                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21666                                                 ;;
21667                                         *ticlib*)
21668                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21669                                                 ;;
21670                                         *)
21671                                                 break
21672                                                 ;;
21673                                         esac
21674                                         if test -n "$cf_item"; then
21675                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21676                                         fi
21677                                 else
21678                                         break
21679                                 fi
21680                         done
21681                 else
21682                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21683                 fi
21684
21685                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21686                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21687                         $cf_dir/Makefile >$cf_dir/Makefile.out
21688                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21689
21690                 $AWK -f $srcdir/mk-0th.awk \
21691                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21692                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21693
21694                 for cf_subset in $cf_subsets
21695                 do
21696                         cf_subdirs=
21697                         for cf_item in $cf_LIST_MODELS
21698                         do
21699                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21700
21701 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21702
21703         case $cf_item in #(vi
21704         libtool) #(vi
21705                 cf_suffix='.la'
21706                 cf_depsuf=$cf_suffix
21707                 ;;
21708         normal) #(vi
21709                 cf_suffix='.a'
21710                 cf_depsuf=$cf_suffix
21711                 ;;
21712         debug) #(vi
21713                 cf_suffix='_g.a'
21714                 cf_depsuf=$cf_suffix
21715                 ;;
21716         profile) #(vi
21717                 cf_suffix='_p.a'
21718                 cf_depsuf=$cf_suffix
21719                 ;;
21720         shared) #(vi
21721                 case $cf_cv_system_name in
21722                 aix[5-7]*) #(vi
21723                         cf_suffix='.a'
21724                         cf_depsuf=$cf_suffix
21725                         ;;
21726                 cygwin*) #(vi
21727                         cf_suffix='.dll'
21728                         cf_depsuf='.dll.a'
21729                         ;;
21730                 darwin*) #(vi
21731                         cf_suffix='.dylib'
21732                         cf_depsuf=$cf_suffix
21733                         ;;
21734                 hpux*) #(vi
21735                         case $target in
21736                         ia64*) #(vi
21737                                 cf_suffix='.so'
21738                                 cf_depsuf=$cf_suffix
21739                                 ;;
21740                         *) #(vi
21741                                 cf_suffix='.sl'
21742                                 cf_depsuf=$cf_suffix
21743                                 ;;
21744                         esac
21745                         ;;
21746                 *)      cf_suffix='.so'
21747                         cf_depsuf=$cf_suffix
21748                         ;;
21749                 esac
21750         esac
21751         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21752         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21753
21754         case $cf_item in
21755         libtool) cf_subdir='obj_lo'  ;;
21756         normal)  cf_subdir='objects' ;;
21757         debug)   cf_subdir='obj_g' ;;
21758         profile) cf_subdir='obj_p' ;;
21759         shared)
21760                 case $cf_cv_system_name in #(vi
21761                 cygwin) #(vi
21762                         cf_subdir='objects' ;;
21763                 *)
21764                         cf_subdir='obj_s' ;;
21765                 esac
21766         esac
21767
21768                         # Test for case where we build libtinfo with a different name.
21769                         cf_libname=$cf_dir
21770                         if test $cf_dir = ncurses ; then
21771                                 case $cf_subset in
21772                                 *base*)
21773                                         cf_libname=${cf_libname}$LIB_SUFFIX
21774                                         ;;
21775                                 *termlib*)
21776                                         cf_libname=$TINFO_LIB_SUFFIX
21777                                         ;;
21778                                 ticlib*)
21779                                         cf_libname=$TICS_LIB_SUFFIX
21780                                         ;;
21781                                 esac
21782                         else
21783                                 cf_libname=${cf_libname}$LIB_SUFFIX
21784                         fi
21785                         if test -n "${DFT_ARG_SUFFIX}" ; then
21786                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21787                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21788                         fi
21789
21790                         # These dependencies really are for development, not
21791                         # builds, but they are useful in porting, too.
21792                         cf_depend="../include/ncurses_cfg.h"
21793                         if test "$srcdir" = "."; then
21794                                 cf_reldir="."
21795                         else
21796                                 cf_reldir="\${srcdir}"
21797                         fi
21798
21799                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21800                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21801                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21802                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21803                         fi
21804
21805                         cf_dir_suffix=
21806                         old_cf_suffix="$cf_suffix"
21807                         if test "$cf_cv_shlib_version_infix" = yes ; then
21808                         if test -n "$LIB_SUFFIX" ; then
21809                                 case $LIB_SUFFIX in
21810                                 tw*)
21811                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21812                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21813                                         cf_dir_suffix=tw
21814                                         ;;
21815                                 t*)
21816                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21817                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21818                                         cf_dir_suffix=t
21819                                         ;;
21820                                 w*)
21821                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21822                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21823                                         cf_dir_suffix=w
21824                                         ;;
21825                                 esac
21826                         fi
21827                         fi
21828
21829                         $AWK -f $srcdir/mk-1st.awk \
21830                                 name=${cf_libname}${cf_dir_suffix} \
21831                                 traces=$LIB_TRACING \
21832                                 MODEL=$cf_ITEM \
21833                                 model=$cf_subdir \
21834                                 prefix=$cf_prefix \
21835                                 suffix=$cf_suffix \
21836                                 subset=$cf_subset \
21837                                 driver=$cf_cv_term_driver \
21838                                 SymLink="$LN_S" \
21839                                 TermlibRoot=$TINFO_NAME \
21840                                 TermlibSuffix=$TINFO_SUFFIX \
21841                                 ShlibVer=$cf_cv_shlib_version \
21842                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21843                                 ReLink=${cf_cv_do_relink:-no} \
21844                                 DoLinks=$cf_cv_do_symlinks \
21845                                 rmSoLocs=$cf_cv_rm_so_locs \
21846                                 ldconfig="$LDCONFIG" \
21847                                 overwrite=$WITH_OVERWRITE \
21848                                 depend="$cf_depend" \
21849                                 host="$host" \
21850                                 libtool_version="$LIBTOOL_VERSION" \
21851                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21852
21853                         cf_suffix="$old_cf_suffix"
21854
21855                         for cf_subdir2 in $cf_subdirs lib
21856                         do
21857                                 test $cf_subdir = $cf_subdir2 && break
21858                         done
21859                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21860                         $AWK -f $srcdir/mk-2nd.awk \
21861                                 name=$cf_dir \
21862                                 traces=$LIB_TRACING \
21863                                 MODEL=$cf_ITEM \
21864                                 model=$cf_subdir \
21865                                 subset=$cf_subset \
21866                                 srcdir=$srcdir \
21867                                 echo=$WITH_ECHO \
21868                                 crenames=$cf_cv_prog_CC_c_o \
21869                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21870                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21871                         cf_subdirs="$cf_subdirs $cf_subdir"
21872                         done
21873                 done
21874         fi
21875
21876         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21877 done
21878
21879 for cf_dir in $SRC_SUBDIRS
21880 do
21881         if test ! -d $srcdir/$cf_dir ; then
21882                 continue
21883         fi
21884
21885         if test -f $cf_dir/Makefile ; then
21886                 case "$cf_dir" in
21887                 Ada95) #(vi
21888                         echo 'libs \' >> Makefile
21889                         echo 'install.libs \' >> Makefile
21890                         echo 'uninstall.libs ::' >> Makefile
21891                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21892                         ;;
21893                 esac
21894         fi
21895
21896         if test -f $srcdir/$cf_dir/modules; then
21897                 echo >> Makefile
21898                 if test -f $srcdir/$cf_dir/headers; then
21899 cat >> Makefile <<CF_EOF
21900 install.includes \\
21901 uninstall.includes \\
21902 CF_EOF
21903                 fi
21904 if test "$cf_dir" != "c++" ; then
21905 echo 'lint \' >> Makefile
21906 fi
21907 cat >> Makefile <<CF_EOF
21908 libs \\
21909 lintlib \\
21910 install.libs \\
21911 uninstall.libs \\
21912 install.$cf_dir \\
21913 uninstall.$cf_dir ::
21914         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21915 CF_EOF
21916         elif test -f $srcdir/$cf_dir/headers; then
21917 cat >> Makefile <<CF_EOF
21918
21919 libs \\
21920 install.libs \\
21921 uninstall.libs \\
21922 install.includes \\
21923 uninstall.includes ::
21924         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21925 CF_EOF
21926 fi
21927 done
21928
21929 cat >> Makefile <<CF_EOF
21930
21931 install.libs uninstall.libs \\
21932 install.data uninstall.data ::
21933 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21934 CF_EOF
21935
21936 if test "x$cf_with_manpages" = xyes; then
21937 cat >> Makefile <<CF_EOF
21938
21939 install.man \\
21940 uninstall.man ::
21941         cd man && \${MAKE} \${CF_MFLAGS} \$@
21942 CF_EOF
21943 fi
21944
21945 cat >> Makefile <<CF_EOF
21946
21947 distclean ::
21948         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21949         rm -f headers.sh headers.sed mk_shared_lib.sh
21950         rm -f edit_man.* man_alias.*
21951         rm -rf \${DIRS_TO_MAKE}
21952 CF_EOF
21953
21954 # Special case: tack's manpage lives in its own directory.
21955 if test "x$cf_with_manpages" = xyes; then
21956 if test -d tack ; then
21957 if test -f $srcdir/$tack.h; then
21958 cat >> Makefile <<CF_EOF
21959
21960 install.man \\
21961 uninstall.man ::
21962         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21963 CF_EOF
21964 fi
21965 fi
21966 fi
21967
21968 rm -f headers.sed headers.sh
21969
21970 echo creating headers.sh
21971 cat >headers.sh <<CF_EOF
21972 #! /bin/sh
21973 # This shell script is generated by the 'configure' script.  It is invoked in a
21974 # subdirectory of the build tree.  It generates a sed-script in the parent
21975 # directory that is used to adjust includes for header files that reside in a
21976 # subdirectory of /usr/include, etc.
21977 PRG=""
21978 while test \$# != 3
21979 do
21980 PRG="\$PRG \$1"; shift
21981 done
21982 DST=\$1
21983 REF=\$2
21984 SRC=\$3
21985 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21986 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21987 echo installing \$SRC in \$DST
21988 CF_EOF
21989
21990 if test $WITH_CURSES_H = yes; then
21991         cat >>headers.sh <<CF_EOF
21992 case \$DST in
21993 /*/include/*)
21994         END=\`basename \$DST\`
21995         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21996         do
21997                 NAME=\`basename \$i\`
21998                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21999         done
22000         ;;
22001 *)
22002         echo "" >> \$TMPSED
22003         ;;
22004 esac
22005 CF_EOF
22006
22007 else
22008         cat >>headers.sh <<CF_EOF
22009 case \$DST in
22010 /*/include/*)
22011         END=\`basename \$DST\`
22012         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22013         do
22014                 NAME=\`basename \$i\`
22015                 if test "\$NAME" = "curses.h"
22016                 then
22017                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22018                         NAME=ncurses.h
22019                 fi
22020                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22021         done
22022         ;;
22023 *)
22024         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22025         ;;
22026 esac
22027 CF_EOF
22028 fi
22029 cat >>headers.sh <<CF_EOF
22030 rm -f \$TMPSRC
22031 sed -f \$TMPSED \$SRC > \$TMPSRC
22032 NAME=\`basename \$SRC\`
22033 CF_EOF
22034 if test $WITH_CURSES_H != yes; then
22035         cat >>headers.sh <<CF_EOF
22036 test "\$NAME" = "curses.h" && NAME=ncurses.h
22037 CF_EOF
22038 fi
22039 cat >>headers.sh <<CF_EOF
22040 # Just in case someone gzip'd manpages, remove the conflicting copy.
22041 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22042
22043 eval \$PRG \$TMPSRC \$DST/\$NAME
22044 rm -f \$TMPSRC \$TMPSED
22045 CF_EOF
22046
22047 chmod 0755 headers.sh
22048
22049 for cf_dir in $SRC_SUBDIRS
22050 do
22051         if test ! -d $srcdir/$cf_dir ; then
22052                 continue
22053         fi
22054
22055         if test -f $srcdir/$cf_dir/headers; then
22056                 $AWK -f $srcdir/mk-hdr.awk \
22057                         subset="$LIB_SUBSETS" \
22058                         compat="$WITH_CURSES_H" \
22059                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22060         fi
22061
22062         if test -f $srcdir/$cf_dir/modules; then
22063                 if test "$cf_dir" != "c++" ; then
22064                         cat >>$cf_dir/Makefile <<"CF_EOF"
22065 depend : ${AUTO_SRC}
22066         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22067
22068 # DO NOT DELETE THIS LINE -- make depend depends on it.
22069 CF_EOF
22070                 fi
22071         fi
22072 done
22073
22074 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22075 if test -z "$USE_OLD_MAKERULES" ; then
22076         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22077 fi
22078 fi
22079  ;;
22080   esac
22081 done
22082 EOF
22083
22084 cat >>$CONFIG_STATUS <<\EOF
22085
22086 { (exit 0); exit 0; }
22087 EOF
22088 chmod +x $CONFIG_STATUS
22089 ac_clean_files=$ac_clean_files_save
22090
22091 # configure is writing to config.log, and then calls config.status.
22092 # config.status does its own redirection, appending to config.log.
22093 # Unfortunately, on DOS this fails, as config.log is still kept open
22094 # by configure, so config.status won't be able to write to it; its
22095 # output is simply discarded.  So we exec the FD to /dev/null,
22096 # effectively closing config.log, so it can be properly (re)opened and
22097 # appended to by config.status.  When coming back to configure, we
22098 # need to make the FD available again.
22099 if test "$no_create" != yes; then
22100   ac_cs_success=:
22101   exec 5>/dev/null
22102   $SHELL $CONFIG_STATUS || ac_cs_success=false
22103   exec 5>>config.log
22104   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22105   # would make configure fail if this is the last instruction.
22106   $ac_cs_success || { (exit 1); exit 1; }
22107 fi
22108 ${MAKE:-make} preinstall