]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20120218
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.543 .
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-tparm-arg=TYPE   override parameter type of tparm
766   --with-rcs-ids          compile-in RCS identifiers
767 Options to Specify How Manpages are Installed:
768   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
769                           optionally formatted/catonly, e.g., gzip,formatted
770   --with-manpage-renames  specify manpage-renaming
771   --with-manpage-aliases  specify manpage-aliases using .so
772   --with-manpage-symlinks specify manpage-aliases using symlinks
773   --with-manpage-tbl      specify manpage processing with tbl
774 Extensions:
775   --disable-ext-funcs     disable function-extensions
776   --enable-sp-funcs       enable experimental SCREEN-extensions
777   --enable-term-driver    enable experimental terminal-driver
778   --enable-const          compile with extra/non-standard const
779   --enable-ext-colors     compile for 256-color support
780   --enable-ext-mouse      compile for extended mouse-encoding
781   --enable-no-padding     compile with $NCURSES_NO_PADDING code
782   --enable-signed-char    compile using signed Boolean's in term.h
783   --enable-sigwinch       compile with SIGWINCH handler
784   --enable-tcap-names     compile with user-definable terminal capabilities
785 Development Code:
786   --without-develop       disable development options
787   --enable-hard-tabs      compile with hard-tabs code
788   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
789 Experimental Code:
790   --disable-assumed-color do not assume anything about default-colors
791   --disable-hashmap       compile without hashmap scrolling-optimization
792   --enable-colorfgbg      compile-in experimental $COLORFGBG code
793   --enable-interop        compile-in experimental interop bindings
794   --with-pthread          use POSIX thread library
795   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
796   --enable-weak-symbols   enable weak-symbols for pthreads
797   --enable-reentrant      compile with experimental reentrant code
798   --with-wrap-prefix=XXX  override prefix used for public variables
799   --enable-safe-sprintf   compile with experimental safe-sprintf code
800   --disable-scroll-hints  compile without scroll-hints code
801   --enable-wgetch-events  compile with experimental wgetch-events code
802 Testing/development Options:
803   --enable-echo           build: display "compiling" commands (default)
804   --enable-warnings       build: turn on GCC compiler warnings
805   --enable-assertions     test: turn on generation of assertion code
806   --with-dmalloc          test: use Gray Watson's dmalloc library
807   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
808   --with-valgrind         test: use valgrind
809   --disable-leaks         test: free permanent memory, analyze leaks
810   --enable-expanded       test: generate functions for certain macros
811   --disable-macros        test: use functions rather than macros
812   --with-trace            test: add trace() function to all models of ncurses
813 Ada95 Binding Options:
814   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
815   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
816   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
817   --with-ada-sharedlib=XX build Ada95 shared-library
818
819 Some influential environment variables:
820   CC          C compiler command
821   CFLAGS      C compiler flags
822   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
823               nonstandard directory <lib dir>
824   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
825               headers in a nonstandard directory <include dir>
826   CPP         C preprocessor
827   CXX         C++ compiler command
828   CXXFLAGS    C++ compiler flags
829   CXXCPP      C++ preprocessor
830
831 Use these variables to override the choices made by `configure' or to help
832 it to find libraries and programs with nonstandard names/locations.
833
834 EOF
835 fi
836
837 if test "$ac_init_help" = "recursive"; then
838   # If there are subdirs, report their specific --help.
839   ac_popdir=`pwd`
840   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
841     cd $ac_subdir
842     # A "../" for each directory in /$ac_subdir.
843     ac_dots=`echo $ac_subdir |
844              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
845
846     case $srcdir in
847     .) # No --srcdir option.  We are building in place.
848       ac_sub_srcdir=$srcdir ;;
849     [\\/]* | ?:[\\/]* ) # Absolute path.
850       ac_sub_srcdir=$srcdir/$ac_subdir ;;
851     *) # Relative path.
852       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
853     esac
854
855     # Check for guested configure; otherwise get Cygnus style configure.
856     if test -f $ac_sub_srcdir/configure.gnu; then
857       echo
858       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
859     elif test -f $ac_sub_srcdir/configure; then
860       echo
861       $SHELL $ac_sub_srcdir/configure  --help=recursive
862     elif test -f $ac_sub_srcdir/configure.ac ||
863            test -f $ac_sub_srcdir/configure.in; then
864       echo
865       $ac_configure --help
866     else
867       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
868     fi
869     cd $ac_popdir
870   done
871 fi
872
873 test -n "$ac_init_help" && exit 0
874 if $ac_init_version; then
875   cat <<\EOF
876
877 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
878 Free Software Foundation, Inc.
879 This configure script is free software; the Free Software Foundation
880 gives unlimited permission to copy, distribute and modify it.
881 EOF
882   exit 0
883 fi
884 exec 5>config.log
885 cat >&5 <<EOF
886 This file contains any messages produced by compilers while
887 running configure, to aid debugging if configure makes a mistake.
888
889 It was created by $as_me, which was
890 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
891
892   $ $0 $@
893
894 EOF
895 {
896 cat <<_ASUNAME
897 ## ---------- ##
898 ## Platform.  ##
899 ## ---------- ##
900
901 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
902 uname -m = `(uname -m) 2>/dev/null || echo unknown`
903 uname -r = `(uname -r) 2>/dev/null || echo unknown`
904 uname -s = `(uname -s) 2>/dev/null || echo unknown`
905 uname -v = `(uname -v) 2>/dev/null || echo unknown`
906
907 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
908 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
909
910 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
911 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
912 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
913 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
914 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
915 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
916 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
917
918 PATH = $PATH
919
920 _ASUNAME
921 } >&5
922
923 cat >&5 <<EOF
924 ## ------------ ##
925 ## Core tests.  ##
926 ## ------------ ##
927
928 EOF
929
930 # Keep a trace of the command line.
931 # Strip out --no-create and --no-recursion so they do not pile up.
932 # Also quote any args containing shell meta-characters.
933 ac_configure_args=
934 ac_sep=
935 for ac_arg
936 do
937   case $ac_arg in
938   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
939   | --no-cr | --no-c) ;;
940   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
941   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
942   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
943     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
944     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
945     ac_sep=" " ;;
946   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
947      ac_sep=" " ;;
948   esac
949   # Get rid of the leading space.
950 done
951
952 # When interrupted or exit'd, cleanup temporary files, and complete
953 # config.log.  We remove comments because anyway the quotes in there
954 # would cause problems or look ugly.
955 trap 'exit_status=$?
956   # Save into config.log some information that might help in debugging.
957   echo >&5
958   echo "## ----------------- ##" >&5
959   echo "## Cache variables.  ##" >&5
960   echo "## ----------------- ##" >&5
961   echo >&5
962   # The following way of writing the cache mishandles newlines in values,
963 {
964   (set) 2>&1 |
965     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
966     *ac_space=\ *)
967       sed -n \
968         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
969           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
970       ;;
971     *)
972       sed -n \
973         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
974       ;;
975     esac;
976 } >&5
977   sed "/^$/d" confdefs.h >conftest.log
978   if test -s conftest.log; then
979     echo >&5
980     echo "## ------------ ##" >&5
981     echo "## confdefs.h.  ##" >&5
982     echo "## ------------ ##" >&5
983     echo >&5
984     cat conftest.log >&5
985   fi
986   (echo; echo) >&5
987   test "$ac_signal" != 0 &&
988     echo "$as_me: caught signal $ac_signal" >&5
989   echo "$as_me: exit $exit_status" >&5
990   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
991     exit $exit_status
992      ' 0
993 for ac_signal in 1 2 13 15; do
994   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
995 done
996 ac_signal=0
997
998 # confdefs.h avoids OS command line length limits that DEFS can exceed.
999 rm -rf conftest* confdefs.h
1000 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1001 echo >confdefs.h
1002
1003 # Let the site file select an alternate cache file if it wants to.
1004 # Prefer explicitly selected file to automatically selected ones.
1005 if test -z "$CONFIG_SITE"; then
1006   if test "x$prefix" != xNONE; then
1007     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1008   else
1009     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1010   fi
1011 fi
1012 for ac_site_file in $CONFIG_SITE; do
1013   if test -r "$ac_site_file"; then
1014     { echo "$as_me:1014: loading site script $ac_site_file" >&5
1015 echo "$as_me: loading site script $ac_site_file" >&6;}
1016     cat "$ac_site_file" >&5
1017     . "$ac_site_file"
1018   fi
1019 done
1020
1021 if test -r "$cache_file"; then
1022   # Some versions of bash will fail to source /dev/null (special
1023   # files actually), so we avoid doing that.
1024   if test -f "$cache_file"; then
1025     { echo "$as_me:1025: loading cache $cache_file" >&5
1026 echo "$as_me: loading cache $cache_file" >&6;}
1027     case $cache_file in
1028       [\\/]* | ?:[\\/]* ) . $cache_file;;
1029       *)                      . ./$cache_file;;
1030     esac
1031   fi
1032 else
1033   { echo "$as_me:1033: creating cache $cache_file" >&5
1034 echo "$as_me: creating cache $cache_file" >&6;}
1035   >$cache_file
1036 fi
1037
1038 # Check that the precious variables saved in the cache have kept the same
1039 # value.
1040 ac_cache_corrupted=false
1041 for ac_var in `(set) 2>&1 |
1042                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1043   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1044   eval ac_new_set=\$ac_env_${ac_var}_set
1045   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1046   eval ac_new_val="\$ac_env_${ac_var}_value"
1047   case $ac_old_set,$ac_new_set in
1048     set,)
1049       { echo "$as_me:1049: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,set)
1053       { echo "$as_me:1053: error: \`$ac_var' was not set in the previous run" >&5
1054 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1055       ac_cache_corrupted=: ;;
1056     ,);;
1057     *)
1058       if test "x$ac_old_val" != "x$ac_new_val"; then
1059         { echo "$as_me:1059: error: \`$ac_var' has changed since the previous run:" >&5
1060 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1061         { echo "$as_me:1061:   former value:  $ac_old_val" >&5
1062 echo "$as_me:   former value:  $ac_old_val" >&2;}
1063         { echo "$as_me:1063:   current value: $ac_new_val" >&5
1064 echo "$as_me:   current value: $ac_new_val" >&2;}
1065         ac_cache_corrupted=:
1066       fi;;
1067   esac
1068   # Pass precious variables to config.status.  It doesn't matter if
1069   # we pass some twice (in addition to the command line arguments).
1070   if test "$ac_new_set" = set; then
1071     case $ac_new_val in
1072     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1073       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1074       ac_configure_args="$ac_configure_args '$ac_arg'"
1075       ;;
1076     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1077        ;;
1078     esac
1079   fi
1080 done
1081 if $ac_cache_corrupted; then
1082   { echo "$as_me:1082: error: changes in the environment can compromise the build" >&5
1083 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1084   { { echo "$as_me:1084: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1085 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1086    { (exit 1); exit 1; }; }
1087 fi
1088
1089 ac_ext=c
1090 ac_cpp='$CPP $CPPFLAGS'
1091 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1092 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1093 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1094 ac_main_return=return
1095
1096 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1097   *c*,-n*) ECHO_N= ECHO_C='
1098 ' ECHO_T='      ' ;;
1099   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1100   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1101 esac
1102 echo "#! $SHELL" >conftest.sh
1103 echo  "exit 0"   >>conftest.sh
1104 chmod +x conftest.sh
1105 if { (echo "$as_me:1105: PATH=\".;.\"; conftest.sh") >&5
1106   (PATH=".;."; conftest.sh) 2>&5
1107   ac_status=$?
1108   echo "$as_me:1108: \$? = $ac_status" >&5
1109   (exit $ac_status); }; then
1110   ac_path_separator=';'
1111 else
1112   ac_path_separator=:
1113 fi
1114 PATH_SEPARATOR="$ac_path_separator"
1115 rm -f conftest.sh
1116
1117 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1118
1119 top_builddir=`pwd`
1120
1121 echo "$as_me:1121: checking for egrep" >&5
1122 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1123 if test "${ac_cv_prog_egrep+set}" = set; then
1124   echo $ECHO_N "(cached) $ECHO_C" >&6
1125 else
1126   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1127     then ac_cv_prog_egrep='grep -E'
1128     else ac_cv_prog_egrep='egrep'
1129     fi
1130 fi
1131 echo "$as_me:1131: result: $ac_cv_prog_egrep" >&5
1132 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1133  EGREP=$ac_cv_prog_egrep
1134
1135 test -z "$EGREP" && { { echo "$as_me:1135: error: No egrep program found" >&5
1136 echo "$as_me: error: No egrep program found" >&2;}
1137    { (exit 1); exit 1; }; }
1138
1139 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1140 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1141 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1142 cf_cv_abi_version=${NCURSES_MAJOR}
1143 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1144 cf_cv_timestamp=`date`
1145 echo "$as_me:1145: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1146 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1147
1148 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1149
1150 # Check whether --with-rel-version or --without-rel-version was given.
1151 if test "${with_rel_version+set}" = set; then
1152   withval="$with_rel_version"
1153   { echo "$as_me:1153: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1154 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1155  cf_cv_rel_version=$withval
1156 fi;
1157
1158  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1159  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1160
1161 if test -n "$NCURSES_MAJOR" ; then
1162   case $NCURSES_MAJOR in #(vi
1163   [0-9]*) #(vi
1164         ;;
1165   *)
1166         { { echo "$as_me:1166: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1167 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1168    { (exit 1); exit 1; }; }
1169         ;;
1170   esac
1171 else
1172   { { echo "$as_me:1172: error: Release major-version value is empty" >&5
1173 echo "$as_me: error: Release major-version value is empty" >&2;}
1174    { (exit 1); exit 1; }; }
1175 fi
1176
1177 if test -n "$NCURSES_MINOR" ; then
1178   case $NCURSES_MINOR in #(vi
1179   [0-9]*) #(vi
1180         ;;
1181   *)
1182         { { echo "$as_me:1182: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1183 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1184    { (exit 1); exit 1; }; }
1185         ;;
1186   esac
1187 else
1188   { { echo "$as_me:1188: error: Release minor-version value is empty" >&5
1189 echo "$as_me: error: Release minor-version value is empty" >&2;}
1190    { (exit 1); exit 1; }; }
1191 fi
1192
1193 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1194
1195 # Check whether --with-abi-version or --without-abi-version was given.
1196 if test "${with_abi_version+set}" = set; then
1197   withval="$with_abi_version"
1198   { echo "$as_me:1198: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1199 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1200  cf_cv_abi_version=$withval
1201 fi;
1202
1203 if test -n "$cf_cv_abi_version" ; then
1204   case $cf_cv_abi_version in #(vi
1205   [0-9]*) #(vi
1206         ;;
1207   *)
1208         { { echo "$as_me:1208: error: ABI version is not a number: $cf_cv_abi_version" >&5
1209 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1210    { (exit 1); exit 1; }; }
1211         ;;
1212   esac
1213 else
1214   { { echo "$as_me:1214: error: ABI version value is empty" >&5
1215 echo "$as_me: error: ABI version value is empty" >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218
1219 ac_aux_dir=
1220 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1221   if test -f $ac_dir/install-sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install-sh -c"
1224     break
1225   elif test -f $ac_dir/install.sh; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/install.sh -c"
1228     break
1229   elif test -f $ac_dir/shtool; then
1230     ac_aux_dir=$ac_dir
1231     ac_install_sh="$ac_aux_dir/shtool install -c"
1232     break
1233   fi
1234 done
1235 if test -z "$ac_aux_dir"; then
1236   { { echo "$as_me:1236: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1237 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1238    { (exit 1); exit 1; }; }
1239 fi
1240 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1241 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1242 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1243
1244 # Make sure we can run config.sub.
1245 $ac_config_sub sun4 >/dev/null 2>&1 ||
1246   { { echo "$as_me:1246: error: cannot run $ac_config_sub" >&5
1247 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1248    { (exit 1); exit 1; }; }
1249
1250 echo "$as_me:1250: checking build system type" >&5
1251 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1252 if test "${ac_cv_build+set}" = set; then
1253   echo $ECHO_N "(cached) $ECHO_C" >&6
1254 else
1255   ac_cv_build_alias=$build_alias
1256 test -z "$ac_cv_build_alias" &&
1257   ac_cv_build_alias=`$ac_config_guess`
1258 test -z "$ac_cv_build_alias" &&
1259   { { echo "$as_me:1259: error: cannot guess build type; you must specify one" >&5
1260 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1261    { (exit 1); exit 1; }; }
1262 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1263   { { echo "$as_me:1263: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1264 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1265    { (exit 1); exit 1; }; }
1266
1267 fi
1268 echo "$as_me:1268: result: $ac_cv_build" >&5
1269 echo "${ECHO_T}$ac_cv_build" >&6
1270 build=$ac_cv_build
1271 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1272 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1273 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1274
1275 echo "$as_me:1275: checking host system type" >&5
1276 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1277 if test "${ac_cv_host+set}" = set; then
1278   echo $ECHO_N "(cached) $ECHO_C" >&6
1279 else
1280   ac_cv_host_alias=$host_alias
1281 test -z "$ac_cv_host_alias" &&
1282   ac_cv_host_alias=$ac_cv_build_alias
1283 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1284   { { echo "$as_me:1284: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1285 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1286    { (exit 1); exit 1; }; }
1287
1288 fi
1289 echo "$as_me:1289: result: $ac_cv_host" >&5
1290 echo "${ECHO_T}$ac_cv_host" >&6
1291 host=$ac_cv_host
1292 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1293 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1294 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1295
1296 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1297         echo "$as_me:1297: checking target system type" >&5
1298 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1299 if test "${ac_cv_target+set}" = set; then
1300   echo $ECHO_N "(cached) $ECHO_C" >&6
1301 else
1302   ac_cv_target_alias=$target_alias
1303 test "x$ac_cv_target_alias" = "x" &&
1304   ac_cv_target_alias=$ac_cv_host_alias
1305 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1306   { { echo "$as_me:1306: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1307 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310 fi
1311 echo "$as_me:1311: result: $ac_cv_target" >&5
1312 echo "${ECHO_T}$ac_cv_target" >&6
1313 target=$ac_cv_target
1314 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1315 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1316 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1317
1318 # The aliases save the names the user supplied, while $host etc.
1319 # will get canonicalized.
1320 test -n "$target_alias" &&
1321   test "$program_prefix$program_suffix$program_transform_name" = \
1322     NONENONEs,x,x, &&
1323   program_prefix=${target_alias}-
1324         system_name="$host_os"
1325 else
1326         system_name="`(uname -s -r) 2>/dev/null`"
1327         if test -z "$system_name" ; then
1328                 system_name="`(hostname) 2>/dev/null`"
1329         fi
1330 fi
1331 test -n "$system_name" && cat >>confdefs.h <<EOF
1332 #define SYSTEM_NAME "$system_name"
1333 EOF
1334
1335 if test "${cf_cv_system_name+set}" = set; then
1336   echo $ECHO_N "(cached) $ECHO_C" >&6
1337 else
1338   cf_cv_system_name="$system_name"
1339 fi
1340
1341 test -z "$system_name" && system_name="$cf_cv_system_name"
1342 test -n "$cf_cv_system_name" && echo "$as_me:1342: result: Configuring for $cf_cv_system_name" >&5
1343 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1344
1345 if test ".$system_name" != ".$cf_cv_system_name" ; then
1346         echo "$as_me:1346: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1347 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1348         { { echo "$as_me:1348: error: \"Please remove config.cache and try again.\"" >&5
1349 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1350    { (exit 1); exit 1; }; }
1351 fi
1352
1353 # Check whether --with-system-type or --without-system-type was given.
1354 if test "${with_system_type+set}" = set; then
1355   withval="$with_system_type"
1356   { echo "$as_me:1356: WARNING: overriding system type to $withval" >&5
1357 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1358  cf_cv_system_name=$withval
1359 fi;
1360
1361 ###     Save the given $CFLAGS to allow user-override.
1362 cf_user_CFLAGS="$CFLAGS"
1363
1364 ###     Default install-location
1365
1366 echo "$as_me:1366: checking for prefix" >&5
1367 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1368 if test "x$prefix" = "xNONE" ; then
1369         case "$cf_cv_system_name" in
1370                 # non-vendor systems don't have a conflict
1371         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1372                 prefix=/usr
1373                 ;;
1374         *)      prefix=$ac_default_prefix
1375                 ;;
1376         esac
1377 fi
1378 echo "$as_me:1378: result: $prefix" >&5
1379 echo "${ECHO_T}$prefix" >&6
1380
1381 if test "x$prefix" = "xNONE" ; then
1382 echo "$as_me:1382: checking for default include-directory" >&5
1383 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1384 test -n "$verbose" && echo 1>&6
1385 for cf_symbol in \
1386         $includedir \
1387         $includedir/ncurses \
1388         $prefix/include \
1389         $prefix/include/ncurses \
1390         /usr/local/include \
1391         /usr/local/include/ncurses \
1392         /usr/include \
1393         /usr/include/ncurses
1394 do
1395         cf_dir=`eval echo $cf_symbol`
1396         if test -f $cf_dir/curses.h ; then
1397         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1398                 includedir="$cf_symbol"
1399                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1400                 break
1401         fi
1402         fi
1403         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1404 done
1405 echo "$as_me:1405: result: $includedir" >&5
1406 echo "${ECHO_T}$includedir" >&6
1407 fi
1408
1409 ###     Checks for programs.
1410 ac_ext=c
1411 ac_cpp='$CPP $CPPFLAGS'
1412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1415 ac_main_return=return
1416 if test -n "$ac_tool_prefix"; then
1417   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1418 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1419 echo "$as_me:1419: checking for $ac_word" >&5
1420 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1421 if test "${ac_cv_prog_CC+set}" = set; then
1422   echo $ECHO_N "(cached) $ECHO_C" >&6
1423 else
1424   if test -n "$CC"; then
1425   ac_cv_prog_CC="$CC" # Let the user override the test.
1426 else
1427   ac_save_IFS=$IFS; IFS=$ac_path_separator
1428 ac_dummy="$PATH"
1429 for ac_dir in $ac_dummy; do
1430   IFS=$ac_save_IFS
1431   test -z "$ac_dir" && ac_dir=.
1432   $as_executable_p "$ac_dir/$ac_word" || continue
1433 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1434 echo "$as_me:1434: found $ac_dir/$ac_word" >&5
1435 break
1436 done
1437
1438 fi
1439 fi
1440 CC=$ac_cv_prog_CC
1441 if test -n "$CC"; then
1442   echo "$as_me:1442: result: $CC" >&5
1443 echo "${ECHO_T}$CC" >&6
1444 else
1445   echo "$as_me:1445: result: no" >&5
1446 echo "${ECHO_T}no" >&6
1447 fi
1448
1449 fi
1450 if test -z "$ac_cv_prog_CC"; then
1451   ac_ct_CC=$CC
1452   # Extract the first word of "gcc", so it can be a program name with args.
1453 set dummy gcc; ac_word=$2
1454 echo "$as_me:1454: checking for $ac_word" >&5
1455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1456 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1457   echo $ECHO_N "(cached) $ECHO_C" >&6
1458 else
1459   if test -n "$ac_ct_CC"; then
1460   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1461 else
1462   ac_save_IFS=$IFS; IFS=$ac_path_separator
1463 ac_dummy="$PATH"
1464 for ac_dir in $ac_dummy; do
1465   IFS=$ac_save_IFS
1466   test -z "$ac_dir" && ac_dir=.
1467   $as_executable_p "$ac_dir/$ac_word" || continue
1468 ac_cv_prog_ac_ct_CC="gcc"
1469 echo "$as_me:1469: found $ac_dir/$ac_word" >&5
1470 break
1471 done
1472
1473 fi
1474 fi
1475 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1476 if test -n "$ac_ct_CC"; then
1477   echo "$as_me:1477: result: $ac_ct_CC" >&5
1478 echo "${ECHO_T}$ac_ct_CC" >&6
1479 else
1480   echo "$as_me:1480: result: no" >&5
1481 echo "${ECHO_T}no" >&6
1482 fi
1483
1484   CC=$ac_ct_CC
1485 else
1486   CC="$ac_cv_prog_CC"
1487 fi
1488
1489 if test -z "$CC"; then
1490   if test -n "$ac_tool_prefix"; then
1491   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1492 set dummy ${ac_tool_prefix}cc; ac_word=$2
1493 echo "$as_me:1493: checking for $ac_word" >&5
1494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1495 if test "${ac_cv_prog_CC+set}" = set; then
1496   echo $ECHO_N "(cached) $ECHO_C" >&6
1497 else
1498   if test -n "$CC"; then
1499   ac_cv_prog_CC="$CC" # Let the user override the test.
1500 else
1501   ac_save_IFS=$IFS; IFS=$ac_path_separator
1502 ac_dummy="$PATH"
1503 for ac_dir in $ac_dummy; do
1504   IFS=$ac_save_IFS
1505   test -z "$ac_dir" && ac_dir=.
1506   $as_executable_p "$ac_dir/$ac_word" || continue
1507 ac_cv_prog_CC="${ac_tool_prefix}cc"
1508 echo "$as_me:1508: found $ac_dir/$ac_word" >&5
1509 break
1510 done
1511
1512 fi
1513 fi
1514 CC=$ac_cv_prog_CC
1515 if test -n "$CC"; then
1516   echo "$as_me:1516: result: $CC" >&5
1517 echo "${ECHO_T}$CC" >&6
1518 else
1519   echo "$as_me:1519: result: no" >&5
1520 echo "${ECHO_T}no" >&6
1521 fi
1522
1523 fi
1524 if test -z "$ac_cv_prog_CC"; then
1525   ac_ct_CC=$CC
1526   # Extract the first word of "cc", so it can be a program name with args.
1527 set dummy cc; ac_word=$2
1528 echo "$as_me:1528: checking for $ac_word" >&5
1529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1530 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1531   echo $ECHO_N "(cached) $ECHO_C" >&6
1532 else
1533   if test -n "$ac_ct_CC"; then
1534   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1535 else
1536   ac_save_IFS=$IFS; IFS=$ac_path_separator
1537 ac_dummy="$PATH"
1538 for ac_dir in $ac_dummy; do
1539   IFS=$ac_save_IFS
1540   test -z "$ac_dir" && ac_dir=.
1541   $as_executable_p "$ac_dir/$ac_word" || continue
1542 ac_cv_prog_ac_ct_CC="cc"
1543 echo "$as_me:1543: found $ac_dir/$ac_word" >&5
1544 break
1545 done
1546
1547 fi
1548 fi
1549 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1550 if test -n "$ac_ct_CC"; then
1551   echo "$as_me:1551: result: $ac_ct_CC" >&5
1552 echo "${ECHO_T}$ac_ct_CC" >&6
1553 else
1554   echo "$as_me:1554: result: no" >&5
1555 echo "${ECHO_T}no" >&6
1556 fi
1557
1558   CC=$ac_ct_CC
1559 else
1560   CC="$ac_cv_prog_CC"
1561 fi
1562
1563 fi
1564 if test -z "$CC"; then
1565   # Extract the first word of "cc", so it can be a program name with args.
1566 set dummy cc; ac_word=$2
1567 echo "$as_me:1567: checking for $ac_word" >&5
1568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1569 if test "${ac_cv_prog_CC+set}" = set; then
1570   echo $ECHO_N "(cached) $ECHO_C" >&6
1571 else
1572   if test -n "$CC"; then
1573   ac_cv_prog_CC="$CC" # Let the user override the test.
1574 else
1575   ac_prog_rejected=no
1576   ac_save_IFS=$IFS; IFS=$ac_path_separator
1577 ac_dummy="$PATH"
1578 for ac_dir in $ac_dummy; do
1579   IFS=$ac_save_IFS
1580   test -z "$ac_dir" && ac_dir=.
1581   $as_executable_p "$ac_dir/$ac_word" || continue
1582 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1583   ac_prog_rejected=yes
1584   continue
1585 fi
1586 ac_cv_prog_CC="cc"
1587 echo "$as_me:1587: found $ac_dir/$ac_word" >&5
1588 break
1589 done
1590
1591 if test $ac_prog_rejected = yes; then
1592   # We found a bogon in the path, so make sure we never use it.
1593   set dummy $ac_cv_prog_CC
1594   shift
1595   if test $# != 0; then
1596     # We chose a different compiler from the bogus one.
1597     # However, it has the same basename, so the bogon will be chosen
1598     # first if we set CC to just the basename; use the full file name.
1599     shift
1600     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1601     shift
1602     ac_cv_prog_CC="$@"
1603   fi
1604 fi
1605 fi
1606 fi
1607 CC=$ac_cv_prog_CC
1608 if test -n "$CC"; then
1609   echo "$as_me:1609: result: $CC" >&5
1610 echo "${ECHO_T}$CC" >&6
1611 else
1612   echo "$as_me:1612: result: no" >&5
1613 echo "${ECHO_T}no" >&6
1614 fi
1615
1616 fi
1617 if test -z "$CC"; then
1618   if test -n "$ac_tool_prefix"; then
1619   for ac_prog in cl
1620   do
1621     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1622 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1623 echo "$as_me:1623: checking for $ac_word" >&5
1624 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1625 if test "${ac_cv_prog_CC+set}" = set; then
1626   echo $ECHO_N "(cached) $ECHO_C" >&6
1627 else
1628   if test -n "$CC"; then
1629   ac_cv_prog_CC="$CC" # Let the user override the test.
1630 else
1631   ac_save_IFS=$IFS; IFS=$ac_path_separator
1632 ac_dummy="$PATH"
1633 for ac_dir in $ac_dummy; do
1634   IFS=$ac_save_IFS
1635   test -z "$ac_dir" && ac_dir=.
1636   $as_executable_p "$ac_dir/$ac_word" || continue
1637 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1638 echo "$as_me:1638: found $ac_dir/$ac_word" >&5
1639 break
1640 done
1641
1642 fi
1643 fi
1644 CC=$ac_cv_prog_CC
1645 if test -n "$CC"; then
1646   echo "$as_me:1646: result: $CC" >&5
1647 echo "${ECHO_T}$CC" >&6
1648 else
1649   echo "$as_me:1649: result: no" >&5
1650 echo "${ECHO_T}no" >&6
1651 fi
1652
1653     test -n "$CC" && break
1654   done
1655 fi
1656 if test -z "$CC"; then
1657   ac_ct_CC=$CC
1658   for ac_prog in cl
1659 do
1660   # Extract the first word of "$ac_prog", so it can be a program name with args.
1661 set dummy $ac_prog; ac_word=$2
1662 echo "$as_me:1662: checking for $ac_word" >&5
1663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1664 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1665   echo $ECHO_N "(cached) $ECHO_C" >&6
1666 else
1667   if test -n "$ac_ct_CC"; then
1668   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1669 else
1670   ac_save_IFS=$IFS; IFS=$ac_path_separator
1671 ac_dummy="$PATH"
1672 for ac_dir in $ac_dummy; do
1673   IFS=$ac_save_IFS
1674   test -z "$ac_dir" && ac_dir=.
1675   $as_executable_p "$ac_dir/$ac_word" || continue
1676 ac_cv_prog_ac_ct_CC="$ac_prog"
1677 echo "$as_me:1677: found $ac_dir/$ac_word" >&5
1678 break
1679 done
1680
1681 fi
1682 fi
1683 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1684 if test -n "$ac_ct_CC"; then
1685   echo "$as_me:1685: result: $ac_ct_CC" >&5
1686 echo "${ECHO_T}$ac_ct_CC" >&6
1687 else
1688   echo "$as_me:1688: result: no" >&5
1689 echo "${ECHO_T}no" >&6
1690 fi
1691
1692   test -n "$ac_ct_CC" && break
1693 done
1694
1695   CC=$ac_ct_CC
1696 fi
1697
1698 fi
1699
1700 test -z "$CC" && { { echo "$as_me:1700: error: no acceptable cc found in \$PATH" >&5
1701 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1702    { (exit 1); exit 1; }; }
1703
1704 # Provide some information about the compiler.
1705 echo "$as_me:1705:" \
1706      "checking for C compiler version" >&5
1707 ac_compiler=`set X $ac_compile; echo $2`
1708 { (eval echo "$as_me:1708: \"$ac_compiler --version </dev/null >&5\"") >&5
1709   (eval $ac_compiler --version </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713 { (eval echo "$as_me:1713: \"$ac_compiler -v </dev/null >&5\"") >&5
1714   (eval $ac_compiler -v </dev/null >&5) 2>&5
1715   ac_status=$?
1716   echo "$as_me:1716: \$? = $ac_status" >&5
1717   (exit $ac_status); }
1718 { (eval echo "$as_me:1718: \"$ac_compiler -V </dev/null >&5\"") >&5
1719   (eval $ac_compiler -V </dev/null >&5) 2>&5
1720   ac_status=$?
1721   echo "$as_me:1721: \$? = $ac_status" >&5
1722   (exit $ac_status); }
1723
1724 cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main ()
1730 {
1731
1732   ;
1733   return 0;
1734 }
1735 _ACEOF
1736 ac_clean_files_save=$ac_clean_files
1737 ac_clean_files="$ac_clean_files a.out a.exe"
1738 # Try to create an executable without -o first, disregard a.out.
1739 # It will help us diagnose broken compilers, and finding out an intuition
1740 # of exeext.
1741 echo "$as_me:1741: checking for C compiler default output" >&5
1742 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1743 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1744 if { (eval echo "$as_me:1744: \"$ac_link_default\"") >&5
1745   (eval $ac_link_default) 2>&5
1746   ac_status=$?
1747   echo "$as_me:1747: \$? = $ac_status" >&5
1748   (exit $ac_status); }; then
1749   # Find the output, starting from the most likely.  This scheme is
1750 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1751 # resort.
1752 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1753                 ls a.out conftest 2>/dev/null;
1754                 ls a.* conftest.* 2>/dev/null`; do
1755   case $ac_file in
1756     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1757     a.out ) # We found the default executable, but exeext='' is most
1758             # certainly right.
1759             break;;
1760     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1761           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1762           export ac_cv_exeext
1763           break;;
1764     * ) break;;
1765   esac
1766 done
1767 else
1768   echo "$as_me: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 { { echo "$as_me:1770: error: C compiler cannot create executables" >&5
1771 echo "$as_me: error: C compiler cannot create executables" >&2;}
1772    { (exit 77); exit 77; }; }
1773 fi
1774
1775 ac_exeext=$ac_cv_exeext
1776 echo "$as_me:1776: result: $ac_file" >&5
1777 echo "${ECHO_T}$ac_file" >&6
1778
1779 # Check the compiler produces executables we can run.  If not, either
1780 # the compiler is broken, or we cross compile.
1781 echo "$as_me:1781: checking whether the C compiler works" >&5
1782 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1783 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1784 # If not cross compiling, check that we can run a simple program.
1785 if test "$cross_compiling" != yes; then
1786   if { ac_try='./$ac_file'
1787   { (eval echo "$as_me:1787: \"$ac_try\"") >&5
1788   (eval $ac_try) 2>&5
1789   ac_status=$?
1790   echo "$as_me:1790: \$? = $ac_status" >&5
1791   (exit $ac_status); }; }; then
1792     cross_compiling=no
1793   else
1794     if test "$cross_compiling" = maybe; then
1795         cross_compiling=yes
1796     else
1797         { { echo "$as_me:1797: error: cannot run C compiled programs.
1798 If you meant to cross compile, use \`--host'." >&5
1799 echo "$as_me: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&2;}
1801    { (exit 1); exit 1; }; }
1802     fi
1803   fi
1804 fi
1805 echo "$as_me:1805: result: yes" >&5
1806 echo "${ECHO_T}yes" >&6
1807
1808 rm -f a.out a.exe conftest$ac_cv_exeext
1809 ac_clean_files=$ac_clean_files_save
1810 # Check the compiler produces executables we can run.  If not, either
1811 # the compiler is broken, or we cross compile.
1812 echo "$as_me:1812: checking whether we are cross compiling" >&5
1813 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1814 echo "$as_me:1814: result: $cross_compiling" >&5
1815 echo "${ECHO_T}$cross_compiling" >&6
1816
1817 echo "$as_me:1817: checking for executable suffix" >&5
1818 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1819 if { (eval echo "$as_me:1819: \"$ac_link\"") >&5
1820   (eval $ac_link) 2>&5
1821   ac_status=$?
1822   echo "$as_me:1822: \$? = $ac_status" >&5
1823   (exit $ac_status); }; then
1824   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1825 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1826 # work properly (i.e., refer to `conftest.exe'), while it won't with
1827 # `rm'.
1828 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1829   case $ac_file in
1830     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1831     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1832           export ac_cv_exeext
1833           break;;
1834     * ) break;;
1835   esac
1836 done
1837 else
1838   { { echo "$as_me:1838: error: cannot compute EXEEXT: cannot compile and link" >&5
1839 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1840    { (exit 1); exit 1; }; }
1841 fi
1842
1843 rm -f conftest$ac_cv_exeext
1844 echo "$as_me:1844: result: $ac_cv_exeext" >&5
1845 echo "${ECHO_T}$ac_cv_exeext" >&6
1846
1847 rm -f conftest.$ac_ext
1848 EXEEXT=$ac_cv_exeext
1849 ac_exeext=$EXEEXT
1850 echo "$as_me:1850: checking for object suffix" >&5
1851 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1852 if test "${ac_cv_objext+set}" = set; then
1853   echo $ECHO_N "(cached) $ECHO_C" >&6
1854 else
1855   cat >conftest.$ac_ext <<_ACEOF
1856 #line 1856 "configure"
1857 #include "confdefs.h"
1858
1859 int
1860 main ()
1861 {
1862
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.o conftest.obj
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); }; then
1873   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1874   case $ac_file in
1875     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1876     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1877        break;;
1878   esac
1879 done
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 { { echo "$as_me:1883: error: cannot compute OBJEXT: cannot compile" >&5
1884 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1885    { (exit 1); exit 1; }; }
1886 fi
1887
1888 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1889 fi
1890 echo "$as_me:1890: result: $ac_cv_objext" >&5
1891 echo "${ECHO_T}$ac_cv_objext" >&6
1892 OBJEXT=$ac_cv_objext
1893 ac_objext=$OBJEXT
1894 echo "$as_me:1894: checking whether we are using the GNU C compiler" >&5
1895 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1896 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1897   echo $ECHO_N "(cached) $ECHO_C" >&6
1898 else
1899   cat >conftest.$ac_ext <<_ACEOF
1900 #line 1900 "configure"
1901 #include "confdefs.h"
1902
1903 int
1904 main ()
1905 {
1906 #ifndef __GNUC__
1907        choke me
1908 #endif
1909
1910   ;
1911   return 0;
1912 }
1913 _ACEOF
1914 rm -f conftest.$ac_objext
1915 if { (eval echo "$as_me:1915: \"$ac_compile\"") >&5
1916   (eval $ac_compile) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); } &&
1920          { ac_try='test -s conftest.$ac_objext'
1921   { (eval echo "$as_me:1921: \"$ac_try\"") >&5
1922   (eval $ac_try) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit $ac_status); }; }; then
1926   ac_compiler_gnu=yes
1927 else
1928   echo "$as_me: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1930 ac_compiler_gnu=no
1931 fi
1932 rm -f conftest.$ac_objext conftest.$ac_ext
1933 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1934
1935 fi
1936 echo "$as_me:1936: result: $ac_cv_c_compiler_gnu" >&5
1937 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1938 GCC=`test $ac_compiler_gnu = yes && echo yes`
1939 ac_test_CFLAGS=${CFLAGS+set}
1940 ac_save_CFLAGS=$CFLAGS
1941 CFLAGS="-g"
1942 echo "$as_me:1942: checking whether $CC accepts -g" >&5
1943 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1944 if test "${ac_cv_prog_cc_g+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947   cat >conftest.$ac_ext <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950
1951 int
1952 main ()
1953 {
1954
1955   ;
1956   return 0;
1957 }
1958 _ACEOF
1959 rm -f conftest.$ac_objext
1960 if { (eval echo "$as_me:1960: \"$ac_compile\"") >&5
1961   (eval $ac_compile) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); } &&
1965          { ac_try='test -s conftest.$ac_objext'
1966   { (eval echo "$as_me:1966: \"$ac_try\"") >&5
1967   (eval $ac_try) 2>&5
1968   ac_status=$?
1969   echo "$as_me:1969: \$? = $ac_status" >&5
1970   (exit $ac_status); }; }; then
1971   ac_cv_prog_cc_g=yes
1972 else
1973   echo "$as_me: failed program was:" >&5
1974 cat conftest.$ac_ext >&5
1975 ac_cv_prog_cc_g=no
1976 fi
1977 rm -f conftest.$ac_objext conftest.$ac_ext
1978 fi
1979 echo "$as_me:1979: result: $ac_cv_prog_cc_g" >&5
1980 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1981 if test "$ac_test_CFLAGS" = set; then
1982   CFLAGS=$ac_save_CFLAGS
1983 elif test $ac_cv_prog_cc_g = yes; then
1984   if test "$GCC" = yes; then
1985     CFLAGS="-g -O2"
1986   else
1987     CFLAGS="-g"
1988   fi
1989 else
1990   if test "$GCC" = yes; then
1991     CFLAGS="-O2"
1992   else
1993     CFLAGS=
1994   fi
1995 fi
1996 # Some people use a C++ compiler to compile C.  Since we use `exit',
1997 # in C++ we need to declare it.  In case someone uses the same compiler
1998 # for both compiling C and C++ we need to have the C++ compiler decide
1999 # the declaration of exit, since it's the most demanding environment.
2000 cat >conftest.$ac_ext <<_ACEOF
2001 #ifndef __cplusplus
2002   choke me
2003 #endif
2004 _ACEOF
2005 rm -f conftest.$ac_objext
2006 if { (eval echo "$as_me:2006: \"$ac_compile\"") >&5
2007   (eval $ac_compile) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); } &&
2011          { ac_try='test -s conftest.$ac_objext'
2012   { (eval echo "$as_me:2012: \"$ac_try\"") >&5
2013   (eval $ac_try) 2>&5
2014   ac_status=$?
2015   echo "$as_me:2015: \$? = $ac_status" >&5
2016   (exit $ac_status); }; }; then
2017   for ac_declaration in \
2018    ''\
2019    '#include <stdlib.h>' \
2020    'extern "C" void std::exit (int) throw (); using std::exit;' \
2021    'extern "C" void std::exit (int); using std::exit;' \
2022    'extern "C" void exit (int) throw ();' \
2023    'extern "C" void exit (int);' \
2024    'void exit (int);'
2025 do
2026   cat >conftest.$ac_ext <<_ACEOF
2027 #line 2027 "configure"
2028 #include "confdefs.h"
2029 #include <stdlib.h>
2030 $ac_declaration
2031 int
2032 main ()
2033 {
2034 exit (42);
2035   ;
2036   return 0;
2037 }
2038 _ACEOF
2039 rm -f conftest.$ac_objext
2040 if { (eval echo "$as_me:2040: \"$ac_compile\"") >&5
2041   (eval $ac_compile) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit $ac_status); } &&
2045          { ac_try='test -s conftest.$ac_objext'
2046   { (eval echo "$as_me:2046: \"$ac_try\"") >&5
2047   (eval $ac_try) 2>&5
2048   ac_status=$?
2049   echo "$as_me:2049: \$? = $ac_status" >&5
2050   (exit $ac_status); }; }; then
2051   :
2052 else
2053   echo "$as_me: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 continue
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058   cat >conftest.$ac_ext <<_ACEOF
2059 #line 2059 "configure"
2060 #include "confdefs.h"
2061 $ac_declaration
2062 int
2063 main ()
2064 {
2065 exit (42);
2066   ;
2067   return 0;
2068 }
2069 _ACEOF
2070 rm -f conftest.$ac_objext
2071 if { (eval echo "$as_me:2071: \"$ac_compile\"") >&5
2072   (eval $ac_compile) 2>&5
2073   ac_status=$?
2074   echo "$as_me:2074: \$? = $ac_status" >&5
2075   (exit $ac_status); } &&
2076          { ac_try='test -s conftest.$ac_objext'
2077   { (eval echo "$as_me:2077: \"$ac_try\"") >&5
2078   (eval $ac_try) 2>&5
2079   ac_status=$?
2080   echo "$as_me:2080: \$? = $ac_status" >&5
2081   (exit $ac_status); }; }; then
2082   break
2083 else
2084   echo "$as_me: failed program was:" >&5
2085 cat conftest.$ac_ext >&5
2086 fi
2087 rm -f conftest.$ac_objext conftest.$ac_ext
2088 done
2089 rm -rf conftest*
2090 if test -n "$ac_declaration"; then
2091   echo '#ifdef __cplusplus' >>confdefs.h
2092   echo $ac_declaration      >>confdefs.h
2093   echo '#endif'             >>confdefs.h
2094 fi
2095
2096 else
2097   echo "$as_me: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 fi
2100 rm -f conftest.$ac_objext conftest.$ac_ext
2101 ac_ext=c
2102 ac_cpp='$CPP $CPPFLAGS'
2103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2106 ac_main_return=return
2107
2108 GCC_VERSION=none
2109 if test "$GCC" = yes ; then
2110         echo "$as_me:2110: checking version of $CC" >&5
2111 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2112         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2113         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2114         echo "$as_me:2114: result: $GCC_VERSION" >&5
2115 echo "${ECHO_T}$GCC_VERSION" >&6
2116 fi
2117
2118 ac_ext=c
2119 ac_cpp='$CPP $CPPFLAGS'
2120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2123 ac_main_return=return
2124 echo "$as_me:2124: checking how to run the C preprocessor" >&5
2125 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2126 # On Suns, sometimes $CPP names a directory.
2127 if test -n "$CPP" && test -d "$CPP"; then
2128   CPP=
2129 fi
2130 if test -z "$CPP"; then
2131   if test "${ac_cv_prog_CPP+set}" = set; then
2132   echo $ECHO_N "(cached) $ECHO_C" >&6
2133 else
2134       # Double quotes because CPP needs to be expanded
2135     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2136     do
2137       ac_preproc_ok=false
2138 for ac_c_preproc_warn_flag in '' yes
2139 do
2140   # Use a header file that comes with gcc, so configuring glibc
2141   # with a fresh cross-compiler works.
2142   # On the NeXT, cc -E runs the code through the compiler's parser,
2143   # not just through cpp. "Syntax error" is here to catch this case.
2144   cat >conftest.$ac_ext <<_ACEOF
2145 #line 2145 "configure"
2146 #include "confdefs.h"
2147 #include <assert.h>
2148                      Syntax error
2149 _ACEOF
2150 if { (eval echo "$as_me:2150: \"$ac_cpp conftest.$ac_ext\"") >&5
2151   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2152   ac_status=$?
2153   egrep -v '^ *\+' conftest.er1 >conftest.err
2154   rm -f conftest.er1
2155   cat conftest.err >&5
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); } >/dev/null; then
2158   if test -s conftest.err; then
2159     ac_cpp_err=$ac_c_preproc_warn_flag
2160   else
2161     ac_cpp_err=
2162   fi
2163 else
2164   ac_cpp_err=yes
2165 fi
2166 if test -z "$ac_cpp_err"; then
2167   :
2168 else
2169   echo "$as_me: failed program was:" >&5
2170   cat conftest.$ac_ext >&5
2171   # Broken: fails on valid input.
2172 continue
2173 fi
2174 rm -f conftest.err conftest.$ac_ext
2175
2176   # OK, works on sane cases.  Now check whether non-existent headers
2177   # can be detected and how.
2178   cat >conftest.$ac_ext <<_ACEOF
2179 #line 2179 "configure"
2180 #include "confdefs.h"
2181 #include <ac_nonexistent.h>
2182 _ACEOF
2183 if { (eval echo "$as_me:2183: \"$ac_cpp conftest.$ac_ext\"") >&5
2184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2185   ac_status=$?
2186   egrep -v '^ *\+' conftest.er1 >conftest.err
2187   rm -f conftest.er1
2188   cat conftest.err >&5
2189   echo "$as_me:2189: \$? = $ac_status" >&5
2190   (exit $ac_status); } >/dev/null; then
2191   if test -s conftest.err; then
2192     ac_cpp_err=$ac_c_preproc_warn_flag
2193   else
2194     ac_cpp_err=
2195   fi
2196 else
2197   ac_cpp_err=yes
2198 fi
2199 if test -z "$ac_cpp_err"; then
2200   # Broken: success on invalid input.
2201 continue
2202 else
2203   echo "$as_me: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   # Passes both tests.
2206 ac_preproc_ok=:
2207 break
2208 fi
2209 rm -f conftest.err conftest.$ac_ext
2210
2211 done
2212 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2213 rm -f conftest.err conftest.$ac_ext
2214 if $ac_preproc_ok; then
2215   break
2216 fi
2217
2218     done
2219     ac_cv_prog_CPP=$CPP
2220
2221 fi
2222   CPP=$ac_cv_prog_CPP
2223 else
2224   ac_cv_prog_CPP=$CPP
2225 fi
2226 echo "$as_me:2226: result: $CPP" >&5
2227 echo "${ECHO_T}$CPP" >&6
2228 ac_preproc_ok=false
2229 for ac_c_preproc_warn_flag in '' yes
2230 do
2231   # Use a header file that comes with gcc, so configuring glibc
2232   # with a fresh cross-compiler works.
2233   # On the NeXT, cc -E runs the code through the compiler's parser,
2234   # not just through cpp. "Syntax error" is here to catch this case.
2235   cat >conftest.$ac_ext <<_ACEOF
2236 #line 2236 "configure"
2237 #include "confdefs.h"
2238 #include <assert.h>
2239                      Syntax error
2240 _ACEOF
2241 if { (eval echo "$as_me:2241: \"$ac_cpp conftest.$ac_ext\"") >&5
2242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2243   ac_status=$?
2244   egrep -v '^ *\+' conftest.er1 >conftest.err
2245   rm -f conftest.er1
2246   cat conftest.err >&5
2247   echo "$as_me:2247: \$? = $ac_status" >&5
2248   (exit $ac_status); } >/dev/null; then
2249   if test -s conftest.err; then
2250     ac_cpp_err=$ac_c_preproc_warn_flag
2251   else
2252     ac_cpp_err=
2253   fi
2254 else
2255   ac_cpp_err=yes
2256 fi
2257 if test -z "$ac_cpp_err"; then
2258   :
2259 else
2260   echo "$as_me: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   # Broken: fails on valid input.
2263 continue
2264 fi
2265 rm -f conftest.err conftest.$ac_ext
2266
2267   # OK, works on sane cases.  Now check whether non-existent headers
2268   # can be detected and how.
2269   cat >conftest.$ac_ext <<_ACEOF
2270 #line 2270 "configure"
2271 #include "confdefs.h"
2272 #include <ac_nonexistent.h>
2273 _ACEOF
2274 if { (eval echo "$as_me:2274: \"$ac_cpp conftest.$ac_ext\"") >&5
2275   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2276   ac_status=$?
2277   egrep -v '^ *\+' conftest.er1 >conftest.err
2278   rm -f conftest.er1
2279   cat conftest.err >&5
2280   echo "$as_me:2280: \$? = $ac_status" >&5
2281   (exit $ac_status); } >/dev/null; then
2282   if test -s conftest.err; then
2283     ac_cpp_err=$ac_c_preproc_warn_flag
2284   else
2285     ac_cpp_err=
2286   fi
2287 else
2288   ac_cpp_err=yes
2289 fi
2290 if test -z "$ac_cpp_err"; then
2291   # Broken: success on invalid input.
2292 continue
2293 else
2294   echo "$as_me: failed program was:" >&5
2295   cat conftest.$ac_ext >&5
2296   # Passes both tests.
2297 ac_preproc_ok=:
2298 break
2299 fi
2300 rm -f conftest.err conftest.$ac_ext
2301
2302 done
2303 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2304 rm -f conftest.err conftest.$ac_ext
2305 if $ac_preproc_ok; then
2306   :
2307 else
2308   { { echo "$as_me:2308: error: C preprocessor \"$CPP\" fails sanity check" >&5
2309 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2310    { (exit 1); exit 1; }; }
2311 fi
2312
2313 ac_ext=c
2314 ac_cpp='$CPP $CPPFLAGS'
2315 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2316 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2317 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2318 ac_main_return=return
2319
2320 if test $ac_cv_c_compiler_gnu = yes; then
2321     echo "$as_me:2321: checking whether $CC needs -traditional" >&5
2322 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2323 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2324   echo $ECHO_N "(cached) $ECHO_C" >&6
2325 else
2326     ac_pattern="Autoconf.*'x'"
2327   cat >conftest.$ac_ext <<_ACEOF
2328 #line 2328 "configure"
2329 #include "confdefs.h"
2330 #include <sgtty.h>
2331 int Autoconf = TIOCGETP;
2332 _ACEOF
2333 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2334   egrep "$ac_pattern" >/dev/null 2>&1; then
2335   ac_cv_prog_gcc_traditional=yes
2336 else
2337   ac_cv_prog_gcc_traditional=no
2338 fi
2339 rm -rf conftest*
2340
2341   if test $ac_cv_prog_gcc_traditional = no; then
2342     cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <termio.h>
2346 int Autoconf = TCGETA;
2347 _ACEOF
2348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349   egrep "$ac_pattern" >/dev/null 2>&1; then
2350   ac_cv_prog_gcc_traditional=yes
2351 fi
2352 rm -rf conftest*
2353
2354   fi
2355 fi
2356 echo "$as_me:2356: result: $ac_cv_prog_gcc_traditional" >&5
2357 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2358   if test $ac_cv_prog_gcc_traditional = yes; then
2359     CC="$CC -traditional"
2360   fi
2361 fi
2362
2363 echo "$as_me:2363: checking whether $CC understands -c and -o together" >&5
2364 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2365 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2366   echo $ECHO_N "(cached) $ECHO_C" >&6
2367 else
2368
2369 cat > conftest.$ac_ext <<CF_EOF
2370 #include <stdio.h>
2371 int main()
2372 {
2373         ${cf_cv_main_return:-return}(0);
2374 }
2375 CF_EOF
2376 # We do the test twice because some compilers refuse to overwrite an
2377 # existing .o file with -o, though they will create one.
2378 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2379 if { (eval echo "$as_me:2379: \"$ac_try\"") >&5
2380   (eval $ac_try) 2>&5
2381   ac_status=$?
2382   echo "$as_me:2382: \$? = $ac_status" >&5
2383   (exit $ac_status); } &&
2384   test -f conftest2.$ac_objext && { (eval echo "$as_me:2384: \"$ac_try\"") >&5
2385   (eval $ac_try) 2>&5
2386   ac_status=$?
2387   echo "$as_me:2387: \$? = $ac_status" >&5
2388   (exit $ac_status); };
2389 then
2390   eval cf_cv_prog_CC_c_o=yes
2391 else
2392   eval cf_cv_prog_CC_c_o=no
2393 fi
2394 rm -rf conftest*
2395
2396 fi
2397 if test $cf_cv_prog_CC_c_o = yes; then
2398   echo "$as_me:2398: result: yes" >&5
2399 echo "${ECHO_T}yes" >&6
2400 else
2401   echo "$as_me:2401: result: no" >&5
2402 echo "${ECHO_T}no" >&6
2403 fi
2404
2405 echo "$as_me:2405: checking for POSIXized ISC" >&5
2406 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2407 if test -d /etc/conf/kconfig.d &&
2408    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2409 then
2410   echo "$as_me:2410: result: yes" >&5
2411 echo "${ECHO_T}yes" >&6
2412   ISC=yes # If later tests want to check for ISC.
2413
2414 cat >>confdefs.h <<\EOF
2415 #define _POSIX_SOURCE 1
2416 EOF
2417
2418   if test "$GCC" = yes; then
2419     CC="$CC -posix"
2420   else
2421     CC="$CC -Xp"
2422   fi
2423 else
2424   echo "$as_me:2424: result: no" >&5
2425 echo "${ECHO_T}no" >&6
2426   ISC=
2427 fi
2428
2429 # This should have been defined by AC_PROG_CC
2430 : ${CC:=cc}
2431
2432 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2433 # into CC.  This will not help with broken scripts that wrap the compiler with
2434 # options, but eliminates a more common category of user confusion.
2435 echo "$as_me:2435: checking \$CC variable" >&5
2436 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2437 case "$CC" in #(vi
2438 *[\ \   ]-[IUD]*)
2439         echo "$as_me:2439: result: broken" >&5
2440 echo "${ECHO_T}broken" >&6
2441         { echo "$as_me:2441: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2442 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2443         # humor him...
2444         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2445         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2446
2447 cf_fix_cppflags=no
2448 cf_new_cflags=
2449 cf_new_cppflags=
2450 cf_new_extra_cppflags=
2451
2452 for cf_add_cflags in $cf_flags
2453 do
2454 case $cf_fix_cppflags in
2455 no)
2456         case $cf_add_cflags in #(vi
2457         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2458                 case $cf_add_cflags in
2459                 -D*)
2460                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2461
2462                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2463                                 && test -z "${cf_tst_cflags}" \
2464                                 && cf_fix_cppflags=yes
2465
2466                         if test $cf_fix_cppflags = yes ; then
2467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2468                                 continue
2469                         elif test "${cf_tst_cflags}" = "\"'" ; then
2470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2471                                 continue
2472                         fi
2473                         ;;
2474                 esac
2475                 case "$CPPFLAGS" in
2476                 *$cf_add_cflags) #(vi
2477                         ;;
2478                 *) #(vi
2479                         case $cf_add_cflags in #(vi
2480                         -D*)
2481                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2482
2483 CPPFLAGS=`echo "$CPPFLAGS" | \
2484         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2485                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2486
2487                                 ;;
2488                         esac
2489                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2490                         ;;
2491                 esac
2492                 ;;
2493         *)
2494                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2495                 ;;
2496         esac
2497         ;;
2498 yes)
2499         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2500
2501         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2502
2503         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2504                 && test -z "${cf_tst_cflags}" \
2505                 && cf_fix_cppflags=no
2506         ;;
2507 esac
2508 done
2509
2510 if test -n "$cf_new_cflags" ; then
2511
2512         CFLAGS="$CFLAGS $cf_new_cflags"
2513 fi
2514
2515 if test -n "$cf_new_cppflags" ; then
2516
2517         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2518 fi
2519
2520 if test -n "$cf_new_extra_cppflags" ; then
2521
2522         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2523 fi
2524
2525         ;;
2526 *)
2527         echo "$as_me:2527: result: ok" >&5
2528 echo "${ECHO_T}ok" >&6
2529         ;;
2530 esac
2531
2532 echo "$as_me:2532: checking for ${CC:-cc} option to accept ANSI C" >&5
2533 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2534 if test "${cf_cv_ansi_cc+set}" = set; then
2535   echo $ECHO_N "(cached) $ECHO_C" >&6
2536 else
2537
2538 cf_cv_ansi_cc=no
2539 cf_save_CFLAGS="$CFLAGS"
2540 cf_save_CPPFLAGS="$CPPFLAGS"
2541 # Don't try gcc -ansi; that turns off useful extensions and
2542 # breaks some systems' header files.
2543 # AIX                   -qlanglvl=ansi
2544 # Ultrix and OSF/1      -std1
2545 # HP-UX                 -Aa -D_HPUX_SOURCE
2546 # SVR4                  -Xc
2547 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2548 for cf_arg in "-DCC_HAS_PROTOS" \
2549         "" \
2550         -qlanglvl=ansi \
2551         -std1 \
2552         -Ae \
2553         "-Aa -D_HPUX_SOURCE" \
2554         -Xc
2555 do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case $cf_fix_cppflags in
2565 no)
2566         case $cf_add_cflags in #(vi
2567         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2568                 case $cf_add_cflags in
2569                 -D*)
2570                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test $cf_fix_cppflags = yes ; then
2577                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2578                                 continue
2579                         elif test "${cf_tst_cflags}" = "\"'" ; then
2580                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2581                                 continue
2582                         fi
2583                         ;;
2584                 esac
2585                 case "$CPPFLAGS" in
2586                 *$cf_add_cflags) #(vi
2587                         ;;
2588                 *) #(vi
2589                         case $cf_add_cflags in #(vi
2590                         -D*)
2591                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2592
2593 CPPFLAGS=`echo "$CPPFLAGS" | \
2594         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2595                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2596
2597                                 ;;
2598                         esac
2599                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2600                         ;;
2601                 esac
2602                 ;;
2603         *)
2604                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2605                 ;;
2606         esac
2607         ;;
2608 yes)
2609         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2610
2611         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2612
2613         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2614                 && test -z "${cf_tst_cflags}" \
2615                 && cf_fix_cppflags=no
2616         ;;
2617 esac
2618 done
2619
2620 if test -n "$cf_new_cflags" ; then
2621
2622         CFLAGS="$CFLAGS $cf_new_cflags"
2623 fi
2624
2625 if test -n "$cf_new_cppflags" ; then
2626
2627         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2628 fi
2629
2630 if test -n "$cf_new_extra_cppflags" ; then
2631
2632         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2633 fi
2634
2635         cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2638
2639 #ifndef CC_HAS_PROTOS
2640 #if !defined(__STDC__) || (__STDC__ != 1)
2641 choke me
2642 #endif
2643 #endif
2644
2645 int
2646 main ()
2647 {
2648
2649         int test (int i, double x);
2650         struct s1 {int (*f) (int a);};
2651         struct s2 {int (*f) (double a);};
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 rm -f conftest.$ac_objext
2657 if { (eval echo "$as_me:2657: \"$ac_compile\"") >&5
2658   (eval $ac_compile) 2>&5
2659   ac_status=$?
2660   echo "$as_me:2660: \$? = $ac_status" >&5
2661   (exit $ac_status); } &&
2662          { ac_try='test -s conftest.$ac_objext'
2663   { (eval echo "$as_me:2663: \"$ac_try\"") >&5
2664   (eval $ac_try) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); }; }; then
2668   cf_cv_ansi_cc="$cf_arg"; break
2669 else
2670   echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 fi
2673 rm -f conftest.$ac_objext conftest.$ac_ext
2674 done
2675 CFLAGS="$cf_save_CFLAGS"
2676 CPPFLAGS="$cf_save_CPPFLAGS"
2677
2678 fi
2679 echo "$as_me:2679: result: $cf_cv_ansi_cc" >&5
2680 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2681
2682 if test "$cf_cv_ansi_cc" != "no"; then
2683 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2684
2685 cf_fix_cppflags=no
2686 cf_new_cflags=
2687 cf_new_cppflags=
2688 cf_new_extra_cppflags=
2689
2690 for cf_add_cflags in $cf_cv_ansi_cc
2691 do
2692 case $cf_fix_cppflags in
2693 no)
2694         case $cf_add_cflags in #(vi
2695         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2696                 case $cf_add_cflags in
2697                 -D*)
2698                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2699
2700                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2701                                 && test -z "${cf_tst_cflags}" \
2702                                 && cf_fix_cppflags=yes
2703
2704                         if test $cf_fix_cppflags = yes ; then
2705                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2706                                 continue
2707                         elif test "${cf_tst_cflags}" = "\"'" ; then
2708                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2709                                 continue
2710                         fi
2711                         ;;
2712                 esac
2713                 case "$CPPFLAGS" in
2714                 *$cf_add_cflags) #(vi
2715                         ;;
2716                 *) #(vi
2717                         case $cf_add_cflags in #(vi
2718                         -D*)
2719                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2720
2721 CPPFLAGS=`echo "$CPPFLAGS" | \
2722         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2723                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2724
2725                                 ;;
2726                         esac
2727                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2728                         ;;
2729                 esac
2730                 ;;
2731         *)
2732                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2733                 ;;
2734         esac
2735         ;;
2736 yes)
2737         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2738
2739         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2740
2741         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2742                 && test -z "${cf_tst_cflags}" \
2743                 && cf_fix_cppflags=no
2744         ;;
2745 esac
2746 done
2747
2748 if test -n "$cf_new_cflags" ; then
2749
2750         CFLAGS="$CFLAGS $cf_new_cflags"
2751 fi
2752
2753 if test -n "$cf_new_cppflags" ; then
2754
2755         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2756 fi
2757
2758 if test -n "$cf_new_extra_cppflags" ; then
2759
2760         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2761 fi
2762
2763 else
2764         cat >>confdefs.h <<\EOF
2765 #define CC_HAS_PROTOS 1
2766 EOF
2767
2768 fi
2769 fi
2770
2771 if test "$cf_cv_ansi_cc" = "no"; then
2772         { { echo "$as_me:2772: error: Your compiler does not appear to recognize prototypes.
2773 You have the following choices:
2774         a. adjust your compiler options
2775         b. get an up-to-date compiler
2776         c. use a wrapper such as unproto" >&5
2777 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2778 You have the following choices:
2779         a. adjust your compiler options
2780         b. get an up-to-date compiler
2781         c. use a wrapper such as unproto" >&2;}
2782    { (exit 1); exit 1; }; }
2783 fi
2784
2785 case $cf_cv_system_name in
2786 os2*)
2787     CFLAGS="$CFLAGS -Zmt"
2788     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2789     CXXFLAGS="$CXXFLAGS -Zmt"
2790     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2791     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2792     ac_cv_exeext=.exe
2793     ;;
2794 esac
2795
2796 PROG_EXT="$EXEEXT"
2797
2798 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2799 #define PROG_EXT "$PROG_EXT"
2800 EOF
2801
2802 if test "$cross_compiling" = yes ; then
2803   LDCONFIG=:
2804 else
2805 case "$cf_cv_system_name" in #(vi
2806 dragonfly*|mirbsd*|freebsd*) #(vi
2807   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2808   ;;
2809 *) LDPATH=$PATH:/sbin:/usr/sbin
2810   # Extract the first word of "ldconfig", so it can be a program name with args.
2811 set dummy ldconfig; ac_word=$2
2812 echo "$as_me:2812: checking for $ac_word" >&5
2813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2814 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2815   echo $ECHO_N "(cached) $ECHO_C" >&6
2816 else
2817   case $LDCONFIG in
2818   [\\/]* | ?:[\\/]*)
2819   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2820   ;;
2821   *)
2822   ac_save_IFS=$IFS; IFS=$ac_path_separator
2823 ac_dummy="$LDPATH"
2824 for ac_dir in $ac_dummy; do
2825   IFS=$ac_save_IFS
2826   test -z "$ac_dir" && ac_dir=.
2827   if $as_executable_p "$ac_dir/$ac_word"; then
2828    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2829    echo "$as_me:2829: found $ac_dir/$ac_word" >&5
2830    break
2831 fi
2832 done
2833
2834   ;;
2835 esac
2836 fi
2837 LDCONFIG=$ac_cv_path_LDCONFIG
2838
2839 if test -n "$LDCONFIG"; then
2840   echo "$as_me:2840: result: $LDCONFIG" >&5
2841 echo "${ECHO_T}$LDCONFIG" >&6
2842 else
2843   echo "$as_me:2843: result: no" >&5
2844 echo "${ECHO_T}no" >&6
2845 fi
2846
2847   ;;
2848 esac
2849 fi
2850
2851 echo "$as_me:2851: checking if you want to ensure bool is consistent with C++" >&5
2852 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2853
2854 # Check whether --with-cxx or --without-cxx was given.
2855 if test "${with_cxx+set}" = set; then
2856   withval="$with_cxx"
2857   cf_with_cxx=$withval
2858 else
2859   cf_with_cxx=yes
2860 fi;
2861 echo "$as_me:2861: result: $cf_with_cxx" >&5
2862 echo "${ECHO_T}$cf_with_cxx" >&6
2863 if test "X$cf_with_cxx" = Xno ; then
2864         CXX=""
2865         GXX=""
2866 else
2867         # with autoconf 2.13, we can change the error to a warning:
2868                 ac_ext=cc
2869 ac_cpp='$CXXCPP $CPPFLAGS'
2870 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2871 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2872 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2873 ac_main_return=return
2874 if test -n "$ac_tool_prefix"; then
2875   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2876   do
2877     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2878 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2879 echo "$as_me:2879: checking for $ac_word" >&5
2880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2881 if test "${ac_cv_prog_CXX+set}" = set; then
2882   echo $ECHO_N "(cached) $ECHO_C" >&6
2883 else
2884   if test -n "$CXX"; then
2885   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2886 else
2887   ac_save_IFS=$IFS; IFS=$ac_path_separator
2888 ac_dummy="$PATH"
2889 for ac_dir in $ac_dummy; do
2890   IFS=$ac_save_IFS
2891   test -z "$ac_dir" && ac_dir=.
2892   $as_executable_p "$ac_dir/$ac_word" || continue
2893 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2894 echo "$as_me:2894: found $ac_dir/$ac_word" >&5
2895 break
2896 done
2897
2898 fi
2899 fi
2900 CXX=$ac_cv_prog_CXX
2901 if test -n "$CXX"; then
2902   echo "$as_me:2902: result: $CXX" >&5
2903 echo "${ECHO_T}$CXX" >&6
2904 else
2905   echo "$as_me:2905: result: no" >&5
2906 echo "${ECHO_T}no" >&6
2907 fi
2908
2909     test -n "$CXX" && break
2910   done
2911 fi
2912 if test -z "$CXX"; then
2913   ac_ct_CXX=$CXX
2914   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2915 do
2916   # Extract the first word of "$ac_prog", so it can be a program name with args.
2917 set dummy $ac_prog; ac_word=$2
2918 echo "$as_me:2918: checking for $ac_word" >&5
2919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2920 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2921   echo $ECHO_N "(cached) $ECHO_C" >&6
2922 else
2923   if test -n "$ac_ct_CXX"; then
2924   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2925 else
2926   ac_save_IFS=$IFS; IFS=$ac_path_separator
2927 ac_dummy="$PATH"
2928 for ac_dir in $ac_dummy; do
2929   IFS=$ac_save_IFS
2930   test -z "$ac_dir" && ac_dir=.
2931   $as_executable_p "$ac_dir/$ac_word" || continue
2932 ac_cv_prog_ac_ct_CXX="$ac_prog"
2933 echo "$as_me:2933: found $ac_dir/$ac_word" >&5
2934 break
2935 done
2936
2937 fi
2938 fi
2939 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2940 if test -n "$ac_ct_CXX"; then
2941   echo "$as_me:2941: result: $ac_ct_CXX" >&5
2942 echo "${ECHO_T}$ac_ct_CXX" >&6
2943 else
2944   echo "$as_me:2944: result: no" >&5
2945 echo "${ECHO_T}no" >&6
2946 fi
2947
2948   test -n "$ac_ct_CXX" && break
2949 done
2950 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2951
2952   CXX=$ac_ct_CXX
2953 fi
2954
2955 # Provide some information about the compiler.
2956 echo "$as_me:2956:" \
2957      "checking for C++ compiler version" >&5
2958 ac_compiler=`set X $ac_compile; echo $2`
2959 { (eval echo "$as_me:2959: \"$ac_compiler --version </dev/null >&5\"") >&5
2960   (eval $ac_compiler --version </dev/null >&5) 2>&5
2961   ac_status=$?
2962   echo "$as_me:2962: \$? = $ac_status" >&5
2963   (exit $ac_status); }
2964 { (eval echo "$as_me:2964: \"$ac_compiler -v </dev/null >&5\"") >&5
2965   (eval $ac_compiler -v </dev/null >&5) 2>&5
2966   ac_status=$?
2967   echo "$as_me:2967: \$? = $ac_status" >&5
2968   (exit $ac_status); }
2969 { (eval echo "$as_me:2969: \"$ac_compiler -V </dev/null >&5\"") >&5
2970   (eval $ac_compiler -V </dev/null >&5) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }
2974
2975 echo "$as_me:2975: checking whether we are using the GNU C++ compiler" >&5
2976 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2977 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2978   echo $ECHO_N "(cached) $ECHO_C" >&6
2979 else
2980   cat >conftest.$ac_ext <<_ACEOF
2981 #line 2981 "configure"
2982 #include "confdefs.h"
2983
2984 int
2985 main ()
2986 {
2987 #ifndef __GNUC__
2988        choke me
2989 #endif
2990
2991   ;
2992   return 0;
2993 }
2994 _ACEOF
2995 rm -f conftest.$ac_objext
2996 if { (eval echo "$as_me:2996: \"$ac_compile\"") >&5
2997   (eval $ac_compile) 2>&5
2998   ac_status=$?
2999   echo "$as_me:2999: \$? = $ac_status" >&5
3000   (exit $ac_status); } &&
3001          { ac_try='test -s conftest.$ac_objext'
3002   { (eval echo "$as_me:3002: \"$ac_try\"") >&5
3003   (eval $ac_try) 2>&5
3004   ac_status=$?
3005   echo "$as_me:3005: \$? = $ac_status" >&5
3006   (exit $ac_status); }; }; then
3007   ac_compiler_gnu=yes
3008 else
3009   echo "$as_me: failed program was:" >&5
3010 cat conftest.$ac_ext >&5
3011 ac_compiler_gnu=no
3012 fi
3013 rm -f conftest.$ac_objext conftest.$ac_ext
3014 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3015
3016 fi
3017 echo "$as_me:3017: result: $ac_cv_cxx_compiler_gnu" >&5
3018 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3019 GXX=`test $ac_compiler_gnu = yes && echo yes`
3020 ac_test_CXXFLAGS=${CXXFLAGS+set}
3021 ac_save_CXXFLAGS=$CXXFLAGS
3022 CXXFLAGS="-g"
3023 echo "$as_me:3023: checking whether $CXX accepts -g" >&5
3024 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3025 if test "${ac_cv_prog_cxx_g+set}" = set; then
3026   echo $ECHO_N "(cached) $ECHO_C" >&6
3027 else
3028   cat >conftest.$ac_ext <<_ACEOF
3029 #line 3029 "configure"
3030 #include "confdefs.h"
3031
3032 int
3033 main ()
3034 {
3035
3036   ;
3037   return 0;
3038 }
3039 _ACEOF
3040 rm -f conftest.$ac_objext
3041 if { (eval echo "$as_me:3041: \"$ac_compile\"") >&5
3042   (eval $ac_compile) 2>&5
3043   ac_status=$?
3044   echo "$as_me:3044: \$? = $ac_status" >&5
3045   (exit $ac_status); } &&
3046          { ac_try='test -s conftest.$ac_objext'
3047   { (eval echo "$as_me:3047: \"$ac_try\"") >&5
3048   (eval $ac_try) 2>&5
3049   ac_status=$?
3050   echo "$as_me:3050: \$? = $ac_status" >&5
3051   (exit $ac_status); }; }; then
3052   ac_cv_prog_cxx_g=yes
3053 else
3054   echo "$as_me: failed program was:" >&5
3055 cat conftest.$ac_ext >&5
3056 ac_cv_prog_cxx_g=no
3057 fi
3058 rm -f conftest.$ac_objext conftest.$ac_ext
3059 fi
3060 echo "$as_me:3060: result: $ac_cv_prog_cxx_g" >&5
3061 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3062 if test "$ac_test_CXXFLAGS" = set; then
3063   CXXFLAGS=$ac_save_CXXFLAGS
3064 elif test $ac_cv_prog_cxx_g = yes; then
3065   if test "$GXX" = yes; then
3066     CXXFLAGS="-g -O2"
3067   else
3068     CXXFLAGS="-g"
3069   fi
3070 else
3071   if test "$GXX" = yes; then
3072     CXXFLAGS="-O2"
3073   else
3074     CXXFLAGS=
3075   fi
3076 fi
3077 for ac_declaration in \
3078    ''\
3079    '#include <stdlib.h>' \
3080    'extern "C" void std::exit (int) throw (); using std::exit;' \
3081    'extern "C" void std::exit (int); using std::exit;' \
3082    'extern "C" void exit (int) throw ();' \
3083    'extern "C" void exit (int);' \
3084    'void exit (int);'
3085 do
3086   cat >conftest.$ac_ext <<_ACEOF
3087 #line 3087 "configure"
3088 #include "confdefs.h"
3089 #include <stdlib.h>
3090 $ac_declaration
3091 int
3092 main ()
3093 {
3094 exit (42);
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); } &&
3105          { ac_try='test -s conftest.$ac_objext'
3106   { (eval echo "$as_me:3106: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); }; }; then
3111   :
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 continue
3116 fi
3117 rm -f conftest.$ac_objext conftest.$ac_ext
3118   cat >conftest.$ac_ext <<_ACEOF
3119 #line 3119 "configure"
3120 #include "confdefs.h"
3121 $ac_declaration
3122 int
3123 main ()
3124 {
3125 exit (42);
3126   ;
3127   return 0;
3128 }
3129 _ACEOF
3130 rm -f conftest.$ac_objext
3131 if { (eval echo "$as_me:3131: \"$ac_compile\"") >&5
3132   (eval $ac_compile) 2>&5
3133   ac_status=$?
3134   echo "$as_me:3134: \$? = $ac_status" >&5
3135   (exit $ac_status); } &&
3136          { ac_try='test -s conftest.$ac_objext'
3137   { (eval echo "$as_me:3137: \"$ac_try\"") >&5
3138   (eval $ac_try) 2>&5
3139   ac_status=$?
3140   echo "$as_me:3140: \$? = $ac_status" >&5
3141   (exit $ac_status); }; }; then
3142   break
3143 else
3144   echo "$as_me: failed program was:" >&5
3145 cat conftest.$ac_ext >&5
3146 fi
3147 rm -f conftest.$ac_objext conftest.$ac_ext
3148 done
3149 rm -rf conftest*
3150 if test -n "$ac_declaration"; then
3151   echo '#ifdef __cplusplus' >>confdefs.h
3152   echo $ac_declaration      >>confdefs.h
3153   echo '#endif'             >>confdefs.h
3154 fi
3155
3156 ac_ext=c
3157 ac_cpp='$CPP $CPPFLAGS'
3158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3161 ac_main_return=return
3162
3163                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3164         if test "$CXX" = "g++" ; then
3165                 # Extract the first word of "g++", so it can be a program name with args.
3166 set dummy g++; ac_word=$2
3167 echo "$as_me:3167: checking for $ac_word" >&5
3168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3169 if test "${ac_cv_path_CXX+set}" = set; then
3170   echo $ECHO_N "(cached) $ECHO_C" >&6
3171 else
3172   case $CXX in
3173   [\\/]* | ?:[\\/]*)
3174   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3175   ;;
3176   *)
3177   ac_save_IFS=$IFS; IFS=$ac_path_separator
3178 ac_dummy="$PATH"
3179 for ac_dir in $ac_dummy; do
3180   IFS=$ac_save_IFS
3181   test -z "$ac_dir" && ac_dir=.
3182   if $as_executable_p "$ac_dir/$ac_word"; then
3183    ac_cv_path_CXX="$ac_dir/$ac_word"
3184    echo "$as_me:3184: found $ac_dir/$ac_word" >&5
3185    break
3186 fi
3187 done
3188
3189   ;;
3190 esac
3191 fi
3192 CXX=$ac_cv_path_CXX
3193
3194 if test -n "$CXX"; then
3195   echo "$as_me:3195: result: $CXX" >&5
3196 echo "${ECHO_T}$CXX" >&6
3197 else
3198   echo "$as_me:3198: result: no" >&5
3199 echo "${ECHO_T}no" >&6
3200 fi
3201
3202         fi
3203         if test "$CXX" = "g++" ; then
3204                 { echo "$as_me:3204: WARNING: ignoring hardcoded g++" >&5
3205 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3206                 cf_with_cxx=no; CXX=""; GXX="";
3207         fi
3208 fi
3209
3210 GXX_VERSION=none
3211 if test "$GXX" = yes; then
3212         echo "$as_me:3212: checking version of g++" >&5
3213 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3214         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3215         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3216         echo "$as_me:3216: result: $GXX_VERSION" >&5
3217 echo "${ECHO_T}$GXX_VERSION" >&6
3218 fi
3219
3220 case $GXX_VERSION in
3221 1*|2.[0-6]*)
3222         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3223         # cf_cxx_library=no
3224         { echo "$as_me:3224: WARNING: templates do not work" >&5
3225 echo "$as_me: WARNING: templates do not work" >&2;}
3226         ;;
3227 esac
3228
3229 echo "$as_me:3229: checking if you want to build C++ binding and demo" >&5
3230 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3231
3232 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3233 if test "${with_cxx_binding+set}" = set; then
3234   withval="$with_cxx_binding"
3235   cf_with_cxx_binding=$withval
3236 else
3237   cf_with_cxx_binding=$cf_with_cxx
3238 fi;
3239 echo "$as_me:3239: result: $cf_with_cxx_binding" >&5
3240 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3241
3242 echo "$as_me:3242: checking if you want to build with Ada95" >&5
3243 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3244
3245 # Check whether --with-ada or --without-ada was given.
3246 if test "${with_ada+set}" = set; then
3247   withval="$with_ada"
3248   cf_with_ada=$withval
3249 else
3250   cf_with_ada=yes
3251 fi;
3252 echo "$as_me:3252: result: $cf_with_ada" >&5
3253 echo "${ECHO_T}$cf_with_ada" >&6
3254
3255 echo "$as_me:3255: checking if you want to install manpages" >&5
3256 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3257
3258 # Check whether --with-manpages or --without-manpages was given.
3259 if test "${with_manpages+set}" = set; then
3260   withval="$with_manpages"
3261   cf_with_manpages=$withval
3262 else
3263   cf_with_manpages=yes
3264 fi;
3265 echo "$as_me:3265: result: $cf_with_manpages" >&5
3266 echo "${ECHO_T}$cf_with_manpages" >&6
3267
3268 echo "$as_me:3268: checking if you want to build programs such as tic" >&5
3269 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3270
3271 # Check whether --with-progs or --without-progs was given.
3272 if test "${with_progs+set}" = set; then
3273   withval="$with_progs"
3274   cf_with_progs=$withval
3275 else
3276   cf_with_progs=yes
3277 fi;
3278 echo "$as_me:3278: result: $cf_with_progs" >&5
3279 echo "${ECHO_T}$cf_with_progs" >&6
3280
3281 echo "$as_me:3281: checking if you want to build test-programs" >&5
3282 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3283
3284 # Check whether --with-tests or --without-tests was given.
3285 if test "${with_tests+set}" = set; then
3286   withval="$with_tests"
3287   cf_with_tests=$withval
3288 else
3289   cf_with_tests=yes
3290 fi;
3291 echo "$as_me:3291: result: $cf_with_tests" >&5
3292 echo "${ECHO_T}$cf_with_tests" >&6
3293
3294 echo "$as_me:3294: checking if you wish to install curses.h" >&5
3295 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3296
3297 # Check whether --with-curses-h or --without-curses-h was given.
3298 if test "${with_curses_h+set}" = set; then
3299   withval="$with_curses_h"
3300   with_curses_h=$withval
3301 else
3302   with_curses_h=yes
3303 fi;
3304 echo "$as_me:3304: result: $with_curses_h" >&5
3305 echo "${ECHO_T}$with_curses_h" >&6
3306
3307 modules_to_build="ncurses"
3308 if test "X$cf_with_progs" != Xno ; then
3309 modules_to_build="$modules_to_build progs tack"
3310 fi
3311 modules_to_build="$modules_to_build panel menu form"
3312
3313 test "$program_prefix" != NONE &&
3314   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3315 # Use a double $ so make ignores it.
3316 test "$program_suffix" != NONE &&
3317   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3318 # Double any \ or $.  echo might interpret backslashes.
3319 # By default was `s,x,x', remove it if useless.
3320 cat <<\_ACEOF >conftest.sed
3321 s/[\\$]/&&/g;s/;s,x,x,$//
3322 _ACEOF
3323 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3324 rm conftest.sed
3325
3326 for ac_prog in mawk gawk nawk awk
3327 do
3328   # Extract the first word of "$ac_prog", so it can be a program name with args.
3329 set dummy $ac_prog; ac_word=$2
3330 echo "$as_me:3330: checking for $ac_word" >&5
3331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3332 if test "${ac_cv_prog_AWK+set}" = set; then
3333   echo $ECHO_N "(cached) $ECHO_C" >&6
3334 else
3335   if test -n "$AWK"; then
3336   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3337 else
3338   ac_save_IFS=$IFS; IFS=$ac_path_separator
3339 ac_dummy="$PATH"
3340 for ac_dir in $ac_dummy; do
3341   IFS=$ac_save_IFS
3342   test -z "$ac_dir" && ac_dir=.
3343   $as_executable_p "$ac_dir/$ac_word" || continue
3344 ac_cv_prog_AWK="$ac_prog"
3345 echo "$as_me:3345: found $ac_dir/$ac_word" >&5
3346 break
3347 done
3348
3349 fi
3350 fi
3351 AWK=$ac_cv_prog_AWK
3352 if test -n "$AWK"; then
3353   echo "$as_me:3353: result: $AWK" >&5
3354 echo "${ECHO_T}$AWK" >&6
3355 else
3356   echo "$as_me:3356: result: no" >&5
3357 echo "${ECHO_T}no" >&6
3358 fi
3359
3360   test -n "$AWK" && break
3361 done
3362
3363 test -z "$AWK" && { { echo "$as_me:3363: error: No awk program found" >&5
3364 echo "$as_me: error: No awk program found" >&2;}
3365    { (exit 1); exit 1; }; }
3366
3367 echo "$as_me:3367: checking for egrep" >&5
3368 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3369 if test "${ac_cv_prog_egrep+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3373     then ac_cv_prog_egrep='grep -E'
3374     else ac_cv_prog_egrep='egrep'
3375     fi
3376 fi
3377 echo "$as_me:3377: result: $ac_cv_prog_egrep" >&5
3378 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3379  EGREP=$ac_cv_prog_egrep
3380
3381 test -z "$EGREP" && { { echo "$as_me:3381: error: No egrep program found" >&5
3382 echo "$as_me: error: No egrep program found" >&2;}
3383    { (exit 1); exit 1; }; }
3384
3385 # Find a good install program.  We prefer a C program (faster),
3386 # so one script is as good as another.  But avoid the broken or
3387 # incompatible versions:
3388 # SysV /etc/install, /usr/sbin/install
3389 # SunOS /usr/etc/install
3390 # IRIX /sbin/install
3391 # AIX /bin/install
3392 # AmigaOS /C/install, which installs bootblocks on floppy discs
3393 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3394 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3395 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3396 # ./install, which can be erroneously created by make from ./install.sh.
3397 echo "$as_me:3397: checking for a BSD compatible install" >&5
3398 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3399 if test -z "$INSTALL"; then
3400 if test "${ac_cv_path_install+set}" = set; then
3401   echo $ECHO_N "(cached) $ECHO_C" >&6
3402 else
3403     ac_save_IFS=$IFS; IFS=$ac_path_separator
3404   for ac_dir in $PATH; do
3405     IFS=$ac_save_IFS
3406     # Account for people who put trailing slashes in PATH elements.
3407     case $ac_dir/ in
3408     / | ./ | .// | /cC/* \
3409     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3410     | /usr/ucb/* ) ;;
3411     *)
3412       # OSF1 and SCO ODT 3.0 have their own names for install.
3413       # Don't use installbsd from OSF since it installs stuff as root
3414       # by default.
3415       for ac_prog in ginstall scoinst install; do
3416         if $as_executable_p "$ac_dir/$ac_prog"; then
3417           if test $ac_prog = install &&
3418             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3419             # AIX install.  It has an incompatible calling convention.
3420             :
3421           elif test $ac_prog = install &&
3422             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3423             # program-specific install script used by HP pwplus--don't use.
3424             :
3425           else
3426             ac_cv_path_install="$ac_dir/$ac_prog -c"
3427             break 2
3428           fi
3429         fi
3430       done
3431       ;;
3432     esac
3433   done
3434
3435 fi
3436   if test "${ac_cv_path_install+set}" = set; then
3437     INSTALL=$ac_cv_path_install
3438   else
3439     # As a last resort, use the slow shell script.  We don't cache a
3440     # path for INSTALL within a source directory, because that will
3441     # break other packages using the cache if that directory is
3442     # removed, or if the path is relative.
3443     INSTALL=$ac_install_sh
3444   fi
3445 fi
3446 echo "$as_me:3446: result: $INSTALL" >&5
3447 echo "${ECHO_T}$INSTALL" >&6
3448
3449 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3450 # It thinks the first close brace ends the variable substitution.
3451 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3452
3453 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3454
3455 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3456
3457 case $INSTALL in
3458 /*)
3459   ;;
3460 *)
3461   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3462   test -z "$cf_dir" && cf_dir=.
3463   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3464   ;;
3465 esac
3466
3467 for ac_prog in tdlint lint alint splint lclint
3468 do
3469   # Extract the first word of "$ac_prog", so it can be a program name with args.
3470 set dummy $ac_prog; ac_word=$2
3471 echo "$as_me:3471: checking for $ac_word" >&5
3472 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3473 if test "${ac_cv_prog_LINT+set}" = set; then
3474   echo $ECHO_N "(cached) $ECHO_C" >&6
3475 else
3476   if test -n "$LINT"; then
3477   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3478 else
3479   ac_save_IFS=$IFS; IFS=$ac_path_separator
3480 ac_dummy="$PATH"
3481 for ac_dir in $ac_dummy; do
3482   IFS=$ac_save_IFS
3483   test -z "$ac_dir" && ac_dir=.
3484   $as_executable_p "$ac_dir/$ac_word" || continue
3485 ac_cv_prog_LINT="$ac_prog"
3486 echo "$as_me:3486: found $ac_dir/$ac_word" >&5
3487 break
3488 done
3489
3490 fi
3491 fi
3492 LINT=$ac_cv_prog_LINT
3493 if test -n "$LINT"; then
3494   echo "$as_me:3494: result: $LINT" >&5
3495 echo "${ECHO_T}$LINT" >&6
3496 else
3497   echo "$as_me:3497: result: no" >&5
3498 echo "${ECHO_T}no" >&6
3499 fi
3500
3501   test -n "$LINT" && break
3502 done
3503
3504 echo "$as_me:3504: checking whether ln -s works" >&5
3505 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3506 LN_S=$as_ln_s
3507 if test "$LN_S" = "ln -s"; then
3508   echo "$as_me:3508: result: yes" >&5
3509 echo "${ECHO_T}yes" >&6
3510 else
3511   echo "$as_me:3511: result: no, using $LN_S" >&5
3512 echo "${ECHO_T}no, using $LN_S" >&6
3513 fi
3514
3515 echo "$as_me:3515: checking if $LN_S -f options work" >&5
3516 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3517
3518 rm -f conf$$.src conf$$dst
3519 echo >conf$$.dst
3520 echo first >conf$$.src
3521 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3522         cf_prog_ln_sf=yes
3523 else
3524         cf_prog_ln_sf=no
3525 fi
3526 rm -f conf$$.dst conf$$src
3527 echo "$as_me:3527: result: $cf_prog_ln_sf" >&5
3528 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3529
3530 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3531
3532 echo "$as_me:3532: checking for long file names" >&5
3533 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3534 if test "${ac_cv_sys_long_file_names+set}" = set; then
3535   echo $ECHO_N "(cached) $ECHO_C" >&6
3536 else
3537   ac_cv_sys_long_file_names=yes
3538 # Test for long file names in all the places we know might matter:
3539 #      .                the current directory, where building will happen
3540 #      $prefix/lib      where we will be installing things
3541 #      $exec_prefix/lib likewise
3542 # eval it to expand exec_prefix.
3543 #      $TMPDIR          if set, where it might want to write temporary files
3544 # if $TMPDIR is not set:
3545 #      /tmp             where it might want to write temporary files
3546 #      /var/tmp         likewise
3547 #      /usr/tmp         likewise
3548 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3549   ac_tmpdirs=$TMPDIR
3550 else
3551   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3552 fi
3553 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3554   test -d $ac_dir || continue
3555   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3556   ac_xdir=$ac_dir/cf$$
3557   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3558   ac_tf1=$ac_xdir/conftest9012345
3559   ac_tf2=$ac_xdir/conftest9012346
3560   (echo 1 >$ac_tf1) 2>/dev/null
3561   (echo 2 >$ac_tf2) 2>/dev/null
3562   ac_val=`cat $ac_tf1 2>/dev/null`
3563   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3564     ac_cv_sys_long_file_names=no
3565     rm -rf $ac_xdir 2>/dev/null
3566     break
3567   fi
3568   rm -rf $ac_xdir 2>/dev/null
3569 done
3570 fi
3571 echo "$as_me:3571: result: $ac_cv_sys_long_file_names" >&5
3572 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3573 if test $ac_cv_sys_long_file_names = yes; then
3574
3575 cat >>confdefs.h <<\EOF
3576 #define HAVE_LONG_FILE_NAMES 1
3577 EOF
3578
3579 fi
3580
3581 # if we find pkg-config, check if we should install the ".pc" files.
3582
3583 echo "$as_me:3583: checking if you want to use pkg-config" >&5
3584 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3585
3586 # Check whether --with-pkg-config or --without-pkg-config was given.
3587 if test "${with_pkg_config+set}" = set; then
3588   withval="$with_pkg_config"
3589   cf_pkg_config=$withval
3590 else
3591   cf_pkg_config=yes
3592 fi;
3593 echo "$as_me:3593: result: $cf_pkg_config" >&5
3594 echo "${ECHO_T}$cf_pkg_config" >&6
3595
3596 case $cf_pkg_config in #(vi
3597 no) #(vi
3598         PKG_CONFIG=none
3599         ;;
3600 yes) #(vi
3601
3602 if test -n "$ac_tool_prefix"; then
3603   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3604 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3605 echo "$as_me:3605: checking for $ac_word" >&5
3606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3607 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3608   echo $ECHO_N "(cached) $ECHO_C" >&6
3609 else
3610   case $PKG_CONFIG in
3611   [\\/]* | ?:[\\/]*)
3612   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3613   ;;
3614   *)
3615   ac_save_IFS=$IFS; IFS=$ac_path_separator
3616 ac_dummy="$PATH"
3617 for ac_dir in $ac_dummy; do
3618   IFS=$ac_save_IFS
3619   test -z "$ac_dir" && ac_dir=.
3620   if $as_executable_p "$ac_dir/$ac_word"; then
3621    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3622    echo "$as_me:3622: found $ac_dir/$ac_word" >&5
3623    break
3624 fi
3625 done
3626
3627   ;;
3628 esac
3629 fi
3630 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3631
3632 if test -n "$PKG_CONFIG"; then
3633   echo "$as_me:3633: result: $PKG_CONFIG" >&5
3634 echo "${ECHO_T}$PKG_CONFIG" >&6
3635 else
3636   echo "$as_me:3636: result: no" >&5
3637 echo "${ECHO_T}no" >&6
3638 fi
3639
3640 fi
3641 if test -z "$ac_cv_path_PKG_CONFIG"; then
3642   ac_pt_PKG_CONFIG=$PKG_CONFIG
3643   # Extract the first word of "pkg-config", so it can be a program name with args.
3644 set dummy pkg-config; ac_word=$2
3645 echo "$as_me:3645: checking for $ac_word" >&5
3646 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3647 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3648   echo $ECHO_N "(cached) $ECHO_C" >&6
3649 else
3650   case $ac_pt_PKG_CONFIG in
3651   [\\/]* | ?:[\\/]*)
3652   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3653   ;;
3654   *)
3655   ac_save_IFS=$IFS; IFS=$ac_path_separator
3656 ac_dummy="$PATH"
3657 for ac_dir in $ac_dummy; do
3658   IFS=$ac_save_IFS
3659   test -z "$ac_dir" && ac_dir=.
3660   if $as_executable_p "$ac_dir/$ac_word"; then
3661    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3662    echo "$as_me:3662: found $ac_dir/$ac_word" >&5
3663    break
3664 fi
3665 done
3666
3667   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3668   ;;
3669 esac
3670 fi
3671 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3672
3673 if test -n "$ac_pt_PKG_CONFIG"; then
3674   echo "$as_me:3674: result: $ac_pt_PKG_CONFIG" >&5
3675 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3676 else
3677   echo "$as_me:3677: result: no" >&5
3678 echo "${ECHO_T}no" >&6
3679 fi
3680
3681   PKG_CONFIG=$ac_pt_PKG_CONFIG
3682 else
3683   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3684 fi
3685
3686         ;;
3687 *)
3688         PKG_CONFIG=$withval
3689         ;;
3690 esac
3691
3692 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3693 if test "$PKG_CONFIG" != none ; then
3694
3695 if test "x$prefix" != xNONE; then
3696   cf_path_syntax="$prefix"
3697 else
3698   cf_path_syntax="$ac_default_prefix"
3699 fi
3700
3701 case ".$PKG_CONFIG" in #(vi
3702 .\$\(*\)*|.\'*\'*) #(vi
3703   ;;
3704 ..|./*|.\\*) #(vi
3705   ;;
3706 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3707   ;;
3708 .\${*prefix}*) #(vi
3709   eval PKG_CONFIG="$PKG_CONFIG"
3710   case ".$PKG_CONFIG" in #(vi
3711   .NONE/*)
3712     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3713     ;;
3714   esac
3715   ;; #(vi
3716 .no|.NONE/*)
3717   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3718   ;;
3719 *)
3720   { { echo "$as_me:3720: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3721 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3722    { (exit 1); exit 1; }; }
3723   ;;
3724 esac
3725
3726 fi
3727
3728 if test "$PKG_CONFIG" != none ; then
3729         echo "$as_me:3729: checking for $PKG_CONFIG library directory" >&5
3730 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3731
3732 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3733 if test "${with_pkg_config_libdir+set}" = set; then
3734   withval="$with_pkg_config_libdir"
3735   PKG_CONFIG_LIBDIR=$withval
3736 else
3737   PKG_CONFIG_LIBDIR=yes
3738 fi;
3739
3740         case x$PKG_CONFIG_LIBDIR in #(vi
3741         x/*) #(vi
3742                 ;;
3743         xyes) #(vi
3744                 # look for the library directory using the same prefix as the executable
3745                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3746                 case x`(arch) 2>/dev/null` in #(vi
3747                 *64) #(vi
3748                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3749                         do
3750                                 if test -d $cf_config/pkgconfig
3751                                 then
3752                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3753                                         break
3754                                 fi
3755                         done
3756                         ;;
3757                 *)
3758                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3759                         ;;
3760                 esac
3761                 ;;
3762         *)
3763                 ;;
3764         esac
3765
3766         echo "$as_me:3766: result: $PKG_CONFIG_LIBDIR" >&5
3767 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3768 fi
3769
3770 if test "$PKG_CONFIG" != none ; then
3771         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3772                 echo "$as_me:3772: checking if we should install .pc files for $PKG_CONFIG" >&5
3773 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3774
3775 # Check whether --enable-pc-files or --disable-pc-files was given.
3776 if test "${enable_pc_files+set}" = set; then
3777   enableval="$enable_pc_files"
3778   enable_pc_files=$enableval
3779 else
3780   enable_pc_files=no
3781 fi;
3782                 echo "$as_me:3782: result: $enable_pc_files" >&5
3783 echo "${ECHO_T}$enable_pc_files" >&6
3784         elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
3785                 enable_pc_files=no
3786                 { echo "$as_me:3786: WARNING: did not find $PKG_CONFIG library" >&5
3787 echo "$as_me: WARNING: did not find $PKG_CONFIG library" >&2;}
3788         fi
3789 else
3790         enable_pc_files=no
3791 fi
3792
3793 echo "$as_me:3793: checking if we should assume mixed-case filenames" >&5
3794 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3795
3796 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3797 if test "${enable_mixed_case+set}" = set; then
3798   enableval="$enable_mixed_case"
3799   enable_mixedcase=$enableval
3800 else
3801   enable_mixedcase=auto
3802 fi;
3803 echo "$as_me:3803: result: $enable_mixedcase" >&5
3804 echo "${ECHO_T}$enable_mixedcase" >&6
3805 if test "$enable_mixedcase" = "auto" ; then
3806
3807 echo "$as_me:3807: checking if filesystem supports mixed-case filenames" >&5
3808 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3809 if test "${cf_cv_mixedcase+set}" = set; then
3810   echo $ECHO_N "(cached) $ECHO_C" >&6
3811 else
3812
3813 if test "$cross_compiling" = yes ; then
3814         case $target_alias in #(vi
3815         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3816                 cf_cv_mixedcase=no
3817                 ;;
3818         *)
3819                 cf_cv_mixedcase=yes
3820                 ;;
3821         esac
3822 else
3823         rm -f conftest CONFTEST
3824         echo test >conftest
3825         if test -f CONFTEST ; then
3826                 cf_cv_mixedcase=no
3827         else
3828                 cf_cv_mixedcase=yes
3829         fi
3830         rm -f conftest CONFTEST
3831 fi
3832
3833 fi
3834 echo "$as_me:3834: result: $cf_cv_mixedcase" >&5
3835 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3836 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3837 #define MIXEDCASE_FILENAMES 1
3838 EOF
3839
3840 else
3841     cf_cv_mixedcase=$enable_mixedcase
3842     if test "$enable_mixedcase" = "yes" ; then
3843         cat >>confdefs.h <<\EOF
3844 #define MIXEDCASE_FILENAMES 1
3845 EOF
3846
3847     fi
3848 fi
3849
3850 # do this after mixed-case option (tags/TAGS is not as important as tic).
3851 echo "$as_me:3851: checking whether ${MAKE-make} sets \${MAKE}" >&5
3852 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3853 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3854 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   cat >conftest.make <<\EOF
3858 all:
3859         @echo 'ac_maketemp="${MAKE}"'
3860 EOF
3861 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3862 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3863 if test -n "$ac_maketemp"; then
3864   eval ac_cv_prog_make_${ac_make}_set=yes
3865 else
3866   eval ac_cv_prog_make_${ac_make}_set=no
3867 fi
3868 rm -f conftest.make
3869 fi
3870 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3871   echo "$as_me:3871: result: yes" >&5
3872 echo "${ECHO_T}yes" >&6
3873   SET_MAKE=
3874 else
3875   echo "$as_me:3875: result: no" >&5
3876 echo "${ECHO_T}no" >&6
3877   SET_MAKE="MAKE=${MAKE-make}"
3878 fi
3879
3880 for ac_prog in exctags ctags
3881 do
3882   # Extract the first word of "$ac_prog", so it can be a program name with args.
3883 set dummy $ac_prog; ac_word=$2
3884 echo "$as_me:3884: checking for $ac_word" >&5
3885 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3886 if test "${ac_cv_prog_CTAGS+set}" = set; then
3887   echo $ECHO_N "(cached) $ECHO_C" >&6
3888 else
3889   if test -n "$CTAGS"; then
3890   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3891 else
3892   ac_save_IFS=$IFS; IFS=$ac_path_separator
3893 ac_dummy="$PATH"
3894 for ac_dir in $ac_dummy; do
3895   IFS=$ac_save_IFS
3896   test -z "$ac_dir" && ac_dir=.
3897   $as_executable_p "$ac_dir/$ac_word" || continue
3898 ac_cv_prog_CTAGS="$ac_prog"
3899 echo "$as_me:3899: found $ac_dir/$ac_word" >&5
3900 break
3901 done
3902
3903 fi
3904 fi
3905 CTAGS=$ac_cv_prog_CTAGS
3906 if test -n "$CTAGS"; then
3907   echo "$as_me:3907: result: $CTAGS" >&5
3908 echo "${ECHO_T}$CTAGS" >&6
3909 else
3910   echo "$as_me:3910: result: no" >&5
3911 echo "${ECHO_T}no" >&6
3912 fi
3913
3914   test -n "$CTAGS" && break
3915 done
3916
3917 for ac_prog in exetags etags
3918 do
3919   # Extract the first word of "$ac_prog", so it can be a program name with args.
3920 set dummy $ac_prog; ac_word=$2
3921 echo "$as_me:3921: checking for $ac_word" >&5
3922 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3923 if test "${ac_cv_prog_ETAGS+set}" = set; then
3924   echo $ECHO_N "(cached) $ECHO_C" >&6
3925 else
3926   if test -n "$ETAGS"; then
3927   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3928 else
3929   ac_save_IFS=$IFS; IFS=$ac_path_separator
3930 ac_dummy="$PATH"
3931 for ac_dir in $ac_dummy; do
3932   IFS=$ac_save_IFS
3933   test -z "$ac_dir" && ac_dir=.
3934   $as_executable_p "$ac_dir/$ac_word" || continue
3935 ac_cv_prog_ETAGS="$ac_prog"
3936 echo "$as_me:3936: found $ac_dir/$ac_word" >&5
3937 break
3938 done
3939
3940 fi
3941 fi
3942 ETAGS=$ac_cv_prog_ETAGS
3943 if test -n "$ETAGS"; then
3944   echo "$as_me:3944: result: $ETAGS" >&5
3945 echo "${ECHO_T}$ETAGS" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951   test -n "$ETAGS" && break
3952 done
3953
3954 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3955 set dummy ${CTAGS:-ctags}; ac_word=$2
3956 echo "$as_me:3956: checking for $ac_word" >&5
3957 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3958 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3959   echo $ECHO_N "(cached) $ECHO_C" >&6
3960 else
3961   if test -n "$MAKE_LOWER_TAGS"; then
3962   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3963 else
3964   ac_save_IFS=$IFS; IFS=$ac_path_separator
3965 ac_dummy="$PATH"
3966 for ac_dir in $ac_dummy; do
3967   IFS=$ac_save_IFS
3968   test -z "$ac_dir" && ac_dir=.
3969   $as_executable_p "$ac_dir/$ac_word" || continue
3970 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3971 echo "$as_me:3971: found $ac_dir/$ac_word" >&5
3972 break
3973 done
3974
3975   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3976 fi
3977 fi
3978 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3979 if test -n "$MAKE_LOWER_TAGS"; then
3980   echo "$as_me:3980: result: $MAKE_LOWER_TAGS" >&5
3981 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 if test "$cf_cv_mixedcase" = yes ; then
3988         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3989 set dummy ${ETAGS:-etags}; ac_word=$2
3990 echo "$as_me:3990: checking for $ac_word" >&5
3991 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3992 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3993   echo $ECHO_N "(cached) $ECHO_C" >&6
3994 else
3995   if test -n "$MAKE_UPPER_TAGS"; then
3996   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3997 else
3998   ac_save_IFS=$IFS; IFS=$ac_path_separator
3999 ac_dummy="$PATH"
4000 for ac_dir in $ac_dummy; do
4001   IFS=$ac_save_IFS
4002   test -z "$ac_dir" && ac_dir=.
4003   $as_executable_p "$ac_dir/$ac_word" || continue
4004 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4005 echo "$as_me:4005: found $ac_dir/$ac_word" >&5
4006 break
4007 done
4008
4009   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4010 fi
4011 fi
4012 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4013 if test -n "$MAKE_UPPER_TAGS"; then
4014   echo "$as_me:4014: result: $MAKE_UPPER_TAGS" >&5
4015 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4016 else
4017   echo "$as_me:4017: result: no" >&5
4018 echo "${ECHO_T}no" >&6
4019 fi
4020
4021 else
4022         MAKE_UPPER_TAGS=no
4023 fi
4024
4025 if test "$MAKE_UPPER_TAGS" = yes ; then
4026         MAKE_UPPER_TAGS=
4027 else
4028         MAKE_UPPER_TAGS="#"
4029 fi
4030
4031 if test "$MAKE_LOWER_TAGS" = yes ; then
4032         MAKE_LOWER_TAGS=
4033 else
4034         MAKE_LOWER_TAGS="#"
4035 fi
4036
4037 echo "$as_me:4037: checking for makeflags variable" >&5
4038 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4039 if test "${cf_cv_makeflags+set}" = set; then
4040   echo $ECHO_N "(cached) $ECHO_C" >&6
4041 else
4042
4043         cf_cv_makeflags=''
4044         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4045         do
4046                 cat >cf_makeflags.tmp <<CF_EOF
4047 SHELL = /bin/sh
4048 all :
4049         @ echo '.$cf_option'
4050 CF_EOF
4051                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4052                 case "$cf_result" in
4053                 .*k)
4054                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4055                         case "$cf_result" in
4056                         .*CC=*) cf_cv_makeflags=
4057                                 ;;
4058                         *)      cf_cv_makeflags=$cf_option
4059                                 ;;
4060                         esac
4061                         break
4062                         ;;
4063                 .-)     ;;
4064                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4065                         ;;
4066                 esac
4067         done
4068         rm -f cf_makeflags.tmp
4069
4070 fi
4071 echo "$as_me:4071: result: $cf_cv_makeflags" >&5
4072 echo "${ECHO_T}$cf_cv_makeflags" >&6
4073
4074 if test -n "$ac_tool_prefix"; then
4075   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4076 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4077 echo "$as_me:4077: checking for $ac_word" >&5
4078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4079 if test "${ac_cv_prog_RANLIB+set}" = set; then
4080   echo $ECHO_N "(cached) $ECHO_C" >&6
4081 else
4082   if test -n "$RANLIB"; then
4083   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4084 else
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   $as_executable_p "$ac_dir/$ac_word" || continue
4091 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4092 echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093 break
4094 done
4095
4096 fi
4097 fi
4098 RANLIB=$ac_cv_prog_RANLIB
4099 if test -n "$RANLIB"; then
4100   echo "$as_me:4100: result: $RANLIB" >&5
4101 echo "${ECHO_T}$RANLIB" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107 fi
4108 if test -z "$ac_cv_prog_RANLIB"; then
4109   ac_ct_RANLIB=$RANLIB
4110   # Extract the first word of "ranlib", so it can be a program name with args.
4111 set dummy ranlib; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$ac_ct_RANLIB"; then
4118   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_ac_ct_RANLIB="ranlib"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4132 fi
4133 fi
4134 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4135 if test -n "$ac_ct_RANLIB"; then
4136   echo "$as_me:4136: result: $ac_ct_RANLIB" >&5
4137 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   RANLIB=$ac_ct_RANLIB
4144 else
4145   RANLIB="$ac_cv_prog_RANLIB"
4146 fi
4147
4148 if test -n "$ac_tool_prefix"; then
4149   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4150 set dummy ${ac_tool_prefix}ld; ac_word=$2
4151 echo "$as_me:4151: checking for $ac_word" >&5
4152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4153 if test "${ac_cv_prog_LD+set}" = set; then
4154   echo $ECHO_N "(cached) $ECHO_C" >&6
4155 else
4156   if test -n "$LD"; then
4157   ac_cv_prog_LD="$LD" # Let the user override the test.
4158 else
4159   ac_save_IFS=$IFS; IFS=$ac_path_separator
4160 ac_dummy="$PATH"
4161 for ac_dir in $ac_dummy; do
4162   IFS=$ac_save_IFS
4163   test -z "$ac_dir" && ac_dir=.
4164   $as_executable_p "$ac_dir/$ac_word" || continue
4165 ac_cv_prog_LD="${ac_tool_prefix}ld"
4166 echo "$as_me:4166: found $ac_dir/$ac_word" >&5
4167 break
4168 done
4169
4170 fi
4171 fi
4172 LD=$ac_cv_prog_LD
4173 if test -n "$LD"; then
4174   echo "$as_me:4174: result: $LD" >&5
4175 echo "${ECHO_T}$LD" >&6
4176 else
4177   echo "$as_me:4177: result: no" >&5
4178 echo "${ECHO_T}no" >&6
4179 fi
4180
4181 fi
4182 if test -z "$ac_cv_prog_LD"; then
4183   ac_ct_LD=$LD
4184   # Extract the first word of "ld", so it can be a program name with args.
4185 set dummy ld; ac_word=$2
4186 echo "$as_me:4186: checking for $ac_word" >&5
4187 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4188 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4189   echo $ECHO_N "(cached) $ECHO_C" >&6
4190 else
4191   if test -n "$ac_ct_LD"; then
4192   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4193 else
4194   ac_save_IFS=$IFS; IFS=$ac_path_separator
4195 ac_dummy="$PATH"
4196 for ac_dir in $ac_dummy; do
4197   IFS=$ac_save_IFS
4198   test -z "$ac_dir" && ac_dir=.
4199   $as_executable_p "$ac_dir/$ac_word" || continue
4200 ac_cv_prog_ac_ct_LD="ld"
4201 echo "$as_me:4201: found $ac_dir/$ac_word" >&5
4202 break
4203 done
4204
4205   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4206 fi
4207 fi
4208 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4209 if test -n "$ac_ct_LD"; then
4210   echo "$as_me:4210: result: $ac_ct_LD" >&5
4211 echo "${ECHO_T}$ac_ct_LD" >&6
4212 else
4213   echo "$as_me:4213: result: no" >&5
4214 echo "${ECHO_T}no" >&6
4215 fi
4216
4217   LD=$ac_ct_LD
4218 else
4219   LD="$ac_cv_prog_LD"
4220 fi
4221
4222 if test -n "$ac_tool_prefix"; then
4223   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4224 set dummy ${ac_tool_prefix}ar; ac_word=$2
4225 echo "$as_me:4225: checking for $ac_word" >&5
4226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4227 if test "${ac_cv_prog_AR+set}" = set; then
4228   echo $ECHO_N "(cached) $ECHO_C" >&6
4229 else
4230   if test -n "$AR"; then
4231   ac_cv_prog_AR="$AR" # Let the user override the test.
4232 else
4233   ac_save_IFS=$IFS; IFS=$ac_path_separator
4234 ac_dummy="$PATH"
4235 for ac_dir in $ac_dummy; do
4236   IFS=$ac_save_IFS
4237   test -z "$ac_dir" && ac_dir=.
4238   $as_executable_p "$ac_dir/$ac_word" || continue
4239 ac_cv_prog_AR="${ac_tool_prefix}ar"
4240 echo "$as_me:4240: found $ac_dir/$ac_word" >&5
4241 break
4242 done
4243
4244 fi
4245 fi
4246 AR=$ac_cv_prog_AR
4247 if test -n "$AR"; then
4248   echo "$as_me:4248: result: $AR" >&5
4249 echo "${ECHO_T}$AR" >&6
4250 else
4251   echo "$as_me:4251: result: no" >&5
4252 echo "${ECHO_T}no" >&6
4253 fi
4254
4255 fi
4256 if test -z "$ac_cv_prog_AR"; then
4257   ac_ct_AR=$AR
4258   # Extract the first word of "ar", so it can be a program name with args.
4259 set dummy ar; ac_word=$2
4260 echo "$as_me:4260: checking for $ac_word" >&5
4261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4262 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4263   echo $ECHO_N "(cached) $ECHO_C" >&6
4264 else
4265   if test -n "$ac_ct_AR"; then
4266   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4267 else
4268   ac_save_IFS=$IFS; IFS=$ac_path_separator
4269 ac_dummy="$PATH"
4270 for ac_dir in $ac_dummy; do
4271   IFS=$ac_save_IFS
4272   test -z "$ac_dir" && ac_dir=.
4273   $as_executable_p "$ac_dir/$ac_word" || continue
4274 ac_cv_prog_ac_ct_AR="ar"
4275 echo "$as_me:4275: found $ac_dir/$ac_word" >&5
4276 break
4277 done
4278
4279   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4280 fi
4281 fi
4282 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4283 if test -n "$ac_ct_AR"; then
4284   echo "$as_me:4284: result: $ac_ct_AR" >&5
4285 echo "${ECHO_T}$ac_ct_AR" >&6
4286 else
4287   echo "$as_me:4287: result: no" >&5
4288 echo "${ECHO_T}no" >&6
4289 fi
4290
4291   AR=$ac_ct_AR
4292 else
4293   AR="$ac_cv_prog_AR"
4294 fi
4295
4296 if test -n "$ac_tool_prefix"; then
4297   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4298 set dummy ${ac_tool_prefix}ar; ac_word=$2
4299 echo "$as_me:4299: checking for $ac_word" >&5
4300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4301 if test "${ac_cv_prog_AR+set}" = set; then
4302   echo $ECHO_N "(cached) $ECHO_C" >&6
4303 else
4304   if test -n "$AR"; then
4305   ac_cv_prog_AR="$AR" # Let the user override the test.
4306 else
4307   ac_save_IFS=$IFS; IFS=$ac_path_separator
4308 ac_dummy="$PATH"
4309 for ac_dir in $ac_dummy; do
4310   IFS=$ac_save_IFS
4311   test -z "$ac_dir" && ac_dir=.
4312   $as_executable_p "$ac_dir/$ac_word" || continue
4313 ac_cv_prog_AR="${ac_tool_prefix}ar"
4314 echo "$as_me:4314: found $ac_dir/$ac_word" >&5
4315 break
4316 done
4317
4318 fi
4319 fi
4320 AR=$ac_cv_prog_AR
4321 if test -n "$AR"; then
4322   echo "$as_me:4322: result: $AR" >&5
4323 echo "${ECHO_T}$AR" >&6
4324 else
4325   echo "$as_me:4325: result: no" >&5
4326 echo "${ECHO_T}no" >&6
4327 fi
4328
4329 fi
4330 if test -z "$ac_cv_prog_AR"; then
4331   ac_ct_AR=$AR
4332   # Extract the first word of "ar", so it can be a program name with args.
4333 set dummy ar; ac_word=$2
4334 echo "$as_me:4334: checking for $ac_word" >&5
4335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   if test -n "$ac_ct_AR"; then
4340   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4341 else
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   $as_executable_p "$ac_dir/$ac_word" || continue
4348 ac_cv_prog_ac_ct_AR="ar"
4349 echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350 break
4351 done
4352
4353   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4354 fi
4355 fi
4356 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4357 if test -n "$ac_ct_AR"; then
4358   echo "$as_me:4358: result: $ac_ct_AR" >&5
4359 echo "${ECHO_T}$ac_ct_AR" >&6
4360 else
4361   echo "$as_me:4361: result: no" >&5
4362 echo "${ECHO_T}no" >&6
4363 fi
4364
4365   AR=$ac_ct_AR
4366 else
4367   AR="$ac_cv_prog_AR"
4368 fi
4369
4370 echo "$as_me:4370: checking for options to update archives" >&5
4371 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4372 if test "${cf_cv_ar_flags+set}" = set; then
4373   echo $ECHO_N "(cached) $ECHO_C" >&6
4374 else
4375
4376         cf_cv_ar_flags=unknown
4377         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4378         do
4379
4380                 # check if $ARFLAGS already contains this choice
4381                 if test "x$ARFLAGS" != "x" ; then
4382                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4383                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4384                                 cf_cv_ar_flags=
4385                                 break
4386                         fi
4387                 fi
4388
4389                 rm -f conftest.$ac_cv_objext
4390                 rm -f conftest.a
4391
4392                 cat >conftest.$ac_ext <<EOF
4393 #line 4393 "configure"
4394 int     testdata[3] = { 123, 456, 789 };
4395 EOF
4396                 if { (eval echo "$as_me:4396: \"$ac_compile\"") >&5
4397   (eval $ac_compile) 2>&5
4398   ac_status=$?
4399   echo "$as_me:4399: \$? = $ac_status" >&5
4400   (exit $ac_status); } ; then
4401                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4402                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4403                         if test -f conftest.a ; then
4404                                 cf_cv_ar_flags=$cf_ar_flags
4405                                 break
4406                         fi
4407                 else
4408                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4409
4410 echo "${as_me:-configure}:4410: testing cannot compile test-program ..." 1>&5
4411
4412                         break
4413                 fi
4414         done
4415         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4416
4417 fi
4418 echo "$as_me:4418: result: $cf_cv_ar_flags" >&5
4419 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4420
4421 if test -n "$ARFLAGS" ; then
4422         if test -n "$cf_cv_ar_flags" ; then
4423                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4424         fi
4425 else
4426         ARFLAGS=$cf_cv_ar_flags
4427 fi
4428
4429 echo "$as_me:4429: checking if you have specified an install-prefix" >&5
4430 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4431
4432 # Check whether --with-install-prefix or --without-install-prefix was given.
4433 if test "${with_install_prefix+set}" = set; then
4434   withval="$with_install_prefix"
4435   case "$withval" in #(vi
4436         yes|no) #(vi
4437                 ;;
4438         *)      DESTDIR="$withval"
4439                 ;;
4440         esac
4441 fi;
4442 echo "$as_me:4442: result: $DESTDIR" >&5
4443 echo "${ECHO_T}$DESTDIR" >&6
4444
4445 ###############################################################################
4446
4447 # If we're cross-compiling, allow the user to override the tools and their
4448 # options.  The configure script is oriented toward identifying the host
4449 # compiler, etc., but we need a build compiler to generate parts of the source.
4450
4451 if test "$cross_compiling" = yes ; then
4452
4453         # defaults that we might want to override
4454         : ${BUILD_CFLAGS:=''}
4455         : ${BUILD_CPPFLAGS:=''}
4456         : ${BUILD_LDFLAGS:=''}
4457         : ${BUILD_LIBS:=''}
4458         : ${BUILD_EXEEXT:='$x'}
4459         : ${BUILD_OBJEXT:='o'}
4460
4461 # Check whether --with-build-cc or --without-build-cc was given.
4462 if test "${with_build_cc+set}" = set; then
4463   withval="$with_build_cc"
4464   BUILD_CC="$withval"
4465 else
4466   for ac_prog in gcc cc cl
4467 do
4468   # Extract the first word of "$ac_prog", so it can be a program name with args.
4469 set dummy $ac_prog; ac_word=$2
4470 echo "$as_me:4470: checking for $ac_word" >&5
4471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4472 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   if test -n "$BUILD_CC"; then
4476   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4477 else
4478   ac_save_IFS=$IFS; IFS=$ac_path_separator
4479 ac_dummy="$PATH"
4480 for ac_dir in $ac_dummy; do
4481   IFS=$ac_save_IFS
4482   test -z "$ac_dir" && ac_dir=.
4483   $as_executable_p "$ac_dir/$ac_word" || continue
4484 ac_cv_prog_BUILD_CC="$ac_prog"
4485 echo "$as_me:4485: found $ac_dir/$ac_word" >&5
4486 break
4487 done
4488
4489 fi
4490 fi
4491 BUILD_CC=$ac_cv_prog_BUILD_CC
4492 if test -n "$BUILD_CC"; then
4493   echo "$as_me:4493: result: $BUILD_CC" >&5
4494 echo "${ECHO_T}$BUILD_CC" >&6
4495 else
4496   echo "$as_me:4496: result: no" >&5
4497 echo "${ECHO_T}no" >&6
4498 fi
4499
4500   test -n "$BUILD_CC" && break
4501 done
4502
4503 fi;
4504         echo "$as_me:4504: checking for native build C compiler" >&5
4505 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4506         echo "$as_me:4506: result: $BUILD_CC" >&5
4507 echo "${ECHO_T}$BUILD_CC" >&6
4508
4509         echo "$as_me:4509: checking for native build C preprocessor" >&5
4510 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4511
4512 # Check whether --with-build-cpp or --without-build-cpp was given.
4513 if test "${with_build_cpp+set}" = set; then
4514   withval="$with_build_cpp"
4515   BUILD_CPP="$withval"
4516 else
4517   BUILD_CPP='${BUILD_CC} -E'
4518 fi;
4519         echo "$as_me:4519: result: $BUILD_CPP" >&5
4520 echo "${ECHO_T}$BUILD_CPP" >&6
4521
4522         echo "$as_me:4522: checking for native build C flags" >&5
4523 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4524
4525 # Check whether --with-build-cflags or --without-build-cflags was given.
4526 if test "${with_build_cflags+set}" = set; then
4527   withval="$with_build_cflags"
4528   BUILD_CFLAGS="$withval"
4529 fi;
4530         echo "$as_me:4530: result: $BUILD_CFLAGS" >&5
4531 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4532
4533         echo "$as_me:4533: checking for native build C preprocessor-flags" >&5
4534 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4535
4536 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4537 if test "${with_build_cppflags+set}" = set; then
4538   withval="$with_build_cppflags"
4539   BUILD_CPPFLAGS="$withval"
4540 fi;
4541         echo "$as_me:4541: result: $BUILD_CPPFLAGS" >&5
4542 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4543
4544         echo "$as_me:4544: checking for native build linker-flags" >&5
4545 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4546
4547 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4548 if test "${with_build_ldflags+set}" = set; then
4549   withval="$with_build_ldflags"
4550   BUILD_LDFLAGS="$withval"
4551 fi;
4552         echo "$as_me:4552: result: $BUILD_LDFLAGS" >&5
4553 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4554
4555         echo "$as_me:4555: checking for native build linker-libraries" >&5
4556 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4557
4558 # Check whether --with-build-libs or --without-build-libs was given.
4559 if test "${with_build_libs+set}" = set; then
4560   withval="$with_build_libs"
4561   BUILD_LIBS="$withval"
4562 fi;
4563         echo "$as_me:4563: result: $BUILD_LIBS" >&5
4564 echo "${ECHO_T}$BUILD_LIBS" >&6
4565
4566         # this assumes we're on Unix.
4567         BUILD_EXEEXT=
4568         BUILD_OBJEXT=o
4569
4570         : ${BUILD_CC:='${CC}'}
4571
4572         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4573                 { { echo "$as_me:4573: error: Cross-build requires two compilers.
4574 Use --with-build-cc to specify the native compiler." >&5
4575 echo "$as_me: error: Cross-build requires two compilers.
4576 Use --with-build-cc to specify the native compiler." >&2;}
4577    { (exit 1); exit 1; }; }
4578         fi
4579
4580 else
4581         : ${BUILD_CC:='${CC}'}
4582         : ${BUILD_CPP:='${CPP}'}
4583         : ${BUILD_CFLAGS:='${CFLAGS}'}
4584         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4585         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4586         : ${BUILD_LIBS:='${LIBS}'}
4587         : ${BUILD_EXEEXT:='$x'}
4588         : ${BUILD_OBJEXT:='o'}
4589 fi
4590
4591 ###############################################################################
4592
4593 ### Options to allow the user to specify the set of libraries which are used.
4594 ### Use "--without-normal --with-shared" to allow the default model to be
4595 ### shared, for example.
4596 cf_list_models=""
4597
4598 echo "$as_me:4598: checking if libtool -version-number should be used" >&5
4599 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4600
4601 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4602 if test "${enable_libtool_version+set}" = set; then
4603   enableval="$enable_libtool_version"
4604   test "$enableval" != no && enableval=yes
4605   if test "$enableval" != "yes" ; then
4606     cf_libtool_version=no
4607   else
4608     cf_libtool_version=yes
4609   fi
4610 else
4611   enableval=yes
4612   cf_libtool_version=yes
4613
4614 fi;
4615 echo "$as_me:4615: result: $cf_libtool_version" >&5
4616 echo "${ECHO_T}$cf_libtool_version" >&6
4617
4618 if test "$cf_libtool_version" = yes ; then
4619         LIBTOOL_VERSION="-version-number"
4620 else
4621         LIBTOOL_VERSION="-version-info"
4622 fi
4623
4624 LIBTOOL=
4625
4626 # common library maintenance symbols that are convenient for libtool scripts:
4627 LIB_CREATE='${AR} -cr'
4628 LIB_OBJECT='${OBJECTS}'
4629 LIB_SUFFIX=.a
4630 LIB_PREP="$RANLIB"
4631
4632 # symbols used to prop libtool up to enable it to determine what it should be
4633 # doing:
4634 LIB_CLEAN=
4635 LIB_COMPILE=
4636 LIB_LINK='${CC}'
4637 LIB_INSTALL=
4638 LIB_UNINSTALL=
4639
4640 echo "$as_me:4640: checking if you want to build libraries with libtool" >&5
4641 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4642
4643 # Check whether --with-libtool or --without-libtool was given.
4644 if test "${with_libtool+set}" = set; then
4645   withval="$with_libtool"
4646   with_libtool=$withval
4647 else
4648   with_libtool=no
4649 fi;
4650 echo "$as_me:4650: result: $with_libtool" >&5
4651 echo "${ECHO_T}$with_libtool" >&6
4652 if test "$with_libtool" != "no"; then
4653
4654         if test "$with_libtool" != "yes" ; then
4655
4656 if test "x$prefix" != xNONE; then
4657   cf_path_syntax="$prefix"
4658 else
4659   cf_path_syntax="$ac_default_prefix"
4660 fi
4661
4662 case ".$with_libtool" in #(vi
4663 .\$\(*\)*|.\'*\'*) #(vi
4664   ;;
4665 ..|./*|.\\*) #(vi
4666   ;;
4667 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4668   ;;
4669 .\${*prefix}*) #(vi
4670   eval with_libtool="$with_libtool"
4671   case ".$with_libtool" in #(vi
4672   .NONE/*)
4673     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4674     ;;
4675   esac
4676   ;; #(vi
4677 .no|.NONE/*)
4678   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4679   ;;
4680 *)
4681   { { echo "$as_me:4681: error: expected a pathname, not \"$with_libtool\"" >&5
4682 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4683    { (exit 1); exit 1; }; }
4684   ;;
4685 esac
4686
4687                 LIBTOOL=$with_libtool
4688         else
4689                 # Extract the first word of "libtool", so it can be a program name with args.
4690 set dummy libtool; ac_word=$2
4691 echo "$as_me:4691: checking for $ac_word" >&5
4692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4693 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4694   echo $ECHO_N "(cached) $ECHO_C" >&6
4695 else
4696   case $LIBTOOL in
4697   [\\/]* | ?:[\\/]*)
4698   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4699   ;;
4700   *)
4701   ac_save_IFS=$IFS; IFS=$ac_path_separator
4702 ac_dummy="$PATH"
4703 for ac_dir in $ac_dummy; do
4704   IFS=$ac_save_IFS
4705   test -z "$ac_dir" && ac_dir=.
4706   if $as_executable_p "$ac_dir/$ac_word"; then
4707    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4708    echo "$as_me:4708: found $ac_dir/$ac_word" >&5
4709    break
4710 fi
4711 done
4712
4713   ;;
4714 esac
4715 fi
4716 LIBTOOL=$ac_cv_path_LIBTOOL
4717
4718 if test -n "$LIBTOOL"; then
4719   echo "$as_me:4719: result: $LIBTOOL" >&5
4720 echo "${ECHO_T}$LIBTOOL" >&6
4721 else
4722   echo "$as_me:4722: result: no" >&5
4723 echo "${ECHO_T}no" >&6
4724 fi
4725
4726         fi
4727         if test -z "$LIBTOOL" ; then
4728                 { { echo "$as_me:4728: error: Cannot find libtool" >&5
4729 echo "$as_me: error: Cannot find libtool" >&2;}
4730    { (exit 1); exit 1; }; }
4731         fi
4732         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4733         LIB_OBJECT='${OBJECTS:.o=.lo}'
4734         LIB_SUFFIX=.la
4735         LIB_CLEAN='${LIBTOOL} --mode=clean'
4736         LIB_COMPILE='${LIBTOOL} --mode=compile'
4737         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4738         LIB_INSTALL='${LIBTOOL} --mode=install'
4739         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4740         LIB_PREP=:
4741
4742         # Show the version of libtool
4743         echo "$as_me:4743: checking version of libtool" >&5
4744 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4745
4746         # Save the version in a cache variable - this is not entirely a good
4747         # thing, but the version string from libtool is very ugly, and for
4748         # bug reports it might be useful to have the original string. "("
4749         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.].*//'`
4750         echo "$as_me:4750: result: $cf_cv_libtool_version" >&5
4751 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4752         if test -z "$cf_cv_libtool_version" ; then
4753                 { { echo "$as_me:4753: error: This is not GNU libtool" >&5
4754 echo "$as_me: error: This is not GNU libtool" >&2;}
4755    { (exit 1); exit 1; }; }
4756         fi
4757
4758         # special hack to add -no-undefined (which libtool should do for itself)
4759         LT_UNDEF=
4760         case "$cf_cv_system_name" in #(vi
4761         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4762                 LT_UNDEF=-no-undefined
4763                 ;;
4764         esac
4765
4766         # special hack to add --tag option for C++ compiler
4767         case $cf_cv_libtool_version in #(vi
4768         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4769                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4770                 LIBTOOL="$LIBTOOL --tag=CC"
4771                 ;;
4772         *)
4773                 LIBTOOL_CXX="$LIBTOOL"
4774                 ;;
4775         esac
4776 else
4777         LIBTOOL=""
4778         LIBTOOL_CXX=""
4779 fi
4780
4781 test -z "$LIBTOOL" && ECHO_LT=
4782
4783 if test "$with_libtool" != "no" ; then
4784
4785 cf_list_models="$cf_list_models libtool"
4786
4787 else
4788
4789 echo "$as_me:4789: checking if you want to build shared libraries" >&5
4790 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4791
4792 # Check whether --with-shared or --without-shared was given.
4793 if test "${with_shared+set}" = set; then
4794   withval="$with_shared"
4795   with_shared=$withval
4796 else
4797   with_shared=no
4798 fi;
4799 echo "$as_me:4799: result: $with_shared" >&5
4800 echo "${ECHO_T}$with_shared" >&6
4801 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4802
4803 echo "$as_me:4803: checking if you want to build static libraries" >&5
4804 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4805
4806 # Check whether --with-normal or --without-normal was given.
4807 if test "${with_normal+set}" = set; then
4808   withval="$with_normal"
4809   with_normal=$withval
4810 else
4811   with_normal=yes
4812 fi;
4813 echo "$as_me:4813: result: $with_normal" >&5
4814 echo "${ECHO_T}$with_normal" >&6
4815 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4816
4817 echo "$as_me:4817: checking if you want to build debug libraries" >&5
4818 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4819
4820 # Check whether --with-debug or --without-debug was given.
4821 if test "${with_debug+set}" = set; then
4822   withval="$with_debug"
4823   with_debug=$withval
4824 else
4825   with_debug=yes
4826 fi;
4827 echo "$as_me:4827: result: $with_debug" >&5
4828 echo "${ECHO_T}$with_debug" >&6
4829 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4830
4831 echo "$as_me:4831: checking if you want to build profiling libraries" >&5
4832 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4833
4834 # Check whether --with-profile or --without-profile was given.
4835 if test "${with_profile+set}" = set; then
4836   withval="$with_profile"
4837   with_profile=$withval
4838 else
4839   with_profile=no
4840 fi;
4841 echo "$as_me:4841: result: $with_profile" >&5
4842 echo "${ECHO_T}$with_profile" >&6
4843 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4844
4845 fi
4846
4847 ###############################################################################
4848
4849 echo "$as_me:4849: checking for specified models" >&5
4850 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4851 test -z "$cf_list_models" && cf_list_models=normal
4852 test "$with_libtool" != "no" && cf_list_models=libtool
4853 echo "$as_me:4853: result: $cf_list_models" >&5
4854 echo "${ECHO_T}$cf_list_models" >&6
4855
4856 ### Use the first model as the default, and save its suffix for use in building
4857 ### up test-applications.
4858 echo "$as_me:4858: checking for default model" >&5
4859 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4860 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4861 echo "$as_me:4861: result: $DFT_LWR_MODEL" >&5
4862 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4863
4864 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4865
4866 TICS_NAME=tic
4867
4868 TINFO_NAME=tinfo
4869
4870 LIB_NAME=ncurses
4871
4872 LIB_DIR=../lib
4873 LIB_2ND=../../lib
4874
4875 echo "$as_me:4875: checking if you want to have a library-prefix" >&5
4876 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4877
4878 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4879 if test "${with_lib_prefix+set}" = set; then
4880   withval="$with_lib_prefix"
4881   with_lib_prefix=$withval
4882 else
4883   with_lib_prefix=auto
4884 fi;
4885 echo "$as_me:4885: result: $with_lib_prefix" >&5
4886 echo "${ECHO_T}$with_lib_prefix" >&6
4887
4888 if test $with_lib_prefix = auto
4889 then
4890
4891         case $cf_cv_system_name in #(vi
4892         OS/2*|os2*) #(vi
4893         LIB_PREFIX=''
4894         ;;
4895         *)      LIB_PREFIX='lib'
4896         ;;
4897         esac
4898 cf_prefix=$LIB_PREFIX
4899
4900 elif test $with_lib_prefix = no
4901 then
4902         LIB_PREFIX=
4903 else
4904         LIB_PREFIX=$with_lib_prefix
4905 fi
4906
4907 LIB_SUFFIX=
4908
4909 ###############################################################################
4910
4911 echo "$as_me:4911: checking if you want to build a separate terminfo library" >&5
4912 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4913
4914 # Check whether --with-termlib or --without-termlib was given.
4915 if test "${with_termlib+set}" = set; then
4916   withval="$with_termlib"
4917   with_termlib=$withval
4918 else
4919   with_termlib=no
4920 fi;
4921 echo "$as_me:4921: result: $with_termlib" >&5
4922 echo "${ECHO_T}$with_termlib" >&6
4923
4924 echo "$as_me:4924: checking if you want to build a separate tic library" >&5
4925 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4926
4927 # Check whether --with-ticlib or --without-ticlib was given.
4928 if test "${with_ticlib+set}" = set; then
4929   withval="$with_ticlib"
4930   with_ticlib=$withval
4931 else
4932   with_ticlib=no
4933 fi;
4934 echo "$as_me:4934: result: $with_ticlib" >&5
4935 echo "${ECHO_T}$with_ticlib" >&6
4936
4937 ### Checks for special libraries, must be done up-front.
4938 SHLIB_LIST=""
4939
4940 echo "$as_me:4940: checking if you want to link with the GPM mouse library" >&5
4941 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4942
4943 # Check whether --with-gpm or --without-gpm was given.
4944 if test "${with_gpm+set}" = set; then
4945   withval="$with_gpm"
4946   with_gpm=$withval
4947 else
4948   with_gpm=maybe
4949 fi;
4950 echo "$as_me:4950: result: $with_gpm" >&5
4951 echo "${ECHO_T}$with_gpm" >&6
4952
4953 if test "$with_gpm" != no ; then
4954         echo "$as_me:4954: checking for gpm.h" >&5
4955 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4956 if test "${ac_cv_header_gpm_h+set}" = set; then
4957   echo $ECHO_N "(cached) $ECHO_C" >&6
4958 else
4959   cat >conftest.$ac_ext <<_ACEOF
4960 #line 4960 "configure"
4961 #include "confdefs.h"
4962 #include <gpm.h>
4963 _ACEOF
4964 if { (eval echo "$as_me:4964: \"$ac_cpp conftest.$ac_ext\"") >&5
4965   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4966   ac_status=$?
4967   egrep -v '^ *\+' conftest.er1 >conftest.err
4968   rm -f conftest.er1
4969   cat conftest.err >&5
4970   echo "$as_me:4970: \$? = $ac_status" >&5
4971   (exit $ac_status); } >/dev/null; then
4972   if test -s conftest.err; then
4973     ac_cpp_err=$ac_c_preproc_warn_flag
4974   else
4975     ac_cpp_err=
4976   fi
4977 else
4978   ac_cpp_err=yes
4979 fi
4980 if test -z "$ac_cpp_err"; then
4981   ac_cv_header_gpm_h=yes
4982 else
4983   echo "$as_me: failed program was:" >&5
4984   cat conftest.$ac_ext >&5
4985   ac_cv_header_gpm_h=no
4986 fi
4987 rm -f conftest.err conftest.$ac_ext
4988 fi
4989 echo "$as_me:4989: result: $ac_cv_header_gpm_h" >&5
4990 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4991 if test $ac_cv_header_gpm_h = yes; then
4992
4993                 cat >>confdefs.h <<\EOF
4994 #define HAVE_GPM_H 1
4995 EOF
4996
4997                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4998                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4999
5000 echo "${as_me:-configure}:5000: testing assuming we really have GPM library ..." 1>&5
5001
5002                         cat >>confdefs.h <<\EOF
5003 #define HAVE_LIBGPM 1
5004 EOF
5005
5006                 else
5007                         echo "$as_me:5007: checking for Gpm_Open in -lgpm" >&5
5008 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5009 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5010   echo $ECHO_N "(cached) $ECHO_C" >&6
5011 else
5012   ac_check_lib_save_LIBS=$LIBS
5013 LIBS="-lgpm  $LIBS"
5014 cat >conftest.$ac_ext <<_ACEOF
5015 #line 5015 "configure"
5016 #include "confdefs.h"
5017
5018 /* Override any gcc2 internal prototype to avoid an error.  */
5019 #ifdef __cplusplus
5020 extern "C"
5021 #endif
5022 /* We use char because int might match the return type of a gcc2
5023    builtin and then its argument prototype would still apply.  */
5024 char Gpm_Open ();
5025 int
5026 main ()
5027 {
5028 Gpm_Open ();
5029   ;
5030   return 0;
5031 }
5032 _ACEOF
5033 rm -f conftest.$ac_objext conftest$ac_exeext
5034 if { (eval echo "$as_me:5034: \"$ac_link\"") >&5
5035   (eval $ac_link) 2>&5
5036   ac_status=$?
5037   echo "$as_me:5037: \$? = $ac_status" >&5
5038   (exit $ac_status); } &&
5039          { ac_try='test -s conftest$ac_exeext'
5040   { (eval echo "$as_me:5040: \"$ac_try\"") >&5
5041   (eval $ac_try) 2>&5
5042   ac_status=$?
5043   echo "$as_me:5043: \$? = $ac_status" >&5
5044   (exit $ac_status); }; }; then
5045   ac_cv_lib_gpm_Gpm_Open=yes
5046 else
5047   echo "$as_me: failed program was:" >&5
5048 cat conftest.$ac_ext >&5
5049 ac_cv_lib_gpm_Gpm_Open=no
5050 fi
5051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5052 LIBS=$ac_check_lib_save_LIBS
5053 fi
5054 echo "$as_me:5054: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5055 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5056 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5057   :
5058 else
5059
5060                                 { { echo "$as_me:5060: error: Cannot link with GPM library" >&5
5061 echo "$as_me: error: Cannot link with GPM library" >&2;}
5062    { (exit 1); exit 1; }; }
5063                 fi
5064                 with_gpm=yes
5065
5066 fi
5067
5068 else
5069
5070                 test "$with_gpm" != maybe && { echo "$as_me:5070: WARNING: Cannot find GPM header" >&5
5071 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5072                 with_gpm=no
5073
5074 fi
5075
5076 fi
5077
5078 if test "$with_gpm" != no ; then
5079         echo "$as_me:5079: checking if you want to load GPM dynamically" >&5
5080 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5081
5082 # Check whether --with-dlsym or --without-dlsym was given.
5083 if test "${with_dlsym+set}" = set; then
5084   withval="$with_dlsym"
5085   with_dlsym=$withval
5086 else
5087   with_dlsym=yes
5088 fi;
5089         echo "$as_me:5089: result: $with_dlsym" >&5
5090 echo "${ECHO_T}$with_dlsym" >&6
5091         if test "$with_dlsym" = yes ; then
5092
5093 cf_have_dlsym=no
5094 echo "$as_me:5094: checking for dlsym" >&5
5095 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5096 if test "${ac_cv_func_dlsym+set}" = set; then
5097   echo $ECHO_N "(cached) $ECHO_C" >&6
5098 else
5099   cat >conftest.$ac_ext <<_ACEOF
5100 #line 5100 "configure"
5101 #include "confdefs.h"
5102 /* System header to define __stub macros and hopefully few prototypes,
5103     which can conflict with char dlsym (); below.  */
5104 #include <assert.h>
5105 /* Override any gcc2 internal prototype to avoid an error.  */
5106 #ifdef __cplusplus
5107 extern "C"
5108 #endif
5109 /* We use char because int might match the return type of a gcc2
5110    builtin and then its argument prototype would still apply.  */
5111 char dlsym ();
5112 char (*f) ();
5113
5114 int
5115 main ()
5116 {
5117 /* The GNU C library defines this for functions which it implements
5118     to always fail with ENOSYS.  Some functions are actually named
5119     something starting with __ and the normal name is an alias.  */
5120 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5121 choke me
5122 #else
5123 f = dlsym;
5124 #endif
5125
5126   ;
5127   return 0;
5128 }
5129 _ACEOF
5130 rm -f conftest.$ac_objext conftest$ac_exeext
5131 if { (eval echo "$as_me:5131: \"$ac_link\"") >&5
5132   (eval $ac_link) 2>&5
5133   ac_status=$?
5134   echo "$as_me:5134: \$? = $ac_status" >&5
5135   (exit $ac_status); } &&
5136          { ac_try='test -s conftest$ac_exeext'
5137   { (eval echo "$as_me:5137: \"$ac_try\"") >&5
5138   (eval $ac_try) 2>&5
5139   ac_status=$?
5140   echo "$as_me:5140: \$? = $ac_status" >&5
5141   (exit $ac_status); }; }; then
5142   ac_cv_func_dlsym=yes
5143 else
5144   echo "$as_me: failed program was:" >&5
5145 cat conftest.$ac_ext >&5
5146 ac_cv_func_dlsym=no
5147 fi
5148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5149 fi
5150 echo "$as_me:5150: result: $ac_cv_func_dlsym" >&5
5151 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5152 if test $ac_cv_func_dlsym = yes; then
5153   cf_have_dlsym=yes
5154 else
5155
5156 cf_have_libdl=no
5157 echo "$as_me:5157: checking for dlsym in -ldl" >&5
5158 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5159 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5160   echo $ECHO_N "(cached) $ECHO_C" >&6
5161 else
5162   ac_check_lib_save_LIBS=$LIBS
5163 LIBS="-ldl  $LIBS"
5164 cat >conftest.$ac_ext <<_ACEOF
5165 #line 5165 "configure"
5166 #include "confdefs.h"
5167
5168 /* Override any gcc2 internal prototype to avoid an error.  */
5169 #ifdef __cplusplus
5170 extern "C"
5171 #endif
5172 /* We use char because int might match the return type of a gcc2
5173    builtin and then its argument prototype would still apply.  */
5174 char dlsym ();
5175 int
5176 main ()
5177 {
5178 dlsym ();
5179   ;
5180   return 0;
5181 }
5182 _ACEOF
5183 rm -f conftest.$ac_objext conftest$ac_exeext
5184 if { (eval echo "$as_me:5184: \"$ac_link\"") >&5
5185   (eval $ac_link) 2>&5
5186   ac_status=$?
5187   echo "$as_me:5187: \$? = $ac_status" >&5
5188   (exit $ac_status); } &&
5189          { ac_try='test -s conftest$ac_exeext'
5190   { (eval echo "$as_me:5190: \"$ac_try\"") >&5
5191   (eval $ac_try) 2>&5
5192   ac_status=$?
5193   echo "$as_me:5193: \$? = $ac_status" >&5
5194   (exit $ac_status); }; }; then
5195   ac_cv_lib_dl_dlsym=yes
5196 else
5197   echo "$as_me: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5199 ac_cv_lib_dl_dlsym=no
5200 fi
5201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5202 LIBS=$ac_check_lib_save_LIBS
5203 fi
5204 echo "$as_me:5204: result: $ac_cv_lib_dl_dlsym" >&5
5205 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5206 if test $ac_cv_lib_dl_dlsym = yes; then
5207
5208         cf_have_dlsym=yes
5209         cf_have_libdl=yes
5210 fi
5211
5212 fi
5213
5214 if test "$cf_have_dlsym" = yes ; then
5215         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5216
5217         echo "$as_me:5217: checking whether able to link to dl*() functions" >&5
5218 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5219         cat >conftest.$ac_ext <<_ACEOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222 #include <dlfcn.h>
5223 int
5224 main ()
5225 {
5226
5227                 void *obj;
5228                 if ((obj = dlopen("filename", 0)) != 0) {
5229                         if (dlsym(obj, "symbolname") == 0) {
5230                         dlclose(obj);
5231                         }
5232                 }
5233   ;
5234   return 0;
5235 }
5236 _ACEOF
5237 rm -f conftest.$ac_objext conftest$ac_exeext
5238 if { (eval echo "$as_me:5238: \"$ac_link\"") >&5
5239   (eval $ac_link) 2>&5
5240   ac_status=$?
5241   echo "$as_me:5241: \$? = $ac_status" >&5
5242   (exit $ac_status); } &&
5243          { ac_try='test -s conftest$ac_exeext'
5244   { (eval echo "$as_me:5244: \"$ac_try\"") >&5
5245   (eval $ac_try) 2>&5
5246   ac_status=$?
5247   echo "$as_me:5247: \$? = $ac_status" >&5
5248   (exit $ac_status); }; }; then
5249
5250                 cat >>confdefs.h <<\EOF
5251 #define HAVE_LIBDL 1
5252 EOF
5253
5254 else
5255   echo "$as_me: failed program was:" >&5
5256 cat conftest.$ac_ext >&5
5257
5258                 { { echo "$as_me:5258: error: Cannot link test program for libdl" >&5
5259 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5260    { (exit 1); exit 1; }; }
5261 fi
5262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5263         echo "$as_me:5263: result: ok" >&5
5264 echo "${ECHO_T}ok" >&6
5265 else
5266         { { echo "$as_me:5266: error: Cannot find dlsym function" >&5
5267 echo "$as_me: error: Cannot find dlsym function" >&2;}
5268    { (exit 1); exit 1; }; }
5269 fi
5270
5271                 if test "$with_gpm" != yes ; then
5272                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5273
5274 echo "${as_me:-configure}:5274: testing assuming soname for gpm is $with_gpm ..." 1>&5
5275
5276                         cf_cv_gpm_soname="$with_gpm"
5277                 else
5278
5279 echo "$as_me:5279: checking for soname of gpm library" >&5
5280 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5281 if test "${cf_cv_gpm_soname+set}" = set; then
5282   echo $ECHO_N "(cached) $ECHO_C" >&6
5283 else
5284
5285 cf_cv_gpm_soname=unknown
5286 if test "$cross_compiling" != yes ; then
5287 cat >conftest.$ac_ext <<CF_EOF
5288 #include <gpm.h>
5289 int main()
5290 {
5291 if (Gpm_Open(0,0)) Gpm_Close();
5292         ${cf_cv_main_return:-return}(0);
5293 }
5294 CF_EOF
5295 cf_save_LIBS="$LIBS"
5296         LIBS="-lgpm $LIBS"
5297         if { (eval echo "$as_me:5297: \"$ac_compile\"") >&5
5298   (eval $ac_compile) 2>&5
5299   ac_status=$?
5300   echo "$as_me:5300: \$? = $ac_status" >&5
5301   (exit $ac_status); } ; then
5302                 if { (eval echo "$as_me:5302: \"$ac_link\"") >&5
5303   (eval $ac_link) 2>&5
5304   ac_status=$?
5305   echo "$as_me:5305: \$? = $ac_status" >&5
5306   (exit $ac_status); } ; then
5307                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5308                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5309                 fi
5310         fi
5311 rm -rf conftest*
5312 LIBS="$cf_save_LIBS"
5313 fi
5314
5315 fi
5316 echo "$as_me:5316: result: $cf_cv_gpm_soname" >&5
5317 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5318
5319                 fi
5320                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5321 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5322 EOF
5323
5324                 SHLIB_LIST="-ldl $SHLIB_LIST"
5325         else
5326                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5327                 TEST_LIBS="-lgpm $TEST_LIBS"
5328         fi
5329         cat >>confdefs.h <<\EOF
5330 #define HAVE_LIBGPM 1
5331 EOF
5332
5333 echo "$as_me:5333: checking for Gpm_Wgetch in -lgpm" >&5
5334 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5335 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5336   echo $ECHO_N "(cached) $ECHO_C" >&6
5337 else
5338   ac_check_lib_save_LIBS=$LIBS
5339 LIBS="-lgpm  $LIBS"
5340 cat >conftest.$ac_ext <<_ACEOF
5341 #line 5341 "configure"
5342 #include "confdefs.h"
5343
5344 /* Override any gcc2 internal prototype to avoid an error.  */
5345 #ifdef __cplusplus
5346 extern "C"
5347 #endif
5348 /* We use char because int might match the return type of a gcc2
5349    builtin and then its argument prototype would still apply.  */
5350 char Gpm_Wgetch ();
5351 int
5352 main ()
5353 {
5354 Gpm_Wgetch ();
5355   ;
5356   return 0;
5357 }
5358 _ACEOF
5359 rm -f conftest.$ac_objext conftest$ac_exeext
5360 if { (eval echo "$as_me:5360: \"$ac_link\"") >&5
5361   (eval $ac_link) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit $ac_status); } &&
5365          { ac_try='test -s conftest$ac_exeext'
5366   { (eval echo "$as_me:5366: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:5369: \$? = $ac_status" >&5
5370   (exit $ac_status); }; }; then
5371   ac_cv_lib_gpm_Gpm_Wgetch=yes
5372 else
5373   echo "$as_me: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375 ac_cv_lib_gpm_Gpm_Wgetch=no
5376 fi
5377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5378 LIBS=$ac_check_lib_save_LIBS
5379 fi
5380 echo "$as_me:5380: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5381 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5382 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5383
5384 echo "$as_me:5384: checking if GPM is weakly bound to curses library" >&5
5385 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5386 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5387   echo $ECHO_N "(cached) $ECHO_C" >&6
5388 else
5389
5390 cf_cv_check_gpm_wgetch=unknown
5391 if test "$cross_compiling" != yes ; then
5392
5393 cat >conftest.$ac_ext <<CF_EOF
5394 #include <gpm.h>
5395 int main()
5396 {
5397         Gpm_Wgetch();
5398         ${cf_cv_main_return:-return}(0);
5399 }
5400 CF_EOF
5401
5402         cf_save_LIBS="$LIBS"
5403         # This only works if we can look at the symbol table.  If a shared
5404         # library is stripped for install, we cannot use that.  So we're forced
5405         # to rely on the static library, noting that some packagers may not
5406         # include it.
5407         LIBS="-static -lgpm -dynamic $LIBS"
5408         if { (eval echo "$as_me:5408: \"$ac_compile\"") >&5
5409   (eval $ac_compile) 2>&5
5410   ac_status=$?
5411   echo "$as_me:5411: \$? = $ac_status" >&5
5412   (exit $ac_status); } ; then
5413                 if { (eval echo "$as_me:5413: \"$ac_link\"") >&5
5414   (eval $ac_link) 2>&5
5415   ac_status=$?
5416   echo "$as_me:5416: \$? = $ac_status" >&5
5417   (exit $ac_status); } ; then
5418                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5419                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5420                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5421                 fi
5422         fi
5423         rm -rf conftest*
5424         LIBS="$cf_save_LIBS"
5425 fi
5426
5427 fi
5428 echo "$as_me:5428: result: $cf_cv_check_gpm_wgetch" >&5
5429 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5430
5431 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5432         { echo "$as_me:5432: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5433 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5434 fi
5435
5436 fi
5437
5438 fi
5439
5440 # not everyone has "test -c"
5441 if test -c /dev/sysmouse 2>/dev/null ; then
5442 echo "$as_me:5442: checking if you want to use sysmouse" >&5
5443 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5444
5445 # Check whether --with-sysmouse or --without-sysmouse was given.
5446 if test "${with_sysmouse+set}" = set; then
5447   withval="$with_sysmouse"
5448   cf_with_sysmouse=$withval
5449 else
5450   cf_with_sysmouse=maybe
5451 fi;
5452         if test "$cf_with_sysmouse" != no ; then
5453         cat >conftest.$ac_ext <<_ACEOF
5454 #line 5454 "configure"
5455 #include "confdefs.h"
5456
5457 #include <osreldate.h>
5458 #if (__FreeBSD_version >= 400017)
5459 #include <sys/consio.h>
5460 #include <sys/fbio.h>
5461 #else
5462 #include <machine/console.h>
5463 #endif
5464
5465 int
5466 main ()
5467 {
5468
5469         struct mouse_info the_mouse;
5470         ioctl(0, CONS_MOUSECTL, &the_mouse);
5471
5472   ;
5473   return 0;
5474 }
5475 _ACEOF
5476 rm -f conftest.$ac_objext
5477 if { (eval echo "$as_me:5477: \"$ac_compile\"") >&5
5478   (eval $ac_compile) 2>&5
5479   ac_status=$?
5480   echo "$as_me:5480: \$? = $ac_status" >&5
5481   (exit $ac_status); } &&
5482          { ac_try='test -s conftest.$ac_objext'
5483   { (eval echo "$as_me:5483: \"$ac_try\"") >&5
5484   (eval $ac_try) 2>&5
5485   ac_status=$?
5486   echo "$as_me:5486: \$? = $ac_status" >&5
5487   (exit $ac_status); }; }; then
5488   cf_with_sysmouse=yes
5489 else
5490   echo "$as_me: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
5492 cf_with_sysmouse=no
5493 fi
5494 rm -f conftest.$ac_objext conftest.$ac_ext
5495         fi
5496 echo "$as_me:5496: result: $cf_with_sysmouse" >&5
5497 echo "${ECHO_T}$cf_with_sysmouse" >&6
5498 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5499 #define USE_SYSMOUSE 1
5500 EOF
5501
5502 fi
5503
5504 if test X"$CC_G_OPT" = X"" ; then
5505         CC_G_OPT='-g'
5506         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5507 fi
5508
5509 if test X"$CXX_G_OPT" = X"" ; then
5510         CXX_G_OPT='-g'
5511         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5512 fi
5513
5514 echo "$as_me:5514: checking for default loader flags" >&5
5515 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5516 case $DFT_LWR_MODEL in
5517 libtool) LD_MODEL=''   ;;
5518 normal)  LD_MODEL=''   ;;
5519 debug)   LD_MODEL=$CC_G_OPT ;;
5520 profile) LD_MODEL='-pg';;
5521 shared)  LD_MODEL=''   ;;
5522 esac
5523 echo "$as_me:5523: result: $LD_MODEL" >&5
5524 echo "${ECHO_T}$LD_MODEL" >&6
5525
5526 case $DFT_LWR_MODEL in
5527 shared)
5528
5529 echo "$as_me:5529: checking if rpath option should be used" >&5
5530 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5531
5532 # Check whether --enable-rpath or --disable-rpath was given.
5533 if test "${enable_rpath+set}" = set; then
5534   enableval="$enable_rpath"
5535   cf_cv_enable_rpath=$enableval
5536 else
5537   cf_cv_enable_rpath=no
5538 fi;
5539 echo "$as_me:5539: result: $cf_cv_enable_rpath" >&5
5540 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5541
5542 echo "$as_me:5542: checking if shared libraries should be relinked during install" >&5
5543 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5544
5545 # Check whether --enable-relink or --disable-relink was given.
5546 if test "${enable_relink+set}" = set; then
5547   enableval="$enable_relink"
5548   cf_cv_do_relink=$enableval
5549 else
5550   cf_cv_do_relink=yes
5551 fi;
5552 echo "$as_me:5552: result: $cf_cv_do_relink" >&5
5553 echo "${ECHO_T}$cf_cv_do_relink" >&6
5554         ;;
5555 esac
5556
5557 LD_RPATH_OPT=
5558 echo "$as_me:5558: checking for an rpath option" >&5
5559 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5560 case $cf_cv_system_name in #(vi
5561 irix*) #(vi
5562         if test "$GCC" = yes; then
5563                 LD_RPATH_OPT="-Wl,-rpath,"
5564         else
5565                 LD_RPATH_OPT="-rpath "
5566         fi
5567         ;;
5568 linux*|gnu*|k*bsd*-gnu) #(vi
5569         LD_RPATH_OPT="-Wl,-rpath,"
5570         ;;
5571 openbsd[2-9].*|mirbsd*) #(vi
5572         LD_RPATH_OPT="-Wl,-rpath,"
5573         ;;
5574 dragonfly*|freebsd*) #(vi
5575         LD_RPATH_OPT="-rpath "
5576         ;;
5577 netbsd*) #(vi
5578         LD_RPATH_OPT="-Wl,-rpath,"
5579         ;;
5580 osf*|mls+*) #(vi
5581         LD_RPATH_OPT="-rpath "
5582         ;;
5583 solaris2*) #(vi
5584         LD_RPATH_OPT="-R"
5585         ;;
5586 *)
5587         ;;
5588 esac
5589 echo "$as_me:5589: result: $LD_RPATH_OPT" >&5
5590 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5591
5592 case "x$LD_RPATH_OPT" in #(vi
5593 x-R*)
5594         echo "$as_me:5594: checking if we need a space after rpath option" >&5
5595 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5596         cf_save_LIBS="$LIBS"
5597         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5598         cat >conftest.$ac_ext <<_ACEOF
5599 #line 5599 "configure"
5600 #include "confdefs.h"
5601
5602 int
5603 main ()
5604 {
5605
5606   ;
5607   return 0;
5608 }
5609 _ACEOF
5610 rm -f conftest.$ac_objext conftest$ac_exeext
5611 if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
5612   (eval $ac_link) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); } &&
5616          { ac_try='test -s conftest$ac_exeext'
5617   { (eval echo "$as_me:5617: \"$ac_try\"") >&5
5618   (eval $ac_try) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); }; }; then
5622   cf_rpath_space=no
5623 else
5624   echo "$as_me: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5626 cf_rpath_space=yes
5627 fi
5628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5629         LIBS="$cf_save_LIBS"
5630         echo "$as_me:5630: result: $cf_rpath_space" >&5
5631 echo "${ECHO_T}$cf_rpath_space" >&6
5632         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5633         ;;
5634 esac
5635
5636         LOCAL_LDFLAGS=
5637         LOCAL_LDFLAGS2=
5638         LD_SHARED_OPTS=
5639         INSTALL_LIB="-m 644"
5640
5641         cf_cv_do_symlinks=no
5642         cf_ld_rpath_opt=
5643         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5644
5645         echo "$as_me:5645: checking if release/abi version should be used for shared libs" >&5
5646 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5647
5648 # Check whether --with-shlib-version or --without-shlib-version was given.
5649 if test "${with_shlib_version+set}" = set; then
5650   withval="$with_shlib_version"
5651   test -z "$withval" && withval=auto
5652         case $withval in #(vi
5653         yes) #(vi
5654                 cf_cv_shlib_version=auto
5655                 ;;
5656         rel|abi|auto|no) #(vi
5657                 cf_cv_shlib_version=$withval
5658                 ;;
5659         *)
5660                 { { echo "$as_me:5660: error: option value must be one of: rel, abi, auto or no" >&5
5661 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5662    { (exit 1); exit 1; }; }
5663                 ;;
5664         esac
5665
5666 else
5667   cf_cv_shlib_version=auto
5668 fi;
5669         echo "$as_me:5669: result: $cf_cv_shlib_version" >&5
5670 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5671
5672         cf_cv_rm_so_locs=no
5673
5674         # Some less-capable ports of gcc support only -fpic
5675         CC_SHARED_OPTS=
5676         if test "$GCC" = yes
5677         then
5678                 echo "$as_me:5678: checking which $CC option to use" >&5
5679 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5680                 cf_save_CFLAGS="$CFLAGS"
5681                 for CC_SHARED_OPTS in -fPIC -fpic ''
5682                 do
5683                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5684                         cat >conftest.$ac_ext <<_ACEOF
5685 #line 5685 "configure"
5686 #include "confdefs.h"
5687 #include <stdio.h>
5688 int
5689 main ()
5690 {
5691 int x = 1
5692   ;
5693   return 0;
5694 }
5695 _ACEOF
5696 rm -f conftest.$ac_objext
5697 if { (eval echo "$as_me:5697: \"$ac_compile\"") >&5
5698   (eval $ac_compile) 2>&5
5699   ac_status=$?
5700   echo "$as_me:5700: \$? = $ac_status" >&5
5701   (exit $ac_status); } &&
5702          { ac_try='test -s conftest.$ac_objext'
5703   { (eval echo "$as_me:5703: \"$ac_try\"") >&5
5704   (eval $ac_try) 2>&5
5705   ac_status=$?
5706   echo "$as_me:5706: \$? = $ac_status" >&5
5707   (exit $ac_status); }; }; then
5708   break
5709 else
5710   echo "$as_me: failed program was:" >&5
5711 cat conftest.$ac_ext >&5
5712 fi
5713 rm -f conftest.$ac_objext conftest.$ac_ext
5714                 done
5715                 echo "$as_me:5715: result: $CC_SHARED_OPTS" >&5
5716 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5717                 CFLAGS="$cf_save_CFLAGS"
5718         fi
5719
5720         cf_cv_shlib_version_infix=no
5721
5722         case $cf_cv_system_name in #(vi
5723         aix4.3-9*|aix[5-7]*) #(vi
5724                 if test "$GCC" = yes; then
5725                         CC_SHARED_OPTS=
5726                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5727                 else
5728                         # CC_SHARED_OPTS='-qpic=large -G'
5729                         # perhaps "-bM:SRE -bnoentry -bexpall"
5730                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5731                 fi
5732                 ;;
5733         beos*) #(vi
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5735                 ;;
5736         cygwin*) #(vi
5737                 CC_SHARED_OPTS=
5738                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5739                 cf_cv_shlib_version=cygdll
5740                 cf_cv_shlib_version_infix=cygdll
5741                 cat >mk_shared_lib.sh <<-CF_EOF
5742                 #!/bin/sh
5743                 SHARED_LIB=\$1
5744                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5745                 shift
5746                 cat <<-EOF
5747                 Linking shared library
5748                 ** SHARED_LIB \$SHARED_LIB
5749                 ** IMPORT_LIB \$IMPORT_LIB
5750 EOF
5751                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5752 CF_EOF
5753                 chmod +x mk_shared_lib.sh
5754                 ;;
5755         darwin*) #(vi
5756                 EXTRA_CFLAGS="-no-cpp-precomp"
5757                 CC_SHARED_OPTS="-dynamic"
5758                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5759                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5760                 cf_cv_shlib_version_infix=yes
5761                 echo "$as_me:5761: checking if ld -search_paths_first works" >&5
5762 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5763 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5764   echo $ECHO_N "(cached) $ECHO_C" >&6
5765 else
5766
5767                         cf_save_LDFLAGS=$LDFLAGS
5768                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5769                         cat >conftest.$ac_ext <<_ACEOF
5770 #line 5770 "configure"
5771 #include "confdefs.h"
5772
5773 int
5774 main ()
5775 {
5776 int i;
5777   ;
5778   return 0;
5779 }
5780 _ACEOF
5781 rm -f conftest.$ac_objext conftest$ac_exeext
5782 if { (eval echo "$as_me:5782: \"$ac_link\"") >&5
5783   (eval $ac_link) 2>&5
5784   ac_status=$?
5785   echo "$as_me:5785: \$? = $ac_status" >&5
5786   (exit $ac_status); } &&
5787          { ac_try='test -s conftest$ac_exeext'
5788   { (eval echo "$as_me:5788: \"$ac_try\"") >&5
5789   (eval $ac_try) 2>&5
5790   ac_status=$?
5791   echo "$as_me:5791: \$? = $ac_status" >&5
5792   (exit $ac_status); }; }; then
5793   cf_cv_ldflags_search_paths_first=yes
5794 else
5795   echo "$as_me: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
5797 cf_cv_ldflags_search_paths_first=no
5798 fi
5799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5800                                 LDFLAGS=$cf_save_LDFLAGS
5801 fi
5802 echo "$as_me:5802: result: $cf_cv_ldflags_search_paths_first" >&5
5803 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5804                 if test $cf_cv_ldflags_search_paths_first = yes; then
5805                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5806                 fi
5807                 ;;
5808         hpux*) #(vi
5809                 # (tested with gcc 2.7.2 -- I don't have c89)
5810                 if test "$GCC" = yes; then
5811                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5812                 else
5813                         CC_SHARED_OPTS='+Z'
5814                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5815                 fi
5816                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5817                 # HP-UX shared libraries must be executable, and should be
5818                 # readonly to exploit a quirk in the memory manager.
5819                 INSTALL_LIB="-m 555"
5820                 ;;
5821         interix*)
5822                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5823                 if test "$cf_cv_shlib_version" = rel; then
5824                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5825                 else
5826                         cf_shared_soname='`basename `'
5827                 fi
5828                 CC_SHARED_OPTS=
5829                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5830                 ;;
5831         irix*) #(vi
5832                 if test "$cf_cv_enable_rpath" = yes ; then
5833                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5834                 fi
5835                 # tested with IRIX 5.2 and 'cc'.
5836                 if test "$GCC" != yes; then
5837                         CC_SHARED_OPTS='-KPIC'
5838                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5839                 else
5840                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5841                 fi
5842                 cf_cv_rm_so_locs=yes
5843                 ;;
5844         linux*|gnu*|k*bsd*-gnu) #(vi
5845                 if test "$DFT_LWR_MODEL" = "shared" ; then
5846                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5847                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5848                 fi
5849                 if test "$cf_cv_enable_rpath" = yes ; then
5850                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5851                 fi
5852
5853         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5854         if test "$cf_cv_shlib_version" = rel; then
5855                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5856         else
5857                 cf_cv_shared_soname='`basename $@`'
5858         fi
5859
5860                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5861                 ;;
5862         openbsd[2-9].*|mirbsd*) #(vi
5863                 if test "$DFT_LWR_MODEL" = "shared" ; then
5864                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5865                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5866                 fi
5867                 if test "$cf_cv_enable_rpath" = yes ; then
5868                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5869                 fi
5870                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5871
5872         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5873         if test "$cf_cv_shlib_version" = rel; then
5874                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5875         else
5876                 cf_cv_shared_soname='`basename $@`'
5877         fi
5878
5879                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5880                 ;;
5881         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5882                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5883                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5884                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5885                 ;;
5886         dragonfly*|freebsd*) #(vi
5887                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5888                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5889                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5890                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5891                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5892                 fi
5893
5894         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5895         if test "$cf_cv_shlib_version" = rel; then
5896                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5897         else
5898                 cf_cv_shared_soname='`basename $@`'
5899         fi
5900
5901                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5902                 ;;
5903         netbsd*) #(vi
5904                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5905                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5906                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5907                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5908                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5909                         if test "$cf_cv_shlib_version" = auto; then
5910                         if test -f /usr/libexec/ld.elf_so; then
5911                                 cf_cv_shlib_version=abi
5912                         else
5913                                 cf_cv_shlib_version=rel
5914                         fi
5915                         fi
5916
5917         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5918         if test "$cf_cv_shlib_version" = rel; then
5919                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5920         else
5921                 cf_cv_shared_soname='`basename $@`'
5922         fi
5923
5924                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5925                 else
5926                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5927                 fi
5928                 ;;
5929         osf*|mls+*) #(vi
5930                 # tested with OSF/1 V3.2 and 'cc'
5931                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5932                 # link with shared libs).
5933                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5934                 case $host_os in #(vi
5935                 osf4*)
5936                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5937                         ;;
5938                 esac
5939                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5940                 if test "$DFT_LWR_MODEL" = "shared" ; then
5941                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5942                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5943                 fi
5944                 cf_cv_rm_so_locs=yes
5945                 ;;
5946         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5947                 # tested with osr5.0.5
5948                 if test "$GCC" != yes; then
5949                         CC_SHARED_OPTS='-belf -KPIC'
5950                 fi
5951                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5952                 if test "$cf_cv_enable_rpath" = yes ; then
5953                         # only way is to set LD_RUN_PATH but no switch for it
5954                         RUN_PATH=$libdir
5955                 fi
5956                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5957                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5958                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5959                 ;;
5960         sunos4*) #(vi
5961                 # tested with SunOS 4.1.1 and gcc 2.7.0
5962                 if test "$GCC" != yes; then
5963                         CC_SHARED_OPTS='-KPIC'
5964                 fi
5965                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5966                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5967                 ;;
5968         solaris2*) #(vi
5969                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5970                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5971                 if test "$DFT_LWR_MODEL" = "shared" ; then
5972                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5973                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5974                 fi
5975                 if test "$cf_cv_enable_rpath" = yes ; then
5976                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5977                 fi
5978
5979         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5980         if test "$cf_cv_shlib_version" = rel; then
5981                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5982         else
5983                 cf_cv_shared_soname='`basename $@`'
5984         fi
5985
5986                 if test "$GCC" != yes; then
5987                         cf_save_CFLAGS="$CFLAGS"
5988                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5989                         do
5990                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5991                                 cat >conftest.$ac_ext <<_ACEOF
5992 #line 5992 "configure"
5993 #include "confdefs.h"
5994 #include <stdio.h>
5995 int
5996 main ()
5997 {
5998 printf("Hello\n");
5999   ;
6000   return 0;
6001 }
6002 _ACEOF
6003 rm -f conftest.$ac_objext
6004 if { (eval echo "$as_me:6004: \"$ac_compile\"") >&5
6005   (eval $ac_compile) 2>&5
6006   ac_status=$?
6007   echo "$as_me:6007: \$? = $ac_status" >&5
6008   (exit $ac_status); } &&
6009          { ac_try='test -s conftest.$ac_objext'
6010   { (eval echo "$as_me:6010: \"$ac_try\"") >&5
6011   (eval $ac_try) 2>&5
6012   ac_status=$?
6013   echo "$as_me:6013: \$? = $ac_status" >&5
6014   (exit $ac_status); }; }; then
6015   break
6016 else
6017   echo "$as_me: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
6019 fi
6020 rm -f conftest.$ac_objext conftest.$ac_ext
6021                         done
6022                         CFLAGS="$cf_save_CFLAGS"
6023                         CC_SHARED_OPTS=$cf_shared_opts
6024                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6025                 else
6026                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6027                 fi
6028                 ;;
6029         sysv5uw7*|unix_sv*) #(vi
6030                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6031                 if test "$GCC" != yes; then
6032                         CC_SHARED_OPTS='-KPIC'
6033                 fi
6034                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6035                 ;;
6036         *)
6037                 CC_SHARED_OPTS='unknown'
6038                 MK_SHARED_LIB='echo unknown'
6039                 ;;
6040         esac
6041
6042         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6043         case "$cf_cv_shlib_version" in #(vi
6044         rel|abi)
6045                 case "$MK_SHARED_LIB" in #(vi
6046                 *'-o $@') #(vi
6047                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6048                         ;;
6049                 *)
6050                         { echo "$as_me:6050: WARNING: ignored --with-shlib-version" >&5
6051 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6052                         ;;
6053                 esac
6054                 ;;
6055         esac
6056
6057         # RPATH_LIST is a colon-separated list of directories
6058         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6059         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6060
6061 if test "$CC_SHARED_OPTS" = "unknown"; then
6062         for model in $cf_list_models; do
6063                 if test "$model" = "shared"; then
6064                         { { echo "$as_me:6064: error: Shared libraries are not supported in this version" >&5
6065 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6066    { (exit 1); exit 1; }; }
6067                 fi
6068         done
6069 fi
6070
6071 ### If we're building with rpath, try to link non-standard libs that way too.
6072 if test "$DFT_LWR_MODEL" = "shared"; then
6073
6074 echo "$as_me:6074: checking if rpath-hack should be disabled" >&5
6075 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6076
6077 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6078 if test "${enable_rpath_hack+set}" = set; then
6079   enableval="$enable_rpath_hack"
6080   test "$enableval" != no && enableval=yes
6081   if test "$enableval" != "yes" ; then
6082     cf_disable_rpath_hack=yes
6083   else
6084     cf_disable_rpath_hack=no
6085   fi
6086 else
6087   enableval=yes
6088   cf_disable_rpath_hack=no
6089
6090 fi;
6091 echo "$as_me:6091: result: $cf_disable_rpath_hack" >&5
6092 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6093 if test "$cf_disable_rpath_hack" = no ; then
6094
6095 echo "$as_me:6095: checking for updated LDFLAGS" >&5
6096 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6097 if test -n "$LD_RPATH_OPT" ; then
6098         echo "$as_me:6098: result: maybe" >&5
6099 echo "${ECHO_T}maybe" >&6
6100
6101         for ac_prog in ldd
6102 do
6103   # Extract the first word of "$ac_prog", so it can be a program name with args.
6104 set dummy $ac_prog; ac_word=$2
6105 echo "$as_me:6105: checking for $ac_word" >&5
6106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6107 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6108   echo $ECHO_N "(cached) $ECHO_C" >&6
6109 else
6110   if test -n "$cf_ldd_prog"; then
6111   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6112 else
6113   ac_save_IFS=$IFS; IFS=$ac_path_separator
6114 ac_dummy="$PATH"
6115 for ac_dir in $ac_dummy; do
6116   IFS=$ac_save_IFS
6117   test -z "$ac_dir" && ac_dir=.
6118   $as_executable_p "$ac_dir/$ac_word" || continue
6119 ac_cv_prog_cf_ldd_prog="$ac_prog"
6120 echo "$as_me:6120: found $ac_dir/$ac_word" >&5
6121 break
6122 done
6123
6124 fi
6125 fi
6126 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6127 if test -n "$cf_ldd_prog"; then
6128   echo "$as_me:6128: result: $cf_ldd_prog" >&5
6129 echo "${ECHO_T}$cf_ldd_prog" >&6
6130 else
6131   echo "$as_me:6131: result: no" >&5
6132 echo "${ECHO_T}no" >&6
6133 fi
6134
6135   test -n "$cf_ldd_prog" && break
6136 done
6137 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6138
6139         cf_rpath_list="/usr/lib /lib"
6140         if test "$cf_ldd_prog" != no
6141         then
6142                 cf_rpath_oops=
6143
6144 cat >conftest.$ac_ext <<_ACEOF
6145 #line 6145 "configure"
6146 #include "confdefs.h"
6147 #include <stdio.h>
6148 int
6149 main ()
6150 {
6151 printf("Hello");
6152   ;
6153   return 0;
6154 }
6155 _ACEOF
6156 rm -f conftest.$ac_objext conftest$ac_exeext
6157 if { (eval echo "$as_me:6157: \"$ac_link\"") >&5
6158   (eval $ac_link) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); } &&
6162          { ac_try='test -s conftest$ac_exeext'
6163   { (eval echo "$as_me:6163: \"$ac_try\"") >&5
6164   (eval $ac_try) 2>&5
6165   ac_status=$?
6166   echo "$as_me:6166: \$? = $ac_status" >&5
6167   (exit $ac_status); }; }; then
6168   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6169                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6170 else
6171   echo "$as_me: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 fi
6174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6175
6176                 # If we passed the link-test, but get a "not found" on a given library,
6177                 # this could be due to inept reconfiguration of gcc to make it only
6178                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6179                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6180                 # /usr/local libraries.
6181                 if test -n "$cf_rpath_oops"
6182                 then
6183                         for cf_rpath_src in $cf_rpath_oops
6184                         do
6185                                 for cf_rpath_dir in \
6186                                         /usr/local \
6187                                         /usr/pkg \
6188                                         /opt/sfw
6189                                 do
6190                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6191                                         then
6192                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6193
6194 echo "${as_me:-configure}:6194: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6195
6196                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6197                                                 break
6198                                         fi
6199                                 done
6200                         done
6201                 fi
6202         fi
6203
6204         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6205
6206 echo "${as_me:-configure}:6206: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6207
6208 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6209
6210 echo "${as_me:-configure}:6210: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6211
6212 cf_rpath_dst=
6213 for cf_rpath_src in $LDFLAGS
6214 do
6215         case $cf_rpath_src in #(vi
6216         -L*) #(vi
6217
6218                 # check if this refers to a directory which we will ignore
6219                 cf_rpath_skip=no
6220                 if test -n "$cf_rpath_list"
6221                 then
6222                         for cf_rpath_item in $cf_rpath_list
6223                         do
6224                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6225                                 then
6226                                         cf_rpath_skip=yes
6227                                         break
6228                                 fi
6229                         done
6230                 fi
6231
6232                 if test "$cf_rpath_skip" = no
6233                 then
6234                         # transform the option
6235                         if test "$LD_RPATH_OPT" = "-R " ; then
6236                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6237                         else
6238                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6239                         fi
6240
6241                         # if we have not already added this, add it now
6242                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6243                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6244                         then
6245                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6246
6247 echo "${as_me:-configure}:6247: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6248
6249                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6250                         fi
6251                 fi
6252                 ;;
6253         esac
6254         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6255 done
6256 LDFLAGS=$cf_rpath_dst
6257
6258 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6259
6260 echo "${as_me:-configure}:6260: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6261
6262 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6263
6264 echo "${as_me:-configure}:6264: testing ...checking LIBS $LIBS ..." 1>&5
6265
6266 cf_rpath_dst=
6267 for cf_rpath_src in $LIBS
6268 do
6269         case $cf_rpath_src in #(vi
6270         -L*) #(vi
6271
6272                 # check if this refers to a directory which we will ignore
6273                 cf_rpath_skip=no
6274                 if test -n "$cf_rpath_list"
6275                 then
6276                         for cf_rpath_item in $cf_rpath_list
6277                         do
6278                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6279                                 then
6280                                         cf_rpath_skip=yes
6281                                         break
6282                                 fi
6283                         done
6284                 fi
6285
6286                 if test "$cf_rpath_skip" = no
6287                 then
6288                         # transform the option
6289                         if test "$LD_RPATH_OPT" = "-R " ; then
6290                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6291                         else
6292                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6293                         fi
6294
6295                         # if we have not already added this, add it now
6296                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6297                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6298                         then
6299                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6300
6301 echo "${as_me:-configure}:6301: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6302
6303                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6304                         fi
6305                 fi
6306                 ;;
6307         esac
6308         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6309 done
6310 LIBS=$cf_rpath_dst
6311
6312 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6313
6314 echo "${as_me:-configure}:6314: testing ...checked LIBS $LIBS ..." 1>&5
6315
6316         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6317
6318 echo "${as_me:-configure}:6318: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6319
6320 fi
6321
6322 fi
6323
6324 fi
6325
6326 ###############################################################################
6327
6328 ###     use option --disable-overwrite to leave out the link to -lcurses
6329 echo "$as_me:6329: checking if you wish to install ncurses overwriting curses" >&5
6330 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6331
6332 # Check whether --enable-overwrite or --disable-overwrite was given.
6333 if test "${enable_overwrite+set}" = set; then
6334   enableval="$enable_overwrite"
6335   with_overwrite=$enableval
6336 else
6337   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6338 fi;
6339 echo "$as_me:6339: result: $with_overwrite" >&5
6340 echo "${ECHO_T}$with_overwrite" >&6
6341
6342 echo "$as_me:6342: checking if external terminfo-database is used" >&5
6343 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6344
6345 # Check whether --enable-database or --disable-database was given.
6346 if test "${enable_database+set}" = set; then
6347   enableval="$enable_database"
6348   use_database=$enableval
6349 else
6350   use_database=yes
6351 fi;
6352 echo "$as_me:6352: result: $use_database" >&5
6353 echo "${ECHO_T}$use_database" >&6
6354
6355 case $host_os in #(vi
6356 os2*) #(vi
6357         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6358         ;;
6359 *) #(vi
6360         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6361         ;;
6362 esac
6363
6364 if test "$use_database" != no ; then
6365         cat >>confdefs.h <<\EOF
6366 #define USE_DATABASE 1
6367 EOF
6368
6369         echo "$as_me:6369: checking which terminfo source-file will be installed" >&5
6370 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6371
6372 # Check whether --with-database or --without-database was given.
6373 if test "${with_database+set}" = set; then
6374   withval="$with_database"
6375   TERMINFO_SRC=$withval
6376 fi;
6377         echo "$as_me:6377: result: $TERMINFO_SRC" >&5
6378 echo "${ECHO_T}$TERMINFO_SRC" >&6
6379
6380         echo "$as_me:6380: checking whether to use hashed database instead of directory/tree" >&5
6381 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6382
6383 # Check whether --with-hashed-db or --without-hashed-db was given.
6384 if test "${with_hashed_db+set}" = set; then
6385   withval="$with_hashed_db"
6386
6387 else
6388   with_hashed_db=no
6389 fi;
6390         echo "$as_me:6390: result: $with_hashed_db" >&5
6391 echo "${ECHO_T}$with_hashed_db" >&6
6392 else
6393         with_hashed_db=no
6394 fi
6395
6396 echo "$as_me:6396: checking for list of fallback descriptions" >&5
6397 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6398
6399 # Check whether --with-fallbacks or --without-fallbacks was given.
6400 if test "${with_fallbacks+set}" = set; then
6401   withval="$with_fallbacks"
6402   with_fallback=$withval
6403 else
6404   with_fallback=
6405 fi;
6406 echo "$as_me:6406: result: $with_fallback" >&5
6407 echo "${ECHO_T}$with_fallback" >&6
6408 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6409
6410 echo "$as_me:6410: checking if you want modern xterm or antique" >&5
6411 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6412
6413 # Check whether --with-xterm-new or --without-xterm-new was given.
6414 if test "${with_xterm_new+set}" = set; then
6415   withval="$with_xterm_new"
6416   with_xterm_new=$withval
6417 else
6418   with_xterm_new=yes
6419 fi;
6420 case $with_xterm_new in
6421 no)     with_xterm_new=xterm-old;;
6422 *)      with_xterm_new=xterm-new;;
6423 esac
6424 echo "$as_me:6424: result: $with_xterm_new" >&5
6425 echo "${ECHO_T}$with_xterm_new" >&6
6426 WHICH_XTERM=$with_xterm_new
6427
6428 echo "$as_me:6428: checking if xterm backspace sends BS or DEL" >&5
6429 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6430
6431 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6432 if test "${with_xterm_kbs+set}" = set; then
6433   withval="$with_xterm_kbs"
6434   with_xterm_kbs=$withval
6435 else
6436   with_xterm_kbs=BS
6437 fi;
6438 case x$with_xterm_kbs in
6439 xyes|xno|xBS|xbs|x8)
6440         with_xterm_kbs=BS
6441         ;;
6442 xDEL|xdel|x127)
6443         with_xterm_kbs=DEL
6444         ;;
6445 *)
6446         with_xterm_kbs=$withval
6447         ;;
6448 esac
6449 echo "$as_me:6449: result: $with_xterm_kbs" >&5
6450 echo "${ECHO_T}$with_xterm_kbs" >&6
6451 XTERM_KBS=$with_xterm_kbs
6452
6453 MAKE_TERMINFO=
6454 if test "$use_database" = no ; then
6455         TERMINFO="${datadir}/terminfo"
6456         MAKE_TERMINFO="#"
6457 else
6458
6459 echo "$as_me:6459: checking for list of terminfo directories" >&5
6460 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6461
6462         case $cf_cv_system_name in
6463         os2*)   PATH_SEPARATOR=';'  ;;
6464         *)      PATH_SEPARATOR=':'  ;;
6465         esac
6466
6467 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6468 if test "${with_terminfo_dirs+set}" = set; then
6469   withval="$with_terminfo_dirs"
6470
6471 else
6472   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6473 fi;
6474 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6475 cf_dst_path=
6476 for cf_src_path in $withval
6477 do
6478
6479 if test "x$prefix" != xNONE; then
6480   cf_path_syntax="$prefix"
6481 else
6482   cf_path_syntax="$ac_default_prefix"
6483 fi
6484
6485 case ".$cf_src_path" in #(vi
6486 .\$\(*\)*|.\'*\'*) #(vi
6487   ;;
6488 ..|./*|.\\*) #(vi
6489   ;;
6490 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6491   ;;
6492 .\${*prefix}*) #(vi
6493   eval cf_src_path="$cf_src_path"
6494   case ".$cf_src_path" in #(vi
6495   .NONE/*)
6496     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6497     ;;
6498   esac
6499   ;; #(vi
6500 .no|.NONE/*)
6501   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6502   ;;
6503 *)
6504   { { echo "$as_me:6504: error: expected a pathname, not \"$cf_src_path\"" >&5
6505 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6506    { (exit 1); exit 1; }; }
6507   ;;
6508 esac
6509
6510   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6511   cf_dst_path="${cf_dst_path}${cf_src_path}"
6512 done
6513 IFS="$ac_save_ifs"
6514
6515 eval 'TERMINFO_DIRS="$cf_dst_path"'
6516
6517 echo "$as_me:6517: result: $TERMINFO_DIRS" >&5
6518 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6519 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6520 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6521 EOF
6522
6523 echo "$as_me:6523: checking for default terminfo directory" >&5
6524 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6525
6526 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6527 if test "${with_default_terminfo_dir+set}" = set; then
6528   withval="$with_default_terminfo_dir"
6529
6530 else
6531   withval="${TERMINFO:-${datadir}/terminfo}"
6532 fi; if test -n "${datadir}/terminfo" ; then
6533
6534 if test "x$prefix" != xNONE; then
6535   cf_path_syntax="$prefix"
6536 else
6537   cf_path_syntax="$ac_default_prefix"
6538 fi
6539
6540 case ".$withval" in #(vi
6541 .\$\(*\)*|.\'*\'*) #(vi
6542   ;;
6543 ..|./*|.\\*) #(vi
6544   ;;
6545 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6546   ;;
6547 .\${*prefix}*) #(vi
6548   eval withval="$withval"
6549   case ".$withval" in #(vi
6550   .NONE/*)
6551     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6552     ;;
6553   esac
6554   ;; #(vi
6555 .no|.NONE/*)
6556   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6557   ;;
6558 *)
6559   { { echo "$as_me:6559: error: expected a pathname, not \"$withval\"" >&5
6560 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6561    { (exit 1); exit 1; }; }
6562   ;;
6563 esac
6564
6565 fi
6566 TERMINFO="$withval"
6567
6568 echo "$as_me:6568: result: $TERMINFO" >&5
6569 echo "${ECHO_T}$TERMINFO" >&6
6570 cat >>confdefs.h <<EOF
6571 #define TERMINFO "$TERMINFO"
6572 EOF
6573
6574 fi
6575
6576 ###     use option --disable-big-core to make tic run on small machines
6577 ###     We need 4Mb, check if we can allocate 50% more than that.
6578 echo "$as_me:6578: checking if big-core option selected" >&5
6579 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6580
6581 # Check whether --enable-big-core or --disable-big-core was given.
6582 if test "${enable_big_core+set}" = set; then
6583   enableval="$enable_big_core"
6584   with_big_core=$enableval
6585 else
6586   if test "$cross_compiling" = yes; then
6587   with_big_core=no
6588 else
6589   cat >conftest.$ac_ext <<_ACEOF
6590 #line 6590 "configure"
6591 #include "confdefs.h"
6592
6593 #include <stdlib.h>
6594 #include <string.h>
6595 int main() {
6596         unsigned long n = 6000000L;
6597         char *s = malloc(n);
6598         if (s != 0)
6599                 s[0] = s[n-1] = 0;
6600         ${cf_cv_main_return:-return}(s == 0);
6601 }
6602 _ACEOF
6603 rm -f conftest$ac_exeext
6604 if { (eval echo "$as_me:6604: \"$ac_link\"") >&5
6605   (eval $ac_link) 2>&5
6606   ac_status=$?
6607   echo "$as_me:6607: \$? = $ac_status" >&5
6608   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6609   { (eval echo "$as_me:6609: \"$ac_try\"") >&5
6610   (eval $ac_try) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit $ac_status); }; }; then
6614   with_big_core=yes
6615 else
6616   echo "$as_me: program exited with status $ac_status" >&5
6617 echo "$as_me: failed program was:" >&5
6618 cat conftest.$ac_ext >&5
6619 with_big_core=no
6620 fi
6621 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6622 fi
6623 fi;
6624 echo "$as_me:6624: result: $with_big_core" >&5
6625 echo "${ECHO_T}$with_big_core" >&6
6626 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6627 #define HAVE_BIG_CORE 1
6628 EOF
6629
6630 ### ISO C only guarantees 512-char strings, we have tables which load faster
6631 ### when constructed using "big" strings.  More than the C compiler, the awk
6632 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6633 echo "$as_me:6633: checking if big-strings option selected" >&5
6634 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6635
6636 # Check whether --enable-big-strings or --disable-big-strings was given.
6637 if test "${enable_big_strings+set}" = set; then
6638   enableval="$enable_big_strings"
6639   with_big_strings=$enableval
6640 else
6641
6642         case x$AWK in #(vi
6643         x)
6644                 eval with_big_strings=no
6645                 ;;
6646         *) #(vi
6647                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6648                         | $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
6649                         eval with_big_strings=yes
6650                 else
6651                         eval with_big_strings=no
6652                 fi
6653                 ;;
6654         esac
6655
6656 fi;
6657 echo "$as_me:6657: result: $with_big_strings" >&5
6658 echo "${ECHO_T}$with_big_strings" >&6
6659
6660 USE_BIG_STRINGS=0
6661 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6662
6663 ###     use option --enable-termcap to compile in the termcap fallback support
6664 echo "$as_me:6664: checking if you want termcap-fallback support" >&5
6665 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6666
6667 # Check whether --enable-termcap or --disable-termcap was given.
6668 if test "${enable_termcap+set}" = set; then
6669   enableval="$enable_termcap"
6670   with_termcap=$enableval
6671 else
6672   with_termcap=no
6673 fi;
6674 echo "$as_me:6674: result: $with_termcap" >&5
6675 echo "${ECHO_T}$with_termcap" >&6
6676
6677 if test "$with_termcap" != "yes" ; then
6678         if test "$use_database" = no ; then
6679                 if test -z "$with_fallback" ; then
6680                         { { echo "$as_me:6680: error: You have disabled the database w/o specifying fallbacks" >&5
6681 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6682    { (exit 1); exit 1; }; }
6683                 fi
6684         fi
6685         cat >>confdefs.h <<\EOF
6686 #define PURE_TERMINFO 1
6687 EOF
6688
6689 else
6690
6691 if test "$with_ticlib" != no ; then
6692         { { echo "$as_me:6692: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6693 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6694    { (exit 1); exit 1; }; }
6695 fi
6696
6697 cat >>confdefs.h <<\EOF
6698 #define USE_TERMCAP 1
6699 EOF
6700
6701 echo "$as_me:6701: checking for list of termcap files" >&5
6702 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6703
6704 # Check whether --with-termpath or --without-termpath was given.
6705 if test "${with_termpath+set}" = set; then
6706   withval="$with_termpath"
6707
6708 else
6709   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6710 fi;
6711 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6712 cf_dst_path=
6713 for cf_src_path in $withval
6714 do
6715
6716 if test "x$prefix" != xNONE; then
6717   cf_path_syntax="$prefix"
6718 else
6719   cf_path_syntax="$ac_default_prefix"
6720 fi
6721
6722 case ".$cf_src_path" in #(vi
6723 .\$\(*\)*|.\'*\'*) #(vi
6724   ;;
6725 ..|./*|.\\*) #(vi
6726   ;;
6727 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6728   ;;
6729 .\${*prefix}*) #(vi
6730   eval cf_src_path="$cf_src_path"
6731   case ".$cf_src_path" in #(vi
6732   .NONE/*)
6733     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6734     ;;
6735   esac
6736   ;; #(vi
6737 .no|.NONE/*)
6738   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6739   ;;
6740 *)
6741   { { echo "$as_me:6741: error: expected a pathname, not \"$cf_src_path\"" >&5
6742 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6743    { (exit 1); exit 1; }; }
6744   ;;
6745 esac
6746
6747   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6748   cf_dst_path="${cf_dst_path}${cf_src_path}"
6749 done
6750 IFS="$ac_save_ifs"
6751
6752 eval 'TERMPATH="$cf_dst_path"'
6753
6754 echo "$as_me:6754: result: $TERMPATH" >&5
6755 echo "${ECHO_T}$TERMPATH" >&6
6756 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6757 #define TERMPATH "$TERMPATH"
6758 EOF
6759
6760 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6761 echo "$as_me:6761: checking if fast termcap-loader is needed" >&5
6762 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6763
6764 # Check whether --enable-getcap or --disable-getcap was given.
6765 if test "${enable_getcap+set}" = set; then
6766   enableval="$enable_getcap"
6767   with_getcap=$enableval
6768 else
6769   with_getcap=no
6770 fi;
6771 echo "$as_me:6771: result: $with_getcap" >&5
6772 echo "${ECHO_T}$with_getcap" >&6
6773 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6774 #define USE_GETCAP 1
6775 EOF
6776
6777 echo "$as_me:6777: checking if translated termcaps will be cached in ~/.terminfo" >&5
6778 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6779
6780 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6781 if test "${enable_getcap_cache+set}" = set; then
6782   enableval="$enable_getcap_cache"
6783   with_getcap_cache=$enableval
6784 else
6785   with_getcap_cache=no
6786 fi;
6787 echo "$as_me:6787: result: $with_getcap_cache" >&5
6788 echo "${ECHO_T}$with_getcap_cache" >&6
6789 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6790 #define USE_GETCAP_CACHE 1
6791 EOF
6792
6793 fi
6794
6795 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6796 echo "$as_me:6796: checking if ~/.terminfo is wanted" >&5
6797 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6798
6799 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6800 if test "${enable_home_terminfo+set}" = set; then
6801   enableval="$enable_home_terminfo"
6802   with_home_terminfo=$enableval
6803 else
6804   with_home_terminfo=yes
6805 fi;
6806 echo "$as_me:6806: result: $with_home_terminfo" >&5
6807 echo "${ECHO_T}$with_home_terminfo" >&6
6808 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6809 #define USE_HOME_TERMINFO 1
6810 EOF
6811
6812 echo "$as_me:6812: checking if you want to use restricted environment when running as root" >&5
6813 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6814
6815 # Check whether --enable-root-environ or --disable-root-environ was given.
6816 if test "${enable_root_environ+set}" = set; then
6817   enableval="$enable_root_environ"
6818   with_root_environ=$enableval
6819 else
6820   with_root_environ=yes
6821 fi;
6822 echo "$as_me:6822: result: $with_root_environ" >&5
6823 echo "${ECHO_T}$with_root_environ" >&6
6824 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6825 #define USE_ROOT_ENVIRON 1
6826 EOF
6827
6828 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6829 ###   to reduce storage requirements for the terminfo database.
6830
6831 for ac_func in \
6832         remove \
6833         unlink
6834 do
6835 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6836 echo "$as_me:6836: checking for $ac_func" >&5
6837 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6838 if eval "test \"\${$as_ac_var+set}\" = set"; then
6839   echo $ECHO_N "(cached) $ECHO_C" >&6
6840 else
6841   cat >conftest.$ac_ext <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6844 /* System header to define __stub macros and hopefully few prototypes,
6845     which can conflict with char $ac_func (); below.  */
6846 #include <assert.h>
6847 /* Override any gcc2 internal prototype to avoid an error.  */
6848 #ifdef __cplusplus
6849 extern "C"
6850 #endif
6851 /* We use char because int might match the return type of a gcc2
6852    builtin and then its argument prototype would still apply.  */
6853 char $ac_func ();
6854 char (*f) ();
6855
6856 int
6857 main ()
6858 {
6859 /* The GNU C library defines this for functions which it implements
6860     to always fail with ENOSYS.  Some functions are actually named
6861     something starting with __ and the normal name is an alias.  */
6862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6863 choke me
6864 #else
6865 f = $ac_func;
6866 #endif
6867
6868   ;
6869   return 0;
6870 }
6871 _ACEOF
6872 rm -f conftest.$ac_objext conftest$ac_exeext
6873 if { (eval echo "$as_me:6873: \"$ac_link\"") >&5
6874   (eval $ac_link) 2>&5
6875   ac_status=$?
6876   echo "$as_me:6876: \$? = $ac_status" >&5
6877   (exit $ac_status); } &&
6878          { ac_try='test -s conftest$ac_exeext'
6879   { (eval echo "$as_me:6879: \"$ac_try\"") >&5
6880   (eval $ac_try) 2>&5
6881   ac_status=$?
6882   echo "$as_me:6882: \$? = $ac_status" >&5
6883   (exit $ac_status); }; }; then
6884   eval "$as_ac_var=yes"
6885 else
6886   echo "$as_me: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6888 eval "$as_ac_var=no"
6889 fi
6890 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6891 fi
6892 echo "$as_me:6892: result: `eval echo '${'$as_ac_var'}'`" >&5
6893 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6894 if test `eval echo '${'$as_ac_var'}'` = yes; then
6895   cat >>confdefs.h <<EOF
6896 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6897 EOF
6898
6899 fi
6900 done
6901
6902 if test "$cross_compiling" = yes ; then
6903
6904 for ac_func in \
6905                 link \
6906                 symlink
6907 do
6908 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6909 echo "$as_me:6909: checking for $ac_func" >&5
6910 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6911 if eval "test \"\${$as_ac_var+set}\" = set"; then
6912   echo $ECHO_N "(cached) $ECHO_C" >&6
6913 else
6914   cat >conftest.$ac_ext <<_ACEOF
6915 #line 6915 "configure"
6916 #include "confdefs.h"
6917 /* System header to define __stub macros and hopefully few prototypes,
6918     which can conflict with char $ac_func (); below.  */
6919 #include <assert.h>
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 #ifdef __cplusplus
6922 extern "C"
6923 #endif
6924 /* We use char because int might match the return type of a gcc2
6925    builtin and then its argument prototype would still apply.  */
6926 char $ac_func ();
6927 char (*f) ();
6928
6929 int
6930 main ()
6931 {
6932 /* The GNU C library defines this for functions which it implements
6933     to always fail with ENOSYS.  Some functions are actually named
6934     something starting with __ and the normal name is an alias.  */
6935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6936 choke me
6937 #else
6938 f = $ac_func;
6939 #endif
6940
6941   ;
6942   return 0;
6943 }
6944 _ACEOF
6945 rm -f conftest.$ac_objext conftest$ac_exeext
6946 if { (eval echo "$as_me:6946: \"$ac_link\"") >&5
6947   (eval $ac_link) 2>&5
6948   ac_status=$?
6949   echo "$as_me:6949: \$? = $ac_status" >&5
6950   (exit $ac_status); } &&
6951          { ac_try='test -s conftest$ac_exeext'
6952   { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953   (eval $ac_try) 2>&5
6954   ac_status=$?
6955   echo "$as_me:6955: \$? = $ac_status" >&5
6956   (exit $ac_status); }; }; then
6957   eval "$as_ac_var=yes"
6958 else
6959   echo "$as_me: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 eval "$as_ac_var=no"
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964 fi
6965 echo "$as_me:6965: result: `eval echo '${'$as_ac_var'}'`" >&5
6966 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6967 if test `eval echo '${'$as_ac_var'}'` = yes; then
6968   cat >>confdefs.h <<EOF
6969 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6970 EOF
6971
6972 fi
6973 done
6974
6975 else
6976         echo "$as_me:6976: checking if link/symlink functions work" >&5
6977 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6978 if test "${cf_cv_link_funcs+set}" = set; then
6979   echo $ECHO_N "(cached) $ECHO_C" >&6
6980 else
6981
6982                 cf_cv_link_funcs=
6983                 for cf_func in link symlink ; do
6984                         if test "$cross_compiling" = yes; then
6985
6986                         eval 'ac_cv_func_'$cf_func'=error'
6987 else
6988   cat >conftest.$ac_ext <<_ACEOF
6989 #line 6989 "configure"
6990 #include "confdefs.h"
6991
6992 #include <sys/types.h>
6993 #include <sys/stat.h>
6994 #ifdef HAVE_UNISTD_H
6995 #include <unistd.h>
6996 #endif
6997 int main()
6998 {
6999         int fail = 0;
7000         char *src = "config.log";
7001         char *dst = "conftest.chk";
7002         struct stat src_sb;
7003         struct stat dst_sb;
7004
7005         stat(src, &src_sb);
7006         fail = ($cf_func("config.log", "conftest.chk") < 0)
7007             || (stat(dst, &dst_sb) < 0)
7008             || (dst_sb.st_mtime != src_sb.st_mtime);
7009 #ifdef HAVE_UNLINK
7010         unlink(dst);
7011 #else
7012         remove(dst);
7013 #endif
7014         ${cf_cv_main_return:-return} (fail);
7015 }
7016
7017 _ACEOF
7018 rm -f conftest$ac_exeext
7019 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7024   { (eval echo "$as_me:7024: \"$ac_try\"") >&5
7025   (eval $ac_try) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); }; }; then
7029
7030                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7031                         eval 'ac_cv_func_'$cf_func'=yes'
7032 else
7033   echo "$as_me: program exited with status $ac_status" >&5
7034 echo "$as_me: failed program was:" >&5
7035 cat conftest.$ac_ext >&5
7036
7037                         eval 'ac_cv_func_'$cf_func'=no'
7038 fi
7039 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7040 fi
7041                 done
7042                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7043
7044 fi
7045 echo "$as_me:7045: result: $cf_cv_link_funcs" >&5
7046 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7047         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
7048 #define HAVE_LINK 1
7049 EOF
7050
7051         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
7052 #define HAVE_SYMLINK 1
7053 EOF
7054
7055 fi
7056
7057 with_links=no
7058 with_symlinks=no
7059
7060 # soft links (symbolic links) are useful for some systems where hard links do
7061 # not work, or to make it simpler to copy terminfo trees around.
7062 if test "$ac_cv_func_symlink" = yes ; then
7063     echo "$as_me:7063: checking if tic should use symbolic links" >&5
7064 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7065
7066 # Check whether --enable-symlinks or --disable-symlinks was given.
7067 if test "${enable_symlinks+set}" = set; then
7068   enableval="$enable_symlinks"
7069   with_symlinks=$enableval
7070 else
7071   with_symlinks=no
7072 fi;
7073     echo "$as_me:7073: result: $with_symlinks" >&5
7074 echo "${ECHO_T}$with_symlinks" >&6
7075 fi
7076
7077 # If we have hard links and did not choose to use soft links instead, there is
7078 # no reason to make this choice optional - use the hard links.
7079 if test "$with_symlinks" = no ; then
7080     echo "$as_me:7080: checking if tic should use hard links" >&5
7081 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7082     if test "$ac_cv_func_link" = yes ; then
7083         with_links=yes
7084     else
7085         with_links=no
7086     fi
7087     echo "$as_me:7087: result: $with_links" >&5
7088 echo "${ECHO_T}$with_links" >&6
7089 fi
7090
7091 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7092 #define USE_LINKS 1
7093 EOF
7094
7095 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7096 #define USE_SYMLINKS 1
7097 EOF
7098
7099 ###   use option --enable-broken-linker to force on use of broken-linker support
7100 echo "$as_me:7100: checking if you want broken-linker support code" >&5
7101 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7102
7103 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7104 if test "${enable_broken_linker+set}" = set; then
7105   enableval="$enable_broken_linker"
7106   with_broken_linker=$enableval
7107 else
7108   with_broken_linker=${BROKEN_LINKER:-no}
7109 fi;
7110 echo "$as_me:7110: result: $with_broken_linker" >&5
7111 echo "${ECHO_T}$with_broken_linker" >&6
7112
7113 BROKEN_LINKER=0
7114 if test "$with_broken_linker" = yes ; then
7115         cat >>confdefs.h <<\EOF
7116 #define BROKEN_LINKER 1
7117 EOF
7118
7119         BROKEN_LINKER=1
7120 elif test "$DFT_LWR_MODEL" = shared ; then
7121         case $cf_cv_system_name in #(vi
7122         cygwin*)
7123                 cat >>confdefs.h <<\EOF
7124 #define BROKEN_LINKER 1
7125 EOF
7126
7127                 BROKEN_LINKER=1
7128                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7129
7130 echo "${as_me:-configure}:7130: testing cygwin linker is broken anyway ..." 1>&5
7131
7132                 ;;
7133         esac
7134 fi
7135
7136 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7137 echo "$as_me:7137: checking if tputs should process BSD-style prefix padding" >&5
7138 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7139
7140 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7141 if test "${enable_bsdpad+set}" = set; then
7142   enableval="$enable_bsdpad"
7143   with_bsdpad=$enableval
7144 else
7145   with_bsdpad=no
7146 fi;
7147 echo "$as_me:7147: result: $with_bsdpad" >&5
7148 echo "${ECHO_T}$with_bsdpad" >&6
7149 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7150 #define BSD_TPUTS 1
7151 EOF
7152
7153 ###   use option --enable-widec to turn on use of wide-character support
7154 NCURSES_CH_T=chtype
7155 NCURSES_LIBUTF8=0
7156
7157 NEED_WCHAR_H=0
7158 NCURSES_MBSTATE_T=0
7159 NCURSES_WCHAR_T=0
7160 NCURSES_WINT_T=0
7161
7162 # Check to define _XOPEN_SOURCE "automatically"
7163
7164 cf_XOPEN_SOURCE=500
7165 cf_POSIX_C_SOURCE=199506L
7166 cf_xopen_source=
7167
7168 case $host_os in #(vi
7169 aix[4-7]*) #(vi
7170         cf_xopen_source="-D_ALL_SOURCE"
7171         ;;
7172 cygwin) #(vi
7173         cf_XOPEN_SOURCE=600
7174         ;;
7175 darwin[0-8].*) #(vi
7176         cf_xopen_source="-D_APPLE_C_SOURCE"
7177         ;;
7178 darwin*) #(vi
7179         cf_xopen_source="-D_DARWIN_C_SOURCE"
7180         cf_XOPEN_SOURCE=
7181         ;;
7182 freebsd*|dragonfly*) #(vi
7183         # 5.x headers associate
7184         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7185         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7186         cf_POSIX_C_SOURCE=200112L
7187         cf_XOPEN_SOURCE=600
7188         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7189         ;;
7190 hpux11*) #(vi
7191         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7192         ;;
7193 hpux*) #(vi
7194         cf_xopen_source="-D_HPUX_SOURCE"
7195         ;;
7196 irix[56].*) #(vi
7197         cf_xopen_source="-D_SGI_SOURCE"
7198         cf_XOPEN_SOURCE=
7199         ;;
7200 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7201
7202 echo "$as_me:7202: checking if we must define _GNU_SOURCE" >&5
7203 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7204 if test "${cf_cv_gnu_source+set}" = set; then
7205   echo $ECHO_N "(cached) $ECHO_C" >&6
7206 else
7207
7208 cat >conftest.$ac_ext <<_ACEOF
7209 #line 7209 "configure"
7210 #include "confdefs.h"
7211 #include <sys/types.h>
7212 int
7213 main ()
7214 {
7215
7216 #ifndef _XOPEN_SOURCE
7217 make an error
7218 #endif
7219   ;
7220   return 0;
7221 }
7222 _ACEOF
7223 rm -f conftest.$ac_objext
7224 if { (eval echo "$as_me:7224: \"$ac_compile\"") >&5
7225   (eval $ac_compile) 2>&5
7226   ac_status=$?
7227   echo "$as_me:7227: \$? = $ac_status" >&5
7228   (exit $ac_status); } &&
7229          { ac_try='test -s conftest.$ac_objext'
7230   { (eval echo "$as_me:7230: \"$ac_try\"") >&5
7231   (eval $ac_try) 2>&5
7232   ac_status=$?
7233   echo "$as_me:7233: \$? = $ac_status" >&5
7234   (exit $ac_status); }; }; then
7235   cf_cv_gnu_source=no
7236 else
7237   echo "$as_me: failed program was:" >&5
7238 cat conftest.$ac_ext >&5
7239 cf_save="$CPPFLAGS"
7240          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7241          cat >conftest.$ac_ext <<_ACEOF
7242 #line 7242 "configure"
7243 #include "confdefs.h"
7244 #include <sys/types.h>
7245 int
7246 main ()
7247 {
7248
7249 #ifdef _XOPEN_SOURCE
7250 make an error
7251 #endif
7252   ;
7253   return 0;
7254 }
7255 _ACEOF
7256 rm -f conftest.$ac_objext
7257 if { (eval echo "$as_me:7257: \"$ac_compile\"") >&5
7258   (eval $ac_compile) 2>&5
7259   ac_status=$?
7260   echo "$as_me:7260: \$? = $ac_status" >&5
7261   (exit $ac_status); } &&
7262          { ac_try='test -s conftest.$ac_objext'
7263   { (eval echo "$as_me:7263: \"$ac_try\"") >&5
7264   (eval $ac_try) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); }; }; then
7268   cf_cv_gnu_source=no
7269 else
7270   echo "$as_me: failed program was:" >&5
7271 cat conftest.$ac_ext >&5
7272 cf_cv_gnu_source=yes
7273 fi
7274 rm -f conftest.$ac_objext conftest.$ac_ext
7275         CPPFLAGS="$cf_save"
7276
7277 fi
7278 rm -f conftest.$ac_objext conftest.$ac_ext
7279
7280 fi
7281 echo "$as_me:7281: result: $cf_cv_gnu_source" >&5
7282 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7283 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7284
7285         ;;
7286 mirbsd*) #(vi
7287         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7288         cf_XOPEN_SOURCE=
7289
7290 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7291
7292 cf_save_CFLAGS="$CFLAGS"
7293 cf_save_CPPFLAGS="$CPPFLAGS"
7294
7295 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7296         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7297                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7298
7299 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7300         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7301                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7302
7303 echo "$as_me:7303: checking if we should define _POSIX_C_SOURCE" >&5
7304 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7305 if test "${cf_cv_posix_c_source+set}" = set; then
7306   echo $ECHO_N "(cached) $ECHO_C" >&6
7307 else
7308
7309 echo "${as_me:-configure}:7309: testing if the symbol is already defined go no further ..." 1>&5
7310
7311         cat >conftest.$ac_ext <<_ACEOF
7312 #line 7312 "configure"
7313 #include "confdefs.h"
7314 #include <sys/types.h>
7315 int
7316 main ()
7317 {
7318
7319 #ifndef _POSIX_C_SOURCE
7320 make an error
7321 #endif
7322   ;
7323   return 0;
7324 }
7325 _ACEOF
7326 rm -f conftest.$ac_objext
7327 if { (eval echo "$as_me:7327: \"$ac_compile\"") >&5
7328   (eval $ac_compile) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); } &&
7332          { ac_try='test -s conftest.$ac_objext'
7333   { (eval echo "$as_me:7333: \"$ac_try\"") >&5
7334   (eval $ac_try) 2>&5
7335   ac_status=$?
7336   echo "$as_me:7336: \$? = $ac_status" >&5
7337   (exit $ac_status); }; }; then
7338   cf_cv_posix_c_source=no
7339 else
7340   echo "$as_me: failed program was:" >&5
7341 cat conftest.$ac_ext >&5
7342 cf_want_posix_source=no
7343          case .$cf_POSIX_C_SOURCE in #(vi
7344          .[12]??*) #(vi
7345                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7346                 ;;
7347          .2) #(vi
7348                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7349                 cf_want_posix_source=yes
7350                 ;;
7351          .*)
7352                 cf_want_posix_source=yes
7353                 ;;
7354          esac
7355          if test "$cf_want_posix_source" = yes ; then
7356                 cat >conftest.$ac_ext <<_ACEOF
7357 #line 7357 "configure"
7358 #include "confdefs.h"
7359 #include <sys/types.h>
7360 int
7361 main ()
7362 {
7363
7364 #ifdef _POSIX_SOURCE
7365 make an error
7366 #endif
7367   ;
7368   return 0;
7369 }
7370 _ACEOF
7371 rm -f conftest.$ac_objext
7372 if { (eval echo "$as_me:7372: \"$ac_compile\"") >&5
7373   (eval $ac_compile) 2>&5
7374   ac_status=$?
7375   echo "$as_me:7375: \$? = $ac_status" >&5
7376   (exit $ac_status); } &&
7377          { ac_try='test -s conftest.$ac_objext'
7378   { (eval echo "$as_me:7378: \"$ac_try\"") >&5
7379   (eval $ac_try) 2>&5
7380   ac_status=$?
7381   echo "$as_me:7381: \$? = $ac_status" >&5
7382   (exit $ac_status); }; }; then
7383   :
7384 else
7385   echo "$as_me: failed program was:" >&5
7386 cat conftest.$ac_ext >&5
7387 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7388 fi
7389 rm -f conftest.$ac_objext conftest.$ac_ext
7390          fi
7391
7392 echo "${as_me:-configure}:7392: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7393
7394          CFLAGS="$cf_trim_CFLAGS"
7395          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7396
7397 echo "${as_me:-configure}:7397: testing if the second compile does not leave our definition intact error ..." 1>&5
7398
7399          cat >conftest.$ac_ext <<_ACEOF
7400 #line 7400 "configure"
7401 #include "confdefs.h"
7402 #include <sys/types.h>
7403 int
7404 main ()
7405 {
7406
7407 #ifndef _POSIX_C_SOURCE
7408 make an error
7409 #endif
7410   ;
7411   return 0;
7412 }
7413 _ACEOF
7414 rm -f conftest.$ac_objext
7415 if { (eval echo "$as_me:7415: \"$ac_compile\"") >&5
7416   (eval $ac_compile) 2>&5
7417   ac_status=$?
7418   echo "$as_me:7418: \$? = $ac_status" >&5
7419   (exit $ac_status); } &&
7420          { ac_try='test -s conftest.$ac_objext'
7421   { (eval echo "$as_me:7421: \"$ac_try\"") >&5
7422   (eval $ac_try) 2>&5
7423   ac_status=$?
7424   echo "$as_me:7424: \$? = $ac_status" >&5
7425   (exit $ac_status); }; }; then
7426   :
7427 else
7428   echo "$as_me: failed program was:" >&5
7429 cat conftest.$ac_ext >&5
7430 cf_cv_posix_c_source=no
7431 fi
7432 rm -f conftest.$ac_objext conftest.$ac_ext
7433          CFLAGS="$cf_save_CFLAGS"
7434          CPPFLAGS="$cf_save_CPPFLAGS"
7435
7436 fi
7437 rm -f conftest.$ac_objext conftest.$ac_ext
7438
7439 fi
7440 echo "$as_me:7440: result: $cf_cv_posix_c_source" >&5
7441 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7442
7443 if test "$cf_cv_posix_c_source" != no ; then
7444         CFLAGS="$cf_trim_CFLAGS"
7445         CPPFLAGS="$cf_trim_CPPFLAGS"
7446
7447 cf_fix_cppflags=no
7448 cf_new_cflags=
7449 cf_new_cppflags=
7450 cf_new_extra_cppflags=
7451
7452 for cf_add_cflags in $cf_cv_posix_c_source
7453 do
7454 case $cf_fix_cppflags in
7455 no)
7456         case $cf_add_cflags in #(vi
7457         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7458                 case $cf_add_cflags in
7459                 -D*)
7460                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7461
7462                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7463                                 && test -z "${cf_tst_cflags}" \
7464                                 && cf_fix_cppflags=yes
7465
7466                         if test $cf_fix_cppflags = yes ; then
7467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7468                                 continue
7469                         elif test "${cf_tst_cflags}" = "\"'" ; then
7470                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7471                                 continue
7472                         fi
7473                         ;;
7474                 esac
7475                 case "$CPPFLAGS" in
7476                 *$cf_add_cflags) #(vi
7477                         ;;
7478                 *) #(vi
7479                         case $cf_add_cflags in #(vi
7480                         -D*)
7481                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7482
7483 CPPFLAGS=`echo "$CPPFLAGS" | \
7484         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7485                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7486
7487                                 ;;
7488                         esac
7489                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7490                         ;;
7491                 esac
7492                 ;;
7493         *)
7494                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7495                 ;;
7496         esac
7497         ;;
7498 yes)
7499         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7500
7501         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7502
7503         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7504                 && test -z "${cf_tst_cflags}" \
7505                 && cf_fix_cppflags=no
7506         ;;
7507 esac
7508 done
7509
7510 if test -n "$cf_new_cflags" ; then
7511
7512         CFLAGS="$CFLAGS $cf_new_cflags"
7513 fi
7514
7515 if test -n "$cf_new_cppflags" ; then
7516
7517         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7518 fi
7519
7520 if test -n "$cf_new_extra_cppflags" ; then
7521
7522         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7523 fi
7524
7525 fi
7526
7527         ;;
7528 netbsd*) #(vi
7529         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7530         ;;
7531 openbsd[4-9]*) #(vi
7532         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7533         cf_xopen_source="-D_BSD_SOURCE"
7534         cf_XOPEN_SOURCE=600
7535         ;;
7536 openbsd*) #(vi
7537         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7538         ;;
7539 osf[45]*) #(vi
7540         cf_xopen_source="-D_OSF_SOURCE"
7541         ;;
7542 nto-qnx*) #(vi
7543         cf_xopen_source="-D_QNX_SOURCE"
7544         ;;
7545 sco*) #(vi
7546         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7547         ;;
7548 solaris2.*) #(vi
7549         cf_xopen_source="-D__EXTENSIONS__"
7550         ;;
7551 *)
7552
7553 echo "$as_me:7553: checking if we should define _XOPEN_SOURCE" >&5
7554 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7555 if test "${cf_cv_xopen_source+set}" = set; then
7556   echo $ECHO_N "(cached) $ECHO_C" >&6
7557 else
7558
7559         cat >conftest.$ac_ext <<_ACEOF
7560 #line 7560 "configure"
7561 #include "confdefs.h"
7562
7563 #include <stdlib.h>
7564 #include <string.h>
7565 #include <sys/types.h>
7566
7567 int
7568 main ()
7569 {
7570
7571 #ifndef _XOPEN_SOURCE
7572 make an error
7573 #endif
7574   ;
7575   return 0;
7576 }
7577 _ACEOF
7578 rm -f conftest.$ac_objext
7579 if { (eval echo "$as_me:7579: \"$ac_compile\"") >&5
7580   (eval $ac_compile) 2>&5
7581   ac_status=$?
7582   echo "$as_me:7582: \$? = $ac_status" >&5
7583   (exit $ac_status); } &&
7584          { ac_try='test -s conftest.$ac_objext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   cf_cv_xopen_source=no
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 cf_save="$CPPFLAGS"
7595          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7596          cat >conftest.$ac_ext <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599
7600 #include <stdlib.h>
7601 #include <string.h>
7602 #include <sys/types.h>
7603
7604 int
7605 main ()
7606 {
7607
7608 #ifdef _XOPEN_SOURCE
7609 make an error
7610 #endif
7611   ;
7612   return 0;
7613 }
7614 _ACEOF
7615 rm -f conftest.$ac_objext
7616 if { (eval echo "$as_me:7616: \"$ac_compile\"") >&5
7617   (eval $ac_compile) 2>&5
7618   ac_status=$?
7619   echo "$as_me:7619: \$? = $ac_status" >&5
7620   (exit $ac_status); } &&
7621          { ac_try='test -s conftest.$ac_objext'
7622   { (eval echo "$as_me:7622: \"$ac_try\"") >&5
7623   (eval $ac_try) 2>&5
7624   ac_status=$?
7625   echo "$as_me:7625: \$? = $ac_status" >&5
7626   (exit $ac_status); }; }; then
7627   cf_cv_xopen_source=no
7628 else
7629   echo "$as_me: failed program was:" >&5
7630 cat conftest.$ac_ext >&5
7631 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7632 fi
7633 rm -f conftest.$ac_objext conftest.$ac_ext
7634         CPPFLAGS="$cf_save"
7635
7636 fi
7637 rm -f conftest.$ac_objext conftest.$ac_ext
7638
7639 fi
7640 echo "$as_me:7640: result: $cf_cv_xopen_source" >&5
7641 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7642
7643 if test "$cf_cv_xopen_source" != no ; then
7644
7645 CFLAGS=`echo "$CFLAGS" | \
7646         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7647                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7648
7649 CPPFLAGS=`echo "$CPPFLAGS" | \
7650         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7651                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7652
7653         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7654
7655 cf_fix_cppflags=no
7656 cf_new_cflags=
7657 cf_new_cppflags=
7658 cf_new_extra_cppflags=
7659
7660 for cf_add_cflags in $cf_temp_xopen_source
7661 do
7662 case $cf_fix_cppflags in
7663 no)
7664         case $cf_add_cflags in #(vi
7665         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7666                 case $cf_add_cflags in
7667                 -D*)
7668                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7669
7670                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7671                                 && test -z "${cf_tst_cflags}" \
7672                                 && cf_fix_cppflags=yes
7673
7674                         if test $cf_fix_cppflags = yes ; then
7675                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7676                                 continue
7677                         elif test "${cf_tst_cflags}" = "\"'" ; then
7678                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7679                                 continue
7680                         fi
7681                         ;;
7682                 esac
7683                 case "$CPPFLAGS" in
7684                 *$cf_add_cflags) #(vi
7685                         ;;
7686                 *) #(vi
7687                         case $cf_add_cflags in #(vi
7688                         -D*)
7689                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7690
7691 CPPFLAGS=`echo "$CPPFLAGS" | \
7692         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7693                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7694
7695                                 ;;
7696                         esac
7697                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7698                         ;;
7699                 esac
7700                 ;;
7701         *)
7702                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7703                 ;;
7704         esac
7705         ;;
7706 yes)
7707         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7708
7709         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7710
7711         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7712                 && test -z "${cf_tst_cflags}" \
7713                 && cf_fix_cppflags=no
7714         ;;
7715 esac
7716 done
7717
7718 if test -n "$cf_new_cflags" ; then
7719
7720         CFLAGS="$CFLAGS $cf_new_cflags"
7721 fi
7722
7723 if test -n "$cf_new_cppflags" ; then
7724
7725         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7726 fi
7727
7728 if test -n "$cf_new_extra_cppflags" ; then
7729
7730         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7731 fi
7732
7733 fi
7734
7735 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7736
7737 cf_save_CFLAGS="$CFLAGS"
7738 cf_save_CPPFLAGS="$CPPFLAGS"
7739
7740 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7741         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7742                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7743
7744 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7745         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7746                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7747
7748 echo "$as_me:7748: checking if we should define _POSIX_C_SOURCE" >&5
7749 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7750 if test "${cf_cv_posix_c_source+set}" = set; then
7751   echo $ECHO_N "(cached) $ECHO_C" >&6
7752 else
7753
7754 echo "${as_me:-configure}:7754: testing if the symbol is already defined go no further ..." 1>&5
7755
7756         cat >conftest.$ac_ext <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <sys/types.h>
7760 int
7761 main ()
7762 {
7763
7764 #ifndef _POSIX_C_SOURCE
7765 make an error
7766 #endif
7767   ;
7768   return 0;
7769 }
7770 _ACEOF
7771 rm -f conftest.$ac_objext
7772 if { (eval echo "$as_me:7772: \"$ac_compile\"") >&5
7773   (eval $ac_compile) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit $ac_status); } &&
7777          { ac_try='test -s conftest.$ac_objext'
7778   { (eval echo "$as_me:7778: \"$ac_try\"") >&5
7779   (eval $ac_try) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit $ac_status); }; }; then
7783   cf_cv_posix_c_source=no
7784 else
7785   echo "$as_me: failed program was:" >&5
7786 cat conftest.$ac_ext >&5
7787 cf_want_posix_source=no
7788          case .$cf_POSIX_C_SOURCE in #(vi
7789          .[12]??*) #(vi
7790                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7791                 ;;
7792          .2) #(vi
7793                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7794                 cf_want_posix_source=yes
7795                 ;;
7796          .*)
7797                 cf_want_posix_source=yes
7798                 ;;
7799          esac
7800          if test "$cf_want_posix_source" = yes ; then
7801                 cat >conftest.$ac_ext <<_ACEOF
7802 #line 7802 "configure"
7803 #include "confdefs.h"
7804 #include <sys/types.h>
7805 int
7806 main ()
7807 {
7808
7809 #ifdef _POSIX_SOURCE
7810 make an error
7811 #endif
7812   ;
7813   return 0;
7814 }
7815 _ACEOF
7816 rm -f conftest.$ac_objext
7817 if { (eval echo "$as_me:7817: \"$ac_compile\"") >&5
7818   (eval $ac_compile) 2>&5
7819   ac_status=$?
7820   echo "$as_me:7820: \$? = $ac_status" >&5
7821   (exit $ac_status); } &&
7822          { ac_try='test -s conftest.$ac_objext'
7823   { (eval echo "$as_me:7823: \"$ac_try\"") >&5
7824   (eval $ac_try) 2>&5
7825   ac_status=$?
7826   echo "$as_me:7826: \$? = $ac_status" >&5
7827   (exit $ac_status); }; }; then
7828   :
7829 else
7830   echo "$as_me: failed program was:" >&5
7831 cat conftest.$ac_ext >&5
7832 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7833 fi
7834 rm -f conftest.$ac_objext conftest.$ac_ext
7835          fi
7836
7837 echo "${as_me:-configure}:7837: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7838
7839          CFLAGS="$cf_trim_CFLAGS"
7840          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7841
7842 echo "${as_me:-configure}:7842: testing if the second compile does not leave our definition intact error ..." 1>&5
7843
7844          cat >conftest.$ac_ext <<_ACEOF
7845 #line 7845 "configure"
7846 #include "confdefs.h"
7847 #include <sys/types.h>
7848 int
7849 main ()
7850 {
7851
7852 #ifndef _POSIX_C_SOURCE
7853 make an error
7854 #endif
7855   ;
7856   return 0;
7857 }
7858 _ACEOF
7859 rm -f conftest.$ac_objext
7860 if { (eval echo "$as_me:7860: \"$ac_compile\"") >&5
7861   (eval $ac_compile) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); } &&
7865          { ac_try='test -s conftest.$ac_objext'
7866   { (eval echo "$as_me:7866: \"$ac_try\"") >&5
7867   (eval $ac_try) 2>&5
7868   ac_status=$?
7869   echo "$as_me:7869: \$? = $ac_status" >&5
7870   (exit $ac_status); }; }; then
7871   :
7872 else
7873   echo "$as_me: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 cf_cv_posix_c_source=no
7876 fi
7877 rm -f conftest.$ac_objext conftest.$ac_ext
7878          CFLAGS="$cf_save_CFLAGS"
7879          CPPFLAGS="$cf_save_CPPFLAGS"
7880
7881 fi
7882 rm -f conftest.$ac_objext conftest.$ac_ext
7883
7884 fi
7885 echo "$as_me:7885: result: $cf_cv_posix_c_source" >&5
7886 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7887
7888 if test "$cf_cv_posix_c_source" != no ; then
7889         CFLAGS="$cf_trim_CFLAGS"
7890         CPPFLAGS="$cf_trim_CPPFLAGS"
7891
7892 cf_fix_cppflags=no
7893 cf_new_cflags=
7894 cf_new_cppflags=
7895 cf_new_extra_cppflags=
7896
7897 for cf_add_cflags in $cf_cv_posix_c_source
7898 do
7899 case $cf_fix_cppflags in
7900 no)
7901         case $cf_add_cflags in #(vi
7902         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7903                 case $cf_add_cflags in
7904                 -D*)
7905                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7906
7907                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7908                                 && test -z "${cf_tst_cflags}" \
7909                                 && cf_fix_cppflags=yes
7910
7911                         if test $cf_fix_cppflags = yes ; then
7912                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7913                                 continue
7914                         elif test "${cf_tst_cflags}" = "\"'" ; then
7915                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7916                                 continue
7917                         fi
7918                         ;;
7919                 esac
7920                 case "$CPPFLAGS" in
7921                 *$cf_add_cflags) #(vi
7922                         ;;
7923                 *) #(vi
7924                         case $cf_add_cflags in #(vi
7925                         -D*)
7926                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7927
7928 CPPFLAGS=`echo "$CPPFLAGS" | \
7929         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7930                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7931
7932                                 ;;
7933                         esac
7934                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7935                         ;;
7936                 esac
7937                 ;;
7938         *)
7939                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7940                 ;;
7941         esac
7942         ;;
7943 yes)
7944         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7945
7946         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7947
7948         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7949                 && test -z "${cf_tst_cflags}" \
7950                 && cf_fix_cppflags=no
7951         ;;
7952 esac
7953 done
7954
7955 if test -n "$cf_new_cflags" ; then
7956
7957         CFLAGS="$CFLAGS $cf_new_cflags"
7958 fi
7959
7960 if test -n "$cf_new_cppflags" ; then
7961
7962         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7963 fi
7964
7965 if test -n "$cf_new_extra_cppflags" ; then
7966
7967         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7968 fi
7969
7970 fi
7971
7972         ;;
7973 esac
7974
7975 if test -n "$cf_xopen_source" ; then
7976
7977 cf_fix_cppflags=no
7978 cf_new_cflags=
7979 cf_new_cppflags=
7980 cf_new_extra_cppflags=
7981
7982 for cf_add_cflags in $cf_xopen_source
7983 do
7984 case $cf_fix_cppflags in
7985 no)
7986         case $cf_add_cflags in #(vi
7987         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7988                 case $cf_add_cflags in
7989                 -D*)
7990                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7991
7992                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7993                                 && test -z "${cf_tst_cflags}" \
7994                                 && cf_fix_cppflags=yes
7995
7996                         if test $cf_fix_cppflags = yes ; then
7997                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7998                                 continue
7999                         elif test "${cf_tst_cflags}" = "\"'" ; then
8000                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8001                                 continue
8002                         fi
8003                         ;;
8004                 esac
8005                 case "$CPPFLAGS" in
8006                 *$cf_add_cflags) #(vi
8007                         ;;
8008                 *) #(vi
8009                         case $cf_add_cflags in #(vi
8010                         -D*)
8011                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8012
8013 CPPFLAGS=`echo "$CPPFLAGS" | \
8014         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8015                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8016
8017                                 ;;
8018                         esac
8019                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8020                         ;;
8021                 esac
8022                 ;;
8023         *)
8024                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8025                 ;;
8026         esac
8027         ;;
8028 yes)
8029         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8030
8031         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8032
8033         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8034                 && test -z "${cf_tst_cflags}" \
8035                 && cf_fix_cppflags=no
8036         ;;
8037 esac
8038 done
8039
8040 if test -n "$cf_new_cflags" ; then
8041
8042         CFLAGS="$CFLAGS $cf_new_cflags"
8043 fi
8044
8045 if test -n "$cf_new_cppflags" ; then
8046
8047         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8048 fi
8049
8050 if test -n "$cf_new_extra_cppflags" ; then
8051
8052         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8053 fi
8054
8055 fi
8056
8057 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8058         echo "$as_me:8058: checking if _XOPEN_SOURCE really is set" >&5
8059 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8060         cat >conftest.$ac_ext <<_ACEOF
8061 #line 8061 "configure"
8062 #include "confdefs.h"
8063 #include <stdlib.h>
8064 int
8065 main ()
8066 {
8067
8068 #ifndef _XOPEN_SOURCE
8069 make an error
8070 #endif
8071   ;
8072   return 0;
8073 }
8074 _ACEOF
8075 rm -f conftest.$ac_objext
8076 if { (eval echo "$as_me:8076: \"$ac_compile\"") >&5
8077   (eval $ac_compile) 2>&5
8078   ac_status=$?
8079   echo "$as_me:8079: \$? = $ac_status" >&5
8080   (exit $ac_status); } &&
8081          { ac_try='test -s conftest.$ac_objext'
8082   { (eval echo "$as_me:8082: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); }; }; then
8087   cf_XOPEN_SOURCE_set=yes
8088 else
8089   echo "$as_me: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 cf_XOPEN_SOURCE_set=no
8092 fi
8093 rm -f conftest.$ac_objext conftest.$ac_ext
8094         echo "$as_me:8094: result: $cf_XOPEN_SOURCE_set" >&5
8095 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8096         if test $cf_XOPEN_SOURCE_set = yes
8097         then
8098                 cat >conftest.$ac_ext <<_ACEOF
8099 #line 8099 "configure"
8100 #include "confdefs.h"
8101 #include <stdlib.h>
8102 int
8103 main ()
8104 {
8105
8106 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8107 make an error
8108 #endif
8109   ;
8110   return 0;
8111 }
8112 _ACEOF
8113 rm -f conftest.$ac_objext
8114 if { (eval echo "$as_me:8114: \"$ac_compile\"") >&5
8115   (eval $ac_compile) 2>&5
8116   ac_status=$?
8117   echo "$as_me:8117: \$? = $ac_status" >&5
8118   (exit $ac_status); } &&
8119          { ac_try='test -s conftest.$ac_objext'
8120   { (eval echo "$as_me:8120: \"$ac_try\"") >&5
8121   (eval $ac_try) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); }; }; then
8125   cf_XOPEN_SOURCE_set_ok=yes
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 cf_XOPEN_SOURCE_set_ok=no
8130 fi
8131 rm -f conftest.$ac_objext conftest.$ac_ext
8132                 if test $cf_XOPEN_SOURCE_set_ok = no
8133                 then
8134                         { echo "$as_me:8134: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8135 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8136                 fi
8137         else
8138
8139 echo "$as_me:8139: checking if we should define _XOPEN_SOURCE" >&5
8140 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8141 if test "${cf_cv_xopen_source+set}" = set; then
8142   echo $ECHO_N "(cached) $ECHO_C" >&6
8143 else
8144
8145         cat >conftest.$ac_ext <<_ACEOF
8146 #line 8146 "configure"
8147 #include "confdefs.h"
8148
8149 #include <stdlib.h>
8150 #include <string.h>
8151 #include <sys/types.h>
8152
8153 int
8154 main ()
8155 {
8156
8157 #ifndef _XOPEN_SOURCE
8158 make an error
8159 #endif
8160   ;
8161   return 0;
8162 }
8163 _ACEOF
8164 rm -f conftest.$ac_objext
8165 if { (eval echo "$as_me:8165: \"$ac_compile\"") >&5
8166   (eval $ac_compile) 2>&5
8167   ac_status=$?
8168   echo "$as_me:8168: \$? = $ac_status" >&5
8169   (exit $ac_status); } &&
8170          { ac_try='test -s conftest.$ac_objext'
8171   { (eval echo "$as_me:8171: \"$ac_try\"") >&5
8172   (eval $ac_try) 2>&5
8173   ac_status=$?
8174   echo "$as_me:8174: \$? = $ac_status" >&5
8175   (exit $ac_status); }; }; then
8176   cf_cv_xopen_source=no
8177 else
8178   echo "$as_me: failed program was:" >&5
8179 cat conftest.$ac_ext >&5
8180 cf_save="$CPPFLAGS"
8181          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8182          cat >conftest.$ac_ext <<_ACEOF
8183 #line 8183 "configure"
8184 #include "confdefs.h"
8185
8186 #include <stdlib.h>
8187 #include <string.h>
8188 #include <sys/types.h>
8189
8190 int
8191 main ()
8192 {
8193
8194 #ifdef _XOPEN_SOURCE
8195 make an error
8196 #endif
8197   ;
8198   return 0;
8199 }
8200 _ACEOF
8201 rm -f conftest.$ac_objext
8202 if { (eval echo "$as_me:8202: \"$ac_compile\"") >&5
8203   (eval $ac_compile) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); } &&
8207          { ac_try='test -s conftest.$ac_objext'
8208   { (eval echo "$as_me:8208: \"$ac_try\"") >&5
8209   (eval $ac_try) 2>&5
8210   ac_status=$?
8211   echo "$as_me:8211: \$? = $ac_status" >&5
8212   (exit $ac_status); }; }; then
8213   cf_cv_xopen_source=no
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8218 fi
8219 rm -f conftest.$ac_objext conftest.$ac_ext
8220         CPPFLAGS="$cf_save"
8221
8222 fi
8223 rm -f conftest.$ac_objext conftest.$ac_ext
8224
8225 fi
8226 echo "$as_me:8226: result: $cf_cv_xopen_source" >&5
8227 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8228
8229 if test "$cf_cv_xopen_source" != no ; then
8230
8231 CFLAGS=`echo "$CFLAGS" | \
8232         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8233                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8234
8235 CPPFLAGS=`echo "$CPPFLAGS" | \
8236         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8237                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8238
8239         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8240
8241 cf_fix_cppflags=no
8242 cf_new_cflags=
8243 cf_new_cppflags=
8244 cf_new_extra_cppflags=
8245
8246 for cf_add_cflags in $cf_temp_xopen_source
8247 do
8248 case $cf_fix_cppflags in
8249 no)
8250         case $cf_add_cflags in #(vi
8251         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8252                 case $cf_add_cflags in
8253                 -D*)
8254                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8255
8256                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8257                                 && test -z "${cf_tst_cflags}" \
8258                                 && cf_fix_cppflags=yes
8259
8260                         if test $cf_fix_cppflags = yes ; then
8261                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8262                                 continue
8263                         elif test "${cf_tst_cflags}" = "\"'" ; then
8264                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8265                                 continue
8266                         fi
8267                         ;;
8268                 esac
8269                 case "$CPPFLAGS" in
8270                 *$cf_add_cflags) #(vi
8271                         ;;
8272                 *) #(vi
8273                         case $cf_add_cflags in #(vi
8274                         -D*)
8275                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8276
8277 CPPFLAGS=`echo "$CPPFLAGS" | \
8278         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8279                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8280
8281                                 ;;
8282                         esac
8283                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8284                         ;;
8285                 esac
8286                 ;;
8287         *)
8288                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8289                 ;;
8290         esac
8291         ;;
8292 yes)
8293         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8294
8295         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8296
8297         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8298                 && test -z "${cf_tst_cflags}" \
8299                 && cf_fix_cppflags=no
8300         ;;
8301 esac
8302 done
8303
8304 if test -n "$cf_new_cflags" ; then
8305
8306         CFLAGS="$CFLAGS $cf_new_cflags"
8307 fi
8308
8309 if test -n "$cf_new_cppflags" ; then
8310
8311         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8312 fi
8313
8314 if test -n "$cf_new_extra_cppflags" ; then
8315
8316         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8317 fi
8318
8319 fi
8320
8321         fi
8322 fi
8323
8324 # Work around breakage on OS X
8325
8326 echo "$as_me:8326: checking if SIGWINCH is defined" >&5
8327 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8328 if test "${cf_cv_define_sigwinch+set}" = set; then
8329   echo $ECHO_N "(cached) $ECHO_C" >&6
8330 else
8331
8332         cat >conftest.$ac_ext <<_ACEOF
8333 #line 8333 "configure"
8334 #include "confdefs.h"
8335
8336 #include <sys/types.h>
8337 #include <sys/signal.h>
8338
8339 int
8340 main ()
8341 {
8342 int x = SIGWINCH
8343   ;
8344   return 0;
8345 }
8346 _ACEOF
8347 rm -f conftest.$ac_objext
8348 if { (eval echo "$as_me:8348: \"$ac_compile\"") >&5
8349   (eval $ac_compile) 2>&5
8350   ac_status=$?
8351   echo "$as_me:8351: \$? = $ac_status" >&5
8352   (exit $ac_status); } &&
8353          { ac_try='test -s conftest.$ac_objext'
8354   { (eval echo "$as_me:8354: \"$ac_try\"") >&5
8355   (eval $ac_try) 2>&5
8356   ac_status=$?
8357   echo "$as_me:8357: \$? = $ac_status" >&5
8358   (exit $ac_status); }; }; then
8359   cf_cv_define_sigwinch=yes
8360 else
8361   echo "$as_me: failed program was:" >&5
8362 cat conftest.$ac_ext >&5
8363 cat >conftest.$ac_ext <<_ACEOF
8364 #line 8364 "configure"
8365 #include "confdefs.h"
8366
8367 #undef _XOPEN_SOURCE
8368 #undef _POSIX_SOURCE
8369 #undef _POSIX_C_SOURCE
8370 #include <sys/types.h>
8371 #include <sys/signal.h>
8372
8373 int
8374 main ()
8375 {
8376 int x = SIGWINCH
8377   ;
8378   return 0;
8379 }
8380 _ACEOF
8381 rm -f conftest.$ac_objext
8382 if { (eval echo "$as_me:8382: \"$ac_compile\"") >&5
8383   (eval $ac_compile) 2>&5
8384   ac_status=$?
8385   echo "$as_me:8385: \$? = $ac_status" >&5
8386   (exit $ac_status); } &&
8387          { ac_try='test -s conftest.$ac_objext'
8388   { (eval echo "$as_me:8388: \"$ac_try\"") >&5
8389   (eval $ac_try) 2>&5
8390   ac_status=$?
8391   echo "$as_me:8391: \$? = $ac_status" >&5
8392   (exit $ac_status); }; }; then
8393   cf_cv_define_sigwinch=maybe
8394 else
8395   echo "$as_me: failed program was:" >&5
8396 cat conftest.$ac_ext >&5
8397 cf_cv_define_sigwinch=no
8398 fi
8399 rm -f conftest.$ac_objext conftest.$ac_ext
8400
8401 fi
8402 rm -f conftest.$ac_objext conftest.$ac_ext
8403
8404 fi
8405 echo "$as_me:8405: result: $cf_cv_define_sigwinch" >&5
8406 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8407
8408 if test "$cf_cv_define_sigwinch" = maybe ; then
8409 echo "$as_me:8409: checking for actual SIGWINCH definition" >&5
8410 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8411 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8412   echo $ECHO_N "(cached) $ECHO_C" >&6
8413 else
8414
8415 cf_cv_fixup_sigwinch=unknown
8416 cf_sigwinch=32
8417 while test $cf_sigwinch != 1
8418 do
8419         cat >conftest.$ac_ext <<_ACEOF
8420 #line 8420 "configure"
8421 #include "confdefs.h"
8422
8423 #undef _XOPEN_SOURCE
8424 #undef _POSIX_SOURCE
8425 #undef _POSIX_C_SOURCE
8426 #include <sys/types.h>
8427 #include <sys/signal.h>
8428
8429 int
8430 main ()
8431 {
8432
8433 #if SIGWINCH != $cf_sigwinch
8434 make an error
8435 #endif
8436 int x = SIGWINCH
8437   ;
8438   return 0;
8439 }
8440 _ACEOF
8441 rm -f conftest.$ac_objext
8442 if { (eval echo "$as_me:8442: \"$ac_compile\"") >&5
8443   (eval $ac_compile) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit $ac_status); } &&
8447          { ac_try='test -s conftest.$ac_objext'
8448   { (eval echo "$as_me:8448: \"$ac_try\"") >&5
8449   (eval $ac_try) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit $ac_status); }; }; then
8453   cf_cv_fixup_sigwinch=$cf_sigwinch
8454          break
8455 else
8456   echo "$as_me: failed program was:" >&5
8457 cat conftest.$ac_ext >&5
8458 fi
8459 rm -f conftest.$ac_objext conftest.$ac_ext
8460
8461 cf_sigwinch=`expr $cf_sigwinch - 1`
8462 done
8463
8464 fi
8465 echo "$as_me:8465: result: $cf_cv_fixup_sigwinch" >&5
8466 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8467
8468         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8469                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8470         fi
8471 fi
8472
8473 # Checks for CODESET support.
8474
8475   echo "$as_me:8475: checking for nl_langinfo and CODESET" >&5
8476 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8477 if test "${am_cv_langinfo_codeset+set}" = set; then
8478   echo $ECHO_N "(cached) $ECHO_C" >&6
8479 else
8480   cat >conftest.$ac_ext <<_ACEOF
8481 #line 8481 "configure"
8482 #include "confdefs.h"
8483 #include <langinfo.h>
8484 int
8485 main ()
8486 {
8487 char* cs = nl_langinfo(CODESET);
8488   ;
8489   return 0;
8490 }
8491 _ACEOF
8492 rm -f conftest.$ac_objext conftest$ac_exeext
8493 if { (eval echo "$as_me:8493: \"$ac_link\"") >&5
8494   (eval $ac_link) 2>&5
8495   ac_status=$?
8496   echo "$as_me:8496: \$? = $ac_status" >&5
8497   (exit $ac_status); } &&
8498          { ac_try='test -s conftest$ac_exeext'
8499   { (eval echo "$as_me:8499: \"$ac_try\"") >&5
8500   (eval $ac_try) 2>&5
8501   ac_status=$?
8502   echo "$as_me:8502: \$? = $ac_status" >&5
8503   (exit $ac_status); }; }; then
8504   am_cv_langinfo_codeset=yes
8505 else
8506   echo "$as_me: failed program was:" >&5
8507 cat conftest.$ac_ext >&5
8508 am_cv_langinfo_codeset=no
8509 fi
8510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8511
8512 fi
8513 echo "$as_me:8513: result: $am_cv_langinfo_codeset" >&5
8514 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8515   if test $am_cv_langinfo_codeset = yes; then
8516
8517 cat >>confdefs.h <<\EOF
8518 #define HAVE_LANGINFO_CODESET 1
8519 EOF
8520
8521   fi
8522
8523 # use these variables to work around a defect in gcc's fixincludes.
8524 NCURSES_OK_WCHAR_T=
8525 NCURSES_OK_WINT_T=
8526
8527 echo "$as_me:8527: checking if you want wide-character code" >&5
8528 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8529
8530 # Check whether --enable-widec or --disable-widec was given.
8531 if test "${enable_widec+set}" = set; then
8532   enableval="$enable_widec"
8533   with_widec=$enableval
8534 else
8535   with_widec=no
8536 fi;
8537 echo "$as_me:8537: result: $with_widec" >&5
8538 echo "${ECHO_T}$with_widec" >&6
8539 if test "$with_widec" = yes ; then
8540         LIB_SUFFIX="w${LIB_SUFFIX}"
8541         cat >>confdefs.h <<\EOF
8542 #define USE_WIDEC_SUPPORT 1
8543 EOF
8544
8545         cat >>confdefs.h <<\EOF
8546 #define NCURSES_WIDECHAR 1
8547 EOF
8548
8549 echo "$as_me:8549: checking if wchar.h can be used as is" >&5
8550 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8551 if test "${cf_cv_wchar_h_okay+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554
8555 cat >conftest.$ac_ext <<_ACEOF
8556 #line 8556 "configure"
8557 #include "confdefs.h"
8558
8559 #include <stdlib.h>
8560 #include <wchar.h>
8561
8562 int
8563 main ()
8564 {
8565
8566         wint_t foo = 0;
8567         int bar = iswpunct(foo)
8568   ;
8569   return 0;
8570 }
8571 _ACEOF
8572 rm -f conftest.$ac_objext
8573 if { (eval echo "$as_me:8573: \"$ac_compile\"") >&5
8574   (eval $ac_compile) 2>&5
8575   ac_status=$?
8576   echo "$as_me:8576: \$? = $ac_status" >&5
8577   (exit $ac_status); } &&
8578          { ac_try='test -s conftest.$ac_objext'
8579   { (eval echo "$as_me:8579: \"$ac_try\"") >&5
8580   (eval $ac_try) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); }; }; then
8584   cf_cv_wchar_h_okay=yes
8585 else
8586   echo "$as_me: failed program was:" >&5
8587 cat conftest.$ac_ext >&5
8588 cf_cv_wchar_h_okay=no
8589 fi
8590 rm -f conftest.$ac_objext conftest.$ac_ext
8591 fi
8592 echo "$as_me:8592: result: $cf_cv_wchar_h_okay" >&5
8593 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8594
8595 if test $cf_cv_wchar_h_okay = no
8596 then
8597
8598 echo "$as_me:8598: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8599 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8600 cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603 #include <sys/types.h>
8604
8605 int
8606 main ()
8607 {
8608
8609 #ifndef _XOPEN_SOURCE_EXTENDED
8610 make an error
8611 #endif
8612   ;
8613   return 0;
8614 }
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:8617: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -s conftest.$ac_objext'
8623   { (eval echo "$as_me:8623: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); }; }; then
8628   cf_result=no
8629 else
8630   echo "$as_me: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 cf_result=yes
8633 fi
8634 rm -f conftest.$ac_objext conftest.$ac_ext
8635 echo "$as_me:8635: result: $cf_result" >&5
8636 echo "${ECHO_T}$cf_result" >&6
8637
8638 if test "$cf_result" = yes ; then
8639         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8640 elif test "x" != "x" ; then
8641         echo "$as_me:8641: checking checking for compatible value versus " >&5
8642 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8643         cat >conftest.$ac_ext <<_ACEOF
8644 #line 8644 "configure"
8645 #include "confdefs.h"
8646 #include <sys/types.h>
8647
8648 int
8649 main ()
8650 {
8651
8652 #if _XOPEN_SOURCE_EXTENDED- < 0
8653 make an error
8654 #endif
8655   ;
8656   return 0;
8657 }
8658 _ACEOF
8659 rm -f conftest.$ac_objext
8660 if { (eval echo "$as_me:8660: \"$ac_compile\"") >&5
8661   (eval $ac_compile) 2>&5
8662   ac_status=$?
8663   echo "$as_me:8663: \$? = $ac_status" >&5
8664   (exit $ac_status); } &&
8665          { ac_try='test -s conftest.$ac_objext'
8666   { (eval echo "$as_me:8666: \"$ac_try\"") >&5
8667   (eval $ac_try) 2>&5
8668   ac_status=$?
8669   echo "$as_me:8669: \$? = $ac_status" >&5
8670   (exit $ac_status); }; }; then
8671   cf_result=yes
8672 else
8673   echo "$as_me: failed program was:" >&5
8674 cat conftest.$ac_ext >&5
8675 cf_result=no
8676 fi
8677 rm -f conftest.$ac_objext conftest.$ac_ext
8678         echo "$as_me:8678: result: $cf_result" >&5
8679 echo "${ECHO_T}$cf_result" >&6
8680         if test "$cf_result" = no ; then
8681                 # perhaps we can override it - try...
8682                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8683         fi
8684 fi
8685
8686 fi
8687
8688         # with_overwrite=no
8689         NCURSES_CH_T=cchar_t
8690
8691 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8692 do
8693 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8694 echo "$as_me:8694: checking for $ac_func" >&5
8695 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8696 if eval "test \"\${$as_ac_var+set}\" = set"; then
8697   echo $ECHO_N "(cached) $ECHO_C" >&6
8698 else
8699   cat >conftest.$ac_ext <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8702 /* System header to define __stub macros and hopefully few prototypes,
8703     which can conflict with char $ac_func (); below.  */
8704 #include <assert.h>
8705 /* Override any gcc2 internal prototype to avoid an error.  */
8706 #ifdef __cplusplus
8707 extern "C"
8708 #endif
8709 /* We use char because int might match the return type of a gcc2
8710    builtin and then its argument prototype would still apply.  */
8711 char $ac_func ();
8712 char (*f) ();
8713
8714 int
8715 main ()
8716 {
8717 /* The GNU C library defines this for functions which it implements
8718     to always fail with ENOSYS.  Some functions are actually named
8719     something starting with __ and the normal name is an alias.  */
8720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8721 choke me
8722 #else
8723 f = $ac_func;
8724 #endif
8725
8726   ;
8727   return 0;
8728 }
8729 _ACEOF
8730 rm -f conftest.$ac_objext conftest$ac_exeext
8731 if { (eval echo "$as_me:8731: \"$ac_link\"") >&5
8732   (eval $ac_link) 2>&5
8733   ac_status=$?
8734   echo "$as_me:8734: \$? = $ac_status" >&5
8735   (exit $ac_status); } &&
8736          { ac_try='test -s conftest$ac_exeext'
8737   { (eval echo "$as_me:8737: \"$ac_try\"") >&5
8738   (eval $ac_try) 2>&5
8739   ac_status=$?
8740   echo "$as_me:8740: \$? = $ac_status" >&5
8741   (exit $ac_status); }; }; then
8742   eval "$as_ac_var=yes"
8743 else
8744   echo "$as_me: failed program was:" >&5
8745 cat conftest.$ac_ext >&5
8746 eval "$as_ac_var=no"
8747 fi
8748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8749 fi
8750 echo "$as_me:8750: result: `eval echo '${'$as_ac_var'}'`" >&5
8751 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8752 if test `eval echo '${'$as_ac_var'}'` = yes; then
8753   cat >>confdefs.h <<EOF
8754 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8755 EOF
8756
8757 fi
8758 done
8759
8760         if test "$ac_cv_func_putwc" != yes ; then
8761
8762 echo "$as_me:8762: checking for multibyte character support" >&5
8763 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8764 if test "${cf_cv_utf8_lib+set}" = set; then
8765   echo $ECHO_N "(cached) $ECHO_C" >&6
8766 else
8767
8768         cf_save_LIBS="$LIBS"
8769         cat >conftest.$ac_ext <<_ACEOF
8770 #line 8770 "configure"
8771 #include "confdefs.h"
8772
8773 #include <stdlib.h>
8774 int
8775 main ()
8776 {
8777 putwc(0,0);
8778   ;
8779   return 0;
8780 }
8781 _ACEOF
8782 rm -f conftest.$ac_objext conftest$ac_exeext
8783 if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
8784   (eval $ac_link) 2>&5
8785   ac_status=$?
8786   echo "$as_me:8786: \$? = $ac_status" >&5
8787   (exit $ac_status); } &&
8788          { ac_try='test -s conftest$ac_exeext'
8789   { (eval echo "$as_me:8789: \"$ac_try\"") >&5
8790   (eval $ac_try) 2>&5
8791   ac_status=$?
8792   echo "$as_me:8792: \$? = $ac_status" >&5
8793   (exit $ac_status); }; }; then
8794   cf_cv_utf8_lib=yes
8795 else
8796   echo "$as_me: failed program was:" >&5
8797 cat conftest.$ac_ext >&5
8798
8799 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8800 # will be set on completion of the AC_TRY_LINK below.
8801 cf_cv_header_path_utf8=
8802 cf_cv_library_path_utf8=
8803
8804 echo "${as_me:-configure}:8804: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8805
8806 cf_save_LIBS="$LIBS"
8807
8808 cat >conftest.$ac_ext <<_ACEOF
8809 #line 8809 "configure"
8810 #include "confdefs.h"
8811
8812 #include <libutf8.h>
8813 int
8814 main ()
8815 {
8816 putwc(0,0);
8817   ;
8818   return 0;
8819 }
8820 _ACEOF
8821 rm -f conftest.$ac_objext conftest$ac_exeext
8822 if { (eval echo "$as_me:8822: \"$ac_link\"") >&5
8823   (eval $ac_link) 2>&5
8824   ac_status=$?
8825   echo "$as_me:8825: \$? = $ac_status" >&5
8826   (exit $ac_status); } &&
8827          { ac_try='test -s conftest$ac_exeext'
8828   { (eval echo "$as_me:8828: \"$ac_try\"") >&5
8829   (eval $ac_try) 2>&5
8830   ac_status=$?
8831   echo "$as_me:8831: \$? = $ac_status" >&5
8832   (exit $ac_status); }; }; then
8833
8834         cf_cv_find_linkage_utf8=yes
8835         cf_cv_header_path_utf8=/usr/include
8836         cf_cv_library_path_utf8=/usr/lib
8837
8838 else
8839   echo "$as_me: failed program was:" >&5
8840 cat conftest.$ac_ext >&5
8841
8842 LIBS="-lutf8  $cf_save_LIBS"
8843
8844 cat >conftest.$ac_ext <<_ACEOF
8845 #line 8845 "configure"
8846 #include "confdefs.h"
8847
8848 #include <libutf8.h>
8849 int
8850 main ()
8851 {
8852 putwc(0,0);
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857 rm -f conftest.$ac_objext conftest$ac_exeext
8858 if { (eval echo "$as_me:8858: \"$ac_link\"") >&5
8859   (eval $ac_link) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); } &&
8863          { ac_try='test -s conftest$ac_exeext'
8864   { (eval echo "$as_me:8864: \"$ac_try\"") >&5
8865   (eval $ac_try) 2>&5
8866   ac_status=$?
8867   echo "$as_me:8867: \$? = $ac_status" >&5
8868   (exit $ac_status); }; }; then
8869
8870         cf_cv_find_linkage_utf8=yes
8871         cf_cv_header_path_utf8=/usr/include
8872         cf_cv_library_path_utf8=/usr/lib
8873         cf_cv_library_file_utf8="-lutf8"
8874
8875 else
8876   echo "$as_me: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878
8879         cf_cv_find_linkage_utf8=no
8880         LIBS="$cf_save_LIBS"
8881
8882     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8883
8884 echo "${as_me:-configure}:8884: testing find linkage for utf8 library ..." 1>&5
8885
8886 echo "${as_me:-configure}:8886: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8887
8888     cf_save_CPPFLAGS="$CPPFLAGS"
8889     cf_test_CPPFLAGS="$CPPFLAGS"
8890
8891 cf_search=
8892
8893 # collect the current set of include-directories from compiler flags
8894 cf_header_path_list=""
8895 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8896         for cf_header_path in $CPPFLAGS $CFLAGS
8897         do
8898                 case $cf_header_path in #(vi
8899                 -I*)
8900                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8901
8902 test "$cf_header_path" != "NONE" && \
8903 test -d "$cf_header_path" && \
8904  {
8905         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8906         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8907         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8908         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8909         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8910         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8911 }
8912
8913                         cf_header_path_list="$cf_header_path_list $cf_search"
8914                         ;;
8915                 esac
8916         done
8917 fi
8918
8919 # add the variations for the package we are looking for
8920
8921 cf_search=
8922
8923 test "/usr" != "$prefix" && \
8924 test -d "/usr" && \
8925 (test $prefix = NONE || test "/usr" != "$prefix") && {
8926         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8927         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8928         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8929         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8930         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8931         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8932 }
8933
8934 test "$prefix" != "NONE" && \
8935 test -d "$prefix" && \
8936  {
8937         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8938         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8939         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8940         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8941         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8942         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8943 }
8944
8945 test "/usr/local" != "$prefix" && \
8946 test -d "/usr/local" && \
8947 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8948         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8949         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8950         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8951         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8952         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8953         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8954 }
8955
8956 test "/opt" != "$prefix" && \
8957 test -d "/opt" && \
8958 (test $prefix = NONE || test "/opt" != "$prefix") && {
8959         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8960         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8961         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8962         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8963         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8964         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8965 }
8966
8967 test "$HOME" != "$prefix" && \
8968 test -d "$HOME" && \
8969 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8970         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8971         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8972         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8973         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8974         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8975         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8976 }
8977
8978 test "$includedir" != NONE && \
8979 test "$includedir" != "/usr/include" && \
8980 test -d "$includedir" && {
8981         test -d $includedir &&    cf_search="$cf_search $includedir"
8982         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8983 }
8984
8985 test "$oldincludedir" != NONE && \
8986 test "$oldincludedir" != "/usr/include" && \
8987 test -d "$oldincludedir" && {
8988         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8989         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8990 }
8991
8992 cf_search="$cf_search $cf_header_path_list"
8993
8994     for cf_cv_header_path_utf8 in $cf_search
8995     do
8996       if test -d $cf_cv_header_path_utf8 ; then
8997         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8998
8999 echo "${as_me:-configure}:8999: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9000
9001         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9002         cat >conftest.$ac_ext <<_ACEOF
9003 #line 9003 "configure"
9004 #include "confdefs.h"
9005
9006 #include <libutf8.h>
9007 int
9008 main ()
9009 {
9010 putwc(0,0);
9011   ;
9012   return 0;
9013 }
9014 _ACEOF
9015 rm -f conftest.$ac_objext
9016 if { (eval echo "$as_me:9016: \"$ac_compile\"") >&5
9017   (eval $ac_compile) 2>&5
9018   ac_status=$?
9019   echo "$as_me:9019: \$? = $ac_status" >&5
9020   (exit $ac_status); } &&
9021          { ac_try='test -s conftest.$ac_objext'
9022   { (eval echo "$as_me:9022: \"$ac_try\"") >&5
9023   (eval $ac_try) 2>&5
9024   ac_status=$?
9025   echo "$as_me:9025: \$? = $ac_status" >&5
9026   (exit $ac_status); }; }; then
9027
9028             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9029
9030 echo "${as_me:-configure}:9030: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9031
9032             cf_cv_find_linkage_utf8=maybe
9033             cf_test_CPPFLAGS="$CPPFLAGS"
9034             break
9035 else
9036   echo "$as_me: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038
9039             CPPFLAGS="$cf_save_CPPFLAGS"
9040
9041 fi
9042 rm -f conftest.$ac_objext conftest.$ac_ext
9043       fi
9044     done
9045
9046     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9047
9048 echo "${as_me:-configure}:9048: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9049
9050       cf_save_LIBS="$LIBS"
9051       cf_save_LDFLAGS="$LDFLAGS"
9052
9053       if test "$cf_cv_find_linkage_utf8" != yes ; then
9054
9055 cf_search=
9056 cf_library_path_list=""
9057 if test -n "${LDFLAGS}${LIBS}" ; then
9058         for cf_library_path in $LDFLAGS $LIBS
9059         do
9060                 case $cf_library_path in #(vi
9061                 -L*)
9062                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9063
9064 test "$cf_library_path" != "NONE" && \
9065 test -d "$cf_library_path" && \
9066  {
9067         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9068         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9069         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9070         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9071         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9072         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9073 }
9074
9075                         cf_library_path_list="$cf_library_path_list $cf_search"
9076                         ;;
9077                 esac
9078         done
9079 fi
9080
9081 cf_search=
9082
9083 test "/usr" != "$prefix" && \
9084 test -d "/usr" && \
9085 (test $prefix = NONE || test "/usr" != "$prefix") && {
9086         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9087         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9088         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9089         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9090         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9091         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9092 }
9093
9094 test "$prefix" != "NONE" && \
9095 test -d "$prefix" && \
9096  {
9097         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9098         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9099         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9100         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9101         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9102         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9103 }
9104
9105 test "/usr/local" != "$prefix" && \
9106 test -d "/usr/local" && \
9107 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9108         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9109         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9110         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9111         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9112         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9113         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9114 }
9115
9116 test "/opt" != "$prefix" && \
9117 test -d "/opt" && \
9118 (test $prefix = NONE || test "/opt" != "$prefix") && {
9119         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9120         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9121         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9122         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9123         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9124         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9125 }
9126
9127 test "$HOME" != "$prefix" && \
9128 test -d "$HOME" && \
9129 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9130         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9131         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9132         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9133         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9134         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9135         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9136 }
9137
9138 cf_search="$cf_library_path_list $cf_search"
9139
9140         for cf_cv_library_path_utf8 in $cf_search
9141         do
9142           if test -d $cf_cv_library_path_utf8 ; then
9143             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9144
9145 echo "${as_me:-configure}:9145: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9146
9147             CPPFLAGS="$cf_test_CPPFLAGS"
9148             LIBS="-lutf8  $cf_save_LIBS"
9149             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9150             cat >conftest.$ac_ext <<_ACEOF
9151 #line 9151 "configure"
9152 #include "confdefs.h"
9153
9154 #include <libutf8.h>
9155 int
9156 main ()
9157 {
9158 putwc(0,0);
9159   ;
9160   return 0;
9161 }
9162 _ACEOF
9163 rm -f conftest.$ac_objext conftest$ac_exeext
9164 if { (eval echo "$as_me:9164: \"$ac_link\"") >&5
9165   (eval $ac_link) 2>&5
9166   ac_status=$?
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); } &&
9169          { ac_try='test -s conftest$ac_exeext'
9170   { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171   (eval $ac_try) 2>&5
9172   ac_status=$?
9173   echo "$as_me:9173: \$? = $ac_status" >&5
9174   (exit $ac_status); }; }; then
9175
9176                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9177
9178 echo "${as_me:-configure}:9178: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9179
9180                 cf_cv_find_linkage_utf8=yes
9181                 cf_cv_library_file_utf8="-lutf8"
9182                 break
9183 else
9184   echo "$as_me: failed program was:" >&5
9185 cat conftest.$ac_ext >&5
9186
9187                 CPPFLAGS="$cf_save_CPPFLAGS"
9188                 LIBS="$cf_save_LIBS"
9189                 LDFLAGS="$cf_save_LDFLAGS"
9190
9191 fi
9192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9193           fi
9194         done
9195         CPPFLAGS="$cf_save_CPPFLAGS"
9196         LDFLAGS="$cf_save_LDFLAGS"
9197       fi
9198
9199     else
9200       cf_cv_find_linkage_utf8=no
9201     fi
9202
9203 fi
9204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9205
9206 fi
9207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9208
9209 LIBS="$cf_save_LIBS"
9210
9211 if test "$cf_cv_find_linkage_utf8" = yes ; then
9212 cf_cv_utf8_lib=add-on
9213 else
9214 cf_cv_utf8_lib=no
9215 fi
9216
9217 fi
9218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9219 fi
9220 echo "$as_me:9220: result: $cf_cv_utf8_lib" >&5
9221 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9222
9223 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9224 # ncurses/ncursesw:
9225 if test "$cf_cv_utf8_lib" = "add-on" ; then
9226         cat >>confdefs.h <<\EOF
9227 #define HAVE_LIBUTF8_H 1
9228 EOF
9229
9230 if test -n "$cf_cv_header_path_utf8" ; then
9231   for cf_add_incdir in $cf_cv_header_path_utf8
9232   do
9233         while test $cf_add_incdir != /usr/include
9234         do
9235           if test -d $cf_add_incdir
9236           then
9237                 cf_have_incdir=no
9238                 if test -n "$CFLAGS$CPPFLAGS" ; then
9239                   # a loop is needed to ensure we can add subdirs of existing dirs
9240                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9241                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9242                           cf_have_incdir=yes; break
9243                         fi
9244                   done
9245                 fi
9246
9247                 if test "$cf_have_incdir" = no ; then
9248                   if test "$cf_add_incdir" = /usr/local/include ; then
9249                         if test "$GCC" = yes
9250                         then
9251                           cf_save_CPPFLAGS=$CPPFLAGS
9252                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9253                           cat >conftest.$ac_ext <<_ACEOF
9254 #line 9254 "configure"
9255 #include "confdefs.h"
9256 #include <stdio.h>
9257 int
9258 main ()
9259 {
9260 printf("Hello")
9261   ;
9262   return 0;
9263 }
9264 _ACEOF
9265 rm -f conftest.$ac_objext
9266 if { (eval echo "$as_me:9266: \"$ac_compile\"") >&5
9267   (eval $ac_compile) 2>&5
9268   ac_status=$?
9269   echo "$as_me:9269: \$? = $ac_status" >&5
9270   (exit $ac_status); } &&
9271          { ac_try='test -s conftest.$ac_objext'
9272   { (eval echo "$as_me:9272: \"$ac_try\"") >&5
9273   (eval $ac_try) 2>&5
9274   ac_status=$?
9275   echo "$as_me:9275: \$? = $ac_status" >&5
9276   (exit $ac_status); }; }; then
9277   :
9278 else
9279   echo "$as_me: failed program was:" >&5
9280 cat conftest.$ac_ext >&5
9281 cf_have_incdir=yes
9282 fi
9283 rm -f conftest.$ac_objext conftest.$ac_ext
9284                           CPPFLAGS=$cf_save_CPPFLAGS
9285                         fi
9286                   fi
9287                 fi
9288
9289                 if test "$cf_have_incdir" = no ; then
9290                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9291
9292 echo "${as_me:-configure}:9292: testing adding $cf_add_incdir to include-path ..." 1>&5
9293
9294                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9295
9296                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9297                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9298                   cf_add_incdir="$cf_top_incdir"
9299                 else
9300                   break
9301                 fi
9302           fi
9303         done
9304   done
9305 fi
9306
9307 if test -n "$cf_cv_library_path_utf8" ; then
9308   for cf_add_libdir in $cf_cv_library_path_utf8
9309   do
9310     if test $cf_add_libdir = /usr/lib ; then
9311       :
9312     elif test -d $cf_add_libdir
9313     then
9314       cf_have_libdir=no
9315       if test -n "$LDFLAGS$LIBS" ; then
9316         # a loop is needed to ensure we can add subdirs of existing dirs
9317         for cf_test_libdir in $LDFLAGS $LIBS ; do
9318           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9319             cf_have_libdir=yes; break
9320           fi
9321         done
9322       fi
9323       if test "$cf_have_libdir" = no ; then
9324         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9325
9326 echo "${as_me:-configure}:9326: testing adding $cf_add_libdir to library-path ..." 1>&5
9327
9328         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9329       fi
9330     fi
9331   done
9332 fi
9333
9334         LIBS="$cf_cv_library_file_utf8 $LIBS"
9335 fi
9336
9337                 if test "$cf_cv_utf8_lib" != no ; then
9338                         NCURSES_LIBUTF8=1
9339                 fi
9340         fi
9341
9342 # This is needed on Tru64 5.0 to declare mbstate_t
9343 echo "$as_me:9343: checking if we must include wchar.h to declare mbstate_t" >&5
9344 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9345 if test "${cf_cv_mbstate_t+set}" = set; then
9346   echo $ECHO_N "(cached) $ECHO_C" >&6
9347 else
9348
9349 cat >conftest.$ac_ext <<_ACEOF
9350 #line 9350 "configure"
9351 #include "confdefs.h"
9352
9353 #include <stdlib.h>
9354 #include <stdarg.h>
9355 #include <stdio.h>
9356 #ifdef HAVE_LIBUTF8_H
9357 #include <libutf8.h>
9358 #endif
9359 int
9360 main ()
9361 {
9362 mbstate_t state
9363   ;
9364   return 0;
9365 }
9366 _ACEOF
9367 rm -f conftest.$ac_objext
9368 if { (eval echo "$as_me:9368: \"$ac_compile\"") >&5
9369   (eval $ac_compile) 2>&5
9370   ac_status=$?
9371   echo "$as_me:9371: \$? = $ac_status" >&5
9372   (exit $ac_status); } &&
9373          { ac_try='test -s conftest.$ac_objext'
9374   { (eval echo "$as_me:9374: \"$ac_try\"") >&5
9375   (eval $ac_try) 2>&5
9376   ac_status=$?
9377   echo "$as_me:9377: \$? = $ac_status" >&5
9378   (exit $ac_status); }; }; then
9379   cf_cv_mbstate_t=no
9380 else
9381   echo "$as_me: failed program was:" >&5
9382 cat conftest.$ac_ext >&5
9383 cat >conftest.$ac_ext <<_ACEOF
9384 #line 9384 "configure"
9385 #include "confdefs.h"
9386
9387 #include <stdlib.h>
9388 #include <stdarg.h>
9389 #include <stdio.h>
9390 #include <wchar.h>
9391 #ifdef HAVE_LIBUTF8_H
9392 #include <libutf8.h>
9393 #endif
9394 int
9395 main ()
9396 {
9397 mbstate_t value
9398   ;
9399   return 0;
9400 }
9401 _ACEOF
9402 rm -f conftest.$ac_objext
9403 if { (eval echo "$as_me:9403: \"$ac_compile\"") >&5
9404   (eval $ac_compile) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); } &&
9408          { ac_try='test -s conftest.$ac_objext'
9409   { (eval echo "$as_me:9409: \"$ac_try\"") >&5
9410   (eval $ac_try) 2>&5
9411   ac_status=$?
9412   echo "$as_me:9412: \$? = $ac_status" >&5
9413   (exit $ac_status); }; }; then
9414   cf_cv_mbstate_t=yes
9415 else
9416   echo "$as_me: failed program was:" >&5
9417 cat conftest.$ac_ext >&5
9418 cf_cv_mbstate_t=unknown
9419 fi
9420 rm -f conftest.$ac_objext conftest.$ac_ext
9421 fi
9422 rm -f conftest.$ac_objext conftest.$ac_ext
9423 fi
9424 echo "$as_me:9424: result: $cf_cv_mbstate_t" >&5
9425 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9426
9427 if test "$cf_cv_mbstate_t" = yes ; then
9428         cat >>confdefs.h <<\EOF
9429 #define NEED_WCHAR_H 1
9430 EOF
9431
9432         NEED_WCHAR_H=1
9433 fi
9434
9435 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9436 if test "$cf_cv_mbstate_t" = unknown ; then
9437         NCURSES_MBSTATE_T=1
9438 fi
9439
9440 # This is needed on Tru64 5.0 to declare wchar_t
9441 echo "$as_me:9441: checking if we must include wchar.h to declare wchar_t" >&5
9442 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9443 if test "${cf_cv_wchar_t+set}" = set; then
9444   echo $ECHO_N "(cached) $ECHO_C" >&6
9445 else
9446
9447 cat >conftest.$ac_ext <<_ACEOF
9448 #line 9448 "configure"
9449 #include "confdefs.h"
9450
9451 #include <stdlib.h>
9452 #include <stdarg.h>
9453 #include <stdio.h>
9454 #ifdef HAVE_LIBUTF8_H
9455 #include <libutf8.h>
9456 #endif
9457 int
9458 main ()
9459 {
9460 wchar_t state
9461   ;
9462   return 0;
9463 }
9464 _ACEOF
9465 rm -f conftest.$ac_objext
9466 if { (eval echo "$as_me:9466: \"$ac_compile\"") >&5
9467   (eval $ac_compile) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); } &&
9471          { ac_try='test -s conftest.$ac_objext'
9472   { (eval echo "$as_me:9472: \"$ac_try\"") >&5
9473   (eval $ac_try) 2>&5
9474   ac_status=$?
9475   echo "$as_me:9475: \$? = $ac_status" >&5
9476   (exit $ac_status); }; }; then
9477   cf_cv_wchar_t=no
9478 else
9479   echo "$as_me: failed program was:" >&5
9480 cat conftest.$ac_ext >&5
9481 cat >conftest.$ac_ext <<_ACEOF
9482 #line 9482 "configure"
9483 #include "confdefs.h"
9484
9485 #include <stdlib.h>
9486 #include <stdarg.h>
9487 #include <stdio.h>
9488 #include <wchar.h>
9489 #ifdef HAVE_LIBUTF8_H
9490 #include <libutf8.h>
9491 #endif
9492 int
9493 main ()
9494 {
9495 wchar_t value
9496   ;
9497   return 0;
9498 }
9499 _ACEOF
9500 rm -f conftest.$ac_objext
9501 if { (eval echo "$as_me:9501: \"$ac_compile\"") >&5
9502   (eval $ac_compile) 2>&5
9503   ac_status=$?
9504   echo "$as_me:9504: \$? = $ac_status" >&5
9505   (exit $ac_status); } &&
9506          { ac_try='test -s conftest.$ac_objext'
9507   { (eval echo "$as_me:9507: \"$ac_try\"") >&5
9508   (eval $ac_try) 2>&5
9509   ac_status=$?
9510   echo "$as_me:9510: \$? = $ac_status" >&5
9511   (exit $ac_status); }; }; then
9512   cf_cv_wchar_t=yes
9513 else
9514   echo "$as_me: failed program was:" >&5
9515 cat conftest.$ac_ext >&5
9516 cf_cv_wchar_t=unknown
9517 fi
9518 rm -f conftest.$ac_objext conftest.$ac_ext
9519 fi
9520 rm -f conftest.$ac_objext conftest.$ac_ext
9521 fi
9522 echo "$as_me:9522: result: $cf_cv_wchar_t" >&5
9523 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9524
9525 if test "$cf_cv_wchar_t" = yes ; then
9526         cat >>confdefs.h <<\EOF
9527 #define NEED_WCHAR_H 1
9528 EOF
9529
9530         NEED_WCHAR_H=1
9531 fi
9532
9533 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9534 if test "$cf_cv_wchar_t" = unknown ; then
9535         NCURSES_WCHAR_T=1
9536 fi
9537
9538 # if we find wchar_t in either place, use substitution to provide a fallback.
9539 if test "$cf_cv_wchar_t" != unknown ; then
9540         NCURSES_OK_WCHAR_T=1
9541 fi
9542
9543 # This is needed on Tru64 5.0 to declare wint_t
9544 echo "$as_me:9544: checking if we must include wchar.h to declare wint_t" >&5
9545 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9546 if test "${cf_cv_wint_t+set}" = set; then
9547   echo $ECHO_N "(cached) $ECHO_C" >&6
9548 else
9549
9550 cat >conftest.$ac_ext <<_ACEOF
9551 #line 9551 "configure"
9552 #include "confdefs.h"
9553
9554 #include <stdlib.h>
9555 #include <stdarg.h>
9556 #include <stdio.h>
9557 #ifdef HAVE_LIBUTF8_H
9558 #include <libutf8.h>
9559 #endif
9560 int
9561 main ()
9562 {
9563 wint_t state
9564   ;
9565   return 0;
9566 }
9567 _ACEOF
9568 rm -f conftest.$ac_objext
9569 if { (eval echo "$as_me:9569: \"$ac_compile\"") >&5
9570   (eval $ac_compile) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); } &&
9574          { ac_try='test -s conftest.$ac_objext'
9575   { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576   (eval $ac_try) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); }; }; then
9580   cf_cv_wint_t=no
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584 cat >conftest.$ac_ext <<_ACEOF
9585 #line 9585 "configure"
9586 #include "confdefs.h"
9587
9588 #include <stdlib.h>
9589 #include <stdarg.h>
9590 #include <stdio.h>
9591 #include <wchar.h>
9592 #ifdef HAVE_LIBUTF8_H
9593 #include <libutf8.h>
9594 #endif
9595 int
9596 main ()
9597 {
9598 wint_t value
9599   ;
9600   return 0;
9601 }
9602 _ACEOF
9603 rm -f conftest.$ac_objext
9604 if { (eval echo "$as_me:9604: \"$ac_compile\"") >&5
9605   (eval $ac_compile) 2>&5
9606   ac_status=$?
9607   echo "$as_me:9607: \$? = $ac_status" >&5
9608   (exit $ac_status); } &&
9609          { ac_try='test -s conftest.$ac_objext'
9610   { (eval echo "$as_me:9610: \"$ac_try\"") >&5
9611   (eval $ac_try) 2>&5
9612   ac_status=$?
9613   echo "$as_me:9613: \$? = $ac_status" >&5
9614   (exit $ac_status); }; }; then
9615   cf_cv_wint_t=yes
9616 else
9617   echo "$as_me: failed program was:" >&5
9618 cat conftest.$ac_ext >&5
9619 cf_cv_wint_t=unknown
9620 fi
9621 rm -f conftest.$ac_objext conftest.$ac_ext
9622 fi
9623 rm -f conftest.$ac_objext conftest.$ac_ext
9624 fi
9625 echo "$as_me:9625: result: $cf_cv_wint_t" >&5
9626 echo "${ECHO_T}$cf_cv_wint_t" >&6
9627
9628 if test "$cf_cv_wint_t" = yes ; then
9629         cat >>confdefs.h <<\EOF
9630 #define NEED_WCHAR_H 1
9631 EOF
9632
9633         NEED_WCHAR_H=1
9634 fi
9635
9636 # if we do not find wint_t in either place, use substitution to provide a fallback.
9637 if test "$cf_cv_wint_t" = unknown ; then
9638         NCURSES_WINT_T=1
9639 fi
9640
9641 # if we find wint_t in either place, use substitution to provide a fallback.
9642 if test "$cf_cv_wint_t" != unknown ; then
9643         NCURSES_OK_WINT_T=1
9644 fi
9645
9646         if test "$NCURSES_MBSTATE_T" != 0; then
9647                 cat >>confdefs.h <<\EOF
9648 #define NEED_MBSTATE_T_DEF 1
9649 EOF
9650
9651         fi
9652 fi
9653
9654 ###   use option --disable-lp64 to allow long chtype
9655 case $cf_cv_abi_version in
9656 [345]*)
9657         default_with_lp64=no
9658         ;;
9659 *)
9660         default_with_lp64=yes
9661         ;;
9662 esac
9663
9664 echo "$as_me:9664: checking whether to enable _LP64 definition in curses.h" >&5
9665 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9666
9667 # Check whether --enable-lp64 or --disable-lp64 was given.
9668 if test "${enable_lp64+set}" = set; then
9669   enableval="$enable_lp64"
9670   with_lp64=$enableval
9671 else
9672   with_lp64=$default_with_lp64
9673 fi;
9674 echo "$as_me:9674: result: $with_lp64" >&5
9675 echo "${ECHO_T}$with_lp64" >&6
9676
9677 if test "$with_lp64" = yes ; then
9678         cf_cv_enable_lp64=1
9679 else
9680         cf_cv_enable_lp64=0
9681 fi
9682
9683 # Check whether --enable-largefile or --disable-largefile was given.
9684 if test "${enable_largefile+set}" = set; then
9685   enableval="$enable_largefile"
9686
9687 fi;
9688 if test "$enable_largefile" != no; then
9689
9690   echo "$as_me:9690: checking for special C compiler options needed for large files" >&5
9691 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9692 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9693   echo $ECHO_N "(cached) $ECHO_C" >&6
9694 else
9695   ac_cv_sys_largefile_CC=no
9696      if test "$GCC" != yes; then
9697        ac_save_CC=$CC
9698        while :; do
9699          # IRIX 6.2 and later do not support large files by default,
9700          # so use the C compiler's -n32 option if that helps.
9701          cat >conftest.$ac_ext <<_ACEOF
9702 #line 9702 "configure"
9703 #include "confdefs.h"
9704 #include <sys/types.h>
9705  /* Check that off_t can represent 2**63 - 1 correctly.
9706     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9707     since some C++ compilers masquerading as C compilers
9708     incorrectly reject 9223372036854775807.  */
9709 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9710   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9711                        && LARGE_OFF_T % 2147483647 == 1)
9712                       ? 1 : -1];
9713 int
9714 main ()
9715 {
9716
9717   ;
9718   return 0;
9719 }
9720 _ACEOF
9721          rm -f conftest.$ac_objext
9722 if { (eval echo "$as_me:9722: \"$ac_compile\"") >&5
9723   (eval $ac_compile) 2>&5
9724   ac_status=$?
9725   echo "$as_me:9725: \$? = $ac_status" >&5
9726   (exit $ac_status); } &&
9727          { ac_try='test -s conftest.$ac_objext'
9728   { (eval echo "$as_me:9728: \"$ac_try\"") >&5
9729   (eval $ac_try) 2>&5
9730   ac_status=$?
9731   echo "$as_me:9731: \$? = $ac_status" >&5
9732   (exit $ac_status); }; }; then
9733   break
9734 else
9735   echo "$as_me: failed program was:" >&5
9736 cat conftest.$ac_ext >&5
9737 fi
9738 rm -f conftest.$ac_objext
9739          CC="$CC -n32"
9740          rm -f conftest.$ac_objext
9741 if { (eval echo "$as_me:9741: \"$ac_compile\"") >&5
9742   (eval $ac_compile) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -s conftest.$ac_objext'
9747   { (eval echo "$as_me:9747: \"$ac_try\"") >&5
9748   (eval $ac_try) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); }; }; then
9752   ac_cv_sys_largefile_CC=' -n32'; break
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756 fi
9757 rm -f conftest.$ac_objext
9758          break
9759        done
9760        CC=$ac_save_CC
9761        rm -f conftest.$ac_ext
9762     fi
9763 fi
9764 echo "$as_me:9764: result: $ac_cv_sys_largefile_CC" >&5
9765 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9766   if test "$ac_cv_sys_largefile_CC" != no; then
9767     CC=$CC$ac_cv_sys_largefile_CC
9768   fi
9769
9770   echo "$as_me:9770: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9771 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9772 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9773   echo $ECHO_N "(cached) $ECHO_C" >&6
9774 else
9775   while :; do
9776   ac_cv_sys_file_offset_bits=no
9777   cat >conftest.$ac_ext <<_ACEOF
9778 #line 9778 "configure"
9779 #include "confdefs.h"
9780 #include <sys/types.h>
9781  /* Check that off_t can represent 2**63 - 1 correctly.
9782     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9783     since some C++ compilers masquerading as C compilers
9784     incorrectly reject 9223372036854775807.  */
9785 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9786   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9787                        && LARGE_OFF_T % 2147483647 == 1)
9788                       ? 1 : -1];
9789 int
9790 main ()
9791 {
9792
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799   (eval $ac_compile) 2>&5
9800   ac_status=$?
9801   echo "$as_me:9801: \$? = $ac_status" >&5
9802   (exit $ac_status); } &&
9803          { ac_try='test -s conftest.$ac_objext'
9804   { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805   (eval $ac_try) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); }; }; then
9809   break
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 fi
9814 rm -f conftest.$ac_objext conftest.$ac_ext
9815   cat >conftest.$ac_ext <<_ACEOF
9816 #line 9816 "configure"
9817 #include "confdefs.h"
9818 #define _FILE_OFFSET_BITS 64
9819 #include <sys/types.h>
9820  /* Check that off_t can represent 2**63 - 1 correctly.
9821     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9822     since some C++ compilers masquerading as C compilers
9823     incorrectly reject 9223372036854775807.  */
9824 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9825   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9826                        && LARGE_OFF_T % 2147483647 == 1)
9827                       ? 1 : -1];
9828 int
9829 main ()
9830 {
9831
9832   ;
9833   return 0;
9834 }
9835 _ACEOF
9836 rm -f conftest.$ac_objext
9837 if { (eval echo "$as_me:9837: \"$ac_compile\"") >&5
9838   (eval $ac_compile) 2>&5
9839   ac_status=$?
9840   echo "$as_me:9840: \$? = $ac_status" >&5
9841   (exit $ac_status); } &&
9842          { ac_try='test -s conftest.$ac_objext'
9843   { (eval echo "$as_me:9843: \"$ac_try\"") >&5
9844   (eval $ac_try) 2>&5
9845   ac_status=$?
9846   echo "$as_me:9846: \$? = $ac_status" >&5
9847   (exit $ac_status); }; }; then
9848   ac_cv_sys_file_offset_bits=64; break
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852 fi
9853 rm -f conftest.$ac_objext conftest.$ac_ext
9854   break
9855 done
9856 fi
9857 echo "$as_me:9857: result: $ac_cv_sys_file_offset_bits" >&5
9858 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9859 if test "$ac_cv_sys_file_offset_bits" != no; then
9860
9861 cat >>confdefs.h <<EOF
9862 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9863 EOF
9864
9865 fi
9866 rm -rf conftest*
9867   echo "$as_me:9867: checking for _LARGE_FILES value needed for large files" >&5
9868 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9869 if test "${ac_cv_sys_large_files+set}" = set; then
9870   echo $ECHO_N "(cached) $ECHO_C" >&6
9871 else
9872   while :; do
9873   ac_cv_sys_large_files=no
9874   cat >conftest.$ac_ext <<_ACEOF
9875 #line 9875 "configure"
9876 #include "confdefs.h"
9877 #include <sys/types.h>
9878  /* Check that off_t can represent 2**63 - 1 correctly.
9879     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9880     since some C++ compilers masquerading as C compilers
9881     incorrectly reject 9223372036854775807.  */
9882 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9883   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9884                        && LARGE_OFF_T % 2147483647 == 1)
9885                       ? 1 : -1];
9886 int
9887 main ()
9888 {
9889
9890   ;
9891   return 0;
9892 }
9893 _ACEOF
9894 rm -f conftest.$ac_objext
9895 if { (eval echo "$as_me:9895: \"$ac_compile\"") >&5
9896   (eval $ac_compile) 2>&5
9897   ac_status=$?
9898   echo "$as_me:9898: \$? = $ac_status" >&5
9899   (exit $ac_status); } &&
9900          { ac_try='test -s conftest.$ac_objext'
9901   { (eval echo "$as_me:9901: \"$ac_try\"") >&5
9902   (eval $ac_try) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); }; }; then
9906   break
9907 else
9908   echo "$as_me: failed program was:" >&5
9909 cat conftest.$ac_ext >&5
9910 fi
9911 rm -f conftest.$ac_objext conftest.$ac_ext
9912   cat >conftest.$ac_ext <<_ACEOF
9913 #line 9913 "configure"
9914 #include "confdefs.h"
9915 #define _LARGE_FILES 1
9916 #include <sys/types.h>
9917  /* Check that off_t can represent 2**63 - 1 correctly.
9918     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9919     since some C++ compilers masquerading as C compilers
9920     incorrectly reject 9223372036854775807.  */
9921 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9922   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9923                        && LARGE_OFF_T % 2147483647 == 1)
9924                       ? 1 : -1];
9925 int
9926 main ()
9927 {
9928
9929   ;
9930   return 0;
9931 }
9932 _ACEOF
9933 rm -f conftest.$ac_objext
9934 if { (eval echo "$as_me:9934: \"$ac_compile\"") >&5
9935   (eval $ac_compile) 2>&5
9936   ac_status=$?
9937   echo "$as_me:9937: \$? = $ac_status" >&5
9938   (exit $ac_status); } &&
9939          { ac_try='test -s conftest.$ac_objext'
9940   { (eval echo "$as_me:9940: \"$ac_try\"") >&5
9941   (eval $ac_try) 2>&5
9942   ac_status=$?
9943   echo "$as_me:9943: \$? = $ac_status" >&5
9944   (exit $ac_status); }; }; then
9945   ac_cv_sys_large_files=1; break
9946 else
9947   echo "$as_me: failed program was:" >&5
9948 cat conftest.$ac_ext >&5
9949 fi
9950 rm -f conftest.$ac_objext conftest.$ac_ext
9951   break
9952 done
9953 fi
9954 echo "$as_me:9954: result: $ac_cv_sys_large_files" >&5
9955 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9956 if test "$ac_cv_sys_large_files" != no; then
9957
9958 cat >>confdefs.h <<EOF
9959 #define _LARGE_FILES $ac_cv_sys_large_files
9960 EOF
9961
9962 fi
9963 rm -rf conftest*
9964 fi
9965
9966     if test "$enable_largefile" != no ; then
9967         echo "$as_me:9967: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9968 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9969 if test "${ac_cv_sys_largefile_source+set}" = set; then
9970   echo $ECHO_N "(cached) $ECHO_C" >&6
9971 else
9972   while :; do
9973   ac_cv_sys_largefile_source=no
9974   cat >conftest.$ac_ext <<_ACEOF
9975 #line 9975 "configure"
9976 #include "confdefs.h"
9977 #include <stdio.h>
9978 int
9979 main ()
9980 {
9981 return !fseeko;
9982   ;
9983   return 0;
9984 }
9985 _ACEOF
9986 rm -f conftest.$ac_objext
9987 if { (eval echo "$as_me:9987: \"$ac_compile\"") >&5
9988   (eval $ac_compile) 2>&5
9989   ac_status=$?
9990   echo "$as_me:9990: \$? = $ac_status" >&5
9991   (exit $ac_status); } &&
9992          { ac_try='test -s conftest.$ac_objext'
9993   { (eval echo "$as_me:9993: \"$ac_try\"") >&5
9994   (eval $ac_try) 2>&5
9995   ac_status=$?
9996   echo "$as_me:9996: \$? = $ac_status" >&5
9997   (exit $ac_status); }; }; then
9998   break
9999 else
10000   echo "$as_me: failed program was:" >&5
10001 cat conftest.$ac_ext >&5
10002 fi
10003 rm -f conftest.$ac_objext conftest.$ac_ext
10004   cat >conftest.$ac_ext <<_ACEOF
10005 #line 10005 "configure"
10006 #include "confdefs.h"
10007 #define _LARGEFILE_SOURCE 1
10008 #include <stdio.h>
10009 int
10010 main ()
10011 {
10012 return !fseeko;
10013   ;
10014   return 0;
10015 }
10016 _ACEOF
10017 rm -f conftest.$ac_objext
10018 if { (eval echo "$as_me:10018: \"$ac_compile\"") >&5
10019   (eval $ac_compile) 2>&5
10020   ac_status=$?
10021   echo "$as_me:10021: \$? = $ac_status" >&5
10022   (exit $ac_status); } &&
10023          { ac_try='test -s conftest.$ac_objext'
10024   { (eval echo "$as_me:10024: \"$ac_try\"") >&5
10025   (eval $ac_try) 2>&5
10026   ac_status=$?
10027   echo "$as_me:10027: \$? = $ac_status" >&5
10028   (exit $ac_status); }; }; then
10029   ac_cv_sys_largefile_source=1; break
10030 else
10031   echo "$as_me: failed program was:" >&5
10032 cat conftest.$ac_ext >&5
10033 fi
10034 rm -f conftest.$ac_objext conftest.$ac_ext
10035   break
10036 done
10037 fi
10038 echo "$as_me:10038: result: $ac_cv_sys_largefile_source" >&5
10039 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10040 if test "$ac_cv_sys_largefile_source" != no; then
10041
10042 cat >>confdefs.h <<EOF
10043 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10044 EOF
10045
10046 fi
10047 rm -rf conftest*
10048
10049 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10050 # in glibc 2.1.3, but that breaks too many other things.
10051 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10052 echo "$as_me:10052: checking for fseeko" >&5
10053 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10054 if test "${ac_cv_func_fseeko+set}" = set; then
10055   echo $ECHO_N "(cached) $ECHO_C" >&6
10056 else
10057   cat >conftest.$ac_ext <<_ACEOF
10058 #line 10058 "configure"
10059 #include "confdefs.h"
10060 #include <stdio.h>
10061 int
10062 main ()
10063 {
10064 return fseeko && fseeko (stdin, 0, 0);
10065   ;
10066   return 0;
10067 }
10068 _ACEOF
10069 rm -f conftest.$ac_objext conftest$ac_exeext
10070 if { (eval echo "$as_me:10070: \"$ac_link\"") >&5
10071   (eval $ac_link) 2>&5
10072   ac_status=$?
10073   echo "$as_me:10073: \$? = $ac_status" >&5
10074   (exit $ac_status); } &&
10075          { ac_try='test -s conftest$ac_exeext'
10076   { (eval echo "$as_me:10076: \"$ac_try\"") >&5
10077   (eval $ac_try) 2>&5
10078   ac_status=$?
10079   echo "$as_me:10079: \$? = $ac_status" >&5
10080   (exit $ac_status); }; }; then
10081   ac_cv_func_fseeko=yes
10082 else
10083   echo "$as_me: failed program was:" >&5
10084 cat conftest.$ac_ext >&5
10085 ac_cv_func_fseeko=no
10086 fi
10087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10088 fi
10089 echo "$as_me:10089: result: $ac_cv_func_fseeko" >&5
10090 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10091 if test $ac_cv_func_fseeko = yes; then
10092
10093 cat >>confdefs.h <<\EOF
10094 #define HAVE_FSEEKO 1
10095 EOF
10096
10097 fi
10098
10099         # Normally we would collect these definitions in the config.h,
10100         # but (like _XOPEN_SOURCE), some environments rely on having these
10101         # defined before any of the system headers are included.  Another
10102         # case comes up with C++, e.g., on AIX the compiler compiles the
10103         # header files by themselves before looking at the body files it is
10104         # told to compile.  For ncurses, those header files do not include
10105         # the config.h
10106         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10107         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10108         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10109
10110         echo "$as_me:10110: checking whether to use struct dirent64" >&5
10111 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10112 if test "${cf_cv_struct_dirent64+set}" = set; then
10113   echo $ECHO_N "(cached) $ECHO_C" >&6
10114 else
10115
10116                 cat >conftest.$ac_ext <<_ACEOF
10117 #line 10117 "configure"
10118 #include "confdefs.h"
10119
10120 #include <sys/types.h>
10121 #include <dirent.h>
10122
10123 int
10124 main ()
10125 {
10126
10127                 /* if transitional largefile support is setup, this is true */
10128                 extern struct dirent64 * readdir(DIR *);
10129                 struct dirent64 *x = readdir((DIR *)0);
10130                 struct dirent *y = readdir((DIR *)0);
10131                 int z = x - y;
10132
10133   ;
10134   return 0;
10135 }
10136 _ACEOF
10137 rm -f conftest.$ac_objext
10138 if { (eval echo "$as_me:10138: \"$ac_compile\"") >&5
10139   (eval $ac_compile) 2>&5
10140   ac_status=$?
10141   echo "$as_me:10141: \$? = $ac_status" >&5
10142   (exit $ac_status); } &&
10143          { ac_try='test -s conftest.$ac_objext'
10144   { (eval echo "$as_me:10144: \"$ac_try\"") >&5
10145   (eval $ac_try) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); }; }; then
10149   cf_cv_struct_dirent64=yes
10150 else
10151   echo "$as_me: failed program was:" >&5
10152 cat conftest.$ac_ext >&5
10153 cf_cv_struct_dirent64=no
10154 fi
10155 rm -f conftest.$ac_objext conftest.$ac_ext
10156
10157 fi
10158 echo "$as_me:10158: result: $cf_cv_struct_dirent64" >&5
10159 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10160         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
10161 #define HAVE_STRUCT_DIRENT64 1
10162 EOF
10163
10164     fi
10165
10166 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10167 echo "$as_me:10167: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10168 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10169
10170 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10171 if test "${enable_tparm_varargs+set}" = set; then
10172   enableval="$enable_tparm_varargs"
10173   with_tparm_varargs=$enableval
10174 else
10175   with_tparm_varargs=yes
10176 fi;
10177 echo "$as_me:10177: result: $with_tparm_varargs" >&5
10178 echo "${ECHO_T}$with_tparm_varargs" >&6
10179 NCURSES_TPARM_VARARGS=0
10180 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
10181
10182 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10183 if test "$with_ticlib" != no ; then
10184 echo "$as_me:10184: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10185 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10186
10187 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10188 if test "${enable_tic_depends+set}" = set; then
10189   enableval="$enable_tic_depends"
10190   with_tic_depends=$enableval
10191 else
10192   with_tic_depends=yes
10193 fi;
10194 echo "$as_me:10194: result: $with_tic_depends" >&5
10195 echo "${ECHO_T}$with_tic_depends" >&6
10196 else
10197         with_tic_depends=no
10198 fi
10199
10200 ###   use option --with-bool to override bool's type
10201 echo "$as_me:10201: checking for type of bool" >&5
10202 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10203
10204 # Check whether --with-bool or --without-bool was given.
10205 if test "${with_bool+set}" = set; then
10206   withval="$with_bool"
10207   NCURSES_BOOL="$withval"
10208 else
10209   NCURSES_BOOL=auto
10210 fi;
10211 echo "$as_me:10211: result: $NCURSES_BOOL" >&5
10212 echo "${ECHO_T}$NCURSES_BOOL" >&6
10213
10214 echo "$as_me:10214: checking for alternate terminal capabilities file" >&5
10215 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10216
10217 # Check whether --with-caps or --without-caps was given.
10218 if test "${with_caps+set}" = set; then
10219   withval="$with_caps"
10220   TERMINFO_CAPS=Caps.$withval
10221 else
10222   TERMINFO_CAPS=Caps
10223 fi;
10224 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10225 echo "$as_me:10225: result: $TERMINFO_CAPS" >&5
10226 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10227
10228 ###   use option --with-chtype to override chtype's type
10229 echo "$as_me:10229: checking for type of chtype" >&5
10230 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10231
10232 # Check whether --with-chtype or --without-chtype was given.
10233 if test "${with_chtype+set}" = set; then
10234   withval="$with_chtype"
10235   NCURSES_CHTYPE="$withval"
10236 else
10237   NCURSES_CHTYPE=auto
10238 fi;
10239 echo "$as_me:10239: result: $NCURSES_CHTYPE" >&5
10240 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10241
10242 ###   use option --with-ospeed to override ospeed's type
10243 echo "$as_me:10243: checking for type of ospeed" >&5
10244 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10245
10246 # Check whether --with-ospeed or --without-ospeed was given.
10247 if test "${with_ospeed+set}" = set; then
10248   withval="$with_ospeed"
10249   NCURSES_OSPEED="$withval"
10250 else
10251   NCURSES_OSPEED=short
10252 fi;
10253 echo "$as_me:10253: result: $NCURSES_OSPEED" >&5
10254 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10255
10256 ###   use option --with-mmask-t to override mmask_t's type
10257 echo "$as_me:10257: checking for type of mmask_t" >&5
10258 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10259
10260 # Check whether --with-mmask-t or --without-mmask-t was given.
10261 if test "${with_mmask_t+set}" = set; then
10262   withval="$with_mmask_t"
10263   NCURSES_MMASK_T="$withval"
10264 else
10265   NCURSES_MMASK_T=auto
10266 fi;
10267 echo "$as_me:10267: result: $NCURSES_MMASK_T" >&5
10268 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10269
10270 ###   use option --with-ccharw-max to override CCHARW_MAX size
10271 echo "$as_me:10271: checking for size CCHARW_MAX" >&5
10272 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10273
10274 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10275 if test "${with_ccharw_max+set}" = set; then
10276   withval="$with_ccharw_max"
10277   NCURSES_CCHARW_MAX="$withval"
10278 else
10279   NCURSES_CCHARW_MAX=5
10280 fi;
10281 echo "$as_me:10281: result: $NCURSES_CCHARW_MAX" >&5
10282 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10283
10284 ###   use option --with-tparm-arg to override tparm's argument type
10285 echo "$as_me:10285: checking for type of tparm args" >&5
10286 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10287
10288 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10289 if test "${with_tparm_arg+set}" = set; then
10290   withval="$with_tparm_arg"
10291   NCURSES_TPARM_ARG="$withval"
10292 else
10293   NCURSES_TPARM_ARG=long
10294 fi;
10295 echo "$as_me:10295: result: $NCURSES_TPARM_ARG" >&5
10296 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10297
10298 ### Enable compiling-in rcs id's
10299 echo "$as_me:10299: checking if RCS identifiers should be compiled-in" >&5
10300 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10301
10302 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10303 if test "${with_rcs_ids+set}" = set; then
10304   withval="$with_rcs_ids"
10305   with_rcs_ids=$withval
10306 else
10307   with_rcs_ids=no
10308 fi;
10309 echo "$as_me:10309: result: $with_rcs_ids" >&5
10310 echo "${ECHO_T}$with_rcs_ids" >&6
10311 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
10312 #define USE_RCS_IDS 1
10313 EOF
10314
10315 ###############################################################################
10316
10317 echo "$as_me:10317: checking format of man-pages" >&5
10318 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10319
10320 # Check whether --with-manpage-format or --without-manpage-format was given.
10321 if test "${with_manpage_format+set}" = set; then
10322   withval="$with_manpage_format"
10323   MANPAGE_FORMAT=$withval
10324 else
10325   MANPAGE_FORMAT=unknown
10326 fi;
10327
10328 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10329 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10330
10331 cf_unknown=
10332
10333 case $MANPAGE_FORMAT in
10334 unknown)
10335   if test -z "$MANPATH" ; then
10336     MANPATH="/usr/man:/usr/share/man"
10337   fi
10338
10339   # look for the 'date' man-page (it's most likely to be installed!)
10340   MANPAGE_FORMAT=
10341   cf_preform=no
10342   cf_catonly=yes
10343   cf_example=date
10344
10345   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10346   for cf_dir in $MANPATH; do
10347     test -z "$cf_dir" && cf_dir=/usr/man
10348     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
10349     do
10350       cf_test=`echo $cf_name | sed -e 's/*//'`
10351       if test "x$cf_test" = "x$cf_name" ; then
10352
10353         case "$cf_name" in
10354         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10355         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10356         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10357         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10358         esac
10359
10360         case "$cf_name" in
10361         $cf_dir/man*)
10362           cf_catonly=no
10363           ;;
10364         $cf_dir/cat*)
10365           cf_preform=yes
10366           ;;
10367         esac
10368         break
10369       fi
10370
10371       # if we found a match in either man* or cat*, stop looking
10372       if test -n "$MANPAGE_FORMAT" ; then
10373         cf_found=no
10374         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10375         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10376         case "$cf_name" in
10377         $cf_dir/cat*)
10378           cf_found=yes
10379           ;;
10380         esac
10381         test $cf_found=yes && break
10382       fi
10383     done
10384     # only check the first directory in $MANPATH where we find manpages
10385     if test -n "$MANPAGE_FORMAT" ; then
10386        break
10387     fi
10388   done
10389   # if we did not find the example, just assume it is normal
10390   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10391   IFS="$ac_save_ifs"
10392   ;;
10393 *)
10394   for cf_option in $MANPAGE_FORMAT; do
10395      case $cf_option in #(vi
10396      gzip|compress|BSDI|normal|formatted|catonly)
10397        ;;
10398      *)
10399        cf_unknown="$cf_unknown $cf_option"
10400        ;;
10401      esac
10402   done
10403   ;;
10404 esac
10405
10406 echo "$as_me:10406: result: $MANPAGE_FORMAT" >&5
10407 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10408 if test -n "$cf_unknown" ; then
10409   { echo "$as_me:10409: WARNING: Unexpected manpage-format $cf_unknown" >&5
10410 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10411 fi
10412
10413 echo "$as_me:10413: checking for manpage renaming" >&5
10414 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10415
10416 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10417 if test "${with_manpage_renames+set}" = set; then
10418   withval="$with_manpage_renames"
10419   MANPAGE_RENAMES=$withval
10420 else
10421   MANPAGE_RENAMES=yes
10422 fi;
10423
10424 case ".$MANPAGE_RENAMES" in #(vi
10425 .no) #(vi
10426   ;;
10427 .|.yes)
10428   # Debian 'man' program?
10429   if test -f /etc/debian_version ; then
10430     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10431   else
10432     MANPAGE_RENAMES=no
10433   fi
10434   ;;
10435 esac
10436
10437 if test "$MANPAGE_RENAMES" != no ; then
10438   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10439     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10440   elif test ! -f $MANPAGE_RENAMES ; then
10441     { { echo "$as_me:10441: error: not a filename: $MANPAGE_RENAMES" >&5
10442 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10443    { (exit 1); exit 1; }; }
10444   fi
10445
10446   test ! -d man && mkdir man
10447
10448   # Construct a sed-script to perform renaming within man-pages
10449   if test -n "$MANPAGE_RENAMES" ; then
10450     test ! -d man && mkdir man
10451     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10452   fi
10453 fi
10454
10455 echo "$as_me:10455: result: $MANPAGE_RENAMES" >&5
10456 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10457
10458 echo "$as_me:10458: checking if manpage aliases will be installed" >&5
10459 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10460
10461 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10462 if test "${with_manpage_aliases+set}" = set; then
10463   withval="$with_manpage_aliases"
10464   MANPAGE_ALIASES=$withval
10465 else
10466   MANPAGE_ALIASES=yes
10467 fi;
10468
10469 echo "$as_me:10469: result: $MANPAGE_ALIASES" >&5
10470 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10471
10472 case "x$LN_S" in #(vi
10473 xln*) #(vi
10474         cf_use_symlinks=yes
10475         ;;
10476 *)
10477         cf_use_symlinks=no
10478         ;;
10479 esac
10480
10481 MANPAGE_SYMLINKS=no
10482 if test "$MANPAGE_ALIASES" = yes ; then
10483 echo "$as_me:10483: checking if manpage symlinks should be used" >&5
10484 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10485
10486 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10487 if test "${with_manpage_symlinks+set}" = set; then
10488   withval="$with_manpage_symlinks"
10489   MANPAGE_SYMLINKS=$withval
10490 else
10491   MANPAGE_SYMLINKS=$cf_use_symlinks
10492 fi;
10493
10494 if test "$$cf_use_symlinks" = no; then
10495 if test "$MANPAGE_SYMLINKS" = yes ; then
10496         { echo "$as_me:10496: WARNING: cannot make symlinks" >&5
10497 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10498         MANPAGE_SYMLINKS=no
10499 fi
10500 fi
10501
10502 echo "$as_me:10502: result: $MANPAGE_SYMLINKS" >&5
10503 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10504 fi
10505
10506 echo "$as_me:10506: checking for manpage tbl" >&5
10507 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10508
10509 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10510 if test "${with_manpage_tbl+set}" = set; then
10511   withval="$with_manpage_tbl"
10512   MANPAGE_TBL=$withval
10513 else
10514   MANPAGE_TBL=no
10515 fi;
10516
10517 echo "$as_me:10517: result: $MANPAGE_TBL" >&5
10518 echo "${ECHO_T}$MANPAGE_TBL" >&6
10519
10520   if test "$prefix" = "NONE" ; then
10521      cf_prefix="$ac_default_prefix"
10522   else
10523      cf_prefix="$prefix"
10524   fi
10525
10526   case "$MANPAGE_FORMAT" in # (vi
10527   *catonly*) # (vi
10528     cf_format=yes
10529     cf_inboth=no
10530     ;;
10531   *formatted*) # (vi
10532     cf_format=yes
10533     cf_inboth=yes
10534     ;;
10535   *)
10536     cf_format=no
10537     cf_inboth=no
10538     ;;
10539   esac
10540
10541 test ! -d man && mkdir man
10542
10543 cf_so_strip=
10544 cf_compress=
10545 case "$MANPAGE_FORMAT" in #(vi
10546 *compress*) #(vi
10547         cf_so_strip="Z"
10548         cf_compress=compress
10549   ;;
10550 *gzip*)
10551         cf_so_strip="gz"
10552         cf_compress=gzip
10553   ;;
10554 esac
10555
10556 cf_edit_man=./edit_man.sh
10557 cf_man_alias=`pwd`/man_alias.sed
10558
10559 cat >$cf_edit_man <<CF_EOF
10560 #! /bin/sh
10561 # this script is generated by the configure-script CF_MAN_PAGES macro.
10562
10563 prefix="$cf_prefix"
10564 datadir="$datadir"
10565
10566 NCURSES_MAJOR="$NCURSES_MAJOR"
10567 NCURSES_MINOR="$NCURSES_MINOR"
10568 NCURSES_PATCH="$NCURSES_PATCH"
10569
10570 NCURSES_OSPEED="$NCURSES_OSPEED"
10571 TERMINFO="$TERMINFO"
10572
10573 INSTALL="$INSTALL"
10574 INSTALL_DATA="$INSTALL_DATA"
10575
10576 transform="$program_transform_name"
10577
10578 TMP=\${TMPDIR:=/tmp}/man\$\$
10579 trap "rm -f \$TMP" 0 1 2 5 15
10580
10581 form=\$1
10582 shift || exit 1
10583
10584 verb=\$1
10585 shift || exit 1
10586
10587 mandir=\$1
10588 shift || exit 1
10589
10590 srcdir=\$1
10591 top_srcdir=\$srcdir/..
10592 shift || exit 1
10593
10594 if test "\$form" = normal ; then
10595         if test "$cf_format" = yes ; then
10596         if test "$cf_inboth" = no ; then
10597                 sh \$0 format \$verb \$mandir \$srcdir \$*
10598                 exit $?
10599         fi
10600         fi
10601         cf_subdir=\$mandir/man
10602         cf_tables=$MANPAGE_TBL
10603 else
10604         cf_subdir=\$mandir/cat
10605         cf_tables=yes
10606 fi
10607
10608 # process the list of source-files
10609 for i in \$* ; do
10610 case \$i in #(vi
10611 *.orig|*.rej) ;; #(vi
10612 *.[0-9]*)
10613         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10614         if test \$verb = installing ; then
10615         if test ! -d \$cf_subdir\${section} ; then
10616                 mkdir -p \$cf_subdir\$section
10617         fi
10618         fi
10619
10620         # replace variables in man page
10621         if test ! -f $cf_man_alias ; then
10622 cat >>$cf_man_alias <<-CF_EOF2
10623                 s,@DATADIR@,\$datadir,g
10624                 s,@TERMINFO@,\$TERMINFO,g
10625                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10626                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10627                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10628                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10629 CF_EOF
10630
10631         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10632         do
10633                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10634                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10635 cat >>$cf_edit_man <<-CF_EOF
10636                 s,@$cf_NAME@,$cf_name,g
10637 CF_EOF
10638         done
10639
10640 cat >>$cf_edit_man <<CF_EOF
10641 CF_EOF2
10642                 echo "...made $cf_man_alias"
10643         fi
10644
10645         aliases=
10646         cf_source=\`basename \$i\`
10647         inalias=\$cf_source
10648         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10649         if test ! -f \$inalias ; then
10650                 echo .. skipped \$cf_source
10651                 continue
10652         fi
10653 CF_EOF
10654
10655 if test "$MANPAGE_ALIASES" != no ; then
10656 cat >>$cf_edit_man <<CF_EOF
10657         nCurses=ignore.3x
10658         test $with_curses_h = yes && nCurses=ncurses.3x
10659         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10660 CF_EOF
10661 fi
10662
10663 if test "$MANPAGE_RENAMES" = no ; then
10664 cat >>$cf_edit_man <<CF_EOF
10665         # perform program transformations for section 1 man pages
10666         if test \$section = 1 ; then
10667                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10668         else
10669                 cf_target=\$cf_subdir\${section}/\$cf_source
10670         fi
10671 CF_EOF
10672 else
10673 cat >>$cf_edit_man <<CF_EOF
10674         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10675         if test -z "\$cf_target" ; then
10676                 echo '? missing rename for '\$cf_source
10677                 cf_target="\$cf_source"
10678         fi
10679         cf_target="\$cf_subdir\${section}/\${cf_target}"
10680
10681 CF_EOF
10682 fi
10683
10684 cat >>$cf_edit_man <<CF_EOF
10685         sed     -f $cf_man_alias \\
10686 CF_EOF
10687
10688 if test -f $MANPAGE_RENAMES ; then
10689 cat >>$cf_edit_man <<CF_EOF
10690                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10691 CF_EOF
10692 else
10693 cat >>$cf_edit_man <<CF_EOF
10694                 < \$i >\$TMP
10695 CF_EOF
10696 fi
10697
10698 cat >>$cf_edit_man <<CF_EOF
10699 if test \$cf_tables = yes ; then
10700         tbl \$TMP >\$TMP.out
10701         mv \$TMP.out \$TMP
10702 fi
10703 CF_EOF
10704
10705 if test $with_overwrite != yes ; then
10706 cat >>$cf_edit_man <<CF_EOF
10707         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10708         mv \$TMP.out \$TMP
10709 CF_EOF
10710 fi
10711
10712 if test $with_curses_h != yes ; then
10713 cat >>$cf_edit_man <<CF_EOF
10714         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10715         mv \$TMP.out \$TMP
10716 CF_EOF
10717 fi
10718
10719 cat >>$cf_edit_man <<CF_EOF
10720         if test \$form = format ; then
10721                 nroff -man \$TMP >\$TMP.out
10722                 mv \$TMP.out \$TMP
10723         fi
10724 CF_EOF
10725
10726 if test -n "$cf_compress" ; then
10727 cat >>$cf_edit_man <<CF_EOF
10728         if test \$verb = installing ; then
10729         if ( $cf_compress -f \$TMP )
10730         then
10731                 mv \$TMP.$cf_so_strip \$TMP
10732         fi
10733         fi
10734         cf_target="\$cf_target.$cf_so_strip"
10735 CF_EOF
10736 fi
10737
10738 case "$MANPAGE_FORMAT" in #(vi
10739 *BSDI*)
10740 cat >>$cf_edit_man <<CF_EOF
10741         if test \$form = format ; then
10742                 # BSDI installs only .0 suffixes in the cat directories
10743                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10744         fi
10745 CF_EOF
10746   ;;
10747 esac
10748
10749 cat >>$cf_edit_man <<CF_EOF
10750         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10751         if test \$verb = installing ; then
10752                 echo \$verb \$cf_target
10753                 \$INSTALL_DATA \$TMP \$cf_target
10754                 test -d \$cf_subdir\${section} &&
10755                 test -n "\$aliases" && (
10756                         cd \$cf_subdir\${section} && (
10757                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10758                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10759                                 cf_target=\`basename \$cf_target\`
10760                                 for cf_alias in \$aliases
10761                                 do
10762                                         if test \$section = 1 ; then
10763                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10764                                         fi
10765
10766                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10767                                                 if test -f \$cf_alias\${suffix} ; then
10768                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10769                                                         then
10770                                                                 continue
10771                                                         fi
10772                                                 fi
10773                                                 echo .. \$verb alias \$cf_alias\${suffix}
10774 CF_EOF
10775 case "x$LN_S" in #(vi
10776 *-f) #(vi
10777 cat >>$cf_edit_man <<CF_EOF
10778                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10779 CF_EOF
10780         ;;
10781 *)
10782 cat >>$cf_edit_man <<CF_EOF
10783                                                 rm -f \$cf_alias\${suffix}
10784                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10785 CF_EOF
10786         ;;
10787 esac
10788 cat >>$cf_edit_man <<CF_EOF
10789                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10790                                                 echo ".so \$cf_source" >\$TMP
10791 CF_EOF
10792 if test -n "$cf_compress" ; then
10793 cat >>$cf_edit_man <<CF_EOF
10794                                                 if test -n "$cf_so_strip" ; then
10795                                                         $cf_compress -f \$TMP
10796                                                         mv \$TMP.$cf_so_strip \$TMP
10797                                                 fi
10798 CF_EOF
10799 fi
10800 cat >>$cf_edit_man <<CF_EOF
10801                                                 echo .. \$verb alias \$cf_alias\${suffix}
10802                                                 rm -f \$cf_alias\${suffix}
10803                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10804                                         fi
10805                                 done
10806                         )
10807                 )
10808         elif test \$verb = removing ; then
10809                 test -f \$cf_target && (
10810                         echo \$verb \$cf_target
10811                         rm -f \$cf_target
10812                 )
10813                 test -d \$cf_subdir\${section} &&
10814                 test -n "\$aliases" && (
10815                         cd \$cf_subdir\${section} && (
10816                                 for cf_alias in \$aliases
10817                                 do
10818                                         if test \$section = 1 ; then
10819                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10820                                         fi
10821
10822                                         echo .. \$verb alias \$cf_alias\${suffix}
10823                                         rm -f \$cf_alias\${suffix}
10824                                 done
10825                         )
10826                 )
10827         else
10828 #               echo ".hy 0"
10829                 cat \$TMP
10830         fi
10831         ;;
10832 esac
10833 done
10834
10835 if test $cf_inboth = yes ; then
10836 if test \$form != format ; then
10837         sh \$0 format \$verb \$mandir \$srcdir \$*
10838 fi
10839 fi
10840
10841 exit 0
10842 CF_EOF
10843 chmod 755 $cf_edit_man
10844
10845 ###############################################################################
10846
10847 ### Note that some functions (such as const) are normally disabled anyway.
10848 echo "$as_me:10848: checking if you want to build with function extensions" >&5
10849 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10850
10851 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10852 if test "${enable_ext_funcs+set}" = set; then
10853   enableval="$enable_ext_funcs"
10854   with_ext_funcs=$enableval
10855 else
10856   with_ext_funcs=yes
10857 fi;
10858 echo "$as_me:10858: result: $with_ext_funcs" >&5
10859 echo "${ECHO_T}$with_ext_funcs" >&6
10860 if test "$with_ext_funcs" = yes ; then
10861         NCURSES_EXT_FUNCS=1
10862         cat >>confdefs.h <<\EOF
10863 #define HAVE_ASSUME_DEFAULT_COLORS 1
10864 EOF
10865
10866         cat >>confdefs.h <<\EOF
10867 #define HAVE_CURSES_VERSION 1
10868 EOF
10869
10870         cat >>confdefs.h <<\EOF
10871 #define HAVE_HAS_KEY 1
10872 EOF
10873
10874         cat >>confdefs.h <<\EOF
10875 #define HAVE_RESIZETERM 1
10876 EOF
10877
10878         cat >>confdefs.h <<\EOF
10879 #define HAVE_RESIZE_TERM 1
10880 EOF
10881
10882         cat >>confdefs.h <<\EOF
10883 #define HAVE_TERM_ENTRY_H 1
10884 EOF
10885
10886         cat >>confdefs.h <<\EOF
10887 #define HAVE_USE_DEFAULT_COLORS 1
10888 EOF
10889
10890         cat >>confdefs.h <<\EOF
10891 #define HAVE_USE_SCREEN 1
10892 EOF
10893
10894         cat >>confdefs.h <<\EOF
10895 #define HAVE_USE_WINDOW 1
10896 EOF
10897
10898         cat >>confdefs.h <<\EOF
10899 #define HAVE_WRESIZE 1
10900 EOF
10901
10902         cat >>confdefs.h <<\EOF
10903 #define NCURSES_EXT_FUNCS 1
10904 EOF
10905
10906         GENERATED_EXT_FUNCS=generated
10907 else
10908         NCURSES_EXT_FUNCS=0
10909         GENERATED_EXT_FUNCS=
10910 fi
10911
10912 echo "$as_me:10912: checking if you want to build with experimental SCREEN extensions" >&5
10913 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10914
10915 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10916 if test "${enable_sp_funcs+set}" = set; then
10917   enableval="$enable_sp_funcs"
10918   with_sp_funcs=$enableval
10919 else
10920   with_sp_funcs=no
10921 fi;
10922 echo "$as_me:10922: result: $with_sp_funcs" >&5
10923 echo "${ECHO_T}$with_sp_funcs" >&6
10924 if test "$with_sp_funcs" = yes ; then
10925         NCURSES_SP_FUNCS=1
10926         cat >>confdefs.h <<\EOF
10927 #define NCURSES_SP_FUNCS 1
10928 EOF
10929
10930         GENERATED_SP_FUNCS=generated
10931 else
10932         NCURSES_SP_FUNCS=0
10933         GENERATED_SP_FUNCS=
10934 fi
10935
10936 echo "$as_me:10936: checking if you want to build with experimental terminal-driver" >&5
10937 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10938
10939 # Check whether --enable-term-driver or --disable-term-driver was given.
10940 if test "${enable_term_driver+set}" = set; then
10941   enableval="$enable_term_driver"
10942   with_term_driver=$enableval
10943 else
10944   with_term_driver=no
10945 fi;
10946 echo "$as_me:10946: result: $with_term_driver" >&5
10947 echo "${ECHO_T}$with_term_driver" >&6
10948 if test "$with_term_driver" = yes ; then
10949         cat >>confdefs.h <<\EOF
10950 #define USE_TERM_DRIVER 1
10951 EOF
10952
10953         if test "$with_sp_funcs" != yes ; then
10954                 { { echo "$as_me:10954: error: The term-driver option relies upon sp-funcs" >&5
10955 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10956    { (exit 1); exit 1; }; }
10957         fi
10958 fi
10959
10960 ###   use option --enable-const to turn on use of const beyond that in XSI.
10961 echo "$as_me:10961: checking for extended use of const keyword" >&5
10962 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10963
10964 # Check whether --enable-const or --disable-const was given.
10965 if test "${enable_const+set}" = set; then
10966   enableval="$enable_const"
10967   with_ext_const=$enableval
10968 else
10969   with_ext_const=no
10970 fi;
10971 echo "$as_me:10971: result: $with_ext_const" >&5
10972 echo "${ECHO_T}$with_ext_const" >&6
10973 NCURSES_CONST='/*nothing*/'
10974 if test "$with_ext_const" = yes ; then
10975         NCURSES_CONST=const
10976 fi
10977
10978 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10979 echo "$as_me:10979: checking if you want to use extended colors" >&5
10980 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10981
10982 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10983 if test "${enable_ext_colors+set}" = set; then
10984   enableval="$enable_ext_colors"
10985   with_ext_colors=$enableval
10986 else
10987   with_ext_colors=no
10988 fi;
10989 echo "$as_me:10989: result: $with_ext_colors" >&5
10990 echo "${ECHO_T}$with_ext_colors" >&6
10991 NCURSES_EXT_COLORS=0
10992 if test "$with_ext_colors" = yes ; then
10993         if test "$with_widec" != yes ; then
10994                 { { echo "$as_me:10994: error: This option applies only to wide-character library" >&5
10995 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10996    { (exit 1); exit 1; }; }
10997         else
10998                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10999
11000 if test "${with_abi_version+set}" != set; then
11001         case $cf_cv_rel_version in
11002         5.*)
11003                 cf_cv_rel_version=6.0
11004                 cf_cv_abi_version=6
11005                 { echo "$as_me:11005: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11006 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11007                 ;;
11008         esac
11009 fi
11010
11011         fi
11012         NCURSES_EXT_COLORS=1
11013         cat >>confdefs.h <<\EOF
11014 #define NCURSES_EXT_COLORS 1
11015 EOF
11016
11017 fi
11018
11019 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11020 echo "$as_me:11020: checking if you want to use extended mouse encoding" >&5
11021 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11022
11023 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11024 if test "${enable_ext_mouse+set}" = set; then
11025   enableval="$enable_ext_mouse"
11026   with_ext_mouse=$enableval
11027 else
11028   with_ext_mouse=no
11029 fi;
11030 echo "$as_me:11030: result: $with_ext_mouse" >&5
11031 echo "${ECHO_T}$with_ext_mouse" >&6
11032 NCURSES_MOUSE_VERSION=1
11033 if test "$with_ext_mouse" = yes ; then
11034         NCURSES_MOUSE_VERSION=2
11035
11036 if test "${with_abi_version+set}" != set; then
11037         case $cf_cv_rel_version in
11038         5.*)
11039                 cf_cv_rel_version=6.0
11040                 cf_cv_abi_version=6
11041                 { echo "$as_me:11041: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11042 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11043                 ;;
11044         esac
11045 fi
11046
11047 fi
11048
11049 echo "$as_me:11049: checking if you want \$NCURSES_NO_PADDING code" >&5
11050 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11051
11052 # Check whether --enable-no-padding or --disable-no-padding was given.
11053 if test "${enable_no_padding+set}" = set; then
11054   enableval="$enable_no_padding"
11055   with_no_padding=$enableval
11056 else
11057   with_no_padding=$with_ext_funcs
11058 fi;
11059 echo "$as_me:11059: result: $with_no_padding" >&5
11060 echo "${ECHO_T}$with_no_padding" >&6
11061 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
11062 #define NCURSES_NO_PADDING 1
11063 EOF
11064
11065 echo "$as_me:11065: checking for ANSI C header files" >&5
11066 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11067 if test "${ac_cv_header_stdc+set}" = set; then
11068   echo $ECHO_N "(cached) $ECHO_C" >&6
11069 else
11070   cat >conftest.$ac_ext <<_ACEOF
11071 #line 11071 "configure"
11072 #include "confdefs.h"
11073 #include <stdlib.h>
11074 #include <stdarg.h>
11075 #include <string.h>
11076 #include <float.h>
11077
11078 _ACEOF
11079 if { (eval echo "$as_me:11079: \"$ac_cpp conftest.$ac_ext\"") >&5
11080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11081   ac_status=$?
11082   egrep -v '^ *\+' conftest.er1 >conftest.err
11083   rm -f conftest.er1
11084   cat conftest.err >&5
11085   echo "$as_me:11085: \$? = $ac_status" >&5
11086   (exit $ac_status); } >/dev/null; then
11087   if test -s conftest.err; then
11088     ac_cpp_err=$ac_c_preproc_warn_flag
11089   else
11090     ac_cpp_err=
11091   fi
11092 else
11093   ac_cpp_err=yes
11094 fi
11095 if test -z "$ac_cpp_err"; then
11096   ac_cv_header_stdc=yes
11097 else
11098   echo "$as_me: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   ac_cv_header_stdc=no
11101 fi
11102 rm -f conftest.err conftest.$ac_ext
11103
11104 if test $ac_cv_header_stdc = yes; then
11105   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11106   cat >conftest.$ac_ext <<_ACEOF
11107 #line 11107 "configure"
11108 #include "confdefs.h"
11109 #include <string.h>
11110
11111 _ACEOF
11112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11113   egrep "memchr" >/dev/null 2>&1; then
11114   :
11115 else
11116   ac_cv_header_stdc=no
11117 fi
11118 rm -rf conftest*
11119
11120 fi
11121
11122 if test $ac_cv_header_stdc = yes; then
11123   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11124   cat >conftest.$ac_ext <<_ACEOF
11125 #line 11125 "configure"
11126 #include "confdefs.h"
11127 #include <stdlib.h>
11128
11129 _ACEOF
11130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11131   egrep "free" >/dev/null 2>&1; then
11132   :
11133 else
11134   ac_cv_header_stdc=no
11135 fi
11136 rm -rf conftest*
11137
11138 fi
11139
11140 if test $ac_cv_header_stdc = yes; then
11141   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11142   if test "$cross_compiling" = yes; then
11143   :
11144 else
11145   cat >conftest.$ac_ext <<_ACEOF
11146 #line 11146 "configure"
11147 #include "confdefs.h"
11148 #include <ctype.h>
11149 #if ((' ' & 0x0FF) == 0x020)
11150 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11151 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11152 #else
11153 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11154                      || ('j' <= (c) && (c) <= 'r') \
11155                      || ('s' <= (c) && (c) <= 'z'))
11156 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11157 #endif
11158
11159 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11160 int
11161 main ()
11162 {
11163   int i;
11164   for (i = 0; i < 256; i++)
11165     if (XOR (islower (i), ISLOWER (i))
11166         || toupper (i) != TOUPPER (i))
11167       $ac_main_return(2);
11168   $ac_main_return (0);
11169 }
11170 _ACEOF
11171 rm -f conftest$ac_exeext
11172 if { (eval echo "$as_me:11172: \"$ac_link\"") >&5
11173   (eval $ac_link) 2>&5
11174   ac_status=$?
11175   echo "$as_me:11175: \$? = $ac_status" >&5
11176   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11177   { (eval echo "$as_me:11177: \"$ac_try\"") >&5
11178   (eval $ac_try) 2>&5
11179   ac_status=$?
11180   echo "$as_me:11180: \$? = $ac_status" >&5
11181   (exit $ac_status); }; }; then
11182   :
11183 else
11184   echo "$as_me: program exited with status $ac_status" >&5
11185 echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187 ac_cv_header_stdc=no
11188 fi
11189 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11190 fi
11191 fi
11192 fi
11193 echo "$as_me:11193: result: $ac_cv_header_stdc" >&5
11194 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11195 if test $ac_cv_header_stdc = yes; then
11196
11197 cat >>confdefs.h <<\EOF
11198 #define STDC_HEADERS 1
11199 EOF
11200
11201 fi
11202
11203 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11204
11205 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11206                   inttypes.h stdint.h unistd.h
11207 do
11208 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11209 echo "$as_me:11209: checking for $ac_header" >&5
11210 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11212   echo $ECHO_N "(cached) $ECHO_C" >&6
11213 else
11214   cat >conftest.$ac_ext <<_ACEOF
11215 #line 11215 "configure"
11216 #include "confdefs.h"
11217 $ac_includes_default
11218 #include <$ac_header>
11219 _ACEOF
11220 rm -f conftest.$ac_objext
11221 if { (eval echo "$as_me:11221: \"$ac_compile\"") >&5
11222   (eval $ac_compile) 2>&5
11223   ac_status=$?
11224   echo "$as_me:11224: \$? = $ac_status" >&5
11225   (exit $ac_status); } &&
11226          { ac_try='test -s conftest.$ac_objext'
11227   { (eval echo "$as_me:11227: \"$ac_try\"") >&5
11228   (eval $ac_try) 2>&5
11229   ac_status=$?
11230   echo "$as_me:11230: \$? = $ac_status" >&5
11231   (exit $ac_status); }; }; then
11232   eval "$as_ac_Header=yes"
11233 else
11234   echo "$as_me: failed program was:" >&5
11235 cat conftest.$ac_ext >&5
11236 eval "$as_ac_Header=no"
11237 fi
11238 rm -f conftest.$ac_objext conftest.$ac_ext
11239 fi
11240 echo "$as_me:11240: result: `eval echo '${'$as_ac_Header'}'`" >&5
11241 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11242 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11243   cat >>confdefs.h <<EOF
11244 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11245 EOF
11246
11247 fi
11248 done
11249
11250 echo "$as_me:11250: checking for signed char" >&5
11251 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11252 if test "${ac_cv_type_signed_char+set}" = set; then
11253   echo $ECHO_N "(cached) $ECHO_C" >&6
11254 else
11255   cat >conftest.$ac_ext <<_ACEOF
11256 #line 11256 "configure"
11257 #include "confdefs.h"
11258 $ac_includes_default
11259 int
11260 main ()
11261 {
11262 if ((signed char *) 0)
11263   return 0;
11264 if (sizeof (signed char))
11265   return 0;
11266   ;
11267   return 0;
11268 }
11269 _ACEOF
11270 rm -f conftest.$ac_objext
11271 if { (eval echo "$as_me:11271: \"$ac_compile\"") >&5
11272   (eval $ac_compile) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); } &&
11276          { ac_try='test -s conftest.$ac_objext'
11277   { (eval echo "$as_me:11277: \"$ac_try\"") >&5
11278   (eval $ac_try) 2>&5
11279   ac_status=$?
11280   echo "$as_me:11280: \$? = $ac_status" >&5
11281   (exit $ac_status); }; }; then
11282   ac_cv_type_signed_char=yes
11283 else
11284   echo "$as_me: failed program was:" >&5
11285 cat conftest.$ac_ext >&5
11286 ac_cv_type_signed_char=no
11287 fi
11288 rm -f conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 echo "$as_me:11290: result: $ac_cv_type_signed_char" >&5
11291 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11292
11293 echo "$as_me:11293: checking size of signed char" >&5
11294 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11295 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11296   echo $ECHO_N "(cached) $ECHO_C" >&6
11297 else
11298   if test "$ac_cv_type_signed_char" = yes; then
11299   if test "$cross_compiling" = yes; then
11300   # Depending upon the size, compute the lo and hi bounds.
11301 cat >conftest.$ac_ext <<_ACEOF
11302 #line 11302 "configure"
11303 #include "confdefs.h"
11304 $ac_includes_default
11305 int
11306 main ()
11307 {
11308 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11309   ;
11310   return 0;
11311 }
11312 _ACEOF
11313 rm -f conftest.$ac_objext
11314 if { (eval echo "$as_me:11314: \"$ac_compile\"") >&5
11315   (eval $ac_compile) 2>&5
11316   ac_status=$?
11317   echo "$as_me:11317: \$? = $ac_status" >&5
11318   (exit $ac_status); } &&
11319          { ac_try='test -s conftest.$ac_objext'
11320   { (eval echo "$as_me:11320: \"$ac_try\"") >&5
11321   (eval $ac_try) 2>&5
11322   ac_status=$?
11323   echo "$as_me:11323: \$? = $ac_status" >&5
11324   (exit $ac_status); }; }; then
11325   ac_lo=0 ac_mid=0
11326   while :; do
11327     cat >conftest.$ac_ext <<_ACEOF
11328 #line 11328 "configure"
11329 #include "confdefs.h"
11330 $ac_includes_default
11331 int
11332 main ()
11333 {
11334 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11335   ;
11336   return 0;
11337 }
11338 _ACEOF
11339 rm -f conftest.$ac_objext
11340 if { (eval echo "$as_me:11340: \"$ac_compile\"") >&5
11341   (eval $ac_compile) 2>&5
11342   ac_status=$?
11343   echo "$as_me:11343: \$? = $ac_status" >&5
11344   (exit $ac_status); } &&
11345          { ac_try='test -s conftest.$ac_objext'
11346   { (eval echo "$as_me:11346: \"$ac_try\"") >&5
11347   (eval $ac_try) 2>&5
11348   ac_status=$?
11349   echo "$as_me:11349: \$? = $ac_status" >&5
11350   (exit $ac_status); }; }; then
11351   ac_hi=$ac_mid; break
11352 else
11353   echo "$as_me: failed program was:" >&5
11354 cat conftest.$ac_ext >&5
11355 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11356 fi
11357 rm -f conftest.$ac_objext conftest.$ac_ext
11358   done
11359 else
11360   echo "$as_me: failed program was:" >&5
11361 cat conftest.$ac_ext >&5
11362 ac_hi=-1 ac_mid=-1
11363   while :; do
11364     cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367 $ac_includes_default
11368 int
11369 main ()
11370 {
11371 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11372   ;
11373   return 0;
11374 }
11375 _ACEOF
11376 rm -f conftest.$ac_objext
11377 if { (eval echo "$as_me:11377: \"$ac_compile\"") >&5
11378   (eval $ac_compile) 2>&5
11379   ac_status=$?
11380   echo "$as_me:11380: \$? = $ac_status" >&5
11381   (exit $ac_status); } &&
11382          { ac_try='test -s conftest.$ac_objext'
11383   { (eval echo "$as_me:11383: \"$ac_try\"") >&5
11384   (eval $ac_try) 2>&5
11385   ac_status=$?
11386   echo "$as_me:11386: \$? = $ac_status" >&5
11387   (exit $ac_status); }; }; then
11388   ac_lo=$ac_mid; break
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 cat conftest.$ac_ext >&5
11392 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11393 fi
11394 rm -f conftest.$ac_objext conftest.$ac_ext
11395   done
11396 fi
11397 rm -f conftest.$ac_objext conftest.$ac_ext
11398 # Binary search between lo and hi bounds.
11399 while test "x$ac_lo" != "x$ac_hi"; do
11400   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11401   cat >conftest.$ac_ext <<_ACEOF
11402 #line 11402 "configure"
11403 #include "confdefs.h"
11404 $ac_includes_default
11405 int
11406 main ()
11407 {
11408 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11409   ;
11410   return 0;
11411 }
11412 _ACEOF
11413 rm -f conftest.$ac_objext
11414 if { (eval echo "$as_me:11414: \"$ac_compile\"") >&5
11415   (eval $ac_compile) 2>&5
11416   ac_status=$?
11417   echo "$as_me:11417: \$? = $ac_status" >&5
11418   (exit $ac_status); } &&
11419          { ac_try='test -s conftest.$ac_objext'
11420   { (eval echo "$as_me:11420: \"$ac_try\"") >&5
11421   (eval $ac_try) 2>&5
11422   ac_status=$?
11423   echo "$as_me:11423: \$? = $ac_status" >&5
11424   (exit $ac_status); }; }; then
11425   ac_hi=$ac_mid
11426 else
11427   echo "$as_me: failed program was:" >&5
11428 cat conftest.$ac_ext >&5
11429 ac_lo=`expr $ac_mid + 1`
11430 fi
11431 rm -f conftest.$ac_objext conftest.$ac_ext
11432 done
11433 ac_cv_sizeof_signed_char=$ac_lo
11434 else
11435   if test "$cross_compiling" = yes; then
11436   { { echo "$as_me:11436: error: cannot run test program while cross compiling" >&5
11437 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11438    { (exit 1); exit 1; }; }
11439 else
11440   cat >conftest.$ac_ext <<_ACEOF
11441 #line 11441 "configure"
11442 #include "confdefs.h"
11443 $ac_includes_default
11444 int
11445 main ()
11446 {
11447 FILE *f = fopen ("conftest.val", "w");
11448 if (!f)
11449   $ac_main_return (1);
11450 fprintf (f, "%d", (sizeof (signed char)));
11451 fclose (f);
11452   ;
11453   return 0;
11454 }
11455 _ACEOF
11456 rm -f conftest$ac_exeext
11457 if { (eval echo "$as_me:11457: \"$ac_link\"") >&5
11458   (eval $ac_link) 2>&5
11459   ac_status=$?
11460   echo "$as_me:11460: \$? = $ac_status" >&5
11461   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11462   { (eval echo "$as_me:11462: \"$ac_try\"") >&5
11463   (eval $ac_try) 2>&5
11464   ac_status=$?
11465   echo "$as_me:11465: \$? = $ac_status" >&5
11466   (exit $ac_status); }; }; then
11467   ac_cv_sizeof_signed_char=`cat conftest.val`
11468 else
11469   echo "$as_me: program exited with status $ac_status" >&5
11470 echo "$as_me: failed program was:" >&5
11471 cat conftest.$ac_ext >&5
11472 fi
11473 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11474 fi
11475 fi
11476 rm -f conftest.val
11477 else
11478   ac_cv_sizeof_signed_char=0
11479 fi
11480 fi
11481 echo "$as_me:11481: result: $ac_cv_sizeof_signed_char" >&5
11482 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11483 cat >>confdefs.h <<EOF
11484 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11485 EOF
11486
11487 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11488         NCURSES_SBOOL="signed char"
11489 else
11490         NCURSES_SBOOL="char"
11491 fi
11492 echo "$as_me:11492: checking if you want to use signed Boolean array in term.h" >&5
11493 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11494
11495 # Check whether --enable-signed-char or --disable-signed-char was given.
11496 if test "${enable_signed_char+set}" = set; then
11497   enableval="$enable_signed_char"
11498   with_signed_char=$enableval
11499 else
11500   with_signed_char=no
11501 fi;
11502 echo "$as_me:11502: result: $with_signed_char" >&5
11503 echo "${ECHO_T}$with_signed_char" >&6
11504 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
11505
11506 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11507 echo "$as_me:11507: checking if you want SIGWINCH handler" >&5
11508 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11509
11510 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11511 if test "${enable_sigwinch+set}" = set; then
11512   enableval="$enable_sigwinch"
11513   with_sigwinch=$enableval
11514 else
11515   with_sigwinch=$with_ext_funcs
11516 fi;
11517 echo "$as_me:11517: result: $with_sigwinch" >&5
11518 echo "${ECHO_T}$with_sigwinch" >&6
11519 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
11520 #define USE_SIGWINCH 1
11521 EOF
11522
11523 ###   use option --enable-tcap-names to allow user to define new capabilities
11524 echo "$as_me:11524: checking if you want user-definable terminal capabilities like termcap" >&5
11525 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11526
11527 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11528 if test "${enable_tcap_names+set}" = set; then
11529   enableval="$enable_tcap_names"
11530   with_tcap_names=$enableval
11531 else
11532   with_tcap_names=$with_ext_funcs
11533 fi;
11534 echo "$as_me:11534: result: $with_tcap_names" >&5
11535 echo "${ECHO_T}$with_tcap_names" >&6
11536 NCURSES_XNAMES=0
11537 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
11538
11539 ###############################################################################
11540 # These options are relatively safe to experiment with.
11541
11542 echo "$as_me:11542: checking if you want all development code" >&5
11543 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11544
11545 # Check whether --with-develop or --without-develop was given.
11546 if test "${with_develop+set}" = set; then
11547   withval="$with_develop"
11548   with_develop=$withval
11549 else
11550   with_develop=no
11551 fi;
11552 echo "$as_me:11552: result: $with_develop" >&5
11553 echo "${ECHO_T}$with_develop" >&6
11554
11555 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11556 echo "$as_me:11556: checking if you want hard-tabs code" >&5
11557 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11558
11559 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11560 if test "${enable_hard_tabs+set}" = set; then
11561   enableval="$enable_hard_tabs"
11562
11563 else
11564   enable_hard_tabs=$with_develop
11565 fi;
11566 echo "$as_me:11566: result: $enable_hard_tabs" >&5
11567 echo "${ECHO_T}$enable_hard_tabs" >&6
11568 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
11569 #define USE_HARD_TABS 1
11570 EOF
11571
11572 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11573 echo "$as_me:11573: checking if you want limited support for xmc" >&5
11574 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11575
11576 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11577 if test "${enable_xmc_glitch+set}" = set; then
11578   enableval="$enable_xmc_glitch"
11579
11580 else
11581   enable_xmc_glitch=$with_develop
11582 fi;
11583 echo "$as_me:11583: result: $enable_xmc_glitch" >&5
11584 echo "${ECHO_T}$enable_xmc_glitch" >&6
11585 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
11586 #define USE_XMC_SUPPORT 1
11587 EOF
11588
11589 ###############################################################################
11590 # These are just experimental, probably should not be in a package:
11591
11592 echo "$as_me:11592: checking if you do not want to assume colors are white-on-black" >&5
11593 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11594
11595 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11596 if test "${enable_assumed_color+set}" = set; then
11597   enableval="$enable_assumed_color"
11598   with_assumed_color=$enableval
11599 else
11600   with_assumed_color=yes
11601 fi;
11602 echo "$as_me:11602: result: $with_assumed_color" >&5
11603 echo "${ECHO_T}$with_assumed_color" >&6
11604 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
11605 #define USE_ASSUMED_COLOR 1
11606 EOF
11607
11608 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11609 echo "$as_me:11609: checking if you want hashmap scrolling-optimization code" >&5
11610 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11611
11612 # Check whether --enable-hashmap or --disable-hashmap was given.
11613 if test "${enable_hashmap+set}" = set; then
11614   enableval="$enable_hashmap"
11615   with_hashmap=$enableval
11616 else
11617   with_hashmap=yes
11618 fi;
11619 echo "$as_me:11619: result: $with_hashmap" >&5
11620 echo "${ECHO_T}$with_hashmap" >&6
11621 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
11622 #define USE_HASHMAP 1
11623 EOF
11624
11625 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11626 echo "$as_me:11626: checking if you want colorfgbg code" >&5
11627 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11628
11629 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11630 if test "${enable_colorfgbg+set}" = set; then
11631   enableval="$enable_colorfgbg"
11632   with_colorfgbg=$enableval
11633 else
11634   with_colorfgbg=no
11635 fi;
11636 echo "$as_me:11636: result: $with_colorfgbg" >&5
11637 echo "${ECHO_T}$with_colorfgbg" >&6
11638 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
11639 #define USE_COLORFGBG 1
11640 EOF
11641
11642 ###   use option --enable-interop to turn on use of bindings used for interop
11643 echo "$as_me:11643: checking if you want interop bindings" >&5
11644 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11645
11646 # Check whether --enable-interop or --disable-interop was given.
11647 if test "${enable_interop+set}" = set; then
11648   enableval="$enable_interop"
11649   with_exp_interop=$enableval
11650 else
11651   with_exp_interop=no
11652 fi;
11653 echo "$as_me:11653: result: $with_exp_interop" >&5
11654 echo "${ECHO_T}$with_exp_interop" >&6
11655
11656 NCURSES_INTEROP_FUNCS=0
11657 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11658
11659 # This is still experimental (20080329), but should ultimately be moved to
11660 # the script-block --with-normal, etc.
11661
11662 echo "$as_me:11662: checking if you want to link with the pthread library" >&5
11663 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11664
11665 # Check whether --with-pthread or --without-pthread was given.
11666 if test "${with_pthread+set}" = set; then
11667   withval="$with_pthread"
11668   with_pthread=$withval
11669 else
11670   with_pthread=no
11671 fi;
11672 echo "$as_me:11672: result: $with_pthread" >&5
11673 echo "${ECHO_T}$with_pthread" >&6
11674
11675 if test "$with_pthread" != no ; then
11676     echo "$as_me:11676: checking for pthread.h" >&5
11677 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11678 if test "${ac_cv_header_pthread_h+set}" = set; then
11679   echo $ECHO_N "(cached) $ECHO_C" >&6
11680 else
11681   cat >conftest.$ac_ext <<_ACEOF
11682 #line 11682 "configure"
11683 #include "confdefs.h"
11684 #include <pthread.h>
11685 _ACEOF
11686 if { (eval echo "$as_me:11686: \"$ac_cpp conftest.$ac_ext\"") >&5
11687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11688   ac_status=$?
11689   egrep -v '^ *\+' conftest.er1 >conftest.err
11690   rm -f conftest.er1
11691   cat conftest.err >&5
11692   echo "$as_me:11692: \$? = $ac_status" >&5
11693   (exit $ac_status); } >/dev/null; then
11694   if test -s conftest.err; then
11695     ac_cpp_err=$ac_c_preproc_warn_flag
11696   else
11697     ac_cpp_err=
11698   fi
11699 else
11700   ac_cpp_err=yes
11701 fi
11702 if test -z "$ac_cpp_err"; then
11703   ac_cv_header_pthread_h=yes
11704 else
11705   echo "$as_me: failed program was:" >&5
11706   cat conftest.$ac_ext >&5
11707   ac_cv_header_pthread_h=no
11708 fi
11709 rm -f conftest.err conftest.$ac_ext
11710 fi
11711 echo "$as_me:11711: result: $ac_cv_header_pthread_h" >&5
11712 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11713 if test $ac_cv_header_pthread_h = yes; then
11714
11715         cat >>confdefs.h <<\EOF
11716 #define HAVE_PTHREADS_H 1
11717 EOF
11718
11719         for cf_lib_pthread in pthread c_r
11720         do
11721             echo "$as_me:11721: checking if we can link with the $cf_lib_pthread library" >&5
11722 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11723             cf_save_LIBS="$LIBS"
11724             LIBS="-l$cf_lib_pthread $LIBS"
11725             cat >conftest.$ac_ext <<_ACEOF
11726 #line 11726 "configure"
11727 #include "confdefs.h"
11728
11729 #include <pthread.h>
11730
11731 int
11732 main ()
11733 {
11734
11735                 int rc = pthread_create(0,0,0,0);
11736                 int r2 = pthread_mutexattr_settype(0, 0);
11737
11738   ;
11739   return 0;
11740 }
11741 _ACEOF
11742 rm -f conftest.$ac_objext conftest$ac_exeext
11743 if { (eval echo "$as_me:11743: \"$ac_link\"") >&5
11744   (eval $ac_link) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit $ac_status); } &&
11748          { ac_try='test -s conftest$ac_exeext'
11749   { (eval echo "$as_me:11749: \"$ac_try\"") >&5
11750   (eval $ac_try) 2>&5
11751   ac_status=$?
11752   echo "$as_me:11752: \$? = $ac_status" >&5
11753   (exit $ac_status); }; }; then
11754   with_pthread=yes
11755 else
11756   echo "$as_me: failed program was:" >&5
11757 cat conftest.$ac_ext >&5
11758 with_pthread=no
11759 fi
11760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11761             LIBS="$cf_save_LIBS"
11762             echo "$as_me:11762: result: $with_pthread" >&5
11763 echo "${ECHO_T}$with_pthread" >&6
11764             test "$with_pthread" = yes && break
11765         done
11766
11767         if test "$with_pthread" = yes ; then
11768             LIBS="-l$cf_lib_pthread $LIBS"
11769             cat >>confdefs.h <<\EOF
11770 #define HAVE_LIBPTHREADS 1
11771 EOF
11772
11773         else
11774             { { echo "$as_me:11774: error: Cannot link with pthread library" >&5
11775 echo "$as_me: error: Cannot link with pthread library" >&2;}
11776    { (exit 1); exit 1; }; }
11777         fi
11778
11779 fi
11780
11781 fi
11782
11783 if test "x$with_pthread" != xno; then
11784         echo "$as_me:11784: checking for pthread_kill" >&5
11785 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11786 if test "${ac_cv_func_pthread_kill+set}" = set; then
11787   echo $ECHO_N "(cached) $ECHO_C" >&6
11788 else
11789   cat >conftest.$ac_ext <<_ACEOF
11790 #line 11790 "configure"
11791 #include "confdefs.h"
11792 /* System header to define __stub macros and hopefully few prototypes,
11793     which can conflict with char pthread_kill (); below.  */
11794 #include <assert.h>
11795 /* Override any gcc2 internal prototype to avoid an error.  */
11796 #ifdef __cplusplus
11797 extern "C"
11798 #endif
11799 /* We use char because int might match the return type of a gcc2
11800    builtin and then its argument prototype would still apply.  */
11801 char pthread_kill ();
11802 char (*f) ();
11803
11804 int
11805 main ()
11806 {
11807 /* The GNU C library defines this for functions which it implements
11808     to always fail with ENOSYS.  Some functions are actually named
11809     something starting with __ and the normal name is an alias.  */
11810 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11811 choke me
11812 #else
11813 f = pthread_kill;
11814 #endif
11815
11816   ;
11817   return 0;
11818 }
11819 _ACEOF
11820 rm -f conftest.$ac_objext conftest$ac_exeext
11821 if { (eval echo "$as_me:11821: \"$ac_link\"") >&5
11822   (eval $ac_link) 2>&5
11823   ac_status=$?
11824   echo "$as_me:11824: \$? = $ac_status" >&5
11825   (exit $ac_status); } &&
11826          { ac_try='test -s conftest$ac_exeext'
11827   { (eval echo "$as_me:11827: \"$ac_try\"") >&5
11828   (eval $ac_try) 2>&5
11829   ac_status=$?
11830   echo "$as_me:11830: \$? = $ac_status" >&5
11831   (exit $ac_status); }; }; then
11832   ac_cv_func_pthread_kill=yes
11833 else
11834   echo "$as_me: failed program was:" >&5
11835 cat conftest.$ac_ext >&5
11836 ac_cv_func_pthread_kill=no
11837 fi
11838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11839 fi
11840 echo "$as_me:11840: result: $ac_cv_func_pthread_kill" >&5
11841 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11842 if test $ac_cv_func_pthread_kill = yes; then
11843
11844                 echo "$as_me:11844: checking if you want to allow EINTR in wgetch with pthreads" >&5
11845 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11846
11847 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11848 if test "${enable_pthreads_eintr+set}" = set; then
11849   enableval="$enable_pthreads_eintr"
11850   use_pthreads_eintr=$enableval
11851 else
11852   use_pthreads_eintr=no
11853 fi;
11854                 echo "$as_me:11854: result: $use_pthreads_eintr" >&5
11855 echo "${ECHO_T}$use_pthreads_eintr" >&6
11856                 if test $use_pthreads_eintr = yes ; then
11857                         cat >>confdefs.h <<\EOF
11858 #define USE_PTHREADS_EINTR 1
11859 EOF
11860
11861                 fi
11862 fi
11863
11864         echo "$as_me:11864: checking if you want to use weak-symbols for pthreads" >&5
11865 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11866
11867 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11868 if test "${enable_weak_symbols+set}" = set; then
11869   enableval="$enable_weak_symbols"
11870   use_weak_symbols=$enableval
11871 else
11872   use_weak_symbols=no
11873 fi;
11874         echo "$as_me:11874: result: $use_weak_symbols" >&5
11875 echo "${ECHO_T}$use_weak_symbols" >&6
11876         if test "$use_weak_symbols" = yes ; then
11877
11878 echo "$as_me:11878: checking if $CC supports weak symbols" >&5
11879 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11880 if test "${cf_cv_weak_symbols+set}" = set; then
11881   echo $ECHO_N "(cached) $ECHO_C" >&6
11882 else
11883
11884 cat >conftest.$ac_ext <<_ACEOF
11885 #line 11885 "configure"
11886 #include "confdefs.h"
11887
11888 #include <stdio.h>
11889 int
11890 main ()
11891 {
11892
11893 #if defined(__GNUC__)
11894 #  if defined __USE_ISOC99
11895 #    define _cat_pragma(exp)    _Pragma(#exp)
11896 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11897 #  else
11898 #    define _weak_pragma(exp)
11899 #  endif
11900 #  define _declare(name)        __extension__ extern __typeof__(name) name
11901 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11902 #endif
11903
11904 weak_symbol(fopen);
11905
11906   ;
11907   return 0;
11908 }
11909 _ACEOF
11910 rm -f conftest.$ac_objext
11911 if { (eval echo "$as_me:11911: \"$ac_compile\"") >&5
11912   (eval $ac_compile) 2>&5
11913   ac_status=$?
11914   echo "$as_me:11914: \$? = $ac_status" >&5
11915   (exit $ac_status); } &&
11916          { ac_try='test -s conftest.$ac_objext'
11917   { (eval echo "$as_me:11917: \"$ac_try\"") >&5
11918   (eval $ac_try) 2>&5
11919   ac_status=$?
11920   echo "$as_me:11920: \$? = $ac_status" >&5
11921   (exit $ac_status); }; }; then
11922   cf_cv_weak_symbols=yes
11923 else
11924   echo "$as_me: failed program was:" >&5
11925 cat conftest.$ac_ext >&5
11926 cf_cv_weak_symbols=no
11927 fi
11928 rm -f conftest.$ac_objext conftest.$ac_ext
11929
11930 fi
11931 echo "$as_me:11931: result: $cf_cv_weak_symbols" >&5
11932 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11933
11934         else
11935                 cf_cv_weak_symbols=no
11936         fi
11937
11938         if test $cf_cv_weak_symbols = yes ; then
11939                 cat >>confdefs.h <<\EOF
11940 #define USE_WEAK_SYMBOLS 1
11941 EOF
11942
11943         fi
11944 fi
11945
11946 PTHREAD=
11947 if test "$with_pthread" = "yes" ; then
11948     cat >>confdefs.h <<\EOF
11949 #define USE_PTHREADS 1
11950 EOF
11951
11952     enable_reentrant=yes
11953     if test $cf_cv_weak_symbols = yes ; then
11954         PTHREAD=-lpthread
11955     fi
11956 fi
11957
11958 # Reentrant code has to be opaque; there's little advantage to making ncurses
11959 # opaque outside of that, so there is no --enable-opaque option.  We can use
11960 # this option without --with-pthreads, but this will be always set for
11961 # pthreads.
11962 echo "$as_me:11962: checking if you want experimental reentrant code" >&5
11963 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11964
11965 # Check whether --enable-reentrant or --disable-reentrant was given.
11966 if test "${enable_reentrant+set}" = set; then
11967   enableval="$enable_reentrant"
11968   with_reentrant=$enableval
11969 else
11970   with_reentrant=no
11971 fi;
11972 echo "$as_me:11972: result: $with_reentrant" >&5
11973 echo "${ECHO_T}$with_reentrant" >&6
11974 if test "$with_reentrant" = yes ; then
11975         cf_cv_enable_reentrant=1
11976         cf_cv_enable_opaque="NCURSES_INTERNALS"
11977         NCURSES_OPAQUE=1
11978         NCURSES_SIZE_T=int
11979         if test $cf_cv_weak_symbols = yes ; then
11980
11981 # remove pthread library from $LIBS
11982 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11983
11984                 TEST_LIBS="-lpthread $TEST_LIBS"
11985                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11986         else
11987                 LIB_SUFFIX="t${LIB_SUFFIX}"
11988         fi
11989         cat >>confdefs.h <<\EOF
11990 #define USE_REENTRANT 1
11991 EOF
11992
11993 if test "${with_abi_version+set}" != set; then
11994         case $cf_cv_rel_version in
11995         5.*)
11996                 cf_cv_rel_version=6.0
11997                 cf_cv_abi_version=6
11998                 { echo "$as_me:11998: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11999 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12000                 ;;
12001         esac
12002 fi
12003
12004 else
12005         cf_cv_enable_reentrant=0
12006         cf_cv_enable_opaque="NCURSES_OPAQUE"
12007         NCURSES_OPAQUE=0
12008         NCURSES_SIZE_T=short
12009 fi
12010
12011 ### Allow using a different wrap-prefix
12012 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12013         echo "$as_me:12013: checking for prefix used to wrap public variables" >&5
12014 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12015
12016 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12017 if test "${with_wrap_prefix+set}" = set; then
12018   withval="$with_wrap_prefix"
12019   NCURSES_WRAP_PREFIX=$withval
12020 else
12021   NCURSES_WRAP_PREFIX=_nc_
12022 fi;
12023         echo "$as_me:12023: result: $NCURSES_WRAP_PREFIX" >&5
12024 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12025 else
12026         NCURSES_WRAP_PREFIX=_nc_
12027 fi
12028
12029 cat >>confdefs.h <<EOF
12030 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12031 EOF
12032
12033 echo "$as_me:12033: checking if you want experimental safe-sprintf code" >&5
12034 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12035
12036 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12037 if test "${enable_safe_sprintf+set}" = set; then
12038   enableval="$enable_safe_sprintf"
12039   with_safe_sprintf=$enableval
12040 else
12041   with_safe_sprintf=no
12042 fi;
12043 echo "$as_me:12043: result: $with_safe_sprintf" >&5
12044 echo "${ECHO_T}$with_safe_sprintf" >&6
12045 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
12046 #define USE_SAFE_SPRINTF 1
12047 EOF
12048
12049 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12050 # when hashmap is used scroll hints are useless
12051 if test "$with_hashmap" = no ; then
12052 echo "$as_me:12052: checking if you want to experiment without scrolling-hints code" >&5
12053 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12054
12055 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12056 if test "${enable_scroll_hints+set}" = set; then
12057   enableval="$enable_scroll_hints"
12058   with_scroll_hints=$enableval
12059 else
12060   with_scroll_hints=yes
12061 fi;
12062 echo "$as_me:12062: result: $with_scroll_hints" >&5
12063 echo "${ECHO_T}$with_scroll_hints" >&6
12064 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
12065 #define USE_SCROLL_HINTS 1
12066 EOF
12067
12068 fi
12069
12070 echo "$as_me:12070: checking if you want experimental wgetch-events code" >&5
12071 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12072
12073 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12074 if test "${enable_wgetch_events+set}" = set; then
12075   enableval="$enable_wgetch_events"
12076   with_wgetch_events=$enableval
12077 else
12078   with_wgetch_events=no
12079 fi;
12080 echo "$as_me:12080: result: $with_wgetch_events" >&5
12081 echo "${ECHO_T}$with_wgetch_events" >&6
12082 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
12083 #define NCURSES_WGETCH_EVENTS 1
12084 EOF
12085
12086 ###############################################################################
12087
12088 ###     use option --disable-echo to suppress full display compiling commands
12089 echo "$as_me:12089: checking if you want to display full commands during build" >&5
12090 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
12091
12092 # Check whether --enable-echo or --disable-echo was given.
12093 if test "${enable_echo+set}" = set; then
12094   enableval="$enable_echo"
12095   with_echo=$enableval
12096 else
12097   with_echo=yes
12098 fi;
12099 if test "$with_echo" = yes; then
12100         ECHO_LINK=
12101 else
12102         ECHO_LINK='@ echo linking $@ ... ;'
12103         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12104         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12105 fi
12106 echo "$as_me:12106: result: $with_echo" >&5
12107 echo "${ECHO_T}$with_echo" >&6
12108
12109 ###     use option --enable-warnings to turn on all gcc warnings
12110 echo "$as_me:12110: checking if you want to see compiler warnings" >&5
12111 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12112
12113 # Check whether --enable-warnings or --disable-warnings was given.
12114 if test "${enable_warnings+set}" = set; then
12115   enableval="$enable_warnings"
12116   with_warnings=$enableval
12117 fi;
12118 echo "$as_me:12118: result: $with_warnings" >&5
12119 echo "${ECHO_T}$with_warnings" >&6
12120
12121 if test "x$with_warnings" = "xyes"; then
12122
12123         ADAFLAGS="$ADAFLAGS -gnatg"
12124
12125 INTEL_COMPILER=no
12126
12127 if test "$GCC" = yes ; then
12128         case $host_os in
12129         linux*|gnu*)
12130                 echo "$as_me:12130: checking if this is really Intel C compiler" >&5
12131 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12132                 cf_save_CFLAGS="$CFLAGS"
12133                 CFLAGS="$CFLAGS -no-gcc"
12134                 cat >conftest.$ac_ext <<_ACEOF
12135 #line 12135 "configure"
12136 #include "confdefs.h"
12137
12138 int
12139 main ()
12140 {
12141
12142 #ifdef __INTEL_COMPILER
12143 #else
12144 make an error
12145 #endif
12146
12147   ;
12148   return 0;
12149 }
12150 _ACEOF
12151 rm -f conftest.$ac_objext
12152 if { (eval echo "$as_me:12152: \"$ac_compile\"") >&5
12153   (eval $ac_compile) 2>&5
12154   ac_status=$?
12155   echo "$as_me:12155: \$? = $ac_status" >&5
12156   (exit $ac_status); } &&
12157          { ac_try='test -s conftest.$ac_objext'
12158   { (eval echo "$as_me:12158: \"$ac_try\"") >&5
12159   (eval $ac_try) 2>&5
12160   ac_status=$?
12161   echo "$as_me:12161: \$? = $ac_status" >&5
12162   (exit $ac_status); }; }; then
12163   INTEL_COMPILER=yes
12164 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12165
12166 else
12167   echo "$as_me: failed program was:" >&5
12168 cat conftest.$ac_ext >&5
12169 fi
12170 rm -f conftest.$ac_objext conftest.$ac_ext
12171                 CFLAGS="$cf_save_CFLAGS"
12172                 echo "$as_me:12172: result: $INTEL_COMPILER" >&5
12173 echo "${ECHO_T}$INTEL_COMPILER" >&6
12174                 ;;
12175         esac
12176 fi
12177
12178 cat > conftest.$ac_ext <<EOF
12179 #line 12179 "${as_me:-configure}"
12180 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12181 EOF
12182
12183 if test "$INTEL_COMPILER" = yes
12184 then
12185 # The "-wdXXX" options suppress warnings:
12186 # remark #1419: external declaration in primary source file
12187 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12188 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12189 # remark #193: zero used for undefined preprocessing identifier
12190 # remark #593: variable "curs_sb_left_arrow" was set but never used
12191 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12192 # remark #869: parameter "tw" was never referenced
12193 # remark #981: operands are evaluated in unspecified order
12194 # warning #279: controlling expression is constant
12195
12196         { echo "$as_me:12196: checking for $CC warning options..." >&5
12197 echo "$as_me: checking for $CC warning options..." >&6;}
12198         cf_save_CFLAGS="$CFLAGS"
12199         EXTRA_CFLAGS="-Wall"
12200         for cf_opt in \
12201                 wd1419 \
12202                 wd1683 \
12203                 wd1684 \
12204                 wd193 \
12205                 wd593 \
12206                 wd279 \
12207                 wd810 \
12208                 wd869 \
12209                 wd981
12210         do
12211                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12212                 if { (eval echo "$as_me:12212: \"$ac_compile\"") >&5
12213   (eval $ac_compile) 2>&5
12214   ac_status=$?
12215   echo "$as_me:12215: \$? = $ac_status" >&5
12216   (exit $ac_status); }; then
12217                         test -n "$verbose" && echo "$as_me:12217: result: ... -$cf_opt" >&5
12218 echo "${ECHO_T}... -$cf_opt" >&6
12219                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12220                 fi
12221         done
12222         CFLAGS="$cf_save_CFLAGS"
12223
12224 elif test "$GCC" = yes
12225 then
12226         { echo "$as_me:12226: checking for $CC warning options..." >&5
12227 echo "$as_me: checking for $CC warning options..." >&6;}
12228         cf_save_CFLAGS="$CFLAGS"
12229         EXTRA_CFLAGS=
12230         cf_warn_CONST=""
12231         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12232         for cf_opt in W Wall \
12233                 Wbad-function-cast \
12234                 Wcast-align \
12235                 Wcast-qual \
12236                 Winline \
12237                 Wmissing-declarations \
12238                 Wmissing-prototypes \
12239                 Wnested-externs \
12240                 Wpointer-arith \
12241                 Wshadow \
12242                 Wstrict-prototypes \
12243                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12244         do
12245                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12246                 if { (eval echo "$as_me:12246: \"$ac_compile\"") >&5
12247   (eval $ac_compile) 2>&5
12248   ac_status=$?
12249   echo "$as_me:12249: \$? = $ac_status" >&5
12250   (exit $ac_status); }; then
12251                         test -n "$verbose" && echo "$as_me:12251: result: ... -$cf_opt" >&5
12252 echo "${ECHO_T}... -$cf_opt" >&6
12253                         case $cf_opt in #(vi
12254                         Wcast-qual) #(vi
12255                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12256                                 ;;
12257                         Winline) #(vi
12258                                 case $GCC_VERSION in
12259                                 [34].*)
12260                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12261
12262 echo "${as_me:-configure}:12262: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12263
12264                                         continue;;
12265                                 esac
12266                                 ;;
12267                         esac
12268                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12269                 fi
12270         done
12271         CFLAGS="$cf_save_CFLAGS"
12272 fi
12273 rm -rf conftest*
12274
12275         if test "$cf_with_cxx" = yes ; then
12276
12277 INTEL_CPLUSPLUS=no
12278
12279 if test "$GCC" = yes ; then
12280         case $host_os in
12281         linux*|gnu*)
12282                 echo "$as_me:12282: checking if this is really Intel C++ compiler" >&5
12283 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12284                 cf_save_CFLAGS="$CXXFLAGS"
12285                 CXXFLAGS="$CXXFLAGS -no-gcc"
12286                 cat >conftest.$ac_ext <<_ACEOF
12287 #line 12287 "configure"
12288 #include "confdefs.h"
12289
12290 int
12291 main ()
12292 {
12293
12294 #ifdef __INTEL_COMPILER
12295 #else
12296 make an error
12297 #endif
12298
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 rm -f conftest.$ac_objext
12304 if { (eval echo "$as_me:12304: \"$ac_compile\"") >&5
12305   (eval $ac_compile) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); } &&
12309          { ac_try='test -s conftest.$ac_objext'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; }; then
12315   INTEL_CPLUSPLUS=yes
12316 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12317
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat conftest.$ac_ext >&5
12321 fi
12322 rm -f conftest.$ac_objext conftest.$ac_ext
12323                 CXXFLAGS="$cf_save_CFLAGS"
12324                 echo "$as_me:12324: result: $INTEL_CPLUSPLUS" >&5
12325 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12326                 ;;
12327         esac
12328 fi
12329
12330 ac_ext=cc
12331 ac_cpp='$CXXCPP $CPPFLAGS'
12332 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12333 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12334 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12335 ac_main_return=return
12336
12337 cat > conftest.$ac_ext <<EOF
12338 #line 12338 "configure"
12339 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12340 EOF
12341
12342 if test "$INTEL_CPLUSPLUS" = yes
12343 then
12344 # The "-wdXXX" options suppress warnings:
12345 # remark #1419: external declaration in primary source file
12346 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12347 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12348 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12349 # remark #193: zero used for undefined preprocessing identifier
12350 # remark #593: variable "curs_sb_left_arrow" was set but never used
12351 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12352 # remark #869: parameter "tw" was never referenced
12353 # remark #981: operands are evaluated in unspecified order
12354 # warning #269: invalid format string conversion
12355
12356         { echo "$as_me:12356: checking for $CC warning options..." >&5
12357 echo "$as_me: checking for $CC warning options..." >&6;}
12358         cf_save_CXXFLAGS="$CXXFLAGS"
12359         EXTRA_CXXFLAGS="-Wall"
12360         for cf_opt in \
12361                 wd1419 \
12362                 wd1682 \
12363                 wd1683 \
12364                 wd1684 \
12365                 wd193 \
12366                 wd279 \
12367                 wd593 \
12368                 wd810 \
12369                 wd869 \
12370                 wd981
12371         do
12372                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12373                 if { (eval echo "$as_me:12373: \"$ac_compile\"") >&5
12374   (eval $ac_compile) 2>&5
12375   ac_status=$?
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit $ac_status); }; then
12378                         test -n "$verbose" && echo "$as_me:12378: result: ... -$cf_opt" >&5
12379 echo "${ECHO_T}... -$cf_opt" >&6
12380                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12381                 fi
12382         done
12383         CXXFLAGS="$cf_save_CXXFLAGS"
12384
12385 elif test "$GXX" = yes
12386 then
12387         { echo "$as_me:12387: checking for $CXX warning options..." >&5
12388 echo "$as_me: checking for $CXX warning options..." >&6;}
12389         cf_save_CXXFLAGS="$CXXFLAGS"
12390         EXTRA_CXXFLAGS="-W -Wall"
12391         cf_gxx_extra_warnings=""
12392         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12393         case "$GCC_VERSION" in
12394         [1-2].*)
12395                 ;;
12396         *)
12397                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12398                 ;;
12399         esac
12400         for cf_opt in \
12401                 Wabi \
12402                 fabi-version=0 \
12403                 Woverloaded-virtual \
12404                 Wsign-promo \
12405                 Wsynth \
12406                 Wold-style-cast \
12407                 Wcast-align \
12408                 Wcast-qual \
12409                 Wmissing-prototypes \
12410                 Wpointer-arith \
12411                 Wshadow \
12412                 Wstrict-prototypes \
12413                 Wundef $cf_gxx_extra_warnings Wno-unused
12414         do
12415                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12416                 if { (eval echo "$as_me:12416: \"$ac_compile\"") >&5
12417   (eval $ac_compile) 2>&5
12418   ac_status=$?
12419   echo "$as_me:12419: \$? = $ac_status" >&5
12420   (exit $ac_status); }; then
12421                         test -n "$verbose" && echo "$as_me:12421: result: ... -$cf_opt" >&5
12422 echo "${ECHO_T}... -$cf_opt" >&6
12423                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12424                 else
12425                         test -n "$verbose" && echo "$as_me:12425: result: ... no -$cf_opt" >&5
12426 echo "${ECHO_T}... no -$cf_opt" >&6
12427                 fi
12428         done
12429         CXXFLAGS="$cf_save_CXXFLAGS"
12430 fi
12431
12432 rm -rf conftest*
12433 ac_ext=c
12434 ac_cpp='$CPP $CPPFLAGS'
12435 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12436 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12437 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12438 ac_main_return=return
12439
12440         fi
12441 fi
12442
12443 if test "$GCC" = yes
12444 then
12445 cat > conftest.i <<EOF
12446 #ifndef GCC_PRINTF
12447 #define GCC_PRINTF 0
12448 #endif
12449 #ifndef GCC_SCANF
12450 #define GCC_SCANF 0
12451 #endif
12452 #ifndef GCC_NORETURN
12453 #define GCC_NORETURN /* nothing */
12454 #endif
12455 #ifndef GCC_UNUSED
12456 #define GCC_UNUSED /* nothing */
12457 #endif
12458 EOF
12459 if test "$GCC" = yes
12460 then
12461         { echo "$as_me:12461: checking for $CC __attribute__ directives..." >&5
12462 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12463 cat > conftest.$ac_ext <<EOF
12464 #line 12464 "${as_me:-configure}"
12465 #include "confdefs.h"
12466 #include "conftest.h"
12467 #include "conftest.i"
12468 #if     GCC_PRINTF
12469 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12470 #else
12471 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12472 #endif
12473 #if     GCC_SCANF
12474 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12475 #else
12476 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12477 #endif
12478 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12479 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12480 extern void foo(void) GCC_NORETURN;
12481 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12482 EOF
12483         cf_printf_attribute=no
12484         cf_scanf_attribute=no
12485         for cf_attribute in scanf printf unused noreturn
12486         do
12487
12488 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12489
12490                 cf_directive="__attribute__(($cf_attribute))"
12491                 echo "checking for $CC $cf_directive" 1>&5
12492
12493                 case $cf_attribute in #(vi
12494                 printf) #(vi
12495                         cf_printf_attribute=yes
12496                         cat >conftest.h <<EOF
12497 #define GCC_$cf_ATTRIBUTE 1
12498 EOF
12499                         ;;
12500                 scanf) #(vi
12501                         cf_scanf_attribute=yes
12502                         cat >conftest.h <<EOF
12503 #define GCC_$cf_ATTRIBUTE 1
12504 EOF
12505                         ;;
12506                 *) #(vi
12507                         cat >conftest.h <<EOF
12508 #define GCC_$cf_ATTRIBUTE $cf_directive
12509 EOF
12510                         ;;
12511                 esac
12512
12513                 if { (eval echo "$as_me:12513: \"$ac_compile\"") >&5
12514   (eval $ac_compile) 2>&5
12515   ac_status=$?
12516   echo "$as_me:12516: \$? = $ac_status" >&5
12517   (exit $ac_status); }; then
12518                         test -n "$verbose" && echo "$as_me:12518: result: ... $cf_attribute" >&5
12519 echo "${ECHO_T}... $cf_attribute" >&6
12520                         cat conftest.h >>confdefs.h
12521                         case $cf_attribute in #(vi
12522                         printf) #(vi
12523                                 if test "$cf_printf_attribute" = no ; then
12524                                         cat >>confdefs.h <<EOF
12525 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
12526 EOF
12527                                 else
12528                                         cat >>confdefs.h <<EOF
12529 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12530 EOF
12531                                 fi
12532                                 ;;
12533                         scanf) #(vi
12534                                 if test "$cf_scanf_attribute" = no ; then
12535                                         cat >>confdefs.h <<EOF
12536 #define GCC_SCANFLIKE(fmt,var) /* nothing */
12537 EOF
12538                                 else
12539                                         cat >>confdefs.h <<EOF
12540 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12541 EOF
12542                                 fi
12543                                 ;;
12544                         esac
12545                 fi
12546         done
12547 else
12548         fgrep define conftest.i >>confdefs.h
12549 fi
12550 rm -rf conftest*
12551 fi
12552
12553 ###     use option --enable-assertions to turn on generation of assertion code
12554 echo "$as_me:12554: checking if you want to enable runtime assertions" >&5
12555 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12556
12557 # Check whether --enable-assertions or --disable-assertions was given.
12558 if test "${enable_assertions+set}" = set; then
12559   enableval="$enable_assertions"
12560   with_assertions=$enableval
12561 else
12562   with_assertions=no
12563 fi;
12564 echo "$as_me:12564: result: $with_assertions" >&5
12565 echo "${ECHO_T}$with_assertions" >&6
12566 if test -n "$GCC"
12567 then
12568         if test "$with_assertions" = no
12569         then
12570                 cat >>confdefs.h <<\EOF
12571 #define NDEBUG 1
12572 EOF
12573
12574                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12575         else
12576
12577         ADAFLAGS="$ADAFLAGS -gnata"
12578
12579         fi
12580 fi
12581
12582 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12583
12584 echo "$as_me:12584: checking if you want to use dmalloc for testing" >&5
12585 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12586
12587 # Check whether --with-dmalloc or --without-dmalloc was given.
12588 if test "${with_dmalloc+set}" = set; then
12589   withval="$with_dmalloc"
12590   cat >>confdefs.h <<\EOF
12591 #define USE_DMALLOC 1
12592 EOF
12593
12594         : ${with_cflags:=-g}
12595         : ${with_no_leaks:=yes}
12596          with_dmalloc=yes
12597 else
12598   with_dmalloc=
12599 fi;
12600 echo "$as_me:12600: result: ${with_dmalloc:-no}" >&5
12601 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12602
12603 case .$with_cflags in #(vi
12604 .*-g*)
12605         case .$CFLAGS in #(vi
12606         .*-g*) #(vi
12607                 ;;
12608         *)
12609
12610 cf_fix_cppflags=no
12611 cf_new_cflags=
12612 cf_new_cppflags=
12613 cf_new_extra_cppflags=
12614
12615 for cf_add_cflags in -g
12616 do
12617 case $cf_fix_cppflags in
12618 no)
12619         case $cf_add_cflags in #(vi
12620         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12621                 case $cf_add_cflags in
12622                 -D*)
12623                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12624
12625                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12626                                 && test -z "${cf_tst_cflags}" \
12627                                 && cf_fix_cppflags=yes
12628
12629                         if test $cf_fix_cppflags = yes ; then
12630                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12631                                 continue
12632                         elif test "${cf_tst_cflags}" = "\"'" ; then
12633                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12634                                 continue
12635                         fi
12636                         ;;
12637                 esac
12638                 case "$CPPFLAGS" in
12639                 *$cf_add_cflags) #(vi
12640                         ;;
12641                 *) #(vi
12642                         case $cf_add_cflags in #(vi
12643                         -D*)
12644                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12645
12646 CPPFLAGS=`echo "$CPPFLAGS" | \
12647         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12648                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12649
12650                                 ;;
12651                         esac
12652                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12653                         ;;
12654                 esac
12655                 ;;
12656         *)
12657                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12658                 ;;
12659         esac
12660         ;;
12661 yes)
12662         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12663
12664         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12665
12666         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12667                 && test -z "${cf_tst_cflags}" \
12668                 && cf_fix_cppflags=no
12669         ;;
12670 esac
12671 done
12672
12673 if test -n "$cf_new_cflags" ; then
12674
12675         CFLAGS="$CFLAGS $cf_new_cflags"
12676 fi
12677
12678 if test -n "$cf_new_cppflags" ; then
12679
12680         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12681 fi
12682
12683 if test -n "$cf_new_extra_cppflags" ; then
12684
12685         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12686 fi
12687
12688                 ;;
12689         esac
12690         ;;
12691 esac
12692
12693 if test "$with_dmalloc" = yes ; then
12694         echo "$as_me:12694: checking for dmalloc.h" >&5
12695 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12696 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12697   echo $ECHO_N "(cached) $ECHO_C" >&6
12698 else
12699   cat >conftest.$ac_ext <<_ACEOF
12700 #line 12700 "configure"
12701 #include "confdefs.h"
12702 #include <dmalloc.h>
12703 _ACEOF
12704 if { (eval echo "$as_me:12704: \"$ac_cpp conftest.$ac_ext\"") >&5
12705   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12706   ac_status=$?
12707   egrep -v '^ *\+' conftest.er1 >conftest.err
12708   rm -f conftest.er1
12709   cat conftest.err >&5
12710   echo "$as_me:12710: \$? = $ac_status" >&5
12711   (exit $ac_status); } >/dev/null; then
12712   if test -s conftest.err; then
12713     ac_cpp_err=$ac_c_preproc_warn_flag
12714   else
12715     ac_cpp_err=
12716   fi
12717 else
12718   ac_cpp_err=yes
12719 fi
12720 if test -z "$ac_cpp_err"; then
12721   ac_cv_header_dmalloc_h=yes
12722 else
12723   echo "$as_me: failed program was:" >&5
12724   cat conftest.$ac_ext >&5
12725   ac_cv_header_dmalloc_h=no
12726 fi
12727 rm -f conftest.err conftest.$ac_ext
12728 fi
12729 echo "$as_me:12729: result: $ac_cv_header_dmalloc_h" >&5
12730 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12731 if test $ac_cv_header_dmalloc_h = yes; then
12732
12733 echo "$as_me:12733: checking for dmalloc_debug in -ldmalloc" >&5
12734 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12735 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12736   echo $ECHO_N "(cached) $ECHO_C" >&6
12737 else
12738   ac_check_lib_save_LIBS=$LIBS
12739 LIBS="-ldmalloc  $LIBS"
12740 cat >conftest.$ac_ext <<_ACEOF
12741 #line 12741 "configure"
12742 #include "confdefs.h"
12743
12744 /* Override any gcc2 internal prototype to avoid an error.  */
12745 #ifdef __cplusplus
12746 extern "C"
12747 #endif
12748 /* We use char because int might match the return type of a gcc2
12749    builtin and then its argument prototype would still apply.  */
12750 char dmalloc_debug ();
12751 int
12752 main ()
12753 {
12754 dmalloc_debug ();
12755   ;
12756   return 0;
12757 }
12758 _ACEOF
12759 rm -f conftest.$ac_objext conftest$ac_exeext
12760 if { (eval echo "$as_me:12760: \"$ac_link\"") >&5
12761   (eval $ac_link) 2>&5
12762   ac_status=$?
12763   echo "$as_me:12763: \$? = $ac_status" >&5
12764   (exit $ac_status); } &&
12765          { ac_try='test -s conftest$ac_exeext'
12766   { (eval echo "$as_me:12766: \"$ac_try\"") >&5
12767   (eval $ac_try) 2>&5
12768   ac_status=$?
12769   echo "$as_me:12769: \$? = $ac_status" >&5
12770   (exit $ac_status); }; }; then
12771   ac_cv_lib_dmalloc_dmalloc_debug=yes
12772 else
12773   echo "$as_me: failed program was:" >&5
12774 cat conftest.$ac_ext >&5
12775 ac_cv_lib_dmalloc_dmalloc_debug=no
12776 fi
12777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12778 LIBS=$ac_check_lib_save_LIBS
12779 fi
12780 echo "$as_me:12780: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12781 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12782 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12783   cat >>confdefs.h <<EOF
12784 #define HAVE_LIBDMALLOC 1
12785 EOF
12786
12787   LIBS="-ldmalloc $LIBS"
12788
12789 fi
12790
12791 fi
12792
12793 fi
12794
12795 echo "$as_me:12795: checking if you want to use dbmalloc for testing" >&5
12796 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12797
12798 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12799 if test "${with_dbmalloc+set}" = set; then
12800   withval="$with_dbmalloc"
12801   cat >>confdefs.h <<\EOF
12802 #define USE_DBMALLOC 1
12803 EOF
12804
12805         : ${with_cflags:=-g}
12806         : ${with_no_leaks:=yes}
12807          with_dbmalloc=yes
12808 else
12809   with_dbmalloc=
12810 fi;
12811 echo "$as_me:12811: result: ${with_dbmalloc:-no}" >&5
12812 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12813
12814 case .$with_cflags in #(vi
12815 .*-g*)
12816         case .$CFLAGS in #(vi
12817         .*-g*) #(vi
12818                 ;;
12819         *)
12820
12821 cf_fix_cppflags=no
12822 cf_new_cflags=
12823 cf_new_cppflags=
12824 cf_new_extra_cppflags=
12825
12826 for cf_add_cflags in -g
12827 do
12828 case $cf_fix_cppflags in
12829 no)
12830         case $cf_add_cflags in #(vi
12831         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12832                 case $cf_add_cflags in
12833                 -D*)
12834                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12835
12836                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12837                                 && test -z "${cf_tst_cflags}" \
12838                                 && cf_fix_cppflags=yes
12839
12840                         if test $cf_fix_cppflags = yes ; then
12841                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12842                                 continue
12843                         elif test "${cf_tst_cflags}" = "\"'" ; then
12844                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12845                                 continue
12846                         fi
12847                         ;;
12848                 esac
12849                 case "$CPPFLAGS" in
12850                 *$cf_add_cflags) #(vi
12851                         ;;
12852                 *) #(vi
12853                         case $cf_add_cflags in #(vi
12854                         -D*)
12855                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12856
12857 CPPFLAGS=`echo "$CPPFLAGS" | \
12858         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12859                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12860
12861                                 ;;
12862                         esac
12863                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12864                         ;;
12865                 esac
12866                 ;;
12867         *)
12868                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12869                 ;;
12870         esac
12871         ;;
12872 yes)
12873         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12874
12875         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12876
12877         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12878                 && test -z "${cf_tst_cflags}" \
12879                 && cf_fix_cppflags=no
12880         ;;
12881 esac
12882 done
12883
12884 if test -n "$cf_new_cflags" ; then
12885
12886         CFLAGS="$CFLAGS $cf_new_cflags"
12887 fi
12888
12889 if test -n "$cf_new_cppflags" ; then
12890
12891         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12892 fi
12893
12894 if test -n "$cf_new_extra_cppflags" ; then
12895
12896         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12897 fi
12898
12899                 ;;
12900         esac
12901         ;;
12902 esac
12903
12904 if test "$with_dbmalloc" = yes ; then
12905         echo "$as_me:12905: checking for dbmalloc.h" >&5
12906 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12907 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12908   echo $ECHO_N "(cached) $ECHO_C" >&6
12909 else
12910   cat >conftest.$ac_ext <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12913 #include <dbmalloc.h>
12914 _ACEOF
12915 if { (eval echo "$as_me:12915: \"$ac_cpp conftest.$ac_ext\"") >&5
12916   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12917   ac_status=$?
12918   egrep -v '^ *\+' conftest.er1 >conftest.err
12919   rm -f conftest.er1
12920   cat conftest.err >&5
12921   echo "$as_me:12921: \$? = $ac_status" >&5
12922   (exit $ac_status); } >/dev/null; then
12923   if test -s conftest.err; then
12924     ac_cpp_err=$ac_c_preproc_warn_flag
12925   else
12926     ac_cpp_err=
12927   fi
12928 else
12929   ac_cpp_err=yes
12930 fi
12931 if test -z "$ac_cpp_err"; then
12932   ac_cv_header_dbmalloc_h=yes
12933 else
12934   echo "$as_me: failed program was:" >&5
12935   cat conftest.$ac_ext >&5
12936   ac_cv_header_dbmalloc_h=no
12937 fi
12938 rm -f conftest.err conftest.$ac_ext
12939 fi
12940 echo "$as_me:12940: result: $ac_cv_header_dbmalloc_h" >&5
12941 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12942 if test $ac_cv_header_dbmalloc_h = yes; then
12943
12944 echo "$as_me:12944: checking for debug_malloc in -ldbmalloc" >&5
12945 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12946 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12947   echo $ECHO_N "(cached) $ECHO_C" >&6
12948 else
12949   ac_check_lib_save_LIBS=$LIBS
12950 LIBS="-ldbmalloc  $LIBS"
12951 cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954
12955 /* Override any gcc2 internal prototype to avoid an error.  */
12956 #ifdef __cplusplus
12957 extern "C"
12958 #endif
12959 /* We use char because int might match the return type of a gcc2
12960    builtin and then its argument prototype would still apply.  */
12961 char debug_malloc ();
12962 int
12963 main ()
12964 {
12965 debug_malloc ();
12966   ;
12967   return 0;
12968 }
12969 _ACEOF
12970 rm -f conftest.$ac_objext conftest$ac_exeext
12971 if { (eval echo "$as_me:12971: \"$ac_link\"") >&5
12972   (eval $ac_link) 2>&5
12973   ac_status=$?
12974   echo "$as_me:12974: \$? = $ac_status" >&5
12975   (exit $ac_status); } &&
12976          { ac_try='test -s conftest$ac_exeext'
12977   { (eval echo "$as_me:12977: \"$ac_try\"") >&5
12978   (eval $ac_try) 2>&5
12979   ac_status=$?
12980   echo "$as_me:12980: \$? = $ac_status" >&5
12981   (exit $ac_status); }; }; then
12982   ac_cv_lib_dbmalloc_debug_malloc=yes
12983 else
12984   echo "$as_me: failed program was:" >&5
12985 cat conftest.$ac_ext >&5
12986 ac_cv_lib_dbmalloc_debug_malloc=no
12987 fi
12988 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12989 LIBS=$ac_check_lib_save_LIBS
12990 fi
12991 echo "$as_me:12991: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12992 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12993 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12994   cat >>confdefs.h <<EOF
12995 #define HAVE_LIBDBMALLOC 1
12996 EOF
12997
12998   LIBS="-ldbmalloc $LIBS"
12999
13000 fi
13001
13002 fi
13003
13004 fi
13005
13006 echo "$as_me:13006: checking if you want to use valgrind for testing" >&5
13007 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13008
13009 # Check whether --with-valgrind or --without-valgrind was given.
13010 if test "${with_valgrind+set}" = set; then
13011   withval="$with_valgrind"
13012   cat >>confdefs.h <<\EOF
13013 #define USE_VALGRIND 1
13014 EOF
13015
13016         : ${with_cflags:=-g}
13017         : ${with_no_leaks:=yes}
13018          with_valgrind=yes
13019 else
13020   with_valgrind=
13021 fi;
13022 echo "$as_me:13022: result: ${with_valgrind:-no}" >&5
13023 echo "${ECHO_T}${with_valgrind:-no}" >&6
13024
13025 case .$with_cflags in #(vi
13026 .*-g*)
13027         case .$CFLAGS in #(vi
13028         .*-g*) #(vi
13029                 ;;
13030         *)
13031
13032 cf_fix_cppflags=no
13033 cf_new_cflags=
13034 cf_new_cppflags=
13035 cf_new_extra_cppflags=
13036
13037 for cf_add_cflags in -g
13038 do
13039 case $cf_fix_cppflags in
13040 no)
13041         case $cf_add_cflags in #(vi
13042         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13043                 case $cf_add_cflags in
13044                 -D*)
13045                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13046
13047                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13048                                 && test -z "${cf_tst_cflags}" \
13049                                 && cf_fix_cppflags=yes
13050
13051                         if test $cf_fix_cppflags = yes ; then
13052                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13053                                 continue
13054                         elif test "${cf_tst_cflags}" = "\"'" ; then
13055                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13056                                 continue
13057                         fi
13058                         ;;
13059                 esac
13060                 case "$CPPFLAGS" in
13061                 *$cf_add_cflags) #(vi
13062                         ;;
13063                 *) #(vi
13064                         case $cf_add_cflags in #(vi
13065                         -D*)
13066                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13067
13068 CPPFLAGS=`echo "$CPPFLAGS" | \
13069         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13070                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13071
13072                                 ;;
13073                         esac
13074                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13075                         ;;
13076                 esac
13077                 ;;
13078         *)
13079                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13080                 ;;
13081         esac
13082         ;;
13083 yes)
13084         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13085
13086         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13087
13088         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13089                 && test -z "${cf_tst_cflags}" \
13090                 && cf_fix_cppflags=no
13091         ;;
13092 esac
13093 done
13094
13095 if test -n "$cf_new_cflags" ; then
13096
13097         CFLAGS="$CFLAGS $cf_new_cflags"
13098 fi
13099
13100 if test -n "$cf_new_cppflags" ; then
13101
13102         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13103 fi
13104
13105 if test -n "$cf_new_extra_cppflags" ; then
13106
13107         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13108 fi
13109
13110                 ;;
13111         esac
13112         ;;
13113 esac
13114
13115 echo "$as_me:13115: checking if you want to perform memory-leak testing" >&5
13116 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13117
13118 # Check whether --enable-leaks or --disable-leaks was given.
13119 if test "${enable_leaks+set}" = set; then
13120   enableval="$enable_leaks"
13121   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13122 else
13123   : ${with_no_leaks:=no}
13124 fi;
13125 echo "$as_me:13125: result: $with_no_leaks" >&5
13126 echo "${ECHO_T}$with_no_leaks" >&6
13127
13128 if test "$with_no_leaks" = yes ; then
13129         cat >>confdefs.h <<\EOF
13130 #define NO_LEAKS 1
13131 EOF
13132
13133         cat >>confdefs.h <<\EOF
13134 #define YY_NO_LEAKS 1
13135 EOF
13136
13137 fi
13138
13139 cat >>confdefs.h <<\EOF
13140 #define HAVE_NC_ALLOC_H 1
13141 EOF
13142
13143 ###     use option --enable-expanded to generate certain macros as functions
13144
13145 # Check whether --enable-expanded or --disable-expanded was given.
13146 if test "${enable_expanded+set}" = set; then
13147   enableval="$enable_expanded"
13148   test "$enableval" = yes && cat >>confdefs.h <<\EOF
13149 #define NCURSES_EXPANDED 1
13150 EOF
13151
13152 fi;
13153
13154 ###     use option --disable-macros to suppress macros in favor of functions
13155
13156 # Check whether --enable-macros or --disable-macros was given.
13157 if test "${enable_macros+set}" = set; then
13158   enableval="$enable_macros"
13159   test "$enableval" = no && cat >>confdefs.h <<\EOF
13160 #define NCURSES_NOMACROS 1
13161 EOF
13162
13163 fi;
13164
13165 # Normally we only add trace() to the debug-library.  Allow this to be
13166 # extended to all models of the ncurses library:
13167 cf_all_traces=no
13168 case "$CFLAGS $CPPFLAGS" in
13169 *-DTRACE*)
13170         cf_all_traces=yes
13171         ;;
13172 esac
13173
13174 echo "$as_me:13174: checking whether to add trace feature to all models" >&5
13175 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13176
13177 # Check whether --with-trace or --without-trace was given.
13178 if test "${with_trace+set}" = set; then
13179   withval="$with_trace"
13180   cf_with_trace=$withval
13181 else
13182   cf_with_trace=$cf_all_traces
13183 fi;
13184 echo "$as_me:13184: result: $cf_with_trace" >&5
13185 echo "${ECHO_T}$cf_with_trace" >&6
13186
13187 if test "$cf_with_trace" = yes ; then
13188         LIB_TRACING=all
13189         ADA_TRACE=TRUE
13190
13191 cf_fix_cppflags=no
13192 cf_new_cflags=
13193 cf_new_cppflags=
13194 cf_new_extra_cppflags=
13195
13196 for cf_add_cflags in -DTRACE
13197 do
13198 case $cf_fix_cppflags in
13199 no)
13200         case $cf_add_cflags in #(vi
13201         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13202                 case $cf_add_cflags in
13203                 -D*)
13204                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13205
13206                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13207                                 && test -z "${cf_tst_cflags}" \
13208                                 && cf_fix_cppflags=yes
13209
13210                         if test $cf_fix_cppflags = yes ; then
13211                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13212                                 continue
13213                         elif test "${cf_tst_cflags}" = "\"'" ; then
13214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13215                                 continue
13216                         fi
13217                         ;;
13218                 esac
13219                 case "$CPPFLAGS" in
13220                 *$cf_add_cflags) #(vi
13221                         ;;
13222                 *) #(vi
13223                         case $cf_add_cflags in #(vi
13224                         -D*)
13225                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13226
13227 CPPFLAGS=`echo "$CPPFLAGS" | \
13228         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13229                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13230
13231                                 ;;
13232                         esac
13233                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13234                         ;;
13235                 esac
13236                 ;;
13237         *)
13238                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13239                 ;;
13240         esac
13241         ;;
13242 yes)
13243         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13244
13245         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13246
13247         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13248                 && test -z "${cf_tst_cflags}" \
13249                 && cf_fix_cppflags=no
13250         ;;
13251 esac
13252 done
13253
13254 if test -n "$cf_new_cflags" ; then
13255
13256         CFLAGS="$CFLAGS $cf_new_cflags"
13257 fi
13258
13259 if test -n "$cf_new_cppflags" ; then
13260
13261         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13262 fi
13263
13264 if test -n "$cf_new_extra_cppflags" ; then
13265
13266         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13267 fi
13268
13269 else
13270         LIB_TRACING=DEBUG
13271         ADA_TRACE=FALSE
13272 fi
13273
13274 ###     Checks for libraries.
13275 case $cf_cv_system_name in #(vi
13276 *mingw32*) #(vi
13277         ;;
13278 *)
13279 echo "$as_me:13279: checking for gettimeofday" >&5
13280 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13281 if test "${ac_cv_func_gettimeofday+set}" = set; then
13282   echo $ECHO_N "(cached) $ECHO_C" >&6
13283 else
13284   cat >conftest.$ac_ext <<_ACEOF
13285 #line 13285 "configure"
13286 #include "confdefs.h"
13287 /* System header to define __stub macros and hopefully few prototypes,
13288     which can conflict with char gettimeofday (); below.  */
13289 #include <assert.h>
13290 /* Override any gcc2 internal prototype to avoid an error.  */
13291 #ifdef __cplusplus
13292 extern "C"
13293 #endif
13294 /* We use char because int might match the return type of a gcc2
13295    builtin and then its argument prototype would still apply.  */
13296 char gettimeofday ();
13297 char (*f) ();
13298
13299 int
13300 main ()
13301 {
13302 /* The GNU C library defines this for functions which it implements
13303     to always fail with ENOSYS.  Some functions are actually named
13304     something starting with __ and the normal name is an alias.  */
13305 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13306 choke me
13307 #else
13308 f = gettimeofday;
13309 #endif
13310
13311   ;
13312   return 0;
13313 }
13314 _ACEOF
13315 rm -f conftest.$ac_objext conftest$ac_exeext
13316 if { (eval echo "$as_me:13316: \"$ac_link\"") >&5
13317   (eval $ac_link) 2>&5
13318   ac_status=$?
13319   echo "$as_me:13319: \$? = $ac_status" >&5
13320   (exit $ac_status); } &&
13321          { ac_try='test -s conftest$ac_exeext'
13322   { (eval echo "$as_me:13322: \"$ac_try\"") >&5
13323   (eval $ac_try) 2>&5
13324   ac_status=$?
13325   echo "$as_me:13325: \$? = $ac_status" >&5
13326   (exit $ac_status); }; }; then
13327   ac_cv_func_gettimeofday=yes
13328 else
13329   echo "$as_me: failed program was:" >&5
13330 cat conftest.$ac_ext >&5
13331 ac_cv_func_gettimeofday=no
13332 fi
13333 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13334 fi
13335 echo "$as_me:13335: result: $ac_cv_func_gettimeofday" >&5
13336 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13337 if test $ac_cv_func_gettimeofday = yes; then
13338   cat >>confdefs.h <<\EOF
13339 #define HAVE_GETTIMEOFDAY 1
13340 EOF
13341
13342 else
13343
13344 echo "$as_me:13344: checking for gettimeofday in -lbsd" >&5
13345 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13346 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13347   echo $ECHO_N "(cached) $ECHO_C" >&6
13348 else
13349   ac_check_lib_save_LIBS=$LIBS
13350 LIBS="-lbsd  $LIBS"
13351 cat >conftest.$ac_ext <<_ACEOF
13352 #line 13352 "configure"
13353 #include "confdefs.h"
13354
13355 /* Override any gcc2 internal prototype to avoid an error.  */
13356 #ifdef __cplusplus
13357 extern "C"
13358 #endif
13359 /* We use char because int might match the return type of a gcc2
13360    builtin and then its argument prototype would still apply.  */
13361 char gettimeofday ();
13362 int
13363 main ()
13364 {
13365 gettimeofday ();
13366   ;
13367   return 0;
13368 }
13369 _ACEOF
13370 rm -f conftest.$ac_objext conftest$ac_exeext
13371 if { (eval echo "$as_me:13371: \"$ac_link\"") >&5
13372   (eval $ac_link) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit $ac_status); } &&
13376          { ac_try='test -s conftest$ac_exeext'
13377   { (eval echo "$as_me:13377: \"$ac_try\"") >&5
13378   (eval $ac_try) 2>&5
13379   ac_status=$?
13380   echo "$as_me:13380: \$? = $ac_status" >&5
13381   (exit $ac_status); }; }; then
13382   ac_cv_lib_bsd_gettimeofday=yes
13383 else
13384   echo "$as_me: failed program was:" >&5
13385 cat conftest.$ac_ext >&5
13386 ac_cv_lib_bsd_gettimeofday=no
13387 fi
13388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13389 LIBS=$ac_check_lib_save_LIBS
13390 fi
13391 echo "$as_me:13391: result: $ac_cv_lib_bsd_gettimeofday" >&5
13392 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13393 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13394   cat >>confdefs.h <<\EOF
13395 #define HAVE_GETTIMEOFDAY 1
13396 EOF
13397
13398         LIBS="-lbsd $LIBS"
13399 fi
13400
13401 fi
13402         ;;
13403 esac
13404
13405 echo "$as_me:13405: checking if -lm needed for math functions" >&5
13406 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13407 if test "${cf_cv_need_libm+set}" = set; then
13408   echo $ECHO_N "(cached) $ECHO_C" >&6
13409 else
13410
13411         cat >conftest.$ac_ext <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13414
13415         #include <stdio.h>
13416         #include <math.h>
13417
13418 int
13419 main ()
13420 {
13421 double x = rand(); printf("result = %g\n", sin(x))
13422   ;
13423   return 0;
13424 }
13425 _ACEOF
13426 rm -f conftest.$ac_objext conftest$ac_exeext
13427 if { (eval echo "$as_me:13427: \"$ac_link\"") >&5
13428   (eval $ac_link) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit $ac_status); } &&
13432          { ac_try='test -s conftest$ac_exeext'
13433   { (eval echo "$as_me:13433: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:13436: \$? = $ac_status" >&5
13437   (exit $ac_status); }; }; then
13438   cf_cv_need_libm=no
13439 else
13440   echo "$as_me: failed program was:" >&5
13441 cat conftest.$ac_ext >&5
13442 cf_cv_need_libm=yes
13443 fi
13444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13445 fi
13446 echo "$as_me:13446: result: $cf_cv_need_libm" >&5
13447 echo "${ECHO_T}$cf_cv_need_libm" >&6
13448 if test "$cf_cv_need_libm" = yes
13449 then
13450 MATH_LIB=-lm
13451 fi
13452
13453 ###     Checks for header files.
13454 echo "$as_me:13454: checking for ANSI C header files" >&5
13455 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13456 if test "${ac_cv_header_stdc+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459   cat >conftest.$ac_ext <<_ACEOF
13460 #line 13460 "configure"
13461 #include "confdefs.h"
13462 #include <stdlib.h>
13463 #include <stdarg.h>
13464 #include <string.h>
13465 #include <float.h>
13466
13467 _ACEOF
13468 if { (eval echo "$as_me:13468: \"$ac_cpp conftest.$ac_ext\"") >&5
13469   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13470   ac_status=$?
13471   egrep -v '^ *\+' conftest.er1 >conftest.err
13472   rm -f conftest.er1
13473   cat conftest.err >&5
13474   echo "$as_me:13474: \$? = $ac_status" >&5
13475   (exit $ac_status); } >/dev/null; then
13476   if test -s conftest.err; then
13477     ac_cpp_err=$ac_c_preproc_warn_flag
13478   else
13479     ac_cpp_err=
13480   fi
13481 else
13482   ac_cpp_err=yes
13483 fi
13484 if test -z "$ac_cpp_err"; then
13485   ac_cv_header_stdc=yes
13486 else
13487   echo "$as_me: failed program was:" >&5
13488   cat conftest.$ac_ext >&5
13489   ac_cv_header_stdc=no
13490 fi
13491 rm -f conftest.err conftest.$ac_ext
13492
13493 if test $ac_cv_header_stdc = yes; then
13494   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13495   cat >conftest.$ac_ext <<_ACEOF
13496 #line 13496 "configure"
13497 #include "confdefs.h"
13498 #include <string.h>
13499
13500 _ACEOF
13501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13502   egrep "memchr" >/dev/null 2>&1; then
13503   :
13504 else
13505   ac_cv_header_stdc=no
13506 fi
13507 rm -rf conftest*
13508
13509 fi
13510
13511 if test $ac_cv_header_stdc = yes; then
13512   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13513   cat >conftest.$ac_ext <<_ACEOF
13514 #line 13514 "configure"
13515 #include "confdefs.h"
13516 #include <stdlib.h>
13517
13518 _ACEOF
13519 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13520   egrep "free" >/dev/null 2>&1; then
13521   :
13522 else
13523   ac_cv_header_stdc=no
13524 fi
13525 rm -rf conftest*
13526
13527 fi
13528
13529 if test $ac_cv_header_stdc = yes; then
13530   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13531   if test "$cross_compiling" = yes; then
13532   :
13533 else
13534   cat >conftest.$ac_ext <<_ACEOF
13535 #line 13535 "configure"
13536 #include "confdefs.h"
13537 #include <ctype.h>
13538 #if ((' ' & 0x0FF) == 0x020)
13539 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13540 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13541 #else
13542 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13543                      || ('j' <= (c) && (c) <= 'r') \
13544                      || ('s' <= (c) && (c) <= 'z'))
13545 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13546 #endif
13547
13548 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13549 int
13550 main ()
13551 {
13552   int i;
13553   for (i = 0; i < 256; i++)
13554     if (XOR (islower (i), ISLOWER (i))
13555         || toupper (i) != TOUPPER (i))
13556       $ac_main_return(2);
13557   $ac_main_return (0);
13558 }
13559 _ACEOF
13560 rm -f conftest$ac_exeext
13561 if { (eval echo "$as_me:13561: \"$ac_link\"") >&5
13562   (eval $ac_link) 2>&5
13563   ac_status=$?
13564   echo "$as_me:13564: \$? = $ac_status" >&5
13565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13566   { (eval echo "$as_me:13566: \"$ac_try\"") >&5
13567   (eval $ac_try) 2>&5
13568   ac_status=$?
13569   echo "$as_me:13569: \$? = $ac_status" >&5
13570   (exit $ac_status); }; }; then
13571   :
13572 else
13573   echo "$as_me: program exited with status $ac_status" >&5
13574 echo "$as_me: failed program was:" >&5
13575 cat conftest.$ac_ext >&5
13576 ac_cv_header_stdc=no
13577 fi
13578 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13579 fi
13580 fi
13581 fi
13582 echo "$as_me:13582: result: $ac_cv_header_stdc" >&5
13583 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13584 if test $ac_cv_header_stdc = yes; then
13585
13586 cat >>confdefs.h <<\EOF
13587 #define STDC_HEADERS 1
13588 EOF
13589
13590 fi
13591
13592 ac_header_dirent=no
13593 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13594   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13595 echo "$as_me:13595: checking for $ac_hdr that defines DIR" >&5
13596 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13598   echo $ECHO_N "(cached) $ECHO_C" >&6
13599 else
13600   cat >conftest.$ac_ext <<_ACEOF
13601 #line 13601 "configure"
13602 #include "confdefs.h"
13603 #include <sys/types.h>
13604 #include <$ac_hdr>
13605
13606 int
13607 main ()
13608 {
13609 if ((DIR *) 0)
13610 return 0;
13611   ;
13612   return 0;
13613 }
13614 _ACEOF
13615 rm -f conftest.$ac_objext
13616 if { (eval echo "$as_me:13616: \"$ac_compile\"") >&5
13617   (eval $ac_compile) 2>&5
13618   ac_status=$?
13619   echo "$as_me:13619: \$? = $ac_status" >&5
13620   (exit $ac_status); } &&
13621          { ac_try='test -s conftest.$ac_objext'
13622   { (eval echo "$as_me:13622: \"$ac_try\"") >&5
13623   (eval $ac_try) 2>&5
13624   ac_status=$?
13625   echo "$as_me:13625: \$? = $ac_status" >&5
13626   (exit $ac_status); }; }; then
13627   eval "$as_ac_Header=yes"
13628 else
13629   echo "$as_me: failed program was:" >&5
13630 cat conftest.$ac_ext >&5
13631 eval "$as_ac_Header=no"
13632 fi
13633 rm -f conftest.$ac_objext conftest.$ac_ext
13634 fi
13635 echo "$as_me:13635: result: `eval echo '${'$as_ac_Header'}'`" >&5
13636 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13637 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13638   cat >>confdefs.h <<EOF
13639 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13640 EOF
13641
13642 ac_header_dirent=$ac_hdr; break
13643 fi
13644
13645 done
13646 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13647 if test $ac_header_dirent = dirent.h; then
13648   echo "$as_me:13648: checking for opendir in -ldir" >&5
13649 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13650 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13651   echo $ECHO_N "(cached) $ECHO_C" >&6
13652 else
13653   ac_check_lib_save_LIBS=$LIBS
13654 LIBS="-ldir  $LIBS"
13655 cat >conftest.$ac_ext <<_ACEOF
13656 #line 13656 "configure"
13657 #include "confdefs.h"
13658
13659 /* Override any gcc2 internal prototype to avoid an error.  */
13660 #ifdef __cplusplus
13661 extern "C"
13662 #endif
13663 /* We use char because int might match the return type of a gcc2
13664    builtin and then its argument prototype would still apply.  */
13665 char opendir ();
13666 int
13667 main ()
13668 {
13669 opendir ();
13670   ;
13671   return 0;
13672 }
13673 _ACEOF
13674 rm -f conftest.$ac_objext conftest$ac_exeext
13675 if { (eval echo "$as_me:13675: \"$ac_link\"") >&5
13676   (eval $ac_link) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit $ac_status); } &&
13680          { ac_try='test -s conftest$ac_exeext'
13681   { (eval echo "$as_me:13681: \"$ac_try\"") >&5
13682   (eval $ac_try) 2>&5
13683   ac_status=$?
13684   echo "$as_me:13684: \$? = $ac_status" >&5
13685   (exit $ac_status); }; }; then
13686   ac_cv_lib_dir_opendir=yes
13687 else
13688   echo "$as_me: failed program was:" >&5
13689 cat conftest.$ac_ext >&5
13690 ac_cv_lib_dir_opendir=no
13691 fi
13692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13693 LIBS=$ac_check_lib_save_LIBS
13694 fi
13695 echo "$as_me:13695: result: $ac_cv_lib_dir_opendir" >&5
13696 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13697 if test $ac_cv_lib_dir_opendir = yes; then
13698   LIBS="$LIBS -ldir"
13699 fi
13700
13701 else
13702   echo "$as_me:13702: checking for opendir in -lx" >&5
13703 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13704 if test "${ac_cv_lib_x_opendir+set}" = set; then
13705   echo $ECHO_N "(cached) $ECHO_C" >&6
13706 else
13707   ac_check_lib_save_LIBS=$LIBS
13708 LIBS="-lx  $LIBS"
13709 cat >conftest.$ac_ext <<_ACEOF
13710 #line 13710 "configure"
13711 #include "confdefs.h"
13712
13713 /* Override any gcc2 internal prototype to avoid an error.  */
13714 #ifdef __cplusplus
13715 extern "C"
13716 #endif
13717 /* We use char because int might match the return type of a gcc2
13718    builtin and then its argument prototype would still apply.  */
13719 char opendir ();
13720 int
13721 main ()
13722 {
13723 opendir ();
13724   ;
13725   return 0;
13726 }
13727 _ACEOF
13728 rm -f conftest.$ac_objext conftest$ac_exeext
13729 if { (eval echo "$as_me:13729: \"$ac_link\"") >&5
13730   (eval $ac_link) 2>&5
13731   ac_status=$?
13732   echo "$as_me:13732: \$? = $ac_status" >&5
13733   (exit $ac_status); } &&
13734          { ac_try='test -s conftest$ac_exeext'
13735   { (eval echo "$as_me:13735: \"$ac_try\"") >&5
13736   (eval $ac_try) 2>&5
13737   ac_status=$?
13738   echo "$as_me:13738: \$? = $ac_status" >&5
13739   (exit $ac_status); }; }; then
13740   ac_cv_lib_x_opendir=yes
13741 else
13742   echo "$as_me: failed program was:" >&5
13743 cat conftest.$ac_ext >&5
13744 ac_cv_lib_x_opendir=no
13745 fi
13746 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13747 LIBS=$ac_check_lib_save_LIBS
13748 fi
13749 echo "$as_me:13749: result: $ac_cv_lib_x_opendir" >&5
13750 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13751 if test $ac_cv_lib_x_opendir = yes; then
13752   LIBS="$LIBS -lx"
13753 fi
13754
13755 fi
13756
13757 echo "$as_me:13757: checking whether time.h and sys/time.h may both be included" >&5
13758 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13759 if test "${ac_cv_header_time+set}" = set; then
13760   echo $ECHO_N "(cached) $ECHO_C" >&6
13761 else
13762   cat >conftest.$ac_ext <<_ACEOF
13763 #line 13763 "configure"
13764 #include "confdefs.h"
13765 #include <sys/types.h>
13766 #include <sys/time.h>
13767 #include <time.h>
13768
13769 int
13770 main ()
13771 {
13772 if ((struct tm *) 0)
13773 return 0;
13774   ;
13775   return 0;
13776 }
13777 _ACEOF
13778 rm -f conftest.$ac_objext
13779 if { (eval echo "$as_me:13779: \"$ac_compile\"") >&5
13780   (eval $ac_compile) 2>&5
13781   ac_status=$?
13782   echo "$as_me:13782: \$? = $ac_status" >&5
13783   (exit $ac_status); } &&
13784          { ac_try='test -s conftest.$ac_objext'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit $ac_status); }; }; then
13790   ac_cv_header_time=yes
13791 else
13792   echo "$as_me: failed program was:" >&5
13793 cat conftest.$ac_ext >&5
13794 ac_cv_header_time=no
13795 fi
13796 rm -f conftest.$ac_objext conftest.$ac_ext
13797 fi
13798 echo "$as_me:13798: result: $ac_cv_header_time" >&5
13799 echo "${ECHO_T}$ac_cv_header_time" >&6
13800 if test $ac_cv_header_time = yes; then
13801
13802 cat >>confdefs.h <<\EOF
13803 #define TIME_WITH_SYS_TIME 1
13804 EOF
13805
13806 fi
13807
13808 cf_regex_func=no
13809
13810 cf_regex_libs="regex re"
13811 case $host_os in #(vi
13812 mingw*)
13813         cf_regex_libs="gnurx $cf_regex_libs"
13814         ;;
13815 esac
13816
13817 echo "$as_me:13817: checking for regcomp" >&5
13818 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13819 if test "${ac_cv_func_regcomp+set}" = set; then
13820   echo $ECHO_N "(cached) $ECHO_C" >&6
13821 else
13822   cat >conftest.$ac_ext <<_ACEOF
13823 #line 13823 "configure"
13824 #include "confdefs.h"
13825 /* System header to define __stub macros and hopefully few prototypes,
13826     which can conflict with char regcomp (); below.  */
13827 #include <assert.h>
13828 /* Override any gcc2 internal prototype to avoid an error.  */
13829 #ifdef __cplusplus
13830 extern "C"
13831 #endif
13832 /* We use char because int might match the return type of a gcc2
13833    builtin and then its argument prototype would still apply.  */
13834 char regcomp ();
13835 char (*f) ();
13836
13837 int
13838 main ()
13839 {
13840 /* The GNU C library defines this for functions which it implements
13841     to always fail with ENOSYS.  Some functions are actually named
13842     something starting with __ and the normal name is an alias.  */
13843 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13844 choke me
13845 #else
13846 f = regcomp;
13847 #endif
13848
13849   ;
13850   return 0;
13851 }
13852 _ACEOF
13853 rm -f conftest.$ac_objext conftest$ac_exeext
13854 if { (eval echo "$as_me:13854: \"$ac_link\"") >&5
13855   (eval $ac_link) 2>&5
13856   ac_status=$?
13857   echo "$as_me:13857: \$? = $ac_status" >&5
13858   (exit $ac_status); } &&
13859          { ac_try='test -s conftest$ac_exeext'
13860   { (eval echo "$as_me:13860: \"$ac_try\"") >&5
13861   (eval $ac_try) 2>&5
13862   ac_status=$?
13863   echo "$as_me:13863: \$? = $ac_status" >&5
13864   (exit $ac_status); }; }; then
13865   ac_cv_func_regcomp=yes
13866 else
13867   echo "$as_me: failed program was:" >&5
13868 cat conftest.$ac_ext >&5
13869 ac_cv_func_regcomp=no
13870 fi
13871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13872 fi
13873 echo "$as_me:13873: result: $ac_cv_func_regcomp" >&5
13874 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13875 if test $ac_cv_func_regcomp = yes; then
13876   cf_regex_func=regcomp
13877 else
13878
13879         for cf_regex_lib in $cf_regex_libs
13880         do
13881                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13882 echo "$as_me:13882: checking for regcomp in -l$cf_regex_lib" >&5
13883 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13884 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13885   echo $ECHO_N "(cached) $ECHO_C" >&6
13886 else
13887   ac_check_lib_save_LIBS=$LIBS
13888 LIBS="-l$cf_regex_lib  $LIBS"
13889 cat >conftest.$ac_ext <<_ACEOF
13890 #line 13890 "configure"
13891 #include "confdefs.h"
13892
13893 /* Override any gcc2 internal prototype to avoid an error.  */
13894 #ifdef __cplusplus
13895 extern "C"
13896 #endif
13897 /* We use char because int might match the return type of a gcc2
13898    builtin and then its argument prototype would still apply.  */
13899 char regcomp ();
13900 int
13901 main ()
13902 {
13903 regcomp ();
13904   ;
13905   return 0;
13906 }
13907 _ACEOF
13908 rm -f conftest.$ac_objext conftest$ac_exeext
13909 if { (eval echo "$as_me:13909: \"$ac_link\"") >&5
13910   (eval $ac_link) 2>&5
13911   ac_status=$?
13912   echo "$as_me:13912: \$? = $ac_status" >&5
13913   (exit $ac_status); } &&
13914          { ac_try='test -s conftest$ac_exeext'
13915   { (eval echo "$as_me:13915: \"$ac_try\"") >&5
13916   (eval $ac_try) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit $ac_status); }; }; then
13920   eval "$as_ac_Lib=yes"
13921 else
13922   echo "$as_me: failed program was:" >&5
13923 cat conftest.$ac_ext >&5
13924 eval "$as_ac_Lib=no"
13925 fi
13926 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13927 LIBS=$ac_check_lib_save_LIBS
13928 fi
13929 echo "$as_me:13929: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13930 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13931 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13932
13933                                 LIBS="-l$cf_regex_lib $LIBS"
13934                                 cf_regex_func=regcomp
13935                                 break
13936 fi
13937
13938         done
13939
13940 fi
13941
13942 if test "$cf_regex_func" = no ; then
13943         echo "$as_me:13943: checking for compile" >&5
13944 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13945 if test "${ac_cv_func_compile+set}" = set; then
13946   echo $ECHO_N "(cached) $ECHO_C" >&6
13947 else
13948   cat >conftest.$ac_ext <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 /* System header to define __stub macros and hopefully few prototypes,
13952     which can conflict with char compile (); below.  */
13953 #include <assert.h>
13954 /* Override any gcc2 internal prototype to avoid an error.  */
13955 #ifdef __cplusplus
13956 extern "C"
13957 #endif
13958 /* We use char because int might match the return type of a gcc2
13959    builtin and then its argument prototype would still apply.  */
13960 char compile ();
13961 char (*f) ();
13962
13963 int
13964 main ()
13965 {
13966 /* The GNU C library defines this for functions which it implements
13967     to always fail with ENOSYS.  Some functions are actually named
13968     something starting with __ and the normal name is an alias.  */
13969 #if defined (__stub_compile) || defined (__stub___compile)
13970 choke me
13971 #else
13972 f = compile;
13973 #endif
13974
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f conftest.$ac_objext conftest$ac_exeext
13980 if { (eval echo "$as_me:13980: \"$ac_link\"") >&5
13981   (eval $ac_link) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit $ac_status); } &&
13985          { ac_try='test -s conftest$ac_exeext'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit $ac_status); }; }; then
13991   ac_cv_func_compile=yes
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat conftest.$ac_ext >&5
13995 ac_cv_func_compile=no
13996 fi
13997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13998 fi
13999 echo "$as_me:13999: result: $ac_cv_func_compile" >&5
14000 echo "${ECHO_T}$ac_cv_func_compile" >&6
14001 if test $ac_cv_func_compile = yes; then
14002   cf_regex_func=compile
14003 else
14004
14005                 echo "$as_me:14005: checking for compile in -lgen" >&5
14006 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14007 if test "${ac_cv_lib_gen_compile+set}" = set; then
14008   echo $ECHO_N "(cached) $ECHO_C" >&6
14009 else
14010   ac_check_lib_save_LIBS=$LIBS
14011 LIBS="-lgen  $LIBS"
14012 cat >conftest.$ac_ext <<_ACEOF
14013 #line 14013 "configure"
14014 #include "confdefs.h"
14015
14016 /* Override any gcc2 internal prototype to avoid an error.  */
14017 #ifdef __cplusplus
14018 extern "C"
14019 #endif
14020 /* We use char because int might match the return type of a gcc2
14021    builtin and then its argument prototype would still apply.  */
14022 char compile ();
14023 int
14024 main ()
14025 {
14026 compile ();
14027   ;
14028   return 0;
14029 }
14030 _ACEOF
14031 rm -f conftest.$ac_objext conftest$ac_exeext
14032 if { (eval echo "$as_me:14032: \"$ac_link\"") >&5
14033   (eval $ac_link) 2>&5
14034   ac_status=$?
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit $ac_status); } &&
14037          { ac_try='test -s conftest$ac_exeext'
14038   { (eval echo "$as_me:14038: \"$ac_try\"") >&5
14039   (eval $ac_try) 2>&5
14040   ac_status=$?
14041   echo "$as_me:14041: \$? = $ac_status" >&5
14042   (exit $ac_status); }; }; then
14043   ac_cv_lib_gen_compile=yes
14044 else
14045   echo "$as_me: failed program was:" >&5
14046 cat conftest.$ac_ext >&5
14047 ac_cv_lib_gen_compile=no
14048 fi
14049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14050 LIBS=$ac_check_lib_save_LIBS
14051 fi
14052 echo "$as_me:14052: result: $ac_cv_lib_gen_compile" >&5
14053 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14054 if test $ac_cv_lib_gen_compile = yes; then
14055
14056                                 LIBS="-lgen $LIBS"
14057                                 cf_regex_func=compile
14058 fi
14059
14060 fi
14061
14062 fi
14063
14064 if test "$cf_regex_func" = no ; then
14065         { echo "$as_me:14065: WARNING: cannot find regular expression library" >&5
14066 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14067 fi
14068
14069 echo "$as_me:14069: checking for regular-expression headers" >&5
14070 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14071 if test "${cf_cv_regex_hdrs+set}" = set; then
14072   echo $ECHO_N "(cached) $ECHO_C" >&6
14073 else
14074
14075 cf_cv_regex_hdrs=no
14076 case $cf_regex_func in #(vi
14077 compile) #(vi
14078         for cf_regex_hdr in regexp.h regexpr.h
14079         do
14080                 cat >conftest.$ac_ext <<_ACEOF
14081 #line 14081 "configure"
14082 #include "confdefs.h"
14083 #include <$cf_regex_hdr>
14084 int
14085 main ()
14086 {
14087
14088                         char *p = compile("", "", "", 0);
14089                         int x = step("", "");
14090
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 rm -f conftest.$ac_objext conftest$ac_exeext
14096 if { (eval echo "$as_me:14096: \"$ac_link\"") >&5
14097   (eval $ac_link) 2>&5
14098   ac_status=$?
14099   echo "$as_me:14099: \$? = $ac_status" >&5
14100   (exit $ac_status); } &&
14101          { ac_try='test -s conftest$ac_exeext'
14102   { (eval echo "$as_me:14102: \"$ac_try\"") >&5
14103   (eval $ac_try) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); }; }; then
14107
14108                         cf_cv_regex_hdrs=$cf_regex_hdr
14109                         break
14110
14111 else
14112   echo "$as_me: failed program was:" >&5
14113 cat conftest.$ac_ext >&5
14114 fi
14115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14116         done
14117         ;;
14118 *)
14119         for cf_regex_hdr in regex.h
14120         do
14121                 cat >conftest.$ac_ext <<_ACEOF
14122 #line 14122 "configure"
14123 #include "confdefs.h"
14124 #include <sys/types.h>
14125 #include <$cf_regex_hdr>
14126 int
14127 main ()
14128 {
14129
14130                         regex_t *p;
14131                         int x = regcomp(p, "", 0);
14132                         int y = regexec(p, "", 0, 0, 0);
14133                         regfree(p);
14134
14135   ;
14136   return 0;
14137 }
14138 _ACEOF
14139 rm -f conftest.$ac_objext conftest$ac_exeext
14140 if { (eval echo "$as_me:14140: \"$ac_link\"") >&5
14141   (eval $ac_link) 2>&5
14142   ac_status=$?
14143   echo "$as_me:14143: \$? = $ac_status" >&5
14144   (exit $ac_status); } &&
14145          { ac_try='test -s conftest$ac_exeext'
14146   { (eval echo "$as_me:14146: \"$ac_try\"") >&5
14147   (eval $ac_try) 2>&5
14148   ac_status=$?
14149   echo "$as_me:14149: \$? = $ac_status" >&5
14150   (exit $ac_status); }; }; then
14151
14152                         cf_cv_regex_hdrs=$cf_regex_hdr
14153                         break
14154
14155 else
14156   echo "$as_me: failed program was:" >&5
14157 cat conftest.$ac_ext >&5
14158 fi
14159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14160         done
14161         ;;
14162 esac
14163
14164 fi
14165 echo "$as_me:14165: result: $cf_cv_regex_hdrs" >&5
14166 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14167
14168 case $cf_cv_regex_hdrs in #(vi
14169     no)        { echo "$as_me:14169: WARNING: no regular expression header found" >&5
14170 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14171     regex.h)   cat >>confdefs.h <<\EOF
14172 #define HAVE_REGEX_H_FUNCS 1
14173 EOF
14174  ;; #(vi
14175     regexp.h)  cat >>confdefs.h <<\EOF
14176 #define HAVE_REGEXP_H_FUNCS 1
14177 EOF
14178  ;; #(vi
14179     regexpr.h) cat >>confdefs.h <<\EOF
14180 #define HAVE_REGEXPR_H_FUNCS 1
14181 EOF
14182  ;;
14183 esac
14184
14185 for ac_header in \
14186 fcntl.h \
14187 getopt.h \
14188 limits.h \
14189 locale.h \
14190 math.h \
14191 poll.h \
14192 sys/bsdtypes.h \
14193 sys/ioctl.h \
14194 sys/param.h \
14195 sys/poll.h \
14196 sys/select.h \
14197 sys/time.h \
14198 sys/times.h \
14199 ttyent.h \
14200 unistd.h \
14201 wctype.h \
14202
14203 do
14204 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14205 echo "$as_me:14205: checking for $ac_header" >&5
14206 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14207 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14208   echo $ECHO_N "(cached) $ECHO_C" >&6
14209 else
14210   cat >conftest.$ac_ext <<_ACEOF
14211 #line 14211 "configure"
14212 #include "confdefs.h"
14213 #include <$ac_header>
14214 _ACEOF
14215 if { (eval echo "$as_me:14215: \"$ac_cpp conftest.$ac_ext\"") >&5
14216   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14217   ac_status=$?
14218   egrep -v '^ *\+' conftest.er1 >conftest.err
14219   rm -f conftest.er1
14220   cat conftest.err >&5
14221   echo "$as_me:14221: \$? = $ac_status" >&5
14222   (exit $ac_status); } >/dev/null; then
14223   if test -s conftest.err; then
14224     ac_cpp_err=$ac_c_preproc_warn_flag
14225   else
14226     ac_cpp_err=
14227   fi
14228 else
14229   ac_cpp_err=yes
14230 fi
14231 if test -z "$ac_cpp_err"; then
14232   eval "$as_ac_Header=yes"
14233 else
14234   echo "$as_me: failed program was:" >&5
14235   cat conftest.$ac_ext >&5
14236   eval "$as_ac_Header=no"
14237 fi
14238 rm -f conftest.err conftest.$ac_ext
14239 fi
14240 echo "$as_me:14240: result: `eval echo '${'$as_ac_Header'}'`" >&5
14241 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14242 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14243   cat >>confdefs.h <<EOF
14244 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14245 EOF
14246
14247 fi
14248 done
14249
14250 for ac_header in unistd.h getopt.h
14251 do
14252 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14253 echo "$as_me:14253: checking for $ac_header" >&5
14254 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14255 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14256   echo $ECHO_N "(cached) $ECHO_C" >&6
14257 else
14258   cat >conftest.$ac_ext <<_ACEOF
14259 #line 14259 "configure"
14260 #include "confdefs.h"
14261 #include <$ac_header>
14262 _ACEOF
14263 if { (eval echo "$as_me:14263: \"$ac_cpp conftest.$ac_ext\"") >&5
14264   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14265   ac_status=$?
14266   egrep -v '^ *\+' conftest.er1 >conftest.err
14267   rm -f conftest.er1
14268   cat conftest.err >&5
14269   echo "$as_me:14269: \$? = $ac_status" >&5
14270   (exit $ac_status); } >/dev/null; then
14271   if test -s conftest.err; then
14272     ac_cpp_err=$ac_c_preproc_warn_flag
14273   else
14274     ac_cpp_err=
14275   fi
14276 else
14277   ac_cpp_err=yes
14278 fi
14279 if test -z "$ac_cpp_err"; then
14280   eval "$as_ac_Header=yes"
14281 else
14282   echo "$as_me: failed program was:" >&5
14283   cat conftest.$ac_ext >&5
14284   eval "$as_ac_Header=no"
14285 fi
14286 rm -f conftest.err conftest.$ac_ext
14287 fi
14288 echo "$as_me:14288: result: `eval echo '${'$as_ac_Header'}'`" >&5
14289 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14290 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14291   cat >>confdefs.h <<EOF
14292 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14293 EOF
14294
14295 fi
14296 done
14297
14298 echo "$as_me:14298: checking for header declaring getopt variables" >&5
14299 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14300 if test "${cf_cv_getopt_header+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303
14304 cf_cv_getopt_header=none
14305 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14306 do
14307 cat >conftest.$ac_ext <<_ACEOF
14308 #line 14308 "configure"
14309 #include "confdefs.h"
14310
14311 #include <$cf_header>
14312 int
14313 main ()
14314 {
14315 int x = optind; char *y = optarg
14316   ;
14317   return 0;
14318 }
14319 _ACEOF
14320 rm -f conftest.$ac_objext
14321 if { (eval echo "$as_me:14321: \"$ac_compile\"") >&5
14322   (eval $ac_compile) 2>&5
14323   ac_status=$?
14324   echo "$as_me:14324: \$? = $ac_status" >&5
14325   (exit $ac_status); } &&
14326          { ac_try='test -s conftest.$ac_objext'
14327   { (eval echo "$as_me:14327: \"$ac_try\"") >&5
14328   (eval $ac_try) 2>&5
14329   ac_status=$?
14330   echo "$as_me:14330: \$? = $ac_status" >&5
14331   (exit $ac_status); }; }; then
14332   cf_cv_getopt_header=$cf_header
14333  break
14334 else
14335   echo "$as_me: failed program was:" >&5
14336 cat conftest.$ac_ext >&5
14337 fi
14338 rm -f conftest.$ac_objext conftest.$ac_ext
14339 done
14340
14341 fi
14342 echo "$as_me:14342: result: $cf_cv_getopt_header" >&5
14343 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14344 if test $cf_cv_getopt_header != none ; then
14345         cat >>confdefs.h <<\EOF
14346 #define HAVE_GETOPT_HEADER 1
14347 EOF
14348
14349 fi
14350
14351 # check for ISC (this may also define _POSIX_SOURCE)
14352 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14353 if test "$ISC" = yes ; then
14354
14355 echo "$as_me:14355: checking for main in -lcposix" >&5
14356 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14357 if test "${ac_cv_lib_cposix_main+set}" = set; then
14358   echo $ECHO_N "(cached) $ECHO_C" >&6
14359 else
14360   ac_check_lib_save_LIBS=$LIBS
14361 LIBS="-lcposix  $LIBS"
14362 cat >conftest.$ac_ext <<_ACEOF
14363 #line 14363 "configure"
14364 #include "confdefs.h"
14365
14366 int
14367 main ()
14368 {
14369 main ();
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f conftest.$ac_objext conftest$ac_exeext
14375 if { (eval echo "$as_me:14375: \"$ac_link\"") >&5
14376   (eval $ac_link) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); } &&
14380          { ac_try='test -s conftest$ac_exeext'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); }; }; then
14386   ac_cv_lib_cposix_main=yes
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat conftest.$ac_ext >&5
14390 ac_cv_lib_cposix_main=no
14391 fi
14392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14393 LIBS=$ac_check_lib_save_LIBS
14394 fi
14395 echo "$as_me:14395: result: $ac_cv_lib_cposix_main" >&5
14396 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14397 if test $ac_cv_lib_cposix_main = yes; then
14398   cat >>confdefs.h <<EOF
14399 #define HAVE_LIBCPOSIX 1
14400 EOF
14401
14402   LIBS="-lcposix $LIBS"
14403
14404 fi
14405
14406         echo "$as_me:14406: checking for bzero in -linet" >&5
14407 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14408 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14409   echo $ECHO_N "(cached) $ECHO_C" >&6
14410 else
14411   ac_check_lib_save_LIBS=$LIBS
14412 LIBS="-linet  $LIBS"
14413 cat >conftest.$ac_ext <<_ACEOF
14414 #line 14414 "configure"
14415 #include "confdefs.h"
14416
14417 /* Override any gcc2 internal prototype to avoid an error.  */
14418 #ifdef __cplusplus
14419 extern "C"
14420 #endif
14421 /* We use char because int might match the return type of a gcc2
14422    builtin and then its argument prototype would still apply.  */
14423 char bzero ();
14424 int
14425 main ()
14426 {
14427 bzero ();
14428   ;
14429   return 0;
14430 }
14431 _ACEOF
14432 rm -f conftest.$ac_objext conftest$ac_exeext
14433 if { (eval echo "$as_me:14433: \"$ac_link\"") >&5
14434   (eval $ac_link) 2>&5
14435   ac_status=$?
14436   echo "$as_me:14436: \$? = $ac_status" >&5
14437   (exit $ac_status); } &&
14438          { ac_try='test -s conftest$ac_exeext'
14439   { (eval echo "$as_me:14439: \"$ac_try\"") >&5
14440   (eval $ac_try) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); }; }; then
14444   ac_cv_lib_inet_bzero=yes
14445 else
14446   echo "$as_me: failed program was:" >&5
14447 cat conftest.$ac_ext >&5
14448 ac_cv_lib_inet_bzero=no
14449 fi
14450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14451 LIBS=$ac_check_lib_save_LIBS
14452 fi
14453 echo "$as_me:14453: result: $ac_cv_lib_inet_bzero" >&5
14454 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14455 if test $ac_cv_lib_inet_bzero = yes; then
14456   LIBS="-linet $LIBS"
14457 fi
14458 fi
14459
14460 echo "$as_me:14460: checking if sys/time.h works with sys/select.h" >&5
14461 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14462 if test "${cf_cv_sys_time_select+set}" = set; then
14463   echo $ECHO_N "(cached) $ECHO_C" >&6
14464 else
14465
14466 cat >conftest.$ac_ext <<_ACEOF
14467 #line 14467 "configure"
14468 #include "confdefs.h"
14469
14470 #include <sys/types.h>
14471 #ifdef HAVE_SYS_TIME_H
14472 #include <sys/time.h>
14473 #endif
14474 #ifdef HAVE_SYS_SELECT_H
14475 #include <sys/select.h>
14476 #endif
14477
14478 int
14479 main ()
14480 {
14481
14482   ;
14483   return 0;
14484 }
14485 _ACEOF
14486 rm -f conftest.$ac_objext
14487 if { (eval echo "$as_me:14487: \"$ac_compile\"") >&5
14488   (eval $ac_compile) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit $ac_status); } &&
14492          { ac_try='test -s conftest.$ac_objext'
14493   { (eval echo "$as_me:14493: \"$ac_try\"") >&5
14494   (eval $ac_try) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); }; }; then
14498   cf_cv_sys_time_select=yes
14499 else
14500   echo "$as_me: failed program was:" >&5
14501 cat conftest.$ac_ext >&5
14502 cf_cv_sys_time_select=no
14503 fi
14504 rm -f conftest.$ac_objext conftest.$ac_ext
14505
14506 fi
14507
14508 echo "$as_me:14508: result: $cf_cv_sys_time_select" >&5
14509 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14510 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14511 #define HAVE_SYS_TIME_SELECT 1
14512 EOF
14513
14514 ###     checks for compiler characteristics
14515 ac_ext=c
14516 ac_cpp='$CPP $CPPFLAGS'
14517 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14518 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14520 ac_main_return=return
14521
14522 echo "$as_me:14522: checking for $CC option to accept ANSI C" >&5
14523 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
14524 if test "${ac_cv_prog_cc_stdc+set}" = set; then
14525   echo $ECHO_N "(cached) $ECHO_C" >&6
14526 else
14527   ac_cv_prog_cc_stdc=no
14528 ac_save_CC=$CC
14529 cat >conftest.$ac_ext <<_ACEOF
14530 #line 14530 "configure"
14531 #include "confdefs.h"
14532 #include <stdarg.h>
14533 #include <stdio.h>
14534 #include <sys/types.h>
14535 #include <sys/stat.h>
14536 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
14537 struct buf { int x; };
14538 FILE * (*rcsopen) (struct buf *, struct stat *, int);
14539 static char *e (p, i)
14540      char **p;
14541      int i;
14542 {
14543   return p[i];
14544 }
14545 static char *f (char * (*g) (char **, int), char **p, ...)
14546 {
14547   char *s;
14548   va_list v;
14549   va_start (v,p);
14550   s = g (p, va_arg (v,int));
14551   va_end (v);
14552   return s;
14553 }
14554 int test (int i, double x);
14555 struct s1 {int (*f) (int a);};
14556 struct s2 {int (*f) (double a);};
14557 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
14558 int argc;
14559 char **argv;
14560 int
14561 main ()
14562 {
14563 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
14564   ;
14565   return 0;
14566 }
14567 _ACEOF
14568 # Don't try gcc -ansi; that turns off useful extensions and
14569 # breaks some systems' header files.
14570 # AIX                   -qlanglvl=ansi
14571 # Ultrix and OSF/1      -std1
14572 # HP-UX 10.20 and later -Ae
14573 # HP-UX older versions  -Aa -D_HPUX_SOURCE
14574 # SVR4                  -Xc -D__EXTENSIONS__
14575 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
14576 do
14577   CC="$ac_save_CC $ac_arg"
14578   rm -f conftest.$ac_objext
14579 if { (eval echo "$as_me:14579: \"$ac_compile\"") >&5
14580   (eval $ac_compile) 2>&5
14581   ac_status=$?
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); } &&
14584          { ac_try='test -s conftest.$ac_objext'
14585   { (eval echo "$as_me:14585: \"$ac_try\"") >&5
14586   (eval $ac_try) 2>&5
14587   ac_status=$?
14588   echo "$as_me:14588: \$? = $ac_status" >&5
14589   (exit $ac_status); }; }; then
14590   ac_cv_prog_cc_stdc=$ac_arg
14591 break
14592 else
14593   echo "$as_me: failed program was:" >&5
14594 cat conftest.$ac_ext >&5
14595 fi
14596 rm -f conftest.$ac_objext
14597 done
14598 rm -f conftest.$ac_ext conftest.$ac_objext
14599 CC=$ac_save_CC
14600
14601 fi
14602
14603 case "x$ac_cv_prog_cc_stdc" in
14604   x|xno)
14605     echo "$as_me:14605: result: none needed" >&5
14606 echo "${ECHO_T}none needed" >&6 ;;
14607   *)
14608     echo "$as_me:14608: result: $ac_cv_prog_cc_stdc" >&5
14609 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
14610     CC="$CC $ac_cv_prog_cc_stdc" ;;
14611 esac
14612
14613 echo "$as_me:14613: checking for an ANSI C-conforming const" >&5
14614 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14615 if test "${ac_cv_c_const+set}" = set; then
14616   echo $ECHO_N "(cached) $ECHO_C" >&6
14617 else
14618   cat >conftest.$ac_ext <<_ACEOF
14619 #line 14619 "configure"
14620 #include "confdefs.h"
14621
14622 int
14623 main ()
14624 {
14625 /* FIXME: Include the comments suggested by Paul. */
14626 #ifndef __cplusplus
14627   /* Ultrix mips cc rejects this.  */
14628   typedef int charset[2];
14629   const charset x;
14630   /* SunOS 4.1.1 cc rejects this.  */
14631   char const *const *ccp;
14632   char **p;
14633   /* NEC SVR4.0.2 mips cc rejects this.  */
14634   struct point {int x, y;};
14635   static struct point const zero = {0,0};
14636   /* AIX XL C 1.02.0.0 rejects this.
14637      It does not let you subtract one const X* pointer from another in
14638      an arm of an if-expression whose if-part is not a constant
14639      expression */
14640   const char *g = "string";
14641   ccp = &g + (g ? g-g : 0);
14642   /* HPUX 7.0 cc rejects these. */
14643   ++ccp;
14644   p = (char**) ccp;
14645   ccp = (char const *const *) p;
14646   { /* SCO 3.2v4 cc rejects this.  */
14647     char *t;
14648     char const *s = 0 ? (char *) 0 : (char const *) 0;
14649
14650     *t++ = 0;
14651   }
14652   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14653     int x[] = {25, 17};
14654     const int *foo = &x[0];
14655     ++foo;
14656   }
14657   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14658     typedef const int *iptr;
14659     iptr p = 0;
14660     ++p;
14661   }
14662   { /* AIX XL C 1.02.0.0 rejects this saying
14663        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14664     struct s { int j; const int *ap[3]; };
14665     struct s *b; b->j = 5;
14666   }
14667   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14668     const int foo = 10;
14669   }
14670 #endif
14671
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f conftest.$ac_objext
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678   (eval $ac_compile) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); } &&
14682          { ac_try='test -s conftest.$ac_objext'
14683   { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit $ac_status); }; }; then
14688   ac_cv_c_const=yes
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat conftest.$ac_ext >&5
14692 ac_cv_c_const=no
14693 fi
14694 rm -f conftest.$ac_objext conftest.$ac_ext
14695 fi
14696 echo "$as_me:14696: result: $ac_cv_c_const" >&5
14697 echo "${ECHO_T}$ac_cv_c_const" >&6
14698 if test $ac_cv_c_const = no; then
14699
14700 cat >>confdefs.h <<\EOF
14701 #define const
14702 EOF
14703
14704 fi
14705
14706 echo "$as_me:14706: checking for inline" >&5
14707 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14708 if test "${ac_cv_c_inline+set}" = set; then
14709   echo $ECHO_N "(cached) $ECHO_C" >&6
14710 else
14711   ac_cv_c_inline=no
14712 for ac_kw in inline __inline__ __inline; do
14713   cat >conftest.$ac_ext <<_ACEOF
14714 #line 14714 "configure"
14715 #include "confdefs.h"
14716 #ifndef __cplusplus
14717 static $ac_kw int static_foo () {return 0; }
14718 $ac_kw int foo () {return 0; }
14719 #endif
14720
14721 _ACEOF
14722 rm -f conftest.$ac_objext
14723 if { (eval echo "$as_me:14723: \"$ac_compile\"") >&5
14724   (eval $ac_compile) 2>&5
14725   ac_status=$?
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit $ac_status); } &&
14728          { ac_try='test -s conftest.$ac_objext'
14729   { (eval echo "$as_me:14729: \"$ac_try\"") >&5
14730   (eval $ac_try) 2>&5
14731   ac_status=$?
14732   echo "$as_me:14732: \$? = $ac_status" >&5
14733   (exit $ac_status); }; }; then
14734   ac_cv_c_inline=$ac_kw; break
14735 else
14736   echo "$as_me: failed program was:" >&5
14737 cat conftest.$ac_ext >&5
14738 fi
14739 rm -f conftest.$ac_objext conftest.$ac_ext
14740 done
14741
14742 fi
14743 echo "$as_me:14743: result: $ac_cv_c_inline" >&5
14744 echo "${ECHO_T}$ac_cv_c_inline" >&6
14745 case $ac_cv_c_inline in
14746   inline | yes) ;;
14747   no)
14748 cat >>confdefs.h <<\EOF
14749 #define inline
14750 EOF
14751  ;;
14752   *)  cat >>confdefs.h <<EOF
14753 #define inline $ac_cv_c_inline
14754 EOF
14755  ;;
14756 esac
14757
14758 NCURSES_INLINE=
14759 if test "$ac_cv_c_inline" != no ; then
14760   NCURSES_INLINE=inline
14761   if test "$INTEL_COMPILER" = yes
14762   then
14763     :
14764   elif test "$GCC" = yes
14765   then
14766     echo "$as_me:14766: checking if $CC supports options to tune inlining" >&5
14767 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14768 if test "${cf_cv_gcc_inline+set}" = set; then
14769   echo $ECHO_N "(cached) $ECHO_C" >&6
14770 else
14771
14772       cf_save_CFLAGS=$CFLAGS
14773       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14774       cat >conftest.$ac_ext <<_ACEOF
14775 #line 14775 "configure"
14776 #include "confdefs.h"
14777 inline int foo(void) { return 1; }
14778 int
14779 main ()
14780 {
14781 ${cf_cv_main_return:-return} foo()
14782   ;
14783   return 0;
14784 }
14785 _ACEOF
14786 rm -f conftest.$ac_objext
14787 if { (eval echo "$as_me:14787: \"$ac_compile\"") >&5
14788   (eval $ac_compile) 2>&5
14789   ac_status=$?
14790   echo "$as_me:14790: \$? = $ac_status" >&5
14791   (exit $ac_status); } &&
14792          { ac_try='test -s conftest.$ac_objext'
14793   { (eval echo "$as_me:14793: \"$ac_try\"") >&5
14794   (eval $ac_try) 2>&5
14795   ac_status=$?
14796   echo "$as_me:14796: \$? = $ac_status" >&5
14797   (exit $ac_status); }; }; then
14798   cf_cv_gcc_inline=yes
14799 else
14800   echo "$as_me: failed program was:" >&5
14801 cat conftest.$ac_ext >&5
14802 cf_cv_gcc_inline=no
14803 fi
14804 rm -f conftest.$ac_objext conftest.$ac_ext
14805       CFLAGS=$cf_save_CFLAGS
14806
14807 fi
14808 echo "$as_me:14808: result: $cf_cv_gcc_inline" >&5
14809 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14810     if test "$cf_cv_gcc_inline" = yes ; then
14811
14812 cf_fix_cppflags=no
14813 cf_new_cflags=
14814 cf_new_cppflags=
14815 cf_new_extra_cppflags=
14816
14817 for cf_add_cflags in --param max-inline-insns-single=1200
14818 do
14819 case $cf_fix_cppflags in
14820 no)
14821         case $cf_add_cflags in #(vi
14822         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14823                 case $cf_add_cflags in
14824                 -D*)
14825                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14826
14827                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14828                                 && test -z "${cf_tst_cflags}" \
14829                                 && cf_fix_cppflags=yes
14830
14831                         if test $cf_fix_cppflags = yes ; then
14832                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14833                                 continue
14834                         elif test "${cf_tst_cflags}" = "\"'" ; then
14835                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14836                                 continue
14837                         fi
14838                         ;;
14839                 esac
14840                 case "$CPPFLAGS" in
14841                 *$cf_add_cflags) #(vi
14842                         ;;
14843                 *) #(vi
14844                         case $cf_add_cflags in #(vi
14845                         -D*)
14846                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14847
14848 CPPFLAGS=`echo "$CPPFLAGS" | \
14849         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14850                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14851
14852                                 ;;
14853                         esac
14854                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14855                         ;;
14856                 esac
14857                 ;;
14858         *)
14859                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14860                 ;;
14861         esac
14862         ;;
14863 yes)
14864         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14865
14866         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14867
14868         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14869                 && test -z "${cf_tst_cflags}" \
14870                 && cf_fix_cppflags=no
14871         ;;
14872 esac
14873 done
14874
14875 if test -n "$cf_new_cflags" ; then
14876
14877         CFLAGS="$CFLAGS $cf_new_cflags"
14878 fi
14879
14880 if test -n "$cf_new_cppflags" ; then
14881
14882         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14883 fi
14884
14885 if test -n "$cf_new_extra_cppflags" ; then
14886
14887         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14888 fi
14889
14890     fi
14891   fi
14892 fi
14893
14894 echo "$as_me:14894: checking for signal global datatype" >&5
14895 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14896 if test "${cf_cv_sig_atomic_t+set}" = set; then
14897   echo $ECHO_N "(cached) $ECHO_C" >&6
14898 else
14899
14900         for cf_type in \
14901                 "volatile sig_atomic_t" \
14902                 "sig_atomic_t" \
14903                 "int"
14904         do
14905         cat >conftest.$ac_ext <<_ACEOF
14906 #line 14906 "configure"
14907 #include "confdefs.h"
14908
14909 #include <sys/types.h>
14910 #include <signal.h>
14911 #include <stdio.h>
14912
14913 extern $cf_type x;
14914 $cf_type x;
14915 static void handler(int sig)
14916 {
14917         x = 5;
14918 }
14919 int
14920 main ()
14921 {
14922 signal(SIGINT, handler);
14923                  x = 1
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 rm -f conftest.$ac_objext
14929 if { (eval echo "$as_me:14929: \"$ac_compile\"") >&5
14930   (eval $ac_compile) 2>&5
14931   ac_status=$?
14932   echo "$as_me:14932: \$? = $ac_status" >&5
14933   (exit $ac_status); } &&
14934          { ac_try='test -s conftest.$ac_objext'
14935   { (eval echo "$as_me:14935: \"$ac_try\"") >&5
14936   (eval $ac_try) 2>&5
14937   ac_status=$?
14938   echo "$as_me:14938: \$? = $ac_status" >&5
14939   (exit $ac_status); }; }; then
14940   cf_cv_sig_atomic_t=$cf_type
14941 else
14942   echo "$as_me: failed program was:" >&5
14943 cat conftest.$ac_ext >&5
14944 cf_cv_sig_atomic_t=no
14945 fi
14946 rm -f conftest.$ac_objext conftest.$ac_ext
14947                 test "$cf_cv_sig_atomic_t" != no && break
14948         done
14949
14950 fi
14951
14952 echo "$as_me:14952: result: $cf_cv_sig_atomic_t" >&5
14953 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14954 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14955 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14956 EOF
14957
14958 if test $NCURSES_CHTYPE = auto ; then
14959
14960 echo "$as_me:14960: checking for type of chtype" >&5
14961 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14962 if test "${cf_cv_typeof_chtype+set}" = set; then
14963   echo $ECHO_N "(cached) $ECHO_C" >&6
14964 else
14965
14966                 if test "$cross_compiling" = yes; then
14967   cf_cv_typeof_chtype=long
14968 else
14969   cat >conftest.$ac_ext <<_ACEOF
14970 #line 14970 "configure"
14971 #include "confdefs.h"
14972
14973 #define WANT_BITS 31
14974 #include <stdio.h>
14975 int main()
14976 {
14977         FILE *fp = fopen("cf_test.out", "w");
14978         if (fp != 0) {
14979                 char *result = "long";
14980                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14981                         int n;
14982                         unsigned int x, y;
14983                         for (n = 0; n < WANT_BITS; n++) {
14984                                 x = (1 << n);
14985                                 y = (x >> n);
14986                                 if (y != 1 || x == 0) {
14987                                         x = 0;
14988                                         break;
14989                                 }
14990                         }
14991                         /*
14992                          * If x is nonzero, an int is big enough for the bits
14993                          * that we want.
14994                          */
14995                         result = (x != 0) ? "int" : "long";
14996                 }
14997                 fputs(result, fp);
14998                 fclose(fp);
14999         }
15000         ${cf_cv_main_return:-return}(0);
15001 }
15002
15003 _ACEOF
15004 rm -f conftest$ac_exeext
15005 if { (eval echo "$as_me:15005: \"$ac_link\"") >&5
15006   (eval $ac_link) 2>&5
15007   ac_status=$?
15008   echo "$as_me:15008: \$? = $ac_status" >&5
15009   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15010   { (eval echo "$as_me:15010: \"$ac_try\"") >&5
15011   (eval $ac_try) 2>&5
15012   ac_status=$?
15013   echo "$as_me:15013: \$? = $ac_status" >&5
15014   (exit $ac_status); }; }; then
15015   cf_cv_typeof_chtype=`cat cf_test.out`
15016 else
15017   echo "$as_me: program exited with status $ac_status" >&5
15018 echo "$as_me: failed program was:" >&5
15019 cat conftest.$ac_ext >&5
15020 cf_cv_typeof_chtype=long
15021 fi
15022 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15023 fi
15024                 rm -f cf_test.out
15025
15026 fi
15027
15028 echo "$as_me:15028: result: $cf_cv_typeof_chtype" >&5
15029 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15030
15031 cat >>confdefs.h <<EOF
15032 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15033 EOF
15034
15035 else
15036         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15037 fi
15038 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15039
15040 echo "$as_me:15040: checking if unsigned literals are legal" >&5
15041 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15042 if test "${cf_cv_unsigned_literals+set}" = set; then
15043   echo $ECHO_N "(cached) $ECHO_C" >&6
15044 else
15045
15046         cat >conftest.$ac_ext <<_ACEOF
15047 #line 15047 "configure"
15048 #include "confdefs.h"
15049
15050 int
15051 main ()
15052 {
15053 long x = 1L + 1UL + 1U + 1
15054   ;
15055   return 0;
15056 }
15057 _ACEOF
15058 rm -f conftest.$ac_objext
15059 if { (eval echo "$as_me:15059: \"$ac_compile\"") >&5
15060   (eval $ac_compile) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); } &&
15064          { ac_try='test -s conftest.$ac_objext'
15065   { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   cf_cv_unsigned_literals=yes
15071 else
15072   echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15074 cf_cv_unsigned_literals=no
15075 fi
15076 rm -f conftest.$ac_objext conftest.$ac_ext
15077
15078 fi
15079
15080 echo "$as_me:15080: result: $cf_cv_unsigned_literals" >&5
15081 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15082
15083 cf_cv_1UL="1"
15084 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15085 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15086
15087 if test $NCURSES_MMASK_T = auto ; then
15088         cf_cv_typeof_mmask_t=long
15089 else
15090         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15091 fi
15092 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15093
15094 ###     Checks for external-data
15095
15096 echo "$as_me:15096: checking if external errno is declared" >&5
15097 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15098 if test "${cf_cv_dcl_errno+set}" = set; then
15099   echo $ECHO_N "(cached) $ECHO_C" >&6
15100 else
15101
15102     cat >conftest.$ac_ext <<_ACEOF
15103 #line 15103 "configure"
15104 #include "confdefs.h"
15105
15106 #ifdef HAVE_STDLIB_H
15107 #include <stdlib.h>
15108 #endif
15109 #include <stdio.h>
15110 #include <sys/types.h>
15111 #include <errno.h>
15112 int
15113 main ()
15114 {
15115 int x = (int) errno
15116   ;
15117   return 0;
15118 }
15119 _ACEOF
15120 rm -f conftest.$ac_objext
15121 if { (eval echo "$as_me:15121: \"$ac_compile\"") >&5
15122   (eval $ac_compile) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); } &&
15126          { ac_try='test -s conftest.$ac_objext'
15127   { (eval echo "$as_me:15127: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); }; }; then
15132   cf_cv_dcl_errno=yes
15133 else
15134   echo "$as_me: failed program was:" >&5
15135 cat conftest.$ac_ext >&5
15136 cf_cv_dcl_errno=no
15137 fi
15138 rm -f conftest.$ac_objext conftest.$ac_ext
15139
15140 fi
15141 echo "$as_me:15141: result: $cf_cv_dcl_errno" >&5
15142 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15143
15144 if test "$cf_cv_dcl_errno" = no ; then
15145
15146 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15147
15148     cat >>confdefs.h <<EOF
15149 #define $cf_result 1
15150 EOF
15151
15152 fi
15153
15154 # It's possible (for near-UNIX clones) that the data doesn't exist
15155
15156 echo "$as_me:15156: checking if external errno exists" >&5
15157 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15158 if test "${cf_cv_have_errno+set}" = set; then
15159   echo $ECHO_N "(cached) $ECHO_C" >&6
15160 else
15161
15162     cat >conftest.$ac_ext <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165
15166 #undef errno
15167 extern int errno;
15168
15169 int
15170 main ()
15171 {
15172 errno = 2
15173   ;
15174   return 0;
15175 }
15176 _ACEOF
15177 rm -f conftest.$ac_objext conftest$ac_exeext
15178 if { (eval echo "$as_me:15178: \"$ac_link\"") >&5
15179   (eval $ac_link) 2>&5
15180   ac_status=$?
15181   echo "$as_me:15181: \$? = $ac_status" >&5
15182   (exit $ac_status); } &&
15183          { ac_try='test -s conftest$ac_exeext'
15184   { (eval echo "$as_me:15184: \"$ac_try\"") >&5
15185   (eval $ac_try) 2>&5
15186   ac_status=$?
15187   echo "$as_me:15187: \$? = $ac_status" >&5
15188   (exit $ac_status); }; }; then
15189   cf_cv_have_errno=yes
15190 else
15191   echo "$as_me: failed program was:" >&5
15192 cat conftest.$ac_ext >&5
15193 cf_cv_have_errno=no
15194 fi
15195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15196
15197 fi
15198 echo "$as_me:15198: result: $cf_cv_have_errno" >&5
15199 echo "${ECHO_T}$cf_cv_have_errno" >&6
15200
15201 if test "$cf_cv_have_errno" = yes ; then
15202
15203 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15204
15205     cat >>confdefs.h <<EOF
15206 #define $cf_result 1
15207 EOF
15208
15209 fi
15210
15211 echo "$as_me:15211: checking if data-only library module links" >&5
15212 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15213 if test "${cf_cv_link_dataonly+set}" = set; then
15214   echo $ECHO_N "(cached) $ECHO_C" >&6
15215 else
15216
15217         rm -f conftest.a
15218         cat >conftest.$ac_ext <<EOF
15219 #line 15219 "configure"
15220 int     testdata[3] = { 123, 456, 789 };
15221 EOF
15222         if { (eval echo "$as_me:15222: \"$ac_compile\"") >&5
15223   (eval $ac_compile) 2>&5
15224   ac_status=$?
15225   echo "$as_me:15225: \$? = $ac_status" >&5
15226   (exit $ac_status); } ; then
15227                 mv conftest.o data.o && \
15228                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15229         fi
15230         rm -f conftest.$ac_ext data.o
15231         cat >conftest.$ac_ext <<EOF
15232 #line 15232 "configure"
15233 int     testfunc()
15234 {
15235 #if defined(NeXT)
15236         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15237 #else
15238         extern int testdata[3];
15239         return testdata[0] == 123
15240            &&  testdata[1] == 456
15241            &&  testdata[2] == 789;
15242 #endif
15243 }
15244 EOF
15245         if { (eval echo "$as_me:15245: \"$ac_compile\"") >&5
15246   (eval $ac_compile) 2>&5
15247   ac_status=$?
15248   echo "$as_me:15248: \$? = $ac_status" >&5
15249   (exit $ac_status); }; then
15250                 mv conftest.o func.o && \
15251                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15252         fi
15253         rm -f conftest.$ac_ext func.o
15254         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15255         cf_saveLIBS="$LIBS"
15256         LIBS="conftest.a $LIBS"
15257         if test "$cross_compiling" = yes; then
15258   cf_cv_link_dataonly=unknown
15259 else
15260   cat >conftest.$ac_ext <<_ACEOF
15261 #line 15261 "configure"
15262 #include "confdefs.h"
15263
15264         int main()
15265         {
15266                 extern int testfunc();
15267                 ${cf_cv_main_return:-return} (!testfunc());
15268         }
15269
15270 _ACEOF
15271 rm -f conftest$ac_exeext
15272 if { (eval echo "$as_me:15272: \"$ac_link\"") >&5
15273   (eval $ac_link) 2>&5
15274   ac_status=$?
15275   echo "$as_me:15275: \$? = $ac_status" >&5
15276   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15277   { (eval echo "$as_me:15277: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282   cf_cv_link_dataonly=yes
15283 else
15284   echo "$as_me: program exited with status $ac_status" >&5
15285 echo "$as_me: failed program was:" >&5
15286 cat conftest.$ac_ext >&5
15287 cf_cv_link_dataonly=no
15288 fi
15289 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15290 fi
15291         LIBS="$cf_saveLIBS"
15292
15293 fi
15294
15295 echo "$as_me:15295: result: $cf_cv_link_dataonly" >&5
15296 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15297
15298 if test "$cf_cv_link_dataonly" = no ; then
15299         cat >>confdefs.h <<\EOF
15300 #define BROKEN_LINKER 1
15301 EOF
15302
15303         BROKEN_LINKER=1
15304 fi
15305
15306 ###     Checks for library functions.
15307
15308 for ac_func in \
15309 getcwd \
15310 getegid \
15311 geteuid \
15312 getttynam \
15313 issetugid \
15314 poll \
15315 remove \
15316 select \
15317 setbuf \
15318 setbuffer \
15319 setvbuf \
15320 sigaction \
15321 sigvec \
15322 strdup \
15323 strstr \
15324 tcgetpgrp \
15325 times \
15326 vsnprintf \
15327
15328 do
15329 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15330 echo "$as_me:15330: checking for $ac_func" >&5
15331 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15332 if eval "test \"\${$as_ac_var+set}\" = set"; then
15333   echo $ECHO_N "(cached) $ECHO_C" >&6
15334 else
15335   cat >conftest.$ac_ext <<_ACEOF
15336 #line 15336 "configure"
15337 #include "confdefs.h"
15338 /* System header to define __stub macros and hopefully few prototypes,
15339     which can conflict with char $ac_func (); below.  */
15340 #include <assert.h>
15341 /* Override any gcc2 internal prototype to avoid an error.  */
15342 #ifdef __cplusplus
15343 extern "C"
15344 #endif
15345 /* We use char because int might match the return type of a gcc2
15346    builtin and then its argument prototype would still apply.  */
15347 char $ac_func ();
15348 char (*f) ();
15349
15350 int
15351 main ()
15352 {
15353 /* The GNU C library defines this for functions which it implements
15354     to always fail with ENOSYS.  Some functions are actually named
15355     something starting with __ and the normal name is an alias.  */
15356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15357 choke me
15358 #else
15359 f = $ac_func;
15360 #endif
15361
15362   ;
15363   return 0;
15364 }
15365 _ACEOF
15366 rm -f conftest.$ac_objext conftest$ac_exeext
15367 if { (eval echo "$as_me:15367: \"$ac_link\"") >&5
15368   (eval $ac_link) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit $ac_status); } &&
15372          { ac_try='test -s conftest$ac_exeext'
15373   { (eval echo "$as_me:15373: \"$ac_try\"") >&5
15374   (eval $ac_try) 2>&5
15375   ac_status=$?
15376   echo "$as_me:15376: \$? = $ac_status" >&5
15377   (exit $ac_status); }; }; then
15378   eval "$as_ac_var=yes"
15379 else
15380   echo "$as_me: failed program was:" >&5
15381 cat conftest.$ac_ext >&5
15382 eval "$as_ac_var=no"
15383 fi
15384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15385 fi
15386 echo "$as_me:15386: result: `eval echo '${'$as_ac_var'}'`" >&5
15387 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15388 if test `eval echo '${'$as_ac_var'}'` = yes; then
15389   cat >>confdefs.h <<EOF
15390 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15391 EOF
15392
15393 fi
15394 done
15395
15396 if test "$with_getcap" = "yes" ; then
15397
15398 echo "$as_me:15398: checking for terminal-capability database functions" >&5
15399 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15400 if test "${cf_cv_cgetent+set}" = set; then
15401   echo $ECHO_N "(cached) $ECHO_C" >&6
15402 else
15403
15404 cat >conftest.$ac_ext <<_ACEOF
15405 #line 15405 "configure"
15406 #include "confdefs.h"
15407
15408 #include <stdlib.h>
15409 int
15410 main ()
15411 {
15412
15413         char temp[128];
15414         char *buf = temp;
15415         char *db_array = temp;
15416         cgetent(&buf, &db_array, "vt100");
15417         cgetcap(buf, "tc", '=');
15418         cgetmatch(buf, "tc");
15419
15420   ;
15421   return 0;
15422 }
15423 _ACEOF
15424 rm -f conftest.$ac_objext conftest$ac_exeext
15425 if { (eval echo "$as_me:15425: \"$ac_link\"") >&5
15426   (eval $ac_link) 2>&5
15427   ac_status=$?
15428   echo "$as_me:15428: \$? = $ac_status" >&5
15429   (exit $ac_status); } &&
15430          { ac_try='test -s conftest$ac_exeext'
15431   { (eval echo "$as_me:15431: \"$ac_try\"") >&5
15432   (eval $ac_try) 2>&5
15433   ac_status=$?
15434   echo "$as_me:15434: \$? = $ac_status" >&5
15435   (exit $ac_status); }; }; then
15436   cf_cv_cgetent=yes
15437 else
15438   echo "$as_me: failed program was:" >&5
15439 cat conftest.$ac_ext >&5
15440 cf_cv_cgetent=no
15441 fi
15442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15443
15444 fi
15445 echo "$as_me:15445: result: $cf_cv_cgetent" >&5
15446 echo "${ECHO_T}$cf_cv_cgetent" >&6
15447
15448 if test "$cf_cv_cgetent" = yes
15449 then
15450         cat >>confdefs.h <<\EOF
15451 #define HAVE_BSD_CGETENT 1
15452 EOF
15453
15454 echo "$as_me:15454: checking if cgetent uses const parameter" >&5
15455 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15456 if test "${cf_cv_cgetent_const+set}" = set; then
15457   echo $ECHO_N "(cached) $ECHO_C" >&6
15458 else
15459
15460 cat >conftest.$ac_ext <<_ACEOF
15461 #line 15461 "configure"
15462 #include "confdefs.h"
15463
15464 #include <stdlib.h>
15465 int
15466 main ()
15467 {
15468
15469         char temp[128];
15470         char *buf = temp;
15471 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15472         const char *db_array = temp;
15473         cgetent(&buf, &db_array, "vt100");
15474 #endif
15475         cgetcap(buf, "tc", '=');
15476         cgetmatch(buf, "tc");
15477
15478   ;
15479   return 0;
15480 }
15481 _ACEOF
15482 rm -f conftest.$ac_objext conftest$ac_exeext
15483 if { (eval echo "$as_me:15483: \"$ac_link\"") >&5
15484   (eval $ac_link) 2>&5
15485   ac_status=$?
15486   echo "$as_me:15486: \$? = $ac_status" >&5
15487   (exit $ac_status); } &&
15488          { ac_try='test -s conftest$ac_exeext'
15489   { (eval echo "$as_me:15489: \"$ac_try\"") >&5
15490   (eval $ac_try) 2>&5
15491   ac_status=$?
15492   echo "$as_me:15492: \$? = $ac_status" >&5
15493   (exit $ac_status); }; }; then
15494   cf_cv_cgetent_const=yes
15495 else
15496   echo "$as_me: failed program was:" >&5
15497 cat conftest.$ac_ext >&5
15498 cf_cv_cgetent_const=no
15499 fi
15500 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15501
15502 fi
15503 echo "$as_me:15503: result: $cf_cv_cgetent_const" >&5
15504 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15505         if test "$cf_cv_cgetent_const" = yes
15506         then
15507                 cat >>confdefs.h <<EOF
15508 #define CGETENT_CONST const
15509 EOF
15510
15511         fi
15512 fi
15513
15514 fi
15515
15516 echo "$as_me:15516: checking for isascii" >&5
15517 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15518 if test "${cf_cv_have_isascii+set}" = set; then
15519   echo $ECHO_N "(cached) $ECHO_C" >&6
15520 else
15521
15522         cat >conftest.$ac_ext <<_ACEOF
15523 #line 15523 "configure"
15524 #include "confdefs.h"
15525 #include <ctype.h>
15526 int
15527 main ()
15528 {
15529 int x = isascii(' ')
15530   ;
15531   return 0;
15532 }
15533 _ACEOF
15534 rm -f conftest.$ac_objext conftest$ac_exeext
15535 if { (eval echo "$as_me:15535: \"$ac_link\"") >&5
15536   (eval $ac_link) 2>&5
15537   ac_status=$?
15538   echo "$as_me:15538: \$? = $ac_status" >&5
15539   (exit $ac_status); } &&
15540          { ac_try='test -s conftest$ac_exeext'
15541   { (eval echo "$as_me:15541: \"$ac_try\"") >&5
15542   (eval $ac_try) 2>&5
15543   ac_status=$?
15544   echo "$as_me:15544: \$? = $ac_status" >&5
15545   (exit $ac_status); }; }; then
15546   cf_cv_have_isascii=yes
15547 else
15548   echo "$as_me: failed program was:" >&5
15549 cat conftest.$ac_ext >&5
15550 cf_cv_have_isascii=no
15551 fi
15552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15553
15554 fi
15555 echo "$as_me:15555: result: $cf_cv_have_isascii" >&5
15556 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15557 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
15558 #define HAVE_ISASCII 1
15559 EOF
15560
15561 if test "$ac_cv_func_sigaction" = yes; then
15562 echo "$as_me:15562: checking whether sigaction needs _POSIX_SOURCE" >&5
15563 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15564 cat >conftest.$ac_ext <<_ACEOF
15565 #line 15565 "configure"
15566 #include "confdefs.h"
15567
15568 #include <sys/types.h>
15569 #include <signal.h>
15570 int
15571 main ()
15572 {
15573 struct sigaction act
15574   ;
15575   return 0;
15576 }
15577 _ACEOF
15578 rm -f conftest.$ac_objext
15579 if { (eval echo "$as_me:15579: \"$ac_compile\"") >&5
15580   (eval $ac_compile) 2>&5
15581   ac_status=$?
15582   echo "$as_me:15582: \$? = $ac_status" >&5
15583   (exit $ac_status); } &&
15584          { ac_try='test -s conftest.$ac_objext'
15585   { (eval echo "$as_me:15585: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   sigact_bad=no
15591 else
15592   echo "$as_me: failed program was:" >&5
15593 cat conftest.$ac_ext >&5
15594
15595 cat >conftest.$ac_ext <<_ACEOF
15596 #line 15596 "configure"
15597 #include "confdefs.h"
15598
15599 #define _POSIX_SOURCE
15600 #include <sys/types.h>
15601 #include <signal.h>
15602 int
15603 main ()
15604 {
15605 struct sigaction act
15606   ;
15607   return 0;
15608 }
15609 _ACEOF
15610 rm -f conftest.$ac_objext
15611 if { (eval echo "$as_me:15611: \"$ac_compile\"") >&5
15612   (eval $ac_compile) 2>&5
15613   ac_status=$?
15614   echo "$as_me:15614: \$? = $ac_status" >&5
15615   (exit $ac_status); } &&
15616          { ac_try='test -s conftest.$ac_objext'
15617   { (eval echo "$as_me:15617: \"$ac_try\"") >&5
15618   (eval $ac_try) 2>&5
15619   ac_status=$?
15620   echo "$as_me:15620: \$? = $ac_status" >&5
15621   (exit $ac_status); }; }; then
15622   sigact_bad=yes
15623          cat >>confdefs.h <<\EOF
15624 #define _POSIX_SOURCE 1
15625 EOF
15626
15627 else
15628   echo "$as_me: failed program was:" >&5
15629 cat conftest.$ac_ext >&5
15630 sigact_bad=unknown
15631 fi
15632 rm -f conftest.$ac_objext conftest.$ac_ext
15633 fi
15634 rm -f conftest.$ac_objext conftest.$ac_ext
15635 echo "$as_me:15635: result: $sigact_bad" >&5
15636 echo "${ECHO_T}$sigact_bad" >&6
15637 fi
15638
15639 echo "$as_me:15639: checking if nanosleep really works" >&5
15640 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15641 if test "${cf_cv_func_nanosleep+set}" = set; then
15642   echo $ECHO_N "(cached) $ECHO_C" >&6
15643 else
15644
15645 if test "$cross_compiling" = yes; then
15646   cf_cv_func_nanosleep=unknown
15647 else
15648   cat >conftest.$ac_ext <<_ACEOF
15649 #line 15649 "configure"
15650 #include "confdefs.h"
15651
15652 #include <stdio.h>
15653 #include <errno.h>
15654 #include <time.h>
15655
15656 #ifdef HAVE_SYS_TIME_H
15657 #include <sys/time.h>
15658 #endif
15659
15660 int main() {
15661         struct timespec ts1, ts2;
15662         int code;
15663         ts1.tv_sec  = 0;
15664         ts1.tv_nsec = 750000000;
15665         ts2.tv_sec  = 0;
15666         ts2.tv_nsec = 0;
15667         errno = 0;
15668         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15669         ${cf_cv_main_return:-return}(code != 0);
15670 }
15671
15672 _ACEOF
15673 rm -f conftest$ac_exeext
15674 if { (eval echo "$as_me:15674: \"$ac_link\"") >&5
15675   (eval $ac_link) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15679   { (eval echo "$as_me:15679: \"$ac_try\"") >&5
15680   (eval $ac_try) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); }; }; then
15684   cf_cv_func_nanosleep=yes
15685 else
15686   echo "$as_me: program exited with status $ac_status" >&5
15687 echo "$as_me: failed program was:" >&5
15688 cat conftest.$ac_ext >&5
15689 cf_cv_func_nanosleep=no
15690 fi
15691 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15692 fi
15693 fi
15694 echo "$as_me:15694: result: $cf_cv_func_nanosleep" >&5
15695 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15696
15697 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
15698 #define HAVE_NANOSLEEP 1
15699 EOF
15700
15701 for ac_header in \
15702 termio.h \
15703 termios.h \
15704 unistd.h \
15705
15706 do
15707 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15708 echo "$as_me:15708: checking for $ac_header" >&5
15709 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15710 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15711   echo $ECHO_N "(cached) $ECHO_C" >&6
15712 else
15713   cat >conftest.$ac_ext <<_ACEOF
15714 #line 15714 "configure"
15715 #include "confdefs.h"
15716 #include <$ac_header>
15717 _ACEOF
15718 if { (eval echo "$as_me:15718: \"$ac_cpp conftest.$ac_ext\"") >&5
15719   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15720   ac_status=$?
15721   egrep -v '^ *\+' conftest.er1 >conftest.err
15722   rm -f conftest.er1
15723   cat conftest.err >&5
15724   echo "$as_me:15724: \$? = $ac_status" >&5
15725   (exit $ac_status); } >/dev/null; then
15726   if test -s conftest.err; then
15727     ac_cpp_err=$ac_c_preproc_warn_flag
15728   else
15729     ac_cpp_err=
15730   fi
15731 else
15732   ac_cpp_err=yes
15733 fi
15734 if test -z "$ac_cpp_err"; then
15735   eval "$as_ac_Header=yes"
15736 else
15737   echo "$as_me: failed program was:" >&5
15738   cat conftest.$ac_ext >&5
15739   eval "$as_ac_Header=no"
15740 fi
15741 rm -f conftest.err conftest.$ac_ext
15742 fi
15743 echo "$as_me:15743: result: `eval echo '${'$as_ac_Header'}'`" >&5
15744 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15745 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15746   cat >>confdefs.h <<EOF
15747 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15748 EOF
15749
15750 fi
15751 done
15752
15753 if test "$ISC" = yes ; then
15754
15755 for ac_header in sys/termio.h
15756 do
15757 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15758 echo "$as_me:15758: checking for $ac_header" >&5
15759 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15760 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15761   echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763   cat >conftest.$ac_ext <<_ACEOF
15764 #line 15764 "configure"
15765 #include "confdefs.h"
15766 #include <$ac_header>
15767 _ACEOF
15768 if { (eval echo "$as_me:15768: \"$ac_cpp conftest.$ac_ext\"") >&5
15769   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15770   ac_status=$?
15771   egrep -v '^ *\+' conftest.er1 >conftest.err
15772   rm -f conftest.er1
15773   cat conftest.err >&5
15774   echo "$as_me:15774: \$? = $ac_status" >&5
15775   (exit $ac_status); } >/dev/null; then
15776   if test -s conftest.err; then
15777     ac_cpp_err=$ac_c_preproc_warn_flag
15778   else
15779     ac_cpp_err=
15780   fi
15781 else
15782   ac_cpp_err=yes
15783 fi
15784 if test -z "$ac_cpp_err"; then
15785   eval "$as_ac_Header=yes"
15786 else
15787   echo "$as_me: failed program was:" >&5
15788   cat conftest.$ac_ext >&5
15789   eval "$as_ac_Header=no"
15790 fi
15791 rm -f conftest.err conftest.$ac_ext
15792 fi
15793 echo "$as_me:15793: result: `eval echo '${'$as_ac_Header'}'`" >&5
15794 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15795 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15796   cat >>confdefs.h <<EOF
15797 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15798 EOF
15799
15800 fi
15801 done
15802
15803 fi
15804 if test "$ac_cv_header_termios_h" = yes ; then
15805         case "$CFLAGS $CPPFLAGS" in
15806         *-D_POSIX_SOURCE*)
15807                 termios_bad=dunno ;;
15808         *)      termios_bad=maybe ;;
15809         esac
15810         if test "$termios_bad" = maybe ; then
15811         echo "$as_me:15811: checking whether termios.h needs _POSIX_SOURCE" >&5
15812 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15813         cat >conftest.$ac_ext <<_ACEOF
15814 #line 15814 "configure"
15815 #include "confdefs.h"
15816 #include <termios.h>
15817 int
15818 main ()
15819 {
15820 struct termios foo; int x = foo.c_iflag
15821   ;
15822   return 0;
15823 }
15824 _ACEOF
15825 rm -f conftest.$ac_objext
15826 if { (eval echo "$as_me:15826: \"$ac_compile\"") >&5
15827   (eval $ac_compile) 2>&5
15828   ac_status=$?
15829   echo "$as_me:15829: \$? = $ac_status" >&5
15830   (exit $ac_status); } &&
15831          { ac_try='test -s conftest.$ac_objext'
15832   { (eval echo "$as_me:15832: \"$ac_try\"") >&5
15833   (eval $ac_try) 2>&5
15834   ac_status=$?
15835   echo "$as_me:15835: \$? = $ac_status" >&5
15836   (exit $ac_status); }; }; then
15837   termios_bad=no
15838 else
15839   echo "$as_me: failed program was:" >&5
15840 cat conftest.$ac_ext >&5
15841
15842                 cat >conftest.$ac_ext <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15845
15846 #define _POSIX_SOURCE
15847 #include <termios.h>
15848 int
15849 main ()
15850 {
15851 struct termios foo; int x = foo.c_iflag
15852   ;
15853   return 0;
15854 }
15855 _ACEOF
15856 rm -f conftest.$ac_objext
15857 if { (eval echo "$as_me:15857: \"$ac_compile\"") >&5
15858   (eval $ac_compile) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); } &&
15862          { ac_try='test -s conftest.$ac_objext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868   termios_bad=unknown
15869 else
15870   echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 termios_bad=yes cat >>confdefs.h <<\EOF
15873 #define _POSIX_SOURCE 1
15874 EOF
15875
15876 fi
15877 rm -f conftest.$ac_objext conftest.$ac_ext
15878
15879 fi
15880 rm -f conftest.$ac_objext conftest.$ac_ext
15881         echo "$as_me:15881: result: $termios_bad" >&5
15882 echo "${ECHO_T}$termios_bad" >&6
15883         fi
15884 fi
15885
15886 echo "$as_me:15886: checking for tcgetattr" >&5
15887 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15888 if test "${cf_cv_have_tcgetattr+set}" = set; then
15889   echo $ECHO_N "(cached) $ECHO_C" >&6
15890 else
15891
15892 cat >conftest.$ac_ext <<_ACEOF
15893 #line 15893 "configure"
15894 #include "confdefs.h"
15895
15896 #include <sys/types.h>
15897 #ifdef HAVE_UNISTD_H
15898 #include <unistd.h>
15899 #endif
15900 #ifdef HAVE_TERMIOS_H
15901 #include <termios.h>
15902 #define TTY struct termios
15903 #else
15904 #ifdef HAVE_TERMIO_H
15905 #include <termio.h>
15906 #define TTY struct termio
15907 #endif
15908 #endif
15909
15910 int
15911 main ()
15912 {
15913
15914 TTY foo;
15915 tcgetattr(1, &foo);
15916   ;
15917   return 0;
15918 }
15919 _ACEOF
15920 rm -f conftest.$ac_objext conftest$ac_exeext
15921 if { (eval echo "$as_me:15921: \"$ac_link\"") >&5
15922   (eval $ac_link) 2>&5
15923   ac_status=$?
15924   echo "$as_me:15924: \$? = $ac_status" >&5
15925   (exit $ac_status); } &&
15926          { ac_try='test -s conftest$ac_exeext'
15927   { (eval echo "$as_me:15927: \"$ac_try\"") >&5
15928   (eval $ac_try) 2>&5
15929   ac_status=$?
15930   echo "$as_me:15930: \$? = $ac_status" >&5
15931   (exit $ac_status); }; }; then
15932   cf_cv_have_tcgetattr=yes
15933 else
15934   echo "$as_me: failed program was:" >&5
15935 cat conftest.$ac_ext >&5
15936 cf_cv_have_tcgetattr=no
15937 fi
15938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15939 fi
15940 echo "$as_me:15940: result: $cf_cv_have_tcgetattr" >&5
15941 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15942 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15943 #define HAVE_TCGETATTR 1
15944 EOF
15945
15946 echo "$as_me:15946: checking for vsscanf function or workaround" >&5
15947 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15948 if test "${cf_cv_func_vsscanf+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951
15952 cat >conftest.$ac_ext <<_ACEOF
15953 #line 15953 "configure"
15954 #include "confdefs.h"
15955
15956 #include <stdarg.h>
15957 #include <stdio.h>
15958 int
15959 main ()
15960 {
15961
15962         va_list ap;
15963         vsscanf("from", "%d", ap)
15964   ;
15965   return 0;
15966 }
15967 _ACEOF
15968 rm -f conftest.$ac_objext conftest$ac_exeext
15969 if { (eval echo "$as_me:15969: \"$ac_link\"") >&5
15970   (eval $ac_link) 2>&5
15971   ac_status=$?
15972   echo "$as_me:15972: \$? = $ac_status" >&5
15973   (exit $ac_status); } &&
15974          { ac_try='test -s conftest$ac_exeext'
15975   { (eval echo "$as_me:15975: \"$ac_try\"") >&5
15976   (eval $ac_try) 2>&5
15977   ac_status=$?
15978   echo "$as_me:15978: \$? = $ac_status" >&5
15979   (exit $ac_status); }; }; then
15980   cf_cv_func_vsscanf=vsscanf
15981 else
15982   echo "$as_me: failed program was:" >&5
15983 cat conftest.$ac_ext >&5
15984
15985 cat >conftest.$ac_ext <<_ACEOF
15986 #line 15986 "configure"
15987 #include "confdefs.h"
15988
15989 #include <stdarg.h>
15990 #include <stdio.h>
15991 int
15992 main ()
15993 {
15994
15995     FILE strbuf;
15996     char *str = "from";
15997
15998     strbuf._flag = _IOREAD;
15999     strbuf._ptr = strbuf._base = (unsigned char *) str;
16000     strbuf._cnt = strlen(str);
16001     strbuf._file = _NFILE;
16002     return (vfscanf(&strbuf, "%d", ap))
16003   ;
16004   return 0;
16005 }
16006 _ACEOF
16007 rm -f conftest.$ac_objext conftest$ac_exeext
16008 if { (eval echo "$as_me:16008: \"$ac_link\"") >&5
16009   (eval $ac_link) 2>&5
16010   ac_status=$?
16011   echo "$as_me:16011: \$? = $ac_status" >&5
16012   (exit $ac_status); } &&
16013          { ac_try='test -s conftest$ac_exeext'
16014   { (eval echo "$as_me:16014: \"$ac_try\"") >&5
16015   (eval $ac_try) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); }; }; then
16019   cf_cv_func_vsscanf=vfscanf
16020 else
16021   echo "$as_me: failed program was:" >&5
16022 cat conftest.$ac_ext >&5
16023
16024 cat >conftest.$ac_ext <<_ACEOF
16025 #line 16025 "configure"
16026 #include "confdefs.h"
16027
16028 #include <stdarg.h>
16029 #include <stdio.h>
16030 int
16031 main ()
16032 {
16033
16034     FILE strbuf;
16035     char *str = "from";
16036
16037     strbuf._flag = _IOREAD;
16038     strbuf._ptr = strbuf._base = (unsigned char *) str;
16039     strbuf._cnt = strlen(str);
16040     strbuf._file = _NFILE;
16041     return (_doscan(&strbuf, "%d", ap))
16042   ;
16043   return 0;
16044 }
16045 _ACEOF
16046 rm -f conftest.$ac_objext conftest$ac_exeext
16047 if { (eval echo "$as_me:16047: \"$ac_link\"") >&5
16048   (eval $ac_link) 2>&5
16049   ac_status=$?
16050   echo "$as_me:16050: \$? = $ac_status" >&5
16051   (exit $ac_status); } &&
16052          { ac_try='test -s conftest$ac_exeext'
16053   { (eval echo "$as_me:16053: \"$ac_try\"") >&5
16054   (eval $ac_try) 2>&5
16055   ac_status=$?
16056   echo "$as_me:16056: \$? = $ac_status" >&5
16057   (exit $ac_status); }; }; then
16058   cf_cv_func_vsscanf=_doscan
16059 else
16060   echo "$as_me: failed program was:" >&5
16061 cat conftest.$ac_ext >&5
16062
16063 cf_cv_func_vsscanf=no
16064 fi
16065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16066 fi
16067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16068 fi
16069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16070 fi
16071 echo "$as_me:16071: result: $cf_cv_func_vsscanf" >&5
16072 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16073
16074 case $cf_cv_func_vsscanf in #(vi
16075 vsscanf) cat >>confdefs.h <<\EOF
16076 #define HAVE_VSSCANF 1
16077 EOF
16078 ;; #(vi
16079 vfscanf) cat >>confdefs.h <<\EOF
16080 #define HAVE_VFSCANF 1
16081 EOF
16082 ;; #(vi
16083 _doscan) cat >>confdefs.h <<\EOF
16084 #define HAVE__DOSCAN 1
16085 EOF
16086 ;;
16087 esac
16088
16089 echo "$as_me:16089: checking for working mkstemp" >&5
16090 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16091 if test "${cf_cv_func_mkstemp+set}" = set; then
16092   echo $ECHO_N "(cached) $ECHO_C" >&6
16093 else
16094
16095 rm -rf conftest*
16096 if test "$cross_compiling" = yes; then
16097   cf_cv_func_mkstemp=maybe
16098 else
16099   cat >conftest.$ac_ext <<_ACEOF
16100 #line 16100 "configure"
16101 #include "confdefs.h"
16102
16103 #include <sys/types.h>
16104 #include <stdlib.h>
16105 #include <stdio.h>
16106 #include <string.h>
16107 #include <sys/stat.h>
16108 int main()
16109 {
16110         char *tmpl = "conftestXXXXXX";
16111         char name[2][80];
16112         int n;
16113         int result = 0;
16114         int fd;
16115         struct stat sb;
16116
16117         umask(077);
16118         for (n = 0; n < 2; ++n) {
16119                 strcpy(name[n], tmpl);
16120                 if ((fd = mkstemp(name[n])) >= 0) {
16121                         if (!strcmp(name[n], tmpl)
16122                          || stat(name[n], &sb) != 0
16123                          || (sb.st_mode & S_IFMT) != S_IFREG
16124                          || (sb.st_mode & 077) != 0) {
16125                                 result = 1;
16126                         }
16127                         close(fd);
16128                 }
16129         }
16130         if (result == 0
16131          && !strcmp(name[0], name[1]))
16132                 result = 1;
16133         ${cf_cv_main_return:-return}(result);
16134 }
16135
16136 _ACEOF
16137 rm -f conftest$ac_exeext
16138 if { (eval echo "$as_me:16138: \"$ac_link\"") >&5
16139   (eval $ac_link) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16143   { (eval echo "$as_me:16143: \"$ac_try\"") >&5
16144   (eval $ac_try) 2>&5
16145   ac_status=$?
16146   echo "$as_me:16146: \$? = $ac_status" >&5
16147   (exit $ac_status); }; }; then
16148   cf_cv_func_mkstemp=yes
16149
16150 else
16151   echo "$as_me: program exited with status $ac_status" >&5
16152 echo "$as_me: failed program was:" >&5
16153 cat conftest.$ac_ext >&5
16154 cf_cv_func_mkstemp=no
16155
16156 fi
16157 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16158 fi
16159
16160 fi
16161 echo "$as_me:16161: result: $cf_cv_func_mkstemp" >&5
16162 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16163 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16164         echo "$as_me:16164: checking for mkstemp" >&5
16165 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16166 if test "${ac_cv_func_mkstemp+set}" = set; then
16167   echo $ECHO_N "(cached) $ECHO_C" >&6
16168 else
16169   cat >conftest.$ac_ext <<_ACEOF
16170 #line 16170 "configure"
16171 #include "confdefs.h"
16172 /* System header to define __stub macros and hopefully few prototypes,
16173     which can conflict with char mkstemp (); below.  */
16174 #include <assert.h>
16175 /* Override any gcc2 internal prototype to avoid an error.  */
16176 #ifdef __cplusplus
16177 extern "C"
16178 #endif
16179 /* We use char because int might match the return type of a gcc2
16180    builtin and then its argument prototype would still apply.  */
16181 char mkstemp ();
16182 char (*f) ();
16183
16184 int
16185 main ()
16186 {
16187 /* The GNU C library defines this for functions which it implements
16188     to always fail with ENOSYS.  Some functions are actually named
16189     something starting with __ and the normal name is an alias.  */
16190 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16191 choke me
16192 #else
16193 f = mkstemp;
16194 #endif
16195
16196   ;
16197   return 0;
16198 }
16199 _ACEOF
16200 rm -f conftest.$ac_objext conftest$ac_exeext
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202   (eval $ac_link) 2>&5
16203   ac_status=$?
16204   echo "$as_me:16204: \$? = $ac_status" >&5
16205   (exit $ac_status); } &&
16206          { ac_try='test -s conftest$ac_exeext'
16207   { (eval echo "$as_me:16207: \"$ac_try\"") >&5
16208   (eval $ac_try) 2>&5
16209   ac_status=$?
16210   echo "$as_me:16210: \$? = $ac_status" >&5
16211   (exit $ac_status); }; }; then
16212   ac_cv_func_mkstemp=yes
16213 else
16214   echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 ac_cv_func_mkstemp=no
16217 fi
16218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16219 fi
16220 echo "$as_me:16220: result: $ac_cv_func_mkstemp" >&5
16221 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16222
16223 fi
16224 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16225         cat >>confdefs.h <<\EOF
16226 #define HAVE_MKSTEMP 1
16227 EOF
16228
16229 fi
16230
16231 # setup for prototype of fallback for vsscanf()
16232
16233 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16234         HAVE_VSSCANF=1
16235 else
16236         HAVE_VSSCANF=0
16237 fi
16238
16239 if test "$cross_compiling" = yes ; then
16240         { echo "$as_me:16240: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16241 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16242 else
16243         echo "$as_me:16243: checking whether setvbuf arguments are reversed" >&5
16244 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16245 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16246   echo $ECHO_N "(cached) $ECHO_C" >&6
16247 else
16248   if test "$cross_compiling" = yes; then
16249   { { echo "$as_me:16249: error: cannot run test program while cross compiling" >&5
16250 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16251    { (exit 1); exit 1; }; }
16252 else
16253   cat >conftest.$ac_ext <<_ACEOF
16254 #line 16254 "configure"
16255 #include "confdefs.h"
16256 #include <stdio.h>
16257 /* If setvbuf has the reversed format, exit 0. */
16258 int
16259 main ()
16260 {
16261   /* This call has the arguments reversed.
16262      A reversed system may check and see that the address of main
16263      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16264   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16265     $ac_main_return(1);
16266   putc('\r', stdout);
16267   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16268 }
16269 _ACEOF
16270 rm -f conftest$ac_exeext
16271 if { (eval echo "$as_me:16271: \"$ac_link\"") >&5
16272   (eval $ac_link) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16276   { (eval echo "$as_me:16276: \"$ac_try\"") >&5
16277   (eval $ac_try) 2>&5
16278   ac_status=$?
16279   echo "$as_me:16279: \$? = $ac_status" >&5
16280   (exit $ac_status); }; }; then
16281   ac_cv_func_setvbuf_reversed=yes
16282 else
16283   echo "$as_me: program exited with status $ac_status" >&5
16284 echo "$as_me: failed program was:" >&5
16285 cat conftest.$ac_ext >&5
16286 ac_cv_func_setvbuf_reversed=no
16287 fi
16288 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16289 fi
16290 rm -f core core.* *.core
16291 fi
16292 echo "$as_me:16292: result: $ac_cv_func_setvbuf_reversed" >&5
16293 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16294 if test $ac_cv_func_setvbuf_reversed = yes; then
16295
16296 cat >>confdefs.h <<\EOF
16297 #define SETVBUF_REVERSED 1
16298 EOF
16299
16300 fi
16301
16302 fi
16303 echo "$as_me:16303: checking return type of signal handlers" >&5
16304 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16305 if test "${ac_cv_type_signal+set}" = set; then
16306   echo $ECHO_N "(cached) $ECHO_C" >&6
16307 else
16308   cat >conftest.$ac_ext <<_ACEOF
16309 #line 16309 "configure"
16310 #include "confdefs.h"
16311 #include <sys/types.h>
16312 #include <signal.h>
16313 #ifdef signal
16314 # undef signal
16315 #endif
16316 #ifdef __cplusplus
16317 extern "C" void (*signal (int, void (*)(int)))(int);
16318 #else
16319 void (*signal ()) ();
16320 #endif
16321
16322 int
16323 main ()
16324 {
16325 int i;
16326   ;
16327   return 0;
16328 }
16329 _ACEOF
16330 rm -f conftest.$ac_objext
16331 if { (eval echo "$as_me:16331: \"$ac_compile\"") >&5
16332   (eval $ac_compile) 2>&5
16333   ac_status=$?
16334   echo "$as_me:16334: \$? = $ac_status" >&5
16335   (exit $ac_status); } &&
16336          { ac_try='test -s conftest.$ac_objext'
16337   { (eval echo "$as_me:16337: \"$ac_try\"") >&5
16338   (eval $ac_try) 2>&5
16339   ac_status=$?
16340   echo "$as_me:16340: \$? = $ac_status" >&5
16341   (exit $ac_status); }; }; then
16342   ac_cv_type_signal=void
16343 else
16344   echo "$as_me: failed program was:" >&5
16345 cat conftest.$ac_ext >&5
16346 ac_cv_type_signal=int
16347 fi
16348 rm -f conftest.$ac_objext conftest.$ac_ext
16349 fi
16350 echo "$as_me:16350: result: $ac_cv_type_signal" >&5
16351 echo "${ECHO_T}$ac_cv_type_signal" >&6
16352
16353 cat >>confdefs.h <<EOF
16354 #define RETSIGTYPE $ac_cv_type_signal
16355 EOF
16356
16357 echo "$as_me:16357: checking for intptr_t" >&5
16358 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16359 if test "${ac_cv_type_intptr_t+set}" = set; then
16360   echo $ECHO_N "(cached) $ECHO_C" >&6
16361 else
16362   cat >conftest.$ac_ext <<_ACEOF
16363 #line 16363 "configure"
16364 #include "confdefs.h"
16365 $ac_includes_default
16366 int
16367 main ()
16368 {
16369 if ((intptr_t *) 0)
16370   return 0;
16371 if (sizeof (intptr_t))
16372   return 0;
16373   ;
16374   return 0;
16375 }
16376 _ACEOF
16377 rm -f conftest.$ac_objext
16378 if { (eval echo "$as_me:16378: \"$ac_compile\"") >&5
16379   (eval $ac_compile) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); } &&
16383          { ac_try='test -s conftest.$ac_objext'
16384   { (eval echo "$as_me:16384: \"$ac_try\"") >&5
16385   (eval $ac_try) 2>&5
16386   ac_status=$?
16387   echo "$as_me:16387: \$? = $ac_status" >&5
16388   (exit $ac_status); }; }; then
16389   ac_cv_type_intptr_t=yes
16390 else
16391   echo "$as_me: failed program was:" >&5
16392 cat conftest.$ac_ext >&5
16393 ac_cv_type_intptr_t=no
16394 fi
16395 rm -f conftest.$ac_objext conftest.$ac_ext
16396 fi
16397 echo "$as_me:16397: result: $ac_cv_type_intptr_t" >&5
16398 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16399 if test $ac_cv_type_intptr_t = yes; then
16400   :
16401 else
16402
16403 cat >>confdefs.h <<EOF
16404 #define intptr_t long
16405 EOF
16406
16407 fi
16408
16409 echo "$as_me:16409: checking for type sigaction_t" >&5
16410 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16411 if test "${cf_cv_type_sigaction+set}" = set; then
16412   echo $ECHO_N "(cached) $ECHO_C" >&6
16413 else
16414
16415         cat >conftest.$ac_ext <<_ACEOF
16416 #line 16416 "configure"
16417 #include "confdefs.h"
16418
16419 #include <signal.h>
16420 int
16421 main ()
16422 {
16423 sigaction_t x
16424   ;
16425   return 0;
16426 }
16427 _ACEOF
16428 rm -f conftest.$ac_objext
16429 if { (eval echo "$as_me:16429: \"$ac_compile\"") >&5
16430   (eval $ac_compile) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); } &&
16434          { ac_try='test -s conftest.$ac_objext'
16435   { (eval echo "$as_me:16435: \"$ac_try\"") >&5
16436   (eval $ac_try) 2>&5
16437   ac_status=$?
16438   echo "$as_me:16438: \$? = $ac_status" >&5
16439   (exit $ac_status); }; }; then
16440   cf_cv_type_sigaction=yes
16441 else
16442   echo "$as_me: failed program was:" >&5
16443 cat conftest.$ac_ext >&5
16444 cf_cv_type_sigaction=no
16445 fi
16446 rm -f conftest.$ac_objext conftest.$ac_ext
16447 fi
16448
16449 echo "$as_me:16449: result: $cf_cv_type_sigaction" >&5
16450 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16451 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
16452 #define HAVE_TYPE_SIGACTION 1
16453 EOF
16454
16455 echo "$as_me:16455: checking declaration of size-change" >&5
16456 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16457 if test "${cf_cv_sizechange+set}" = set; then
16458   echo $ECHO_N "(cached) $ECHO_C" >&6
16459 else
16460
16461     cf_cv_sizechange=unknown
16462     cf_save_CPPFLAGS="$CPPFLAGS"
16463
16464 for cf_opts in "" "NEED_PTEM_H"
16465 do
16466
16467     CPPFLAGS="$cf_save_CPPFLAGS"
16468     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16469     cat >conftest.$ac_ext <<_ACEOF
16470 #line 16470 "configure"
16471 #include "confdefs.h"
16472 #include <sys/types.h>
16473 #ifdef HAVE_TERMIOS_H
16474 #include <termios.h>
16475 #else
16476 #ifdef HAVE_TERMIO_H
16477 #include <termio.h>
16478 #endif
16479 #endif
16480 #ifdef NEED_PTEM_H
16481 /* This is a workaround for SCO:  they neglected to define struct winsize in
16482  * termios.h -- it's only in termio.h and ptem.h
16483  */
16484 #include        <sys/stream.h>
16485 #include        <sys/ptem.h>
16486 #endif
16487 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16488 #include <sys/ioctl.h>
16489 #endif
16490
16491 int
16492 main ()
16493 {
16494
16495 #ifdef TIOCGSIZE
16496         struct ttysize win;     /* FIXME: what system is this? */
16497         int y = win.ts_lines;
16498         int x = win.ts_cols;
16499 #else
16500 #ifdef TIOCGWINSZ
16501         struct winsize win;
16502         int y = win.ws_row;
16503         int x = win.ws_col;
16504 #else
16505         no TIOCGSIZE or TIOCGWINSZ
16506 #endif /* TIOCGWINSZ */
16507 #endif /* TIOCGSIZE */
16508
16509   ;
16510   return 0;
16511 }
16512 _ACEOF
16513 rm -f conftest.$ac_objext
16514 if { (eval echo "$as_me:16514: \"$ac_compile\"") >&5
16515   (eval $ac_compile) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); } &&
16519          { ac_try='test -s conftest.$ac_objext'
16520   { (eval echo "$as_me:16520: \"$ac_try\"") >&5
16521   (eval $ac_try) 2>&5
16522   ac_status=$?
16523   echo "$as_me:16523: \$? = $ac_status" >&5
16524   (exit $ac_status); }; }; then
16525   cf_cv_sizechange=yes
16526 else
16527   echo "$as_me: failed program was:" >&5
16528 cat conftest.$ac_ext >&5
16529 cf_cv_sizechange=no
16530 fi
16531 rm -f conftest.$ac_objext conftest.$ac_ext
16532
16533         CPPFLAGS="$cf_save_CPPFLAGS"
16534         if test "$cf_cv_sizechange" = yes ; then
16535                 echo "size-change succeeded ($cf_opts)" >&5
16536                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16537                 break
16538         fi
16539 done
16540
16541 fi
16542 echo "$as_me:16542: result: $cf_cv_sizechange" >&5
16543 echo "${ECHO_T}$cf_cv_sizechange" >&6
16544 if test "$cf_cv_sizechange" != no ; then
16545         cat >>confdefs.h <<\EOF
16546 #define HAVE_SIZECHANGE 1
16547 EOF
16548
16549         case $cf_cv_sizechange in #(vi
16550         NEED*)
16551                 cat >>confdefs.h <<EOF
16552 #define $cf_cv_sizechange  1
16553 EOF
16554
16555                 ;;
16556         esac
16557 fi
16558
16559 echo "$as_me:16559: checking for memmove" >&5
16560 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16561 if test "${ac_cv_func_memmove+set}" = set; then
16562   echo $ECHO_N "(cached) $ECHO_C" >&6
16563 else
16564   cat >conftest.$ac_ext <<_ACEOF
16565 #line 16565 "configure"
16566 #include "confdefs.h"
16567 /* System header to define __stub macros and hopefully few prototypes,
16568     which can conflict with char memmove (); below.  */
16569 #include <assert.h>
16570 /* Override any gcc2 internal prototype to avoid an error.  */
16571 #ifdef __cplusplus
16572 extern "C"
16573 #endif
16574 /* We use char because int might match the return type of a gcc2
16575    builtin and then its argument prototype would still apply.  */
16576 char memmove ();
16577 char (*f) ();
16578
16579 int
16580 main ()
16581 {
16582 /* The GNU C library defines this for functions which it implements
16583     to always fail with ENOSYS.  Some functions are actually named
16584     something starting with __ and the normal name is an alias.  */
16585 #if defined (__stub_memmove) || defined (__stub___memmove)
16586 choke me
16587 #else
16588 f = memmove;
16589 #endif
16590
16591   ;
16592   return 0;
16593 }
16594 _ACEOF
16595 rm -f conftest.$ac_objext conftest$ac_exeext
16596 if { (eval echo "$as_me:16596: \"$ac_link\"") >&5
16597   (eval $ac_link) 2>&5
16598   ac_status=$?
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit $ac_status); } &&
16601          { ac_try='test -s conftest$ac_exeext'
16602   { (eval echo "$as_me:16602: \"$ac_try\"") >&5
16603   (eval $ac_try) 2>&5
16604   ac_status=$?
16605   echo "$as_me:16605: \$? = $ac_status" >&5
16606   (exit $ac_status); }; }; then
16607   ac_cv_func_memmove=yes
16608 else
16609   echo "$as_me: failed program was:" >&5
16610 cat conftest.$ac_ext >&5
16611 ac_cv_func_memmove=no
16612 fi
16613 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16614 fi
16615 echo "$as_me:16615: result: $ac_cv_func_memmove" >&5
16616 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16617 if test $ac_cv_func_memmove = yes; then
16618   :
16619 else
16620
16621 echo "$as_me:16621: checking for bcopy" >&5
16622 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16623 if test "${ac_cv_func_bcopy+set}" = set; then
16624   echo $ECHO_N "(cached) $ECHO_C" >&6
16625 else
16626   cat >conftest.$ac_ext <<_ACEOF
16627 #line 16627 "configure"
16628 #include "confdefs.h"
16629 /* System header to define __stub macros and hopefully few prototypes,
16630     which can conflict with char bcopy (); below.  */
16631 #include <assert.h>
16632 /* Override any gcc2 internal prototype to avoid an error.  */
16633 #ifdef __cplusplus
16634 extern "C"
16635 #endif
16636 /* We use char because int might match the return type of a gcc2
16637    builtin and then its argument prototype would still apply.  */
16638 char bcopy ();
16639 char (*f) ();
16640
16641 int
16642 main ()
16643 {
16644 /* The GNU C library defines this for functions which it implements
16645     to always fail with ENOSYS.  Some functions are actually named
16646     something starting with __ and the normal name is an alias.  */
16647 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16648 choke me
16649 #else
16650 f = bcopy;
16651 #endif
16652
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext conftest$ac_exeext
16658 if { (eval echo "$as_me:16658: \"$ac_link\"") >&5
16659   (eval $ac_link) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest$ac_exeext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   ac_cv_func_bcopy=yes
16670 else
16671   echo "$as_me: failed program was:" >&5
16672 cat conftest.$ac_ext >&5
16673 ac_cv_func_bcopy=no
16674 fi
16675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16676 fi
16677 echo "$as_me:16677: result: $ac_cv_func_bcopy" >&5
16678 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16679 if test $ac_cv_func_bcopy = yes; then
16680
16681         echo "$as_me:16681: checking if bcopy does overlapping moves" >&5
16682 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16683 if test "${cf_cv_good_bcopy+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686
16687                 if test "$cross_compiling" = yes; then
16688   cf_cv_good_bcopy=unknown
16689 else
16690   cat >conftest.$ac_ext <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16693
16694 int main() {
16695         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16696         char temp[40];
16697         bcopy(data, temp, sizeof(data));
16698         bcopy(temp+10, temp, 15);
16699         bcopy(temp+5, temp+15, 10);
16700         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16701 }
16702
16703 _ACEOF
16704 rm -f conftest$ac_exeext
16705 if { (eval echo "$as_me:16705: \"$ac_link\"") >&5
16706   (eval $ac_link) 2>&5
16707   ac_status=$?
16708   echo "$as_me:16708: \$? = $ac_status" >&5
16709   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16710   { (eval echo "$as_me:16710: \"$ac_try\"") >&5
16711   (eval $ac_try) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); }; }; then
16715   cf_cv_good_bcopy=yes
16716 else
16717   echo "$as_me: program exited with status $ac_status" >&5
16718 echo "$as_me: failed program was:" >&5
16719 cat conftest.$ac_ext >&5
16720 cf_cv_good_bcopy=no
16721 fi
16722 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16723 fi
16724
16725 fi
16726 echo "$as_me:16726: result: $cf_cv_good_bcopy" >&5
16727 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16728
16729 else
16730   cf_cv_good_bcopy=no
16731 fi
16732
16733         if test "$cf_cv_good_bcopy" = yes ; then
16734                 cat >>confdefs.h <<\EOF
16735 #define USE_OK_BCOPY 1
16736 EOF
16737
16738         else
16739                 cat >>confdefs.h <<\EOF
16740 #define USE_MY_MEMMOVE 1
16741 EOF
16742
16743         fi
16744
16745 fi
16746
16747 echo "$as_me:16747: checking if poll really works" >&5
16748 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16749 if test "${cf_cv_working_poll+set}" = set; then
16750   echo $ECHO_N "(cached) $ECHO_C" >&6
16751 else
16752
16753 if test "$cross_compiling" = yes; then
16754   cf_cv_working_poll=unknown
16755 else
16756   cat >conftest.$ac_ext <<_ACEOF
16757 #line 16757 "configure"
16758 #include "confdefs.h"
16759
16760 #include <stdio.h>
16761 #ifdef HAVE_POLL_H
16762 #include <poll.h>
16763 #else
16764 #include <sys/poll.h>
16765 #endif
16766 int main() {
16767         struct pollfd myfds;
16768         int ret;
16769
16770         /* check for Darwin bug with respect to "devices" */
16771         myfds.fd = open("/dev/null", 1);
16772         if (myfds.fd < 0)
16773                 myfds.fd = 0;
16774         myfds.events = POLLIN;
16775         myfds.revents = 0;
16776
16777         ret = poll(&myfds, 1, 100);
16778
16779         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16780                 ret = -1;
16781         } else {
16782
16783                 /* also check with standard input */
16784                 myfds.fd = 0;
16785                 myfds.events = POLLIN;
16786                 myfds.revents = 0;
16787
16788                 ret = poll(&myfds, 1, 100);
16789                 if (ret < 0) {
16790                         ret = 0;
16791                 }
16792         }
16793         ${cf_cv_main_return:-return}(ret != 0);
16794 }
16795 _ACEOF
16796 rm -f conftest$ac_exeext
16797 if { (eval echo "$as_me:16797: \"$ac_link\"") >&5
16798   (eval $ac_link) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16802   { (eval echo "$as_me:16802: \"$ac_try\"") >&5
16803   (eval $ac_try) 2>&5
16804   ac_status=$?
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); }; }; then
16807   cf_cv_working_poll=yes
16808 else
16809   echo "$as_me: program exited with status $ac_status" >&5
16810 echo "$as_me: failed program was:" >&5
16811 cat conftest.$ac_ext >&5
16812 cf_cv_working_poll=no
16813 fi
16814 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16815 fi
16816 fi
16817 echo "$as_me:16817: result: $cf_cv_working_poll" >&5
16818 echo "${ECHO_T}$cf_cv_working_poll" >&6
16819 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16820 #define HAVE_WORKING_POLL 1
16821 EOF
16822
16823 echo "$as_me:16823: checking for va_copy" >&5
16824 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16825 if test "${cf_cv_have_va_copy+set}" = set; then
16826   echo $ECHO_N "(cached) $ECHO_C" >&6
16827 else
16828
16829 cat >conftest.$ac_ext <<_ACEOF
16830 #line 16830 "configure"
16831 #include "confdefs.h"
16832
16833 #include <stdarg.h>
16834
16835 int
16836 main ()
16837 {
16838
16839         static va_list dst;
16840         static va_list src;
16841         va_copy(dst, src)
16842   ;
16843   return 0;
16844 }
16845 _ACEOF
16846 rm -f conftest.$ac_objext conftest$ac_exeext
16847 if { (eval echo "$as_me:16847: \"$ac_link\"") >&5
16848   (eval $ac_link) 2>&5
16849   ac_status=$?
16850   echo "$as_me:16850: \$? = $ac_status" >&5
16851   (exit $ac_status); } &&
16852          { ac_try='test -s conftest$ac_exeext'
16853   { (eval echo "$as_me:16853: \"$ac_try\"") >&5
16854   (eval $ac_try) 2>&5
16855   ac_status=$?
16856   echo "$as_me:16856: \$? = $ac_status" >&5
16857   (exit $ac_status); }; }; then
16858   cf_cv_have_va_copy=yes
16859 else
16860   echo "$as_me: failed program was:" >&5
16861 cat conftest.$ac_ext >&5
16862 cf_cv_have_va_copy=no
16863 fi
16864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16865 fi
16866 echo "$as_me:16866: result: $cf_cv_have_va_copy" >&5
16867 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16868
16869 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16870 #define HAVE_VA_COPY 1
16871 EOF
16872
16873 echo "$as_me:16873: checking for __va_copy" >&5
16874 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16875 if test "${cf_cv_have___va_copy+set}" = set; then
16876   echo $ECHO_N "(cached) $ECHO_C" >&6
16877 else
16878
16879 cat >conftest.$ac_ext <<_ACEOF
16880 #line 16880 "configure"
16881 #include "confdefs.h"
16882
16883 #include <stdarg.h>
16884
16885 int
16886 main ()
16887 {
16888
16889         static va_list dst;
16890         static va_list src;
16891         __va_copy(dst, src)
16892   ;
16893   return 0;
16894 }
16895 _ACEOF
16896 rm -f conftest.$ac_objext conftest$ac_exeext
16897 if { (eval echo "$as_me:16897: \"$ac_link\"") >&5
16898   (eval $ac_link) 2>&5
16899   ac_status=$?
16900   echo "$as_me:16900: \$? = $ac_status" >&5
16901   (exit $ac_status); } &&
16902          { ac_try='test -s conftest$ac_exeext'
16903   { (eval echo "$as_me:16903: \"$ac_try\"") >&5
16904   (eval $ac_try) 2>&5
16905   ac_status=$?
16906   echo "$as_me:16906: \$? = $ac_status" >&5
16907   (exit $ac_status); }; }; then
16908   cf_cv_have___va_copy=yes
16909 else
16910   echo "$as_me: failed program was:" >&5
16911 cat conftest.$ac_ext >&5
16912 cf_cv_have___va_copy=no
16913 fi
16914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16915 fi
16916 echo "$as_me:16916: result: $cf_cv_have___va_copy" >&5
16917 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16918
16919 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16920 #define HAVE___VA_COPY 1
16921 EOF
16922
16923 echo "$as_me:16923: checking for pid_t" >&5
16924 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16925 if test "${ac_cv_type_pid_t+set}" = set; then
16926   echo $ECHO_N "(cached) $ECHO_C" >&6
16927 else
16928   cat >conftest.$ac_ext <<_ACEOF
16929 #line 16929 "configure"
16930 #include "confdefs.h"
16931 $ac_includes_default
16932 int
16933 main ()
16934 {
16935 if ((pid_t *) 0)
16936   return 0;
16937 if (sizeof (pid_t))
16938   return 0;
16939   ;
16940   return 0;
16941 }
16942 _ACEOF
16943 rm -f conftest.$ac_objext
16944 if { (eval echo "$as_me:16944: \"$ac_compile\"") >&5
16945   (eval $ac_compile) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit $ac_status); } &&
16949          { ac_try='test -s conftest.$ac_objext'
16950   { (eval echo "$as_me:16950: \"$ac_try\"") >&5
16951   (eval $ac_try) 2>&5
16952   ac_status=$?
16953   echo "$as_me:16953: \$? = $ac_status" >&5
16954   (exit $ac_status); }; }; then
16955   ac_cv_type_pid_t=yes
16956 else
16957   echo "$as_me: failed program was:" >&5
16958 cat conftest.$ac_ext >&5
16959 ac_cv_type_pid_t=no
16960 fi
16961 rm -f conftest.$ac_objext conftest.$ac_ext
16962 fi
16963 echo "$as_me:16963: result: $ac_cv_type_pid_t" >&5
16964 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16965 if test $ac_cv_type_pid_t = yes; then
16966   :
16967 else
16968
16969 cat >>confdefs.h <<EOF
16970 #define pid_t int
16971 EOF
16972
16973 fi
16974
16975 for ac_header in unistd.h vfork.h
16976 do
16977 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16978 echo "$as_me:16978: checking for $ac_header" >&5
16979 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16980 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16981   echo $ECHO_N "(cached) $ECHO_C" >&6
16982 else
16983   cat >conftest.$ac_ext <<_ACEOF
16984 #line 16984 "configure"
16985 #include "confdefs.h"
16986 #include <$ac_header>
16987 _ACEOF
16988 if { (eval echo "$as_me:16988: \"$ac_cpp conftest.$ac_ext\"") >&5
16989   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16990   ac_status=$?
16991   egrep -v '^ *\+' conftest.er1 >conftest.err
16992   rm -f conftest.er1
16993   cat conftest.err >&5
16994   echo "$as_me:16994: \$? = $ac_status" >&5
16995   (exit $ac_status); } >/dev/null; then
16996   if test -s conftest.err; then
16997     ac_cpp_err=$ac_c_preproc_warn_flag
16998   else
16999     ac_cpp_err=
17000   fi
17001 else
17002   ac_cpp_err=yes
17003 fi
17004 if test -z "$ac_cpp_err"; then
17005   eval "$as_ac_Header=yes"
17006 else
17007   echo "$as_me: failed program was:" >&5
17008   cat conftest.$ac_ext >&5
17009   eval "$as_ac_Header=no"
17010 fi
17011 rm -f conftest.err conftest.$ac_ext
17012 fi
17013 echo "$as_me:17013: result: `eval echo '${'$as_ac_Header'}'`" >&5
17014 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17016   cat >>confdefs.h <<EOF
17017 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17018 EOF
17019
17020 fi
17021 done
17022
17023 for ac_func in fork vfork
17024 do
17025 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17026 echo "$as_me:17026: checking for $ac_func" >&5
17027 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17028 if eval "test \"\${$as_ac_var+set}\" = set"; then
17029   echo $ECHO_N "(cached) $ECHO_C" >&6
17030 else
17031   cat >conftest.$ac_ext <<_ACEOF
17032 #line 17032 "configure"
17033 #include "confdefs.h"
17034 /* System header to define __stub macros and hopefully few prototypes,
17035     which can conflict with char $ac_func (); below.  */
17036 #include <assert.h>
17037 /* Override any gcc2 internal prototype to avoid an error.  */
17038 #ifdef __cplusplus
17039 extern "C"
17040 #endif
17041 /* We use char because int might match the return type of a gcc2
17042    builtin and then its argument prototype would still apply.  */
17043 char $ac_func ();
17044 char (*f) ();
17045
17046 int
17047 main ()
17048 {
17049 /* The GNU C library defines this for functions which it implements
17050     to always fail with ENOSYS.  Some functions are actually named
17051     something starting with __ and the normal name is an alias.  */
17052 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17053 choke me
17054 #else
17055 f = $ac_func;
17056 #endif
17057
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 rm -f conftest.$ac_objext conftest$ac_exeext
17063 if { (eval echo "$as_me:17063: \"$ac_link\"") >&5
17064   (eval $ac_link) 2>&5
17065   ac_status=$?
17066   echo "$as_me:17066: \$? = $ac_status" >&5
17067   (exit $ac_status); } &&
17068          { ac_try='test -s conftest$ac_exeext'
17069   { (eval echo "$as_me:17069: \"$ac_try\"") >&5
17070   (eval $ac_try) 2>&5
17071   ac_status=$?
17072   echo "$as_me:17072: \$? = $ac_status" >&5
17073   (exit $ac_status); }; }; then
17074   eval "$as_ac_var=yes"
17075 else
17076   echo "$as_me: failed program was:" >&5
17077 cat conftest.$ac_ext >&5
17078 eval "$as_ac_var=no"
17079 fi
17080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17081 fi
17082 echo "$as_me:17082: result: `eval echo '${'$as_ac_var'}'`" >&5
17083 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17084 if test `eval echo '${'$as_ac_var'}'` = yes; then
17085   cat >>confdefs.h <<EOF
17086 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17087 EOF
17088
17089 fi
17090 done
17091
17092 ac_cv_func_fork_works=$ac_cv_func_fork
17093 if test "x$ac_cv_func_fork" = xyes; then
17094   echo "$as_me:17094: checking for working fork" >&5
17095 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17096 if test "${ac_cv_func_fork_works+set}" = set; then
17097   echo $ECHO_N "(cached) $ECHO_C" >&6
17098 else
17099   if test "$cross_compiling" = yes; then
17100   ac_cv_func_fork_works=cross
17101 else
17102   cat >conftest.$ac_ext <<_ACEOF
17103 /* By Rüdiger Kuhlmann. */
17104       #include <sys/types.h>
17105       #if HAVE_UNISTD_H
17106       # include <unistd.h>
17107       #endif
17108       /* Some systems only have a dummy stub for fork() */
17109       int main ()
17110       {
17111         if (fork() < 0)
17112           $ac_main_return (1);
17113         $ac_main_return (0);
17114       }
17115 _ACEOF
17116 rm -f conftest$ac_exeext
17117 if { (eval echo "$as_me:17117: \"$ac_link\"") >&5
17118   (eval $ac_link) 2>&5
17119   ac_status=$?
17120   echo "$as_me:17120: \$? = $ac_status" >&5
17121   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17122   { (eval echo "$as_me:17122: \"$ac_try\"") >&5
17123   (eval $ac_try) 2>&5
17124   ac_status=$?
17125   echo "$as_me:17125: \$? = $ac_status" >&5
17126   (exit $ac_status); }; }; then
17127   ac_cv_func_fork_works=yes
17128 else
17129   echo "$as_me: program exited with status $ac_status" >&5
17130 echo "$as_me: failed program was:" >&5
17131 cat conftest.$ac_ext >&5
17132 ac_cv_func_fork_works=no
17133 fi
17134 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17135 fi
17136 fi
17137 echo "$as_me:17137: result: $ac_cv_func_fork_works" >&5
17138 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17139
17140 fi
17141 if test "x$ac_cv_func_fork_works" = xcross; then
17142   case $host in
17143     *-*-amigaos* | *-*-msdosdjgpp*)
17144       # Override, as these systems have only a dummy fork() stub
17145       ac_cv_func_fork_works=no
17146       ;;
17147     *)
17148       ac_cv_func_fork_works=yes
17149       ;;
17150   esac
17151   { echo "$as_me:17151: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17152 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17153 fi
17154 ac_cv_func_vfork_works=$ac_cv_func_vfork
17155 if test "x$ac_cv_func_vfork" = xyes; then
17156   echo "$as_me:17156: checking for working vfork" >&5
17157 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17158 if test "${ac_cv_func_vfork_works+set}" = set; then
17159   echo $ECHO_N "(cached) $ECHO_C" >&6
17160 else
17161   if test "$cross_compiling" = yes; then
17162   ac_cv_func_vfork_works=cross
17163 else
17164   cat >conftest.$ac_ext <<_ACEOF
17165 #line 17165 "configure"
17166 #include "confdefs.h"
17167 /* Thanks to Paul Eggert for this test.  */
17168 #include <stdio.h>
17169 #include <sys/types.h>
17170 #include <sys/stat.h>
17171 #if HAVE_UNISTD_H
17172 # include <unistd.h>
17173 #endif
17174 #if HAVE_VFORK_H
17175 # include <vfork.h>
17176 #endif
17177 /* On some sparc systems, changes by the child to local and incoming
17178    argument registers are propagated back to the parent.  The compiler
17179    is told about this with #include <vfork.h>, but some compilers
17180    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17181    static variable whose address is put into a register that is
17182    clobbered by the vfork.  */
17183 static
17184 #ifdef __cplusplus
17185 sparc_address_test (int arg)
17186 # else
17187 sparc_address_test (arg) int arg;
17188 #endif
17189 {
17190   static pid_t child;
17191   if (!child) {
17192     child = vfork ();
17193     if (child < 0) {
17194       perror ("vfork");
17195       _exit(2);
17196     }
17197     if (!child) {
17198       arg = getpid();
17199       write(-1, "", 0);
17200       _exit (arg);
17201     }
17202   }
17203 }
17204
17205 int
17206 main ()
17207 {
17208   pid_t parent = getpid ();
17209   pid_t child;
17210
17211   sparc_address_test ();
17212
17213   child = vfork ();
17214
17215   if (child == 0) {
17216     /* Here is another test for sparc vfork register problems.  This
17217        test uses lots of local variables, at least as many local
17218        variables as main has allocated so far including compiler
17219        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17220        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17221        reuse the register of parent for one of the local variables,
17222        since it will think that parent can't possibly be used any more
17223        in this routine.  Assigning to the local variable will thus
17224        munge parent in the parent process.  */
17225     pid_t
17226       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17227       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17228     /* Convince the compiler that p..p7 are live; otherwise, it might
17229        use the same hardware register for all 8 local variables.  */
17230     if (p != p1 || p != p2 || p != p3 || p != p4
17231         || p != p5 || p != p6 || p != p7)
17232       _exit(1);
17233
17234     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17235        from child file descriptors.  If the child closes a descriptor
17236        before it execs or exits, this munges the parent's descriptor
17237        as well.  Test for this by closing stdout in the child.  */
17238     _exit(close(fileno(stdout)) != 0);
17239   } else {
17240     int status;
17241     struct stat st;
17242
17243     while (wait(&status) != child)
17244       ;
17245     $ac_main_return(
17246          /* Was there some problem with vforking?  */
17247          child < 0
17248
17249          /* Did the child fail?  (This shouldn't happen.)  */
17250          || status
17251
17252          /* Did the vfork/compiler bug occur?  */
17253          || parent != getpid()
17254
17255          /* Did the file descriptor bug occur?  */
17256          || fstat(fileno(stdout), &st) != 0
17257          );
17258   }
17259 }
17260 _ACEOF
17261 rm -f conftest$ac_exeext
17262 if { (eval echo "$as_me:17262: \"$ac_link\"") >&5
17263   (eval $ac_link) 2>&5
17264   ac_status=$?
17265   echo "$as_me:17265: \$? = $ac_status" >&5
17266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17267   { (eval echo "$as_me:17267: \"$ac_try\"") >&5
17268   (eval $ac_try) 2>&5
17269   ac_status=$?
17270   echo "$as_me:17270: \$? = $ac_status" >&5
17271   (exit $ac_status); }; }; then
17272   ac_cv_func_vfork_works=yes
17273 else
17274   echo "$as_me: program exited with status $ac_status" >&5
17275 echo "$as_me: failed program was:" >&5
17276 cat conftest.$ac_ext >&5
17277 ac_cv_func_vfork_works=no
17278 fi
17279 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17280 fi
17281 fi
17282 echo "$as_me:17282: result: $ac_cv_func_vfork_works" >&5
17283 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17284
17285 fi;
17286 if test "x$ac_cv_func_fork_works" = xcross; then
17287   ac_cv_func_vfork_works=ac_cv_func_vfork
17288   { echo "$as_me:17288: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17289 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17290 fi
17291
17292 if test "x$ac_cv_func_vfork_works" = xyes; then
17293
17294 cat >>confdefs.h <<\EOF
17295 #define HAVE_WORKING_VFORK 1
17296 EOF
17297
17298 else
17299
17300 cat >>confdefs.h <<\EOF
17301 #define vfork fork
17302 EOF
17303
17304 fi
17305 if test "x$ac_cv_func_fork_works" = xyes; then
17306
17307 cat >>confdefs.h <<\EOF
17308 #define HAVE_WORKING_FORK 1
17309 EOF
17310
17311 fi
17312
17313 # special check for test/ditto.c
17314
17315 echo "$as_me:17315: checking for openpty in -lutil" >&5
17316 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17317 if test "${ac_cv_lib_util_openpty+set}" = set; then
17318   echo $ECHO_N "(cached) $ECHO_C" >&6
17319 else
17320   ac_check_lib_save_LIBS=$LIBS
17321 LIBS="-lutil  $LIBS"
17322 cat >conftest.$ac_ext <<_ACEOF
17323 #line 17323 "configure"
17324 #include "confdefs.h"
17325
17326 /* Override any gcc2 internal prototype to avoid an error.  */
17327 #ifdef __cplusplus
17328 extern "C"
17329 #endif
17330 /* We use char because int might match the return type of a gcc2
17331    builtin and then its argument prototype would still apply.  */
17332 char openpty ();
17333 int
17334 main ()
17335 {
17336 openpty ();
17337   ;
17338   return 0;
17339 }
17340 _ACEOF
17341 rm -f conftest.$ac_objext conftest$ac_exeext
17342 if { (eval echo "$as_me:17342: \"$ac_link\"") >&5
17343   (eval $ac_link) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit $ac_status); } &&
17347          { ac_try='test -s conftest$ac_exeext'
17348   { (eval echo "$as_me:17348: \"$ac_try\"") >&5
17349   (eval $ac_try) 2>&5
17350   ac_status=$?
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); }; }; then
17353   ac_cv_lib_util_openpty=yes
17354 else
17355   echo "$as_me: failed program was:" >&5
17356 cat conftest.$ac_ext >&5
17357 ac_cv_lib_util_openpty=no
17358 fi
17359 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17360 LIBS=$ac_check_lib_save_LIBS
17361 fi
17362 echo "$as_me:17362: result: $ac_cv_lib_util_openpty" >&5
17363 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17364 if test $ac_cv_lib_util_openpty = yes; then
17365   cf_cv_lib_util=yes
17366 else
17367   cf_cv_lib_util=no
17368 fi
17369
17370 echo "$as_me:17370: checking for openpty header" >&5
17371 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17372 if test "${cf_cv_func_openpty+set}" = set; then
17373   echo $ECHO_N "(cached) $ECHO_C" >&6
17374 else
17375
17376     cf_save_LIBS="$LIBS"
17377     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17378     for cf_header in pty.h libutil.h util.h
17379     do
17380     cat >conftest.$ac_ext <<_ACEOF
17381 #line 17381 "configure"
17382 #include "confdefs.h"
17383
17384 #include <$cf_header>
17385
17386 int
17387 main ()
17388 {
17389
17390     int x = openpty((int *)0, (int *)0, (char *)0,
17391                    (struct termios *)0, (struct winsize *)0);
17392
17393   ;
17394   return 0;
17395 }
17396 _ACEOF
17397 rm -f conftest.$ac_objext conftest$ac_exeext
17398 if { (eval echo "$as_me:17398: \"$ac_link\"") >&5
17399   (eval $ac_link) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit $ac_status); } &&
17403          { ac_try='test -s conftest$ac_exeext'
17404   { (eval echo "$as_me:17404: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); }; }; then
17409
17410         cf_cv_func_openpty=$cf_header
17411         break
17412
17413 else
17414   echo "$as_me: failed program was:" >&5
17415 cat conftest.$ac_ext >&5
17416
17417         cf_cv_func_openpty=no
17418
17419 fi
17420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17421     done
17422     LIBS="$cf_save_LIBS"
17423
17424 fi
17425 echo "$as_me:17425: result: $cf_cv_func_openpty" >&5
17426 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17427
17428 if test "$cf_cv_func_openpty" != no ; then
17429     cat >>confdefs.h <<EOF
17430 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17431 EOF
17432
17433     cat >>confdefs.h <<\EOF
17434 #define USE_XTERM_PTY 1
17435 EOF
17436
17437     if test "$cf_cv_lib_util" = yes ; then
17438         TEST_LIBS="-lutil $TEST_LIBS"
17439     fi
17440 fi
17441
17442 if test "$with_hashed_db" != no ; then
17443         cat >>confdefs.h <<\EOF
17444 #define USE_HASHED_DB 1
17445 EOF
17446
17447 case $with_hashed_db in #(vi
17448 yes|*able*) #(vi
17449     ;;
17450 *)
17451     if test -d "$with_hashed_db" ; then
17452
17453 if test -n "$with_hashed_db/include" ; then
17454   for cf_add_incdir in $with_hashed_db/include
17455   do
17456         while test $cf_add_incdir != /usr/include
17457         do
17458           if test -d $cf_add_incdir
17459           then
17460                 cf_have_incdir=no
17461                 if test -n "$CFLAGS$CPPFLAGS" ; then
17462                   # a loop is needed to ensure we can add subdirs of existing dirs
17463                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17464                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17465                           cf_have_incdir=yes; break
17466                         fi
17467                   done
17468                 fi
17469
17470                 if test "$cf_have_incdir" = no ; then
17471                   if test "$cf_add_incdir" = /usr/local/include ; then
17472                         if test "$GCC" = yes
17473                         then
17474                           cf_save_CPPFLAGS=$CPPFLAGS
17475                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17476                           cat >conftest.$ac_ext <<_ACEOF
17477 #line 17477 "configure"
17478 #include "confdefs.h"
17479 #include <stdio.h>
17480 int
17481 main ()
17482 {
17483 printf("Hello")
17484   ;
17485   return 0;
17486 }
17487 _ACEOF
17488 rm -f conftest.$ac_objext
17489 if { (eval echo "$as_me:17489: \"$ac_compile\"") >&5
17490   (eval $ac_compile) 2>&5
17491   ac_status=$?
17492   echo "$as_me:17492: \$? = $ac_status" >&5
17493   (exit $ac_status); } &&
17494          { ac_try='test -s conftest.$ac_objext'
17495   { (eval echo "$as_me:17495: \"$ac_try\"") >&5
17496   (eval $ac_try) 2>&5
17497   ac_status=$?
17498   echo "$as_me:17498: \$? = $ac_status" >&5
17499   (exit $ac_status); }; }; then
17500   :
17501 else
17502   echo "$as_me: failed program was:" >&5
17503 cat conftest.$ac_ext >&5
17504 cf_have_incdir=yes
17505 fi
17506 rm -f conftest.$ac_objext conftest.$ac_ext
17507                           CPPFLAGS=$cf_save_CPPFLAGS
17508                         fi
17509                   fi
17510                 fi
17511
17512                 if test "$cf_have_incdir" = no ; then
17513                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17514
17515 echo "${as_me:-configure}:17515: testing adding $cf_add_incdir to include-path ..." 1>&5
17516
17517                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17518
17519                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17520                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17521                   cf_add_incdir="$cf_top_incdir"
17522                 else
17523                   break
17524                 fi
17525           fi
17526         done
17527   done
17528 fi
17529
17530 if test -n "$with_hashed_db/lib" ; then
17531   for cf_add_libdir in $with_hashed_db/lib
17532   do
17533     if test $cf_add_libdir = /usr/lib ; then
17534       :
17535     elif test -d $cf_add_libdir
17536     then
17537       cf_have_libdir=no
17538       if test -n "$LDFLAGS$LIBS" ; then
17539         # a loop is needed to ensure we can add subdirs of existing dirs
17540         for cf_test_libdir in $LDFLAGS $LIBS ; do
17541           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17542             cf_have_libdir=yes; break
17543           fi
17544         done
17545       fi
17546       if test "$cf_have_libdir" = no ; then
17547         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17548
17549 echo "${as_me:-configure}:17549: testing adding $cf_add_libdir to library-path ..." 1>&5
17550
17551         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17552       fi
17553     fi
17554   done
17555 fi
17556
17557     fi
17558 esac
17559
17560 echo "$as_me:17560: checking for db.h" >&5
17561 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17562 if test "${ac_cv_header_db_h+set}" = set; then
17563   echo $ECHO_N "(cached) $ECHO_C" >&6
17564 else
17565   cat >conftest.$ac_ext <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568 #include <db.h>
17569 _ACEOF
17570 if { (eval echo "$as_me:17570: \"$ac_cpp conftest.$ac_ext\"") >&5
17571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17572   ac_status=$?
17573   egrep -v '^ *\+' conftest.er1 >conftest.err
17574   rm -f conftest.er1
17575   cat conftest.err >&5
17576   echo "$as_me:17576: \$? = $ac_status" >&5
17577   (exit $ac_status); } >/dev/null; then
17578   if test -s conftest.err; then
17579     ac_cpp_err=$ac_c_preproc_warn_flag
17580   else
17581     ac_cpp_err=
17582   fi
17583 else
17584   ac_cpp_err=yes
17585 fi
17586 if test -z "$ac_cpp_err"; then
17587   ac_cv_header_db_h=yes
17588 else
17589   echo "$as_me: failed program was:" >&5
17590   cat conftest.$ac_ext >&5
17591   ac_cv_header_db_h=no
17592 fi
17593 rm -f conftest.err conftest.$ac_ext
17594 fi
17595 echo "$as_me:17595: result: $ac_cv_header_db_h" >&5
17596 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17597 if test $ac_cv_header_db_h = yes; then
17598
17599 echo "$as_me:17599: checking for version of db" >&5
17600 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17601 if test "${cf_cv_hashed_db_version+set}" = set; then
17602   echo $ECHO_N "(cached) $ECHO_C" >&6
17603 else
17604
17605 cf_cv_hashed_db_version=unknown
17606
17607 for cf_db_version in 1 2 3 4 5
17608 do
17609
17610 echo "${as_me:-configure}:17610: testing checking for db version $cf_db_version ..." 1>&5
17611
17612         cat >conftest.$ac_ext <<_ACEOF
17613 #line 17613 "configure"
17614 #include "confdefs.h"
17615
17616 $ac_includes_default
17617 #include <db.h>
17618
17619 #ifdef DB_VERSION_MAJOR
17620         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17621 #if $cf_db_version == DB_VERSION_MAJOR
17622         /* ok */
17623 #else
17624         make an error
17625 #endif
17626 #else
17627 #if $cf_db_version == 1
17628         /* ok: assuming this is DB 1.8.5 */
17629 #else
17630         make an error
17631 #endif
17632 #endif
17633
17634 int
17635 main ()
17636 {
17637 DBT *foo = 0
17638   ;
17639   return 0;
17640 }
17641 _ACEOF
17642 rm -f conftest.$ac_objext
17643 if { (eval echo "$as_me:17643: \"$ac_compile\"") >&5
17644   (eval $ac_compile) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -s conftest.$ac_objext'
17649   { (eval echo "$as_me:17649: \"$ac_try\"") >&5
17650   (eval $ac_try) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit $ac_status); }; }; then
17654
17655         cf_cv_hashed_db_version=$cf_db_version
17656         break
17657
17658 else
17659   echo "$as_me: failed program was:" >&5
17660 cat conftest.$ac_ext >&5
17661 fi
17662 rm -f conftest.$ac_objext conftest.$ac_ext
17663 done
17664
17665 fi
17666 echo "$as_me:17666: result: $cf_cv_hashed_db_version" >&5
17667 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17668
17669 if test "$cf_cv_hashed_db_version" = unknown ; then
17670         { { echo "$as_me:17670: error: Cannot determine version of db" >&5
17671 echo "$as_me: error: Cannot determine version of db" >&2;}
17672    { (exit 1); exit 1; }; }
17673 else
17674
17675 echo "$as_me:17675: checking for db libraries" >&5
17676 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17677 if test "${cf_cv_hashed_db_libs+set}" = set; then
17678   echo $ECHO_N "(cached) $ECHO_C" >&6
17679 else
17680
17681 cf_cv_hashed_db_libs=unknown
17682 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17683 do
17684         cf_save_libs="$LIBS"
17685         if test -n "$cf_db_libs"; then
17686                 LIBS="-l$cf_db_libs $LIBS"
17687         fi
17688
17689 echo "${as_me:-configure}:17689: testing checking for library "$cf_db_libs" ..." 1>&5
17690
17691         cat >conftest.$ac_ext <<_ACEOF
17692 #line 17692 "configure"
17693 #include "confdefs.h"
17694
17695 $ac_includes_default
17696 #include <db.h>
17697
17698 int
17699 main ()
17700 {
17701
17702         char *path = "/tmp/foo";
17703 #ifdef DB_VERSION_MAJOR
17704 #if DB_VERSION_MAJOR >= 4
17705         DB *result = 0;
17706         db_create(&result, NULL, 0);
17707         result->open(result,
17708                 NULL,
17709                 path,
17710                 path,
17711                 DB_HASH,
17712                 DB_CREATE,
17713                 0644);
17714 #elif DB_VERSION_MAJOR >= 3
17715         DB *result = 0;
17716         db_create(&result, NULL, 0);
17717         result->open(result,
17718                 path,
17719                 path,
17720                 DB_HASH,
17721                 DB_CREATE,
17722                 0644);
17723 #elif DB_VERSION_MAJOR >= 2
17724         DB *result = 0;
17725         db_open(path,
17726                 DB_HASH,
17727                 DB_CREATE,
17728                 0644,
17729                 (DB_ENV *) 0,
17730                 (DB_INFO *) 0,
17731                 &result);
17732 #endif /* DB_VERSION_MAJOR */
17733 #else
17734         DB *result = dbopen(path,
17735                      2,
17736                      0644,
17737                      DB_HASH,
17738                      0);
17739 #endif
17740         ${cf_cv_main_return:-return}(result != 0)
17741
17742   ;
17743   return 0;
17744 }
17745 _ACEOF
17746 rm -f conftest.$ac_objext conftest$ac_exeext
17747 if { (eval echo "$as_me:17747: \"$ac_link\"") >&5
17748   (eval $ac_link) 2>&5
17749   ac_status=$?
17750   echo "$as_me:17750: \$? = $ac_status" >&5
17751   (exit $ac_status); } &&
17752          { ac_try='test -s conftest$ac_exeext'
17753   { (eval echo "$as_me:17753: \"$ac_try\"") >&5
17754   (eval $ac_try) 2>&5
17755   ac_status=$?
17756   echo "$as_me:17756: \$? = $ac_status" >&5
17757   (exit $ac_status); }; }; then
17758
17759         if test -n "$cf_db_libs" ; then
17760                 cf_cv_hashed_db_libs=$cf_db_libs
17761         else
17762                 cf_cv_hashed_db_libs=default
17763         fi
17764         LIBS="$cf_save_libs"
17765         break
17766
17767 else
17768   echo "$as_me: failed program was:" >&5
17769 cat conftest.$ac_ext >&5
17770 fi
17771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17772         LIBS="$cf_save_libs"
17773 done
17774
17775 fi
17776 echo "$as_me:17776: result: $cf_cv_hashed_db_libs" >&5
17777 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17778
17779         if test "$cf_cv_hashed_db_libs" = unknown ; then
17780                 { { echo "$as_me:17780: error: Cannot determine library for db" >&5
17781 echo "$as_me: error: Cannot determine library for db" >&2;}
17782    { (exit 1); exit 1; }; }
17783         elif test "$cf_cv_hashed_db_libs" != default ; then
17784                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17785         fi
17786 fi
17787
17788 else
17789
17790         { { echo "$as_me:17790: error: Cannot find db.h" >&5
17791 echo "$as_me: error: Cannot find db.h" >&2;}
17792    { (exit 1); exit 1; }; }
17793
17794 fi
17795
17796 fi
17797
17798 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17799         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17800         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17801 fi
17802
17803 # Just in case, check if the C compiler has a bool type.
17804
17805 echo "$as_me:17805: checking if we should include stdbool.h" >&5
17806 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17807
17808 if test "${cf_cv_header_stdbool_h+set}" = set; then
17809   echo $ECHO_N "(cached) $ECHO_C" >&6
17810 else
17811
17812         cat >conftest.$ac_ext <<_ACEOF
17813 #line 17813 "configure"
17814 #include "confdefs.h"
17815
17816 int
17817 main ()
17818 {
17819 bool foo = false
17820   ;
17821   return 0;
17822 }
17823 _ACEOF
17824 rm -f conftest.$ac_objext
17825 if { (eval echo "$as_me:17825: \"$ac_compile\"") >&5
17826   (eval $ac_compile) 2>&5
17827   ac_status=$?
17828   echo "$as_me:17828: \$? = $ac_status" >&5
17829   (exit $ac_status); } &&
17830          { ac_try='test -s conftest.$ac_objext'
17831   { (eval echo "$as_me:17831: \"$ac_try\"") >&5
17832   (eval $ac_try) 2>&5
17833   ac_status=$?
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); }; }; then
17836   cf_cv_header_stdbool_h=0
17837 else
17838   echo "$as_me: failed program was:" >&5
17839 cat conftest.$ac_ext >&5
17840 cat >conftest.$ac_ext <<_ACEOF
17841 #line 17841 "configure"
17842 #include "confdefs.h"
17843
17844 #ifndef __BEOS__
17845 #include <stdbool.h>
17846 #endif
17847
17848 int
17849 main ()
17850 {
17851 bool foo = false
17852   ;
17853   return 0;
17854 }
17855 _ACEOF
17856 rm -f conftest.$ac_objext
17857 if { (eval echo "$as_me:17857: \"$ac_compile\"") >&5
17858   (eval $ac_compile) 2>&5
17859   ac_status=$?
17860   echo "$as_me:17860: \$? = $ac_status" >&5
17861   (exit $ac_status); } &&
17862          { ac_try='test -s conftest.$ac_objext'
17863   { (eval echo "$as_me:17863: \"$ac_try\"") >&5
17864   (eval $ac_try) 2>&5
17865   ac_status=$?
17866   echo "$as_me:17866: \$? = $ac_status" >&5
17867   (exit $ac_status); }; }; then
17868   cf_cv_header_stdbool_h=1
17869 else
17870   echo "$as_me: failed program was:" >&5
17871 cat conftest.$ac_ext >&5
17872 cf_cv_header_stdbool_h=0
17873 fi
17874 rm -f conftest.$ac_objext conftest.$ac_ext
17875 fi
17876 rm -f conftest.$ac_objext conftest.$ac_ext
17877 fi
17878
17879 if test "$cf_cv_header_stdbool_h" = 1
17880 then    echo "$as_me:17880: result: yes" >&5
17881 echo "${ECHO_T}yes" >&6
17882 else    echo "$as_me:17882: result: no" >&5
17883 echo "${ECHO_T}no" >&6
17884 fi
17885
17886 echo "$as_me:17886: checking for builtin bool type" >&5
17887 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17888
17889 if test "${cf_cv_cc_bool_type+set}" = set; then
17890   echo $ECHO_N "(cached) $ECHO_C" >&6
17891 else
17892
17893         cat >conftest.$ac_ext <<_ACEOF
17894 #line 17894 "configure"
17895 #include "confdefs.h"
17896
17897 #include <stdio.h>
17898 #include <sys/types.h>
17899
17900 int
17901 main ()
17902 {
17903 bool x = false
17904   ;
17905   return 0;
17906 }
17907 _ACEOF
17908 rm -f conftest.$ac_objext
17909 if { (eval echo "$as_me:17909: \"$ac_compile\"") >&5
17910   (eval $ac_compile) 2>&5
17911   ac_status=$?
17912   echo "$as_me:17912: \$? = $ac_status" >&5
17913   (exit $ac_status); } &&
17914          { ac_try='test -s conftest.$ac_objext'
17915   { (eval echo "$as_me:17915: \"$ac_try\"") >&5
17916   (eval $ac_try) 2>&5
17917   ac_status=$?
17918   echo "$as_me:17918: \$? = $ac_status" >&5
17919   (exit $ac_status); }; }; then
17920   cf_cv_cc_bool_type=1
17921 else
17922   echo "$as_me: failed program was:" >&5
17923 cat conftest.$ac_ext >&5
17924 cf_cv_cc_bool_type=0
17925 fi
17926 rm -f conftest.$ac_objext conftest.$ac_ext
17927
17928 fi
17929
17930 if test "$cf_cv_cc_bool_type" = 1
17931 then    echo "$as_me:17931: result: yes" >&5
17932 echo "${ECHO_T}yes" >&6
17933 else    echo "$as_me:17933: result: no" >&5
17934 echo "${ECHO_T}no" >&6
17935 fi
17936
17937 # Check for C++ compiler characteristics (and ensure that it's there!)
17938 if test -n "$CXX" ; then
17939         ac_ext=cc
17940 ac_cpp='$CXXCPP $CPPFLAGS'
17941 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17942 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17943 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17944 ac_main_return=return
17945
17946 if test -n "$GXX" ; then
17947 case $cf_cv_system_name in #(vi
17948 os2*) #(vi
17949         cf_stdcpp_libname=stdcpp
17950         ;;
17951 *)
17952         cf_stdcpp_libname=stdc++
17953         ;;
17954 esac
17955 echo "$as_me:17955: checking for library $cf_stdcpp_libname" >&5
17956 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17957 if test "${cf_cv_libstdcpp+set}" = set; then
17958   echo $ECHO_N "(cached) $ECHO_C" >&6
17959 else
17960
17961         cf_save="$LIBS"
17962         LIBS="-l$cf_stdcpp_libname $LIBS"
17963 cat >conftest.$ac_ext <<_ACEOF
17964 #line 17964 "configure"
17965 #include "confdefs.h"
17966
17967 #include <strstream.h>
17968 int
17969 main ()
17970 {
17971
17972 char buf[80];
17973 strstreambuf foo(buf, sizeof(buf))
17974
17975   ;
17976   return 0;
17977 }
17978 _ACEOF
17979 rm -f conftest.$ac_objext conftest$ac_exeext
17980 if { (eval echo "$as_me:17980: \"$ac_link\"") >&5
17981   (eval $ac_link) 2>&5
17982   ac_status=$?
17983   echo "$as_me:17983: \$? = $ac_status" >&5
17984   (exit $ac_status); } &&
17985          { ac_try='test -s conftest$ac_exeext'
17986   { (eval echo "$as_me:17986: \"$ac_try\"") >&5
17987   (eval $ac_try) 2>&5
17988   ac_status=$?
17989   echo "$as_me:17989: \$? = $ac_status" >&5
17990   (exit $ac_status); }; }; then
17991   cf_cv_libstdcpp=yes
17992 else
17993   echo "$as_me: failed program was:" >&5
17994 cat conftest.$ac_ext >&5
17995 cf_cv_libstdcpp=no
17996 fi
17997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17998         LIBS="$cf_save"
17999
18000 fi
18001 echo "$as_me:18001: result: $cf_cv_libstdcpp" >&5
18002 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18003 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18004 fi
18005
18006         echo "$as_me:18006: checking whether $CXX understands -c and -o together" >&5
18007 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18008 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18009   echo $ECHO_N "(cached) $ECHO_C" >&6
18010 else
18011
18012 cat > conftest.$ac_ext <<CF_EOF
18013 #include <stdio.h>
18014 int main()
18015 {
18016         ${cf_cv_main_return:-return}(0);
18017 }
18018 CF_EOF
18019 # We do the test twice because some compilers refuse to overwrite an
18020 # existing .o file with -o, though they will create one.
18021 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18022 if { (eval echo "$as_me:18022: \"$ac_try\"") >&5
18023   (eval $ac_try) 2>&5
18024   ac_status=$?
18025   echo "$as_me:18025: \$? = $ac_status" >&5
18026   (exit $ac_status); } &&
18027   test -f conftest2.$ac_objext && { (eval echo "$as_me:18027: \"$ac_try\"") >&5
18028   (eval $ac_try) 2>&5
18029   ac_status=$?
18030   echo "$as_me:18030: \$? = $ac_status" >&5
18031   (exit $ac_status); };
18032 then
18033   eval cf_cv_prog_CXX_c_o=yes
18034 else
18035   eval cf_cv_prog_CXX_c_o=no
18036 fi
18037 rm -rf conftest*
18038
18039 fi
18040 if test $cf_cv_prog_CXX_c_o = yes; then
18041   echo "$as_me:18041: result: yes" >&5
18042 echo "${ECHO_T}yes" >&6
18043 else
18044   echo "$as_me:18044: result: no" >&5
18045 echo "${ECHO_T}no" >&6
18046 fi
18047
18048         case $GXX_VERSION in
18049         1*|2.0-6*)
18050                 cf_cxx_library=yes
18051                 ;;
18052         *-2.7*|2.7*)
18053
18054 cf_cxx_library=unknown
18055 case $cf_cv_system_name in #(vi
18056 os2*) #(vi
18057         cf_gpp_libname=gpp
18058         ;;
18059 *)
18060         cf_gpp_libname=g++
18061         ;;
18062 esac
18063 if test "$GXX" = yes; then
18064         echo "$as_me:18064: checking for lib$cf_gpp_libname" >&5
18065 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18066         cf_save="$LIBS"
18067         LIBS="-l$cf_gpp_libname $LIBS"
18068         cat >conftest.$ac_ext <<_ACEOF
18069 #line 18069 "configure"
18070 #include "confdefs.h"
18071
18072 #include <$cf_gpp_libname/builtin.h>
18073
18074 int
18075 main ()
18076 {
18077 two_arg_error_handler_t foo2 = lib_error_handler
18078   ;
18079   return 0;
18080 }
18081 _ACEOF
18082 rm -f conftest.$ac_objext conftest$ac_exeext
18083 if { (eval echo "$as_me:18083: \"$ac_link\"") >&5
18084   (eval $ac_link) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); } &&
18088          { ac_try='test -s conftest$ac_exeext'
18089   { (eval echo "$as_me:18089: \"$ac_try\"") >&5
18090   (eval $ac_try) 2>&5
18091   ac_status=$?
18092   echo "$as_me:18092: \$? = $ac_status" >&5
18093   (exit $ac_status); }; }; then
18094   cf_cxx_library=yes
18095          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18096          if test "$cf_gpp_libname" = cpp ; then
18097             cat >>confdefs.h <<\EOF
18098 #define HAVE_GPP_BUILTIN_H 1
18099 EOF
18100
18101          else
18102             cat >>confdefs.h <<\EOF
18103 #define HAVE_GXX_BUILTIN_H 1
18104 EOF
18105
18106          fi
18107 else
18108   echo "$as_me: failed program was:" >&5
18109 cat conftest.$ac_ext >&5
18110 cat >conftest.$ac_ext <<_ACEOF
18111 #line 18111 "configure"
18112 #include "confdefs.h"
18113
18114 #include <builtin.h>
18115
18116 int
18117 main ()
18118 {
18119 two_arg_error_handler_t foo2 = lib_error_handler
18120   ;
18121   return 0;
18122 }
18123 _ACEOF
18124 rm -f conftest.$ac_objext conftest$ac_exeext
18125 if { (eval echo "$as_me:18125: \"$ac_link\"") >&5
18126   (eval $ac_link) 2>&5
18127   ac_status=$?
18128   echo "$as_me:18128: \$? = $ac_status" >&5
18129   (exit $ac_status); } &&
18130          { ac_try='test -s conftest$ac_exeext'
18131   { (eval echo "$as_me:18131: \"$ac_try\"") >&5
18132   (eval $ac_try) 2>&5
18133   ac_status=$?
18134   echo "$as_me:18134: \$? = $ac_status" >&5
18135   (exit $ac_status); }; }; then
18136   cf_cxx_library=yes
18137          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18138          cat >>confdefs.h <<\EOF
18139 #define HAVE_BUILTIN_H 1
18140 EOF
18141
18142 else
18143   echo "$as_me: failed program was:" >&5
18144 cat conftest.$ac_ext >&5
18145 cf_cxx_library=no
18146 fi
18147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18148 fi
18149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18150         LIBS="$cf_save"
18151         echo "$as_me:18151: result: $cf_cxx_library" >&5
18152 echo "${ECHO_T}$cf_cxx_library" >&6
18153 fi
18154
18155                 ;;
18156         *)
18157                 cf_cxx_library=no
18158                 ;;
18159         esac
18160
18161         ac_ext=cc
18162 ac_cpp='$CXXCPP $CPPFLAGS'
18163 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18164 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18165 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18166 ac_main_return=return
18167 echo "$as_me:18167: checking how to run the C++ preprocessor" >&5
18168 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18169 if test -z "$CXXCPP"; then
18170   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18171   echo $ECHO_N "(cached) $ECHO_C" >&6
18172 else
18173       # Double quotes because CXXCPP needs to be expanded
18174     for CXXCPP in "$CXX -E" "/lib/cpp"
18175     do
18176       ac_preproc_ok=false
18177 for ac_cxx_preproc_warn_flag in '' yes
18178 do
18179   # Use a header file that comes with gcc, so configuring glibc
18180   # with a fresh cross-compiler works.
18181   # On the NeXT, cc -E runs the code through the compiler's parser,
18182   # not just through cpp. "Syntax error" is here to catch this case.
18183   cat >conftest.$ac_ext <<_ACEOF
18184 #line 18184 "configure"
18185 #include "confdefs.h"
18186 #include <assert.h>
18187                      Syntax error
18188 _ACEOF
18189 if { (eval echo "$as_me:18189: \"$ac_cpp conftest.$ac_ext\"") >&5
18190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18191   ac_status=$?
18192   egrep -v '^ *\+' conftest.er1 >conftest.err
18193   rm -f conftest.er1
18194   cat conftest.err >&5
18195   echo "$as_me:18195: \$? = $ac_status" >&5
18196   (exit $ac_status); } >/dev/null; then
18197   if test -s conftest.err; then
18198     ac_cpp_err=$ac_cxx_preproc_warn_flag
18199   else
18200     ac_cpp_err=
18201   fi
18202 else
18203   ac_cpp_err=yes
18204 fi
18205 if test -z "$ac_cpp_err"; then
18206   :
18207 else
18208   echo "$as_me: failed program was:" >&5
18209   cat conftest.$ac_ext >&5
18210   # Broken: fails on valid input.
18211 continue
18212 fi
18213 rm -f conftest.err conftest.$ac_ext
18214
18215   # OK, works on sane cases.  Now check whether non-existent headers
18216   # can be detected and how.
18217   cat >conftest.$ac_ext <<_ACEOF
18218 #line 18218 "configure"
18219 #include "confdefs.h"
18220 #include <ac_nonexistent.h>
18221 _ACEOF
18222 if { (eval echo "$as_me:18222: \"$ac_cpp conftest.$ac_ext\"") >&5
18223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18224   ac_status=$?
18225   egrep -v '^ *\+' conftest.er1 >conftest.err
18226   rm -f conftest.er1
18227   cat conftest.err >&5
18228   echo "$as_me:18228: \$? = $ac_status" >&5
18229   (exit $ac_status); } >/dev/null; then
18230   if test -s conftest.err; then
18231     ac_cpp_err=$ac_cxx_preproc_warn_flag
18232   else
18233     ac_cpp_err=
18234   fi
18235 else
18236   ac_cpp_err=yes
18237 fi
18238 if test -z "$ac_cpp_err"; then
18239   # Broken: success on invalid input.
18240 continue
18241 else
18242   echo "$as_me: failed program was:" >&5
18243   cat conftest.$ac_ext >&5
18244   # Passes both tests.
18245 ac_preproc_ok=:
18246 break
18247 fi
18248 rm -f conftest.err conftest.$ac_ext
18249
18250 done
18251 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18252 rm -f conftest.err conftest.$ac_ext
18253 if $ac_preproc_ok; then
18254   break
18255 fi
18256
18257     done
18258     ac_cv_prog_CXXCPP=$CXXCPP
18259
18260 fi
18261   CXXCPP=$ac_cv_prog_CXXCPP
18262 else
18263   ac_cv_prog_CXXCPP=$CXXCPP
18264 fi
18265 echo "$as_me:18265: result: $CXXCPP" >&5
18266 echo "${ECHO_T}$CXXCPP" >&6
18267 ac_preproc_ok=false
18268 for ac_cxx_preproc_warn_flag in '' yes
18269 do
18270   # Use a header file that comes with gcc, so configuring glibc
18271   # with a fresh cross-compiler works.
18272   # On the NeXT, cc -E runs the code through the compiler's parser,
18273   # not just through cpp. "Syntax error" is here to catch this case.
18274   cat >conftest.$ac_ext <<_ACEOF
18275 #line 18275 "configure"
18276 #include "confdefs.h"
18277 #include <assert.h>
18278                      Syntax error
18279 _ACEOF
18280 if { (eval echo "$as_me:18280: \"$ac_cpp conftest.$ac_ext\"") >&5
18281   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18282   ac_status=$?
18283   egrep -v '^ *\+' conftest.er1 >conftest.err
18284   rm -f conftest.er1
18285   cat conftest.err >&5
18286   echo "$as_me:18286: \$? = $ac_status" >&5
18287   (exit $ac_status); } >/dev/null; then
18288   if test -s conftest.err; then
18289     ac_cpp_err=$ac_cxx_preproc_warn_flag
18290   else
18291     ac_cpp_err=
18292   fi
18293 else
18294   ac_cpp_err=yes
18295 fi
18296 if test -z "$ac_cpp_err"; then
18297   :
18298 else
18299   echo "$as_me: failed program was:" >&5
18300   cat conftest.$ac_ext >&5
18301   # Broken: fails on valid input.
18302 continue
18303 fi
18304 rm -f conftest.err conftest.$ac_ext
18305
18306   # OK, works on sane cases.  Now check whether non-existent headers
18307   # can be detected and how.
18308   cat >conftest.$ac_ext <<_ACEOF
18309 #line 18309 "configure"
18310 #include "confdefs.h"
18311 #include <ac_nonexistent.h>
18312 _ACEOF
18313 if { (eval echo "$as_me:18313: \"$ac_cpp conftest.$ac_ext\"") >&5
18314   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18315   ac_status=$?
18316   egrep -v '^ *\+' conftest.er1 >conftest.err
18317   rm -f conftest.er1
18318   cat conftest.err >&5
18319   echo "$as_me:18319: \$? = $ac_status" >&5
18320   (exit $ac_status); } >/dev/null; then
18321   if test -s conftest.err; then
18322     ac_cpp_err=$ac_cxx_preproc_warn_flag
18323   else
18324     ac_cpp_err=
18325   fi
18326 else
18327   ac_cpp_err=yes
18328 fi
18329 if test -z "$ac_cpp_err"; then
18330   # Broken: success on invalid input.
18331 continue
18332 else
18333   echo "$as_me: failed program was:" >&5
18334   cat conftest.$ac_ext >&5
18335   # Passes both tests.
18336 ac_preproc_ok=:
18337 break
18338 fi
18339 rm -f conftest.err conftest.$ac_ext
18340
18341 done
18342 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18343 rm -f conftest.err conftest.$ac_ext
18344 if $ac_preproc_ok; then
18345   :
18346 else
18347   { { echo "$as_me:18347: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18348 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18349    { (exit 1); exit 1; }; }
18350 fi
18351
18352 ac_ext=cc
18353 ac_cpp='$CXXCPP $CPPFLAGS'
18354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18357 ac_main_return=return
18358
18359 for ac_header in typeinfo
18360 do
18361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18362 echo "$as_me:18362: checking for $ac_header" >&5
18363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18365   echo $ECHO_N "(cached) $ECHO_C" >&6
18366 else
18367   cat >conftest.$ac_ext <<_ACEOF
18368 #line 18368 "configure"
18369 #include "confdefs.h"
18370 #include <$ac_header>
18371 _ACEOF
18372 if { (eval echo "$as_me:18372: \"$ac_cpp conftest.$ac_ext\"") >&5
18373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18374   ac_status=$?
18375   egrep -v '^ *\+' conftest.er1 >conftest.err
18376   rm -f conftest.er1
18377   cat conftest.err >&5
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } >/dev/null; then
18380   if test -s conftest.err; then
18381     ac_cpp_err=$ac_cxx_preproc_warn_flag
18382   else
18383     ac_cpp_err=
18384   fi
18385 else
18386   ac_cpp_err=yes
18387 fi
18388 if test -z "$ac_cpp_err"; then
18389   eval "$as_ac_Header=yes"
18390 else
18391   echo "$as_me: failed program was:" >&5
18392   cat conftest.$ac_ext >&5
18393   eval "$as_ac_Header=no"
18394 fi
18395 rm -f conftest.err conftest.$ac_ext
18396 fi
18397 echo "$as_me:18397: result: `eval echo '${'$as_ac_Header'}'`" >&5
18398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18400   cat >>confdefs.h <<EOF
18401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18402 EOF
18403
18404 fi
18405 done
18406
18407 for ac_header in iostream
18408 do
18409 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18410 echo "$as_me:18410: checking for $ac_header" >&5
18411 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18413   echo $ECHO_N "(cached) $ECHO_C" >&6
18414 else
18415   cat >conftest.$ac_ext <<_ACEOF
18416 #line 18416 "configure"
18417 #include "confdefs.h"
18418 #include <$ac_header>
18419 _ACEOF
18420 if { (eval echo "$as_me:18420: \"$ac_cpp conftest.$ac_ext\"") >&5
18421   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18422   ac_status=$?
18423   egrep -v '^ *\+' conftest.er1 >conftest.err
18424   rm -f conftest.er1
18425   cat conftest.err >&5
18426   echo "$as_me:18426: \$? = $ac_status" >&5
18427   (exit $ac_status); } >/dev/null; then
18428   if test -s conftest.err; then
18429     ac_cpp_err=$ac_cxx_preproc_warn_flag
18430   else
18431     ac_cpp_err=
18432   fi
18433 else
18434   ac_cpp_err=yes
18435 fi
18436 if test -z "$ac_cpp_err"; then
18437   eval "$as_ac_Header=yes"
18438 else
18439   echo "$as_me: failed program was:" >&5
18440   cat conftest.$ac_ext >&5
18441   eval "$as_ac_Header=no"
18442 fi
18443 rm -f conftest.err conftest.$ac_ext
18444 fi
18445 echo "$as_me:18445: result: `eval echo '${'$as_ac_Header'}'`" >&5
18446 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18447 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18448   cat >>confdefs.h <<EOF
18449 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18450 EOF
18451
18452 fi
18453 done
18454
18455 if test x"$ac_cv_header_iostream" = xyes ; then
18456         echo "$as_me:18456: checking if iostream uses std-namespace" >&5
18457 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18458         cat >conftest.$ac_ext <<_ACEOF
18459 #line 18459 "configure"
18460 #include "confdefs.h"
18461
18462 #include <iostream>
18463 using std::endl;
18464 using std::cerr;
18465 int
18466 main ()
18467 {
18468
18469 cerr << "testing" << endl;
18470
18471   ;
18472   return 0;
18473 }
18474 _ACEOF
18475 rm -f conftest.$ac_objext
18476 if { (eval echo "$as_me:18476: \"$ac_compile\"") >&5
18477   (eval $ac_compile) 2>&5
18478   ac_status=$?
18479   echo "$as_me:18479: \$? = $ac_status" >&5
18480   (exit $ac_status); } &&
18481          { ac_try='test -s conftest.$ac_objext'
18482   { (eval echo "$as_me:18482: \"$ac_try\"") >&5
18483   (eval $ac_try) 2>&5
18484   ac_status=$?
18485   echo "$as_me:18485: \$? = $ac_status" >&5
18486   (exit $ac_status); }; }; then
18487   cf_iostream_namespace=yes
18488 else
18489   echo "$as_me: failed program was:" >&5
18490 cat conftest.$ac_ext >&5
18491 cf_iostream_namespace=no
18492 fi
18493 rm -f conftest.$ac_objext conftest.$ac_ext
18494         echo "$as_me:18494: result: $cf_iostream_namespace" >&5
18495 echo "${ECHO_T}$cf_iostream_namespace" >&6
18496         if test "$cf_iostream_namespace" = yes ; then
18497                 cat >>confdefs.h <<\EOF
18498 #define IOSTREAM_NAMESPACE 1
18499 EOF
18500
18501         fi
18502 fi
18503
18504 echo "$as_me:18504: checking if we should include stdbool.h" >&5
18505 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18506
18507 if test "${cf_cv_header_stdbool_h+set}" = set; then
18508   echo $ECHO_N "(cached) $ECHO_C" >&6
18509 else
18510
18511         cat >conftest.$ac_ext <<_ACEOF
18512 #line 18512 "configure"
18513 #include "confdefs.h"
18514
18515 int
18516 main ()
18517 {
18518 bool foo = false
18519   ;
18520   return 0;
18521 }
18522 _ACEOF
18523 rm -f conftest.$ac_objext
18524 if { (eval echo "$as_me:18524: \"$ac_compile\"") >&5
18525   (eval $ac_compile) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit $ac_status); } &&
18529          { ac_try='test -s conftest.$ac_objext'
18530   { (eval echo "$as_me:18530: \"$ac_try\"") >&5
18531   (eval $ac_try) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit $ac_status); }; }; then
18535   cf_cv_header_stdbool_h=0
18536 else
18537   echo "$as_me: failed program was:" >&5
18538 cat conftest.$ac_ext >&5
18539 cat >conftest.$ac_ext <<_ACEOF
18540 #line 18540 "configure"
18541 #include "confdefs.h"
18542
18543 #ifndef __BEOS__
18544 #include <stdbool.h>
18545 #endif
18546
18547 int
18548 main ()
18549 {
18550 bool foo = false
18551   ;
18552   return 0;
18553 }
18554 _ACEOF
18555 rm -f conftest.$ac_objext
18556 if { (eval echo "$as_me:18556: \"$ac_compile\"") >&5
18557   (eval $ac_compile) 2>&5
18558   ac_status=$?
18559   echo "$as_me:18559: \$? = $ac_status" >&5
18560   (exit $ac_status); } &&
18561          { ac_try='test -s conftest.$ac_objext'
18562   { (eval echo "$as_me:18562: \"$ac_try\"") >&5
18563   (eval $ac_try) 2>&5
18564   ac_status=$?
18565   echo "$as_me:18565: \$? = $ac_status" >&5
18566   (exit $ac_status); }; }; then
18567   cf_cv_header_stdbool_h=1
18568 else
18569   echo "$as_me: failed program was:" >&5
18570 cat conftest.$ac_ext >&5
18571 cf_cv_header_stdbool_h=0
18572 fi
18573 rm -f conftest.$ac_objext conftest.$ac_ext
18574 fi
18575 rm -f conftest.$ac_objext conftest.$ac_ext
18576 fi
18577
18578 if test "$cf_cv_header_stdbool_h" = 1
18579 then    echo "$as_me:18579: result: yes" >&5
18580 echo "${ECHO_T}yes" >&6
18581 else    echo "$as_me:18581: result: no" >&5
18582 echo "${ECHO_T}no" >&6
18583 fi
18584
18585 echo "$as_me:18585: checking for builtin bool type" >&5
18586 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18587
18588 if test "${cf_cv_builtin_bool+set}" = set; then
18589   echo $ECHO_N "(cached) $ECHO_C" >&6
18590 else
18591
18592         cat >conftest.$ac_ext <<_ACEOF
18593 #line 18593 "configure"
18594 #include "confdefs.h"
18595
18596 #include <stdio.h>
18597 #include <sys/types.h>
18598
18599 int
18600 main ()
18601 {
18602 bool x = false
18603   ;
18604   return 0;
18605 }
18606 _ACEOF
18607 rm -f conftest.$ac_objext
18608 if { (eval echo "$as_me:18608: \"$ac_compile\"") >&5
18609   (eval $ac_compile) 2>&5
18610   ac_status=$?
18611   echo "$as_me:18611: \$? = $ac_status" >&5
18612   (exit $ac_status); } &&
18613          { ac_try='test -s conftest.$ac_objext'
18614   { (eval echo "$as_me:18614: \"$ac_try\"") >&5
18615   (eval $ac_try) 2>&5
18616   ac_status=$?
18617   echo "$as_me:18617: \$? = $ac_status" >&5
18618   (exit $ac_status); }; }; then
18619   cf_cv_builtin_bool=1
18620 else
18621   echo "$as_me: failed program was:" >&5
18622 cat conftest.$ac_ext >&5
18623 cf_cv_builtin_bool=0
18624 fi
18625 rm -f conftest.$ac_objext conftest.$ac_ext
18626
18627 fi
18628
18629 if test "$cf_cv_builtin_bool" = 1
18630 then    echo "$as_me:18630: result: yes" >&5
18631 echo "${ECHO_T}yes" >&6
18632 else    echo "$as_me:18632: result: no" >&5
18633 echo "${ECHO_T}no" >&6
18634 fi
18635
18636 echo "$as_me:18636: checking for size of bool" >&5
18637 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18638 if test "${cf_cv_type_of_bool+set}" = set; then
18639   echo $ECHO_N "(cached) $ECHO_C" >&6
18640 else
18641
18642         rm -f cf_test.out
18643         if test "$cross_compiling" = yes; then
18644   cf_cv_type_of_bool=unknown
18645 else
18646   cat >conftest.$ac_ext <<_ACEOF
18647 #line 18647 "configure"
18648 #include "confdefs.h"
18649
18650 #include <stdlib.h>
18651 #include <stdio.h>
18652
18653 #if defined(__cplusplus)
18654
18655 #ifdef HAVE_GXX_BUILTIN_H
18656 #include <g++/builtin.h>
18657 #elif HAVE_GPP_BUILTIN_H
18658 #include <gpp/builtin.h>
18659 #elif HAVE_BUILTIN_H
18660 #include <builtin.h>
18661 #endif
18662
18663 #else
18664
18665 #if $cf_cv_header_stdbool_h
18666 #include <stdbool.h>
18667 #endif
18668
18669 #endif
18670
18671 main()
18672 {
18673         FILE *fp = fopen("cf_test.out", "w");
18674         if (fp != 0) {
18675                 bool x = true;
18676                 if ((bool)(-x) >= 0)
18677                         fputs("unsigned ", fp);
18678                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18679                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18680                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18681                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18682                 fclose(fp);
18683         }
18684         ${cf_cv_main_return:-return}(0);
18685 }
18686
18687 _ACEOF
18688 rm -f conftest$ac_exeext
18689 if { (eval echo "$as_me:18689: \"$ac_link\"") >&5
18690   (eval $ac_link) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18694   { (eval echo "$as_me:18694: \"$ac_try\"") >&5
18695   (eval $ac_try) 2>&5
18696   ac_status=$?
18697   echo "$as_me:18697: \$? = $ac_status" >&5
18698   (exit $ac_status); }; }; then
18699   cf_cv_type_of_bool=`cat cf_test.out`
18700                  if test -z "$cf_cv_type_of_bool"; then
18701                    cf_cv_type_of_bool=unknown
18702                  fi
18703 else
18704   echo "$as_me: program exited with status $ac_status" >&5
18705 echo "$as_me: failed program was:" >&5
18706 cat conftest.$ac_ext >&5
18707 cf_cv_type_of_bool=unknown
18708 fi
18709 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18710 fi
18711
18712 fi
18713
18714         rm -f cf_test.out
18715 echo "$as_me:18715: result: $cf_cv_type_of_bool" >&5
18716 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18717 if test "$cf_cv_type_of_bool" = unknown ; then
18718         case .$NCURSES_BOOL in #(vi
18719         .auto|.) NCURSES_BOOL=unsigned;;
18720         esac
18721         { echo "$as_me:18721: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18722 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18723         cf_cv_type_of_bool=$NCURSES_BOOL
18724 fi
18725
18726 echo "$as_me:18726: checking for special defines needed for etip.h" >&5
18727 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18728 cf_save_CXXFLAGS="$CXXFLAGS"
18729 cf_result="none"
18730
18731 # etip.h includes ncurses.h which includes ncurses_dll.h
18732 # But ncurses_dll.h is generated - fix here.
18733 test -d include || mkdir include
18734 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
18735
18736 for cf_math in "" MATH_H
18737 do
18738 for cf_excp in "" MATH_EXCEPTION
18739 do
18740         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18741         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18742         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18743 cat >conftest.$ac_ext <<_ACEOF
18744 #line 18744 "configure"
18745 #include "confdefs.h"
18746
18747 #include <etip.h.in>
18748
18749 int
18750 main ()
18751 {
18752
18753   ;
18754   return 0;
18755 }
18756 _ACEOF
18757 rm -f conftest.$ac_objext
18758 if { (eval echo "$as_me:18758: \"$ac_compile\"") >&5
18759   (eval $ac_compile) 2>&5
18760   ac_status=$?
18761   echo "$as_me:18761: \$? = $ac_status" >&5
18762   (exit $ac_status); } &&
18763          { ac_try='test -s conftest.$ac_objext'
18764   { (eval echo "$as_me:18764: \"$ac_try\"") >&5
18765   (eval $ac_try) 2>&5
18766   ac_status=$?
18767   echo "$as_me:18767: \$? = $ac_status" >&5
18768   (exit $ac_status); }; }; then
18769
18770         test -n "$cf_math" && cat >>confdefs.h <<EOF
18771 #define ETIP_NEEDS_${cf_math} 1
18772 EOF
18773
18774         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18775 #define ETIP_NEEDS_${cf_excp} 1
18776 EOF
18777
18778         cf_result="$cf_math $cf_excp"
18779         break 2
18780
18781 else
18782   echo "$as_me: failed program was:" >&5
18783 cat conftest.$ac_ext >&5
18784 fi
18785 rm -f conftest.$ac_objext conftest.$ac_ext
18786 done
18787 done
18788 echo "$as_me:18788: result: $cf_result" >&5
18789 echo "${ECHO_T}$cf_result" >&6
18790 CXXFLAGS="$cf_save_CXXFLAGS"
18791
18792 if test -n "$CXX"; then
18793 echo "$as_me:18793: checking if $CXX accepts parameter initialization" >&5
18794 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18795 if test "${cf_cv_cpp_param_init+set}" = set; then
18796   echo $ECHO_N "(cached) $ECHO_C" >&6
18797 else
18798
18799         ac_ext=cc
18800 ac_cpp='$CXXCPP $CPPFLAGS'
18801 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18802 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18803 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18804 ac_main_return=return
18805
18806         if test "$cross_compiling" = yes; then
18807   cf_cv_cpp_param_init=unknown
18808 else
18809   cat >conftest.$ac_ext <<_ACEOF
18810 #line 18810 "configure"
18811 #include "confdefs.h"
18812
18813 class TEST {
18814 private:
18815         int value;
18816 public:
18817         TEST(int x = 1);
18818         ~TEST();
18819 };
18820
18821 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18822 {
18823         value = x;
18824 }
18825 int main() { }
18826
18827 _ACEOF
18828 rm -f conftest$ac_exeext
18829 if { (eval echo "$as_me:18829: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18834   { (eval echo "$as_me:18834: \"$ac_try\"") >&5
18835   (eval $ac_try) 2>&5
18836   ac_status=$?
18837   echo "$as_me:18837: \$? = $ac_status" >&5
18838   (exit $ac_status); }; }; then
18839   cf_cv_cpp_param_init=yes
18840 else
18841   echo "$as_me: program exited with status $ac_status" >&5
18842 echo "$as_me: failed program was:" >&5
18843 cat conftest.$ac_ext >&5
18844 cf_cv_cpp_param_init=no
18845 fi
18846 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18847 fi
18848         ac_ext=cc
18849 ac_cpp='$CXXCPP $CPPFLAGS'
18850 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18851 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18852 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18853 ac_main_return=return
18854
18855 fi
18856 echo "$as_me:18856: result: $cf_cv_cpp_param_init" >&5
18857 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18858 fi
18859 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18860 #define CPP_HAS_PARAM_INIT 1
18861 EOF
18862
18863 if test -n "$CXX"; then
18864
18865 echo "$as_me:18865: checking if $CXX accepts static_cast" >&5
18866 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18867 if test "${cf_cv_cpp_static_cast+set}" = set; then
18868   echo $ECHO_N "(cached) $ECHO_C" >&6
18869 else
18870
18871         ac_ext=cc
18872 ac_cpp='$CXXCPP $CPPFLAGS'
18873 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18874 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18875 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18876 ac_main_return=return
18877
18878         cat >conftest.$ac_ext <<_ACEOF
18879 #line 18879 "configure"
18880 #include "confdefs.h"
18881
18882 class NCursesPanel
18883 {
18884 public:
18885   NCursesPanel(int nlines,
18886                int ncols,
18887                int begin_y = 0,
18888                int begin_x = 0)
18889   {
18890   }
18891
18892   ~NCursesPanel();
18893 };
18894
18895 template<class T> class NCursesUserPanel : public NCursesPanel
18896 {
18897 public:
18898   NCursesUserPanel (int nlines,
18899                     int ncols,
18900                     int begin_y = 0,
18901                     int begin_x = 0,
18902                     const T* p_UserData = static_cast<T*>(0))
18903     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18904   {
18905   };
18906   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18907   {
18908   };
18909
18910   virtual ~NCursesUserPanel() {};
18911 };
18912
18913 int
18914 main ()
18915 {
18916
18917         const char* p_UserData = static_cast<char*>(0)
18918   ;
18919   return 0;
18920 }
18921 _ACEOF
18922 rm -f conftest.$ac_objext
18923 if { (eval echo "$as_me:18923: \"$ac_compile\"") >&5
18924   (eval $ac_compile) 2>&5
18925   ac_status=$?
18926   echo "$as_me:18926: \$? = $ac_status" >&5
18927   (exit $ac_status); } &&
18928          { ac_try='test -s conftest.$ac_objext'
18929   { (eval echo "$as_me:18929: \"$ac_try\"") >&5
18930   (eval $ac_try) 2>&5
18931   ac_status=$?
18932   echo "$as_me:18932: \$? = $ac_status" >&5
18933   (exit $ac_status); }; }; then
18934   cf_cv_cpp_static_cast=yes
18935 else
18936   echo "$as_me: failed program was:" >&5
18937 cat conftest.$ac_ext >&5
18938 cf_cv_cpp_static_cast=no
18939 fi
18940 rm -f conftest.$ac_objext conftest.$ac_ext
18941
18942         ac_ext=cc
18943 ac_cpp='$CXXCPP $CPPFLAGS'
18944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18947 ac_main_return=return
18948
18949 fi
18950 echo "$as_me:18950: result: $cf_cv_cpp_static_cast" >&5
18951 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18952
18953 fi
18954
18955 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18956 #define CPP_HAS_STATIC_CAST 1
18957 EOF
18958
18959         CXX_AR='$(AR)'
18960         CXX_ARFLAGS='$(ARFLAGS)'
18961         case $cf_cv_system_name in #(vi
18962         irix*) #(vi
18963             if test "$GXX" != yes ; then
18964                 CXX_AR='$(CXX)'
18965                 CXX_ARFLAGS='-ar -o'
18966             fi
18967             ;;
18968         sco3.2v5*) #(vi
18969             CXXLDFLAGS="-u main"
18970             ;;
18971         solaris2*)
18972             if test "$GXX" != yes ; then
18973                 CXX_AR='$(CXX)'
18974                 CXX_ARFLAGS='-xar -o'
18975             fi
18976             ;;
18977         esac
18978
18979 else
18980         cf_cxx_library=no
18981         cf_cv_builtin_bool=1
18982
18983         # Just because we are not configuring against C++ right now does not
18984         # mean that a user will not want to use C++.  Some distributors disable
18985         # the C++ portion of this configuration as a shortcut (or just to avoid
18986         # compiling the demo in the c++ directory).  So we need a reasonable
18987         # default for the 'bool' type.
18988         #
18989         # Caveat: since the storage of the bool type is not standardized, it
18990         # may change.
18991
18992         if test "$NCURSES_BOOL" != auto ; then
18993                 cf_cv_type_of_bool=$NCURSES_BOOL
18994                 cf_cv_header_stdbool_h=0
18995         else
18996                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18997
18998 echo "$as_me:18998: checking for size of bool" >&5
18999 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19000 if test "${cf_cv_type_of_bool+set}" = set; then
19001   echo $ECHO_N "(cached) $ECHO_C" >&6
19002 else
19003
19004         rm -f cf_test.out
19005         if test "$cross_compiling" = yes; then
19006   cf_cv_type_of_bool=unknown
19007 else
19008   cat >conftest.$ac_ext <<_ACEOF
19009 #line 19009 "configure"
19010 #include "confdefs.h"
19011
19012 #include <stdlib.h>
19013 #include <stdio.h>
19014
19015 #if defined(__cplusplus)
19016
19017 #ifdef HAVE_GXX_BUILTIN_H
19018 #include <g++/builtin.h>
19019 #elif HAVE_GPP_BUILTIN_H
19020 #include <gpp/builtin.h>
19021 #elif HAVE_BUILTIN_H
19022 #include <builtin.h>
19023 #endif
19024
19025 #else
19026
19027 #if $cf_cv_header_stdbool_h
19028 #include <stdbool.h>
19029 #endif
19030
19031 #endif
19032
19033 main()
19034 {
19035         FILE *fp = fopen("cf_test.out", "w");
19036         if (fp != 0) {
19037                 bool x = true;
19038                 if ((bool)(-x) >= 0)
19039                         fputs("unsigned ", fp);
19040                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19041                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19042                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19043                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19044                 fclose(fp);
19045         }
19046         ${cf_cv_main_return:-return}(0);
19047 }
19048
19049 _ACEOF
19050 rm -f conftest$ac_exeext
19051 if { (eval echo "$as_me:19051: \"$ac_link\"") >&5
19052   (eval $ac_link) 2>&5
19053   ac_status=$?
19054   echo "$as_me:19054: \$? = $ac_status" >&5
19055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19056   { (eval echo "$as_me:19056: \"$ac_try\"") >&5
19057   (eval $ac_try) 2>&5
19058   ac_status=$?
19059   echo "$as_me:19059: \$? = $ac_status" >&5
19060   (exit $ac_status); }; }; then
19061   cf_cv_type_of_bool=`cat cf_test.out`
19062                  if test -z "$cf_cv_type_of_bool"; then
19063                    cf_cv_type_of_bool=unknown
19064                  fi
19065 else
19066   echo "$as_me: program exited with status $ac_status" >&5
19067 echo "$as_me: failed program was:" >&5
19068 cat conftest.$ac_ext >&5
19069 cf_cv_type_of_bool=unknown
19070 fi
19071 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19072 fi
19073
19074 fi
19075
19076         rm -f cf_test.out
19077 echo "$as_me:19077: result: $cf_cv_type_of_bool" >&5
19078 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19079 if test "$cf_cv_type_of_bool" = unknown ; then
19080         case .$NCURSES_BOOL in #(vi
19081         .auto|.) NCURSES_BOOL=unsigned;;
19082         esac
19083         { echo "$as_me:19083: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19084 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19085         cf_cv_type_of_bool=$NCURSES_BOOL
19086 fi
19087
19088                 else
19089                         echo "$as_me:19089: checking for fallback type of bool" >&5
19090 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19091                         case "$host_cpu" in #(vi
19092                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19093                         *)      cf_cv_type_of_bool=int  ;;
19094                         esac
19095                         echo "$as_me:19095: result: $cf_cv_type_of_bool" >&5
19096 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19097                 fi
19098         fi
19099 fi
19100
19101 # If the C compiler did not declare bool, and we did not determine that the C++
19102 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19103 # ncurses library use the same type as C++ bool.  Note that this allows one to
19104 # specify the type of bool in a configure-script option and postpone
19105 # integration with the C++ compiler provided that the types are compatible.
19106 USE_CXX_BOOL=1
19107 if test $cf_cv_cc_bool_type = 1
19108 then
19109         # oops: C has a bool.  Unlikely, but C++ could differ.
19110         USE_CXX_BOOL=0
19111 elif test $cf_cv_builtin_bool = 0
19112 then
19113         # C++ has no bool
19114         USE_CXX_BOOL=0
19115 else
19116         # this is the normal case
19117         USE_CXX_BOOL='defined(__cplusplus)'
19118 fi
19119
19120 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19121
19122         if test "$cf_with_ada" != "no" ; then
19123                 if test "$with_libtool" != "no"; then
19124                         { echo "$as_me:19124: WARNING: libtool does not support Ada - disabling feature" >&5
19125 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19126                         cf_with_ada=no
19127                 fi
19128         fi
19129
19130         if test "$cf_with_ada" != "no" ; then
19131
19132 cf_ada_make=gnatmake
19133 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19134 set dummy $cf_ada_make; ac_word=$2
19135 echo "$as_me:19135: checking for $ac_word" >&5
19136 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19137 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19138   echo $ECHO_N "(cached) $ECHO_C" >&6
19139 else
19140   if test -n "$gnat_exists"; then
19141   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19142 else
19143   ac_save_IFS=$IFS; IFS=$ac_path_separator
19144 ac_dummy="$PATH"
19145 for ac_dir in $ac_dummy; do
19146   IFS=$ac_save_IFS
19147   test -z "$ac_dir" && ac_dir=.
19148   $as_executable_p "$ac_dir/$ac_word" || continue
19149 ac_cv_prog_gnat_exists="yes"
19150 echo "$as_me:19150: found $ac_dir/$ac_word" >&5
19151 break
19152 done
19153
19154   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19155 fi
19156 fi
19157 gnat_exists=$ac_cv_prog_gnat_exists
19158 if test -n "$gnat_exists"; then
19159   echo "$as_me:19159: result: $gnat_exists" >&5
19160 echo "${ECHO_T}$gnat_exists" >&6
19161 else
19162   echo "$as_me:19162: result: no" >&5
19163 echo "${ECHO_T}no" >&6
19164 fi
19165
19166 if test "$ac_cv_prog_gnat_exists" = no; then
19167    cf_ada_make=
19168    cf_cv_prog_gnat_correct=no
19169 else
19170
19171 echo "$as_me:19171: checking for gnat version" >&5
19172 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19173 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19174         grep '[0-9].[0-9][0-9]*' |\
19175     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19176 echo "$as_me:19176: result: $cf_gnat_version" >&5
19177 echo "${ECHO_T}$cf_gnat_version" >&6
19178
19179 case $cf_gnat_version in #(vi
19180 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19181         cf_cv_prog_gnat_correct=yes
19182         ;;
19183 *)
19184         { echo "$as_me:19184: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19185 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19186         cf_cv_prog_gnat_correct=no
19187         ;;
19188 esac
19189
19190    # Extract the first word of "m4", so it can be a program name with args.
19191 set dummy m4; ac_word=$2
19192 echo "$as_me:19192: checking for $ac_word" >&5
19193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19194 if test "${ac_cv_prog_M4_exists+set}" = set; then
19195   echo $ECHO_N "(cached) $ECHO_C" >&6
19196 else
19197   if test -n "$M4_exists"; then
19198   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19199 else
19200   ac_save_IFS=$IFS; IFS=$ac_path_separator
19201 ac_dummy="$PATH"
19202 for ac_dir in $ac_dummy; do
19203   IFS=$ac_save_IFS
19204   test -z "$ac_dir" && ac_dir=.
19205   $as_executable_p "$ac_dir/$ac_word" || continue
19206 ac_cv_prog_M4_exists="yes"
19207 echo "$as_me:19207: found $ac_dir/$ac_word" >&5
19208 break
19209 done
19210
19211   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19212 fi
19213 fi
19214 M4_exists=$ac_cv_prog_M4_exists
19215 if test -n "$M4_exists"; then
19216   echo "$as_me:19216: result: $M4_exists" >&5
19217 echo "${ECHO_T}$M4_exists" >&6
19218 else
19219   echo "$as_me:19219: result: no" >&5
19220 echo "${ECHO_T}no" >&6
19221 fi
19222
19223    if test "$ac_cv_prog_M4_exists" = no; then
19224       cf_cv_prog_gnat_correct=no
19225       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19226    fi
19227    if test "$cf_cv_prog_gnat_correct" = yes; then
19228       echo "$as_me:19228: checking if GNAT works" >&5
19229 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19230
19231 rm -rf conftest* *~conftest*
19232 cat >>conftest.ads <<CF_EOF
19233 procedure conftest;
19234 CF_EOF
19235 cat >>conftest.adb <<CF_EOF
19236 with Text_IO;
19237 with GNAT.OS_Lib;
19238 procedure conftest is
19239 begin
19240    Text_IO.Put ("Hello World");
19241    Text_IO.New_Line;
19242    GNAT.OS_Lib.OS_Exit (0);
19243 end conftest;
19244 CF_EOF
19245 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19246    if ( ./conftest 1>&5 2>&1 ) ; then
19247       cf_cv_prog_gnat_correct=yes
19248    else
19249       cf_cv_prog_gnat_correct=no
19250    fi
19251 else
19252    cf_cv_prog_gnat_correct=no
19253 fi
19254 rm -rf conftest* *~conftest*
19255
19256       echo "$as_me:19256: result: $cf_cv_prog_gnat_correct" >&5
19257 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19258    fi
19259 fi
19260
19261                 if test "$cf_cv_prog_gnat_correct" = yes; then
19262
19263         ADAFLAGS="$ADAFLAGS -gnatpn"
19264
19265                         # make ADAFLAGS consistent with CFLAGS
19266                         case "$CFLAGS" in
19267                         *-g*)
19268
19269         ADAFLAGS="$ADAFLAGS -g"
19270
19271                                 ;;
19272                         esac
19273                         case "$CFLAGS" in
19274                         *-O*)
19275
19276         ADAFLAGS="$ADAFLAGS -O3"
19277
19278                                 ;;
19279                         esac
19280
19281 echo "$as_me:19281: checking if GNAT supports generics" >&5
19282 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19283 case $cf_gnat_version in #(vi
19284 3.[1-9]*|[4-9].*) #(vi
19285         cf_gnat_generics=yes
19286         ;;
19287 *)
19288         cf_gnat_generics=no
19289         ;;
19290 esac
19291 echo "$as_me:19291: result: $cf_gnat_generics" >&5
19292 echo "${ECHO_T}$cf_gnat_generics" >&6
19293
19294 if test "$cf_gnat_generics" = yes
19295 then
19296         cf_compile_generics=generics
19297         cf_generic_objects="\${GENOBJS}"
19298 else
19299         cf_compile_generics=
19300         cf_generic_objects=
19301 fi
19302
19303 echo "$as_me:19303: checking if GNAT supports SIGINT" >&5
19304 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19305 if test "${cf_cv_gnat_sigint+set}" = set; then
19306   echo $ECHO_N "(cached) $ECHO_C" >&6
19307 else
19308
19309 rm -rf conftest* *~conftest*
19310 cat >>conftest.ads <<CF_EOF
19311 with Ada.Interrupts.Names;
19312
19313 package ConfTest is
19314
19315    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19316    pragma Unreserve_All_Interrupts;
19317    pragma Warnings (On);
19318
19319    protected Process is
19320       procedure Stop;
19321       function Continue return Boolean;
19322       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19323    private
19324       Done : Boolean := False;
19325    end Process;
19326
19327 end ConfTest;
19328 CF_EOF
19329 cat >>conftest.adb <<CF_EOF
19330 package body ConfTest is
19331    protected body Process is
19332       procedure Stop is
19333       begin
19334          Done := True;
19335       end Stop;
19336       function Continue return Boolean is
19337       begin
19338          return not Done;
19339       end Continue;
19340    end Process;
19341 end ConfTest;
19342 CF_EOF
19343 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19344       cf_cv_gnat_sigint=yes
19345 else
19346    cf_cv_gnat_sigint=no
19347 fi
19348 rm -rf conftest* *~conftest*
19349
19350 fi
19351 echo "$as_me:19351: result: $cf_cv_gnat_sigint" >&5
19352 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19353
19354 if test $cf_cv_gnat_sigint = yes ; then
19355         USE_GNAT_SIGINT=""
19356 else
19357         USE_GNAT_SIGINT="#"
19358 fi
19359
19360 echo "$as_me:19360: checking if GNAT pragma Unreferenced works" >&5
19361 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19362 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19363   echo $ECHO_N "(cached) $ECHO_C" >&6
19364 else
19365
19366 rm -rf conftest* *~conftest*
19367 cat >>conftest.ads <<CF_EOF
19368 procedure conftest;
19369 CF_EOF
19370 cat >>conftest.adb <<CF_EOF
19371 with Text_IO;
19372 with GNAT.OS_Lib;
19373 procedure conftest is
19374    test : Integer;
19375    pragma Unreferenced (test);
19376 begin
19377    test := 1;
19378    Text_IO.Put ("Hello World");
19379    Text_IO.New_Line;
19380    GNAT.OS_Lib.OS_Exit (0);
19381 end conftest;
19382 CF_EOF
19383 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19384       cf_cv_pragma_unreferenced=yes
19385 else
19386    cf_cv_pragma_unreferenced=no
19387 fi
19388 rm -rf conftest* *~conftest*
19389
19390 fi
19391 echo "$as_me:19391: result: $cf_cv_pragma_unreferenced" >&5
19392 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19393
19394 # if the pragma is supported, use it (needed in the Trace code).
19395 if test $cf_cv_pragma_unreferenced = yes ; then
19396         PRAGMA_UNREF=TRUE
19397 else
19398         PRAGMA_UNREF=FALSE
19399 fi
19400
19401 cf_gnat_libraries=no
19402 cf_gnat_projects=no
19403
19404 echo "$as_me:19404: checking if GNAT supports project files" >&5
19405 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19406 case $cf_gnat_version in #(vi
19407 3.[0-9]*) #(vi
19408         ;;
19409 *)
19410         case $cf_cv_system_name in #(vi
19411         cygwin*) #(vi
19412                 ;;
19413         *)
19414                 mkdir conftest.src conftest.bin conftest.lib
19415                 cd conftest.src
19416                 rm -rf conftest* *~conftest*
19417                 cat >>library.gpr <<CF_EOF
19418 project Library is
19419   Kind := External ("LIB_KIND");
19420   for Library_Name use "ConfTest";
19421   for Object_Dir use ".";
19422   for Library_ALI_Dir use External("LIBRARY_DIR");
19423   for Library_Version use External ("SONAME");
19424   for Library_Kind use Kind;
19425   for Library_Dir use External("BUILD_DIR");
19426   Source_Dir := External ("SOURCE_DIR");
19427   for Source_Dirs use (Source_Dir);
19428   package Compiler is
19429      for Default_Switches ("Ada") use
19430        ("-g",
19431         "-O2",
19432         "-gnatafno",
19433         "-gnatVa",   -- All validity checks
19434         "-gnatwa");  -- Activate all optional errors
19435   end Compiler;
19436 end Library;
19437 CF_EOF
19438                 cat >>confpackage.ads <<CF_EOF
19439 package ConfPackage is
19440    procedure conftest;
19441 end ConfPackage;
19442 CF_EOF
19443                 cat >>confpackage.adb <<CF_EOF
19444 with Text_IO;
19445 package body ConfPackage is
19446    procedure conftest is
19447    begin
19448       Text_IO.Put ("Hello World");
19449       Text_IO.New_Line;
19450    end conftest;
19451 end ConfPackage;
19452 CF_EOF
19453                 if ( $cf_ada_make $ADAFLAGS \
19454                                 -Plibrary.gpr \
19455                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19456                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19457                                 -XSOURCE_DIR=`pwd` \
19458                                 -XSONAME=libConfTest.so.1 \
19459                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19460                         cf_gnat_projects=yes
19461                 fi
19462                 cd ..
19463                 if test -f conftest.lib/confpackage.ali
19464                 then
19465                         cf_gnat_libraries=yes
19466                 fi
19467                 rm -rf conftest* *~conftest*
19468                 ;;
19469         esac
19470         ;;
19471 esac
19472 echo "$as_me:19472: result: $cf_gnat_projects" >&5
19473 echo "${ECHO_T}$cf_gnat_projects" >&6
19474
19475 if test $cf_gnat_projects = yes
19476 then
19477         echo "$as_me:19477: checking if GNAT supports libraries" >&5
19478 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19479         echo "$as_me:19479: result: $cf_gnat_libraries" >&5
19480 echo "${ECHO_T}$cf_gnat_libraries" >&6
19481 fi
19482
19483 if test "$cf_gnat_projects" = yes
19484 then
19485         USE_OLD_MAKERULES="#"
19486         USE_GNAT_PROJECTS=""
19487 else
19488         USE_OLD_MAKERULES=""
19489         USE_GNAT_PROJECTS="#"
19490 fi
19491
19492 if test "$cf_gnat_libraries" = yes
19493 then
19494         USE_GNAT_LIBRARIES=""
19495 else
19496         USE_GNAT_LIBRARIES="#"
19497 fi
19498
19499 echo "$as_me:19499: checking for ada-compiler" >&5
19500 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19501
19502 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19503 if test "${with_ada_compiler+set}" = set; then
19504   withval="$with_ada_compiler"
19505   cf_ada_compiler=$withval
19506 else
19507   cf_ada_compiler=gnatmake
19508 fi;
19509
19510 echo "$as_me:19510: result: $cf_ada_compiler" >&5
19511 echo "${ECHO_T}$cf_ada_compiler" >&6
19512
19513                         cf_ada_package=terminal_interface
19514
19515 echo "$as_me:19515: checking for ada-include" >&5
19516 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19517
19518 # Check whether --with-ada-include or --without-ada-include was given.
19519 if test "${with_ada_include+set}" = set; then
19520   withval="$with_ada_include"
19521
19522 else
19523   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19524 fi; if test -n "$prefix/share/ada/adainclude" ; then
19525
19526 if test "x$prefix" != xNONE; then
19527   cf_path_syntax="$prefix"
19528 else
19529   cf_path_syntax="$ac_default_prefix"
19530 fi
19531
19532 case ".$withval" in #(vi
19533 .\$\(*\)*|.\'*\'*) #(vi
19534   ;;
19535 ..|./*|.\\*) #(vi
19536   ;;
19537 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19538   ;;
19539 .\${*prefix}*) #(vi
19540   eval withval="$withval"
19541   case ".$withval" in #(vi
19542   .NONE/*)
19543     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19544     ;;
19545   esac
19546   ;; #(vi
19547 .no|.NONE/*)
19548   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19549   ;;
19550 *)
19551   { { echo "$as_me:19551: error: expected a pathname, not \"$withval\"" >&5
19552 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19553    { (exit 1); exit 1; }; }
19554   ;;
19555 esac
19556
19557 fi
19558 ADA_INCLUDE="$withval"
19559
19560 echo "$as_me:19560: result: $ADA_INCLUDE" >&5
19561 echo "${ECHO_T}$ADA_INCLUDE" >&6
19562
19563 echo "$as_me:19563: checking for ada-objects" >&5
19564 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19565
19566 # Check whether --with-ada-objects or --without-ada-objects was given.
19567 if test "${with_ada_objects+set}" = set; then
19568   withval="$with_ada_objects"
19569
19570 else
19571   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19572 fi; if test -n "$prefix/lib/ada/adalib" ; then
19573
19574 if test "x$prefix" != xNONE; then
19575   cf_path_syntax="$prefix"
19576 else
19577   cf_path_syntax="$ac_default_prefix"
19578 fi
19579
19580 case ".$withval" in #(vi
19581 .\$\(*\)*|.\'*\'*) #(vi
19582   ;;
19583 ..|./*|.\\*) #(vi
19584   ;;
19585 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19586   ;;
19587 .\${*prefix}*) #(vi
19588   eval withval="$withval"
19589   case ".$withval" in #(vi
19590   .NONE/*)
19591     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19592     ;;
19593   esac
19594   ;; #(vi
19595 .no|.NONE/*)
19596   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19597   ;;
19598 *)
19599   { { echo "$as_me:19599: error: expected a pathname, not \"$withval\"" >&5
19600 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19601    { (exit 1); exit 1; }; }
19602   ;;
19603 esac
19604
19605 fi
19606 ADA_OBJECTS="$withval"
19607
19608 echo "$as_me:19608: result: $ADA_OBJECTS" >&5
19609 echo "${ECHO_T}$ADA_OBJECTS" >&6
19610
19611 echo "$as_me:19611: checking if an Ada95 shared-library should be built" >&5
19612 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19613
19614 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19615 if test "${with_ada_sharedlib+set}" = set; then
19616   withval="$with_ada_sharedlib"
19617   with_ada_sharedlib=$withval
19618 else
19619   with_ada_sharedlib=no
19620 fi;
19621 echo "$as_me:19621: result: $with_ada_sharedlib" >&5
19622 echo "${ECHO_T}$with_ada_sharedlib" >&6
19623
19624 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19625 MAKE_ADA_SHAREDLIB="#"
19626
19627 if test "x$with_ada_sharedlib" != xno
19628 then
19629         MAKE_ADA_SHAREDLIB=
19630         if test "x$with_ada_sharedlib" != xyes
19631         then
19632                 ADA_SHAREDLIB="$with_ada_sharedlib"
19633         fi
19634 fi
19635
19636                 fi
19637         fi
19638 else
19639         cf_with_ada=no
19640 fi
19641
19642 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19643 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19644 ###
19645 ### ticlib modules may be a separate library, otherwise contained in termlib.
19646 ### termlib modules may be a separate library, otherwise contained in ncurses.
19647 ###
19648 ### The of "+" or " " between the tokens controls the way the script
19649 ### chooses to split module lists into libraries.
19650 ###
19651 ### (see CF_LIB_RULES).
19652 echo "$as_me:19652: checking for library subsets" >&5
19653 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19654 LIB_SUBSETS=
19655
19656 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19657         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19658         if test "$with_ticlib" != no ; then
19659                 LIB_SUBSETS="${LIB_SUBSETS} "
19660         else
19661                 LIB_SUBSETS="${LIB_SUBSETS}+"
19662         fi
19663 fi
19664
19665 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19666 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19667
19668 if test "$with_termlib" != no ; then
19669         LIB_SUBSETS="${LIB_SUBSETS} "
19670 else
19671         LIB_SUBSETS="${LIB_SUBSETS}+"
19672 fi
19673
19674 LIB_SUBSETS="${LIB_SUBSETS}base"
19675
19676 # Most term-driver calls are to tinfo, but some like init_pair are to the
19677 # base library (so it resides in base).
19678 if test "$with_term_driver" != no ; then
19679         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19680         case $cf_cv_system_name in #(vi
19681         *mingw32*) #(vi
19682                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19683                 ;;
19684         *) #(vi
19685                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19686                 ;;
19687         esac
19688 fi
19689
19690 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19691 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19692
19693 echo "$as_me:19693: result: $LIB_SUBSETS" >&5
19694 echo "${ECHO_T}$LIB_SUBSETS" >&6
19695
19696 ### Construct the list of include-directories to be generated
19697
19698 CPPFLAGS="$CPPFLAGS -I. -I../include"
19699 if test "$srcdir" != "."; then
19700         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19701 fi
19702 if test "$GCC" != yes; then
19703         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19704 elif test "$includedir" != "/usr/include"; then
19705         if test "$includedir" = '${prefix}/include' ; then
19706                 if test $prefix != /usr ; then
19707                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19708                 fi
19709         else
19710                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19711         fi
19712 fi
19713
19714 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19715 if test "$srcdir" != "."; then
19716         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19717 fi
19718 if test "$GCC" != yes; then
19719         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19720 elif test "$includedir" != "/usr/include"; then
19721         if test "$includedir" = '${prefix}/include' ; then
19722                 if test $prefix != /usr ; then
19723                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19724                 fi
19725         else
19726                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19727         fi
19728 fi
19729
19730 ### Build up pieces for makefile rules
19731 echo "$as_me:19731: checking default library suffix" >&5
19732 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19733
19734         case $DFT_LWR_MODEL in
19735         libtool) DFT_ARG_SUFFIX=''   ;;
19736         normal)  DFT_ARG_SUFFIX=''   ;;
19737         debug)   DFT_ARG_SUFFIX='_g' ;;
19738         profile) DFT_ARG_SUFFIX='_p' ;;
19739         shared)  DFT_ARG_SUFFIX=''   ;;
19740         esac
19741         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19742 echo "$as_me:19742: result: $DFT_ARG_SUFFIX" >&5
19743 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19744
19745 echo "$as_me:19745: checking default library-dependency suffix" >&5
19746 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19747
19748         case $DFT_LWR_MODEL in #(vi
19749         libtool) #(vi
19750                 DFT_LIB_SUFFIX='.la'
19751                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19752                 ;;
19753         normal) #(vi
19754                 DFT_LIB_SUFFIX='.a'
19755                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19756                 ;;
19757         debug) #(vi
19758                 DFT_LIB_SUFFIX='_g.a'
19759                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19760                 ;;
19761         profile) #(vi
19762                 DFT_LIB_SUFFIX='_p.a'
19763                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19764                 ;;
19765         shared) #(vi
19766                 case $cf_cv_system_name in
19767                 aix[5-7]*) #(vi
19768                         DFT_LIB_SUFFIX='.a'
19769                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19770                         ;;
19771                 cygwin*) #(vi
19772                         DFT_LIB_SUFFIX='.dll'
19773                         DFT_DEP_SUFFIX='.dll.a'
19774                         ;;
19775                 darwin*) #(vi
19776                         DFT_LIB_SUFFIX='.dylib'
19777                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19778                         ;;
19779                 hpux*) #(vi
19780                         case $target in
19781                         ia64*) #(vi
19782                                 DFT_LIB_SUFFIX='.so'
19783                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19784                                 ;;
19785                         *) #(vi
19786                                 DFT_LIB_SUFFIX='.sl'
19787                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19788                                 ;;
19789                         esac
19790                         ;;
19791                 *)      DFT_LIB_SUFFIX='.so'
19792                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19793                         ;;
19794                 esac
19795         esac
19796         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19797         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19798 echo "$as_me:19798: result: $DFT_DEP_SUFFIX" >&5
19799 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19800
19801 echo "$as_me:19801: checking default object directory" >&5
19802 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19803
19804         case $DFT_LWR_MODEL in
19805         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19806         normal)  DFT_OBJ_SUBDIR='objects' ;;
19807         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19808         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19809         shared)
19810                 case $cf_cv_system_name in #(vi
19811                 cygwin) #(vi
19812                         DFT_OBJ_SUBDIR='objects' ;;
19813                 *)
19814                         DFT_OBJ_SUBDIR='obj_s' ;;
19815                 esac
19816         esac
19817 echo "$as_me:19817: result: $DFT_OBJ_SUBDIR" >&5
19818 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19819
19820 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19821 if test "$cf_with_cxx" = yes ; then
19822 echo "$as_me:19822: checking c++ library-dependency suffix" >&5
19823 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19824 if test "$with_libtool" != "no"; then
19825         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19826 else
19827
19828         case normal in #(vi
19829         libtool) #(vi
19830                 CXX_LIB_SUFFIX='.la'
19831                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19832                 ;;
19833         normal) #(vi
19834                 CXX_LIB_SUFFIX='.a'
19835                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19836                 ;;
19837         debug) #(vi
19838                 CXX_LIB_SUFFIX='_g.a'
19839                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19840                 ;;
19841         profile) #(vi
19842                 CXX_LIB_SUFFIX='_p.a'
19843                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19844                 ;;
19845         shared) #(vi
19846                 case $cf_cv_system_name in
19847                 aix[5-7]*) #(vi
19848                         CXX_LIB_SUFFIX='.a'
19849                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19850                         ;;
19851                 cygwin*) #(vi
19852                         CXX_LIB_SUFFIX='.dll'
19853                         CXX_DEP_SUFFIX='.dll.a'
19854                         ;;
19855                 darwin*) #(vi
19856                         CXX_LIB_SUFFIX='.dylib'
19857                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19858                         ;;
19859                 hpux*) #(vi
19860                         case $target in
19861                         ia64*) #(vi
19862                                 CXX_LIB_SUFFIX='.so'
19863                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19864                                 ;;
19865                         *) #(vi
19866                                 CXX_LIB_SUFFIX='.sl'
19867                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19868                                 ;;
19869                         esac
19870                         ;;
19871                 *)      CXX_LIB_SUFFIX='.so'
19872                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19873                         ;;
19874                 esac
19875         esac
19876         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19877         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19878 fi
19879 echo "$as_me:19879: result: $CXX_LIB_SUFFIX" >&5
19880 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19881
19882 fi
19883
19884 # do not want -ldl in build except as needed for -lncurses dependency
19885 if test "$with_dlsym" = yes ; then
19886 if test $DFT_LWR_MODEL = shared || \
19887    test $DFT_LWR_MODEL = libtool ; then
19888
19889 # remove dl library from $LIBS
19890 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19891
19892 fi
19893 fi
19894 ### Set up low-level terminfo dependencies for makefiles.
19895
19896 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19897 # do not need libdl
19898 TICS_LIST=
19899 if test "$with_dlsym" = yes ; then
19900
19901 # remove dl library from $SHLIB_LIST
19902 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19903
19904 fi
19905
19906 if test "$with_ticlib" != no ; then
19907
19908         if test "$with_ticlib" != yes ; then
19909                 TICS_NAME=$with_ticlib
19910                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19911                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19912                 TICS_LIB_SUFFIX="${with_ticlib}"
19913         else
19914                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19915                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19916                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19917         fi
19918         TICS_LDFLAGS="-L${LIB_DIR}"
19919         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19920 else
19921         TICS_LDFLAGS="-L${LIB_DIR}"
19922         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19923 fi
19924
19925 if test "$with_termlib" != no ; then
19926
19927         if test "$with_termlib" != yes ; then
19928                 TINFO_NAME=$with_termlib
19929                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19930                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19931                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19932                 TINFO_LIB_SUFFIX="${with_termlib}"
19933         else
19934                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19935                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19936                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19937                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19938         fi
19939
19940         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19941         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19942         if test "$DFT_LWR_MODEL" = "libtool"; then
19943                 TEST_ARGS="${TEST_DEPS}"
19944                 TEST_ARG2="${TEST_DEP2}"
19945                 TINFO_LDFLAGS="-L${LIB_DIR}"
19946                 TINFO_LIBS="$TEST_ARGS"
19947                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19948                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19949         else
19950                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19951                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19952                 if test "x$with_term_driver" != xno ; then
19953                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19954                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19955                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19956                 else
19957                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19958                         TINFO_LIBS="$TEST_ARGS"
19959                 fi
19960                 TINFO_LDFLAGS="-L${LIB_DIR}"
19961                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19962         fi
19963 else
19964         # the next lines are needed for linking libtic over libncurses
19965         TINFO_NAME=${LIB_NAME}
19966         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19967         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19968         if test "$with_tic_depends" = yes ; then
19969                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19970         else
19971                 TICS_LIST="$SHLIB_LIST"
19972         fi
19973
19974         TINFO_LDFLAGS="-L${LIB_DIR}"
19975         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19976 fi
19977
19978 if test "$DFT_LWR_MODEL" = shared ; then
19979         case $cf_cv_system_name in #(vi
19980         cygwin*)
19981                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19982                 TINFO_SUFFIX=.dll
19983                 ;;
19984         esac
19985 fi
19986
19987 if test "$with_dlsym" = yes ; then
19988
19989 # remove dl library from $TICS_LIST
19990 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19991
19992 fi
19993
19994 if test "$DFT_LWR_MODEL" = "libtool"; then
19995     OBJEXT=lo
19996 fi
19997
19998 # needed for Ada95
19999 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20000
20001 case $DFT_LWR_MODEL in
20002 normal|debug|profile)
20003
20004 if test "$GCC" = yes ; then
20005         case $cf_cv_system_name in #(
20006         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20007                 LDFLAGS_STATIC=
20008                 LDFLAGS_SHARED=
20009                 ;;
20010     *)  #( normally, except when broken
20011         LDFLAGS_STATIC=-static
20012         LDFLAGS_SHARED=-dynamic
20013         ;;
20014     esac
20015 else
20016         case $cf_cv_system_name in #(
20017         aix[4-7]*)      #( from ld manpage
20018                 LDFLAGS_STATIC=-bstatic
20019                 LDFLAGS_SHARED=-bdynamic
20020                 ;;
20021         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20022                 # We could also use just "archive" and "shared".
20023                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20024                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20025                 ;;
20026         irix*)          #( from ld manpage IRIX64
20027                 LDFLAGS_STATIC=-Bstatic
20028                 LDFLAGS_SHARED=-Bdynamic
20029                 ;;
20030         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20031                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20032                 LDFLAGS_STATIC=-noso
20033                 LDFLAGS_SHARED=-so_archive
20034                 ;;
20035         solaris2*)
20036                 LDFLAGS_STATIC=-Bstatic
20037                 LDFLAGS_SHARED=-Bdynamic
20038                 ;;
20039         esac
20040 fi
20041
20042 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20043 then
20044         echo "$as_me:20044: checking if linker supports switching between static/dynamic" >&5
20045 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20046
20047         rm -f libconftest.a
20048         cat >conftest.$ac_ext <<EOF
20049 #line 20049 "configure"
20050 #include <stdio.h>
20051 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20052 EOF
20053         if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
20054   (eval $ac_compile) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); } ; then
20058                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20059                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20060         fi
20061         rm -f conftest.*
20062
20063         cf_save_LIBS="$LIBS"
20064
20065         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20066         cat >conftest.$ac_ext <<_ACEOF
20067 #line 20067 "configure"
20068 #include "confdefs.h"
20069
20070 #line 20070 "configure"
20071 #include <stdio.h>
20072 int cf_ldflags_static(FILE *fp);
20073
20074 int
20075 main ()
20076 {
20077
20078         return cf_ldflags_static(stdin);
20079
20080   ;
20081   return 0;
20082 }
20083 _ACEOF
20084 rm -f conftest.$ac_objext conftest$ac_exeext
20085 if { (eval echo "$as_me:20085: \"$ac_link\"") >&5
20086   (eval $ac_link) 2>&5
20087   ac_status=$?
20088   echo "$as_me:20088: \$? = $ac_status" >&5
20089   (exit $ac_status); } &&
20090          { ac_try='test -s conftest$ac_exeext'
20091   { (eval echo "$as_me:20091: \"$ac_try\"") >&5
20092   (eval $ac_try) 2>&5
20093   ac_status=$?
20094   echo "$as_me:20094: \$? = $ac_status" >&5
20095   (exit $ac_status); }; }; then
20096
20097         # some linkers simply ignore the -dynamic
20098         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20099         *static*) # (vi
20100                 cf_ldflags_static=no
20101                 ;;
20102         *)
20103                 cf_ldflags_static=yes
20104                 ;;
20105         esac
20106
20107 else
20108   echo "$as_me: failed program was:" >&5
20109 cat conftest.$ac_ext >&5
20110 cf_ldflags_static=no
20111 fi
20112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20113
20114         rm -f libconftest.*
20115         LIBS="$cf_save_LIBS"
20116
20117         echo "$as_me:20117: result: $cf_ldflags_static" >&5
20118 echo "${ECHO_T}$cf_ldflags_static" >&6
20119
20120         if test $cf_ldflags_static != yes
20121         then
20122                 LDFLAGS_STATIC=
20123                 LDFLAGS_SHARED=
20124         fi
20125 else
20126         LDFLAGS_STATIC=
20127         LDFLAGS_SHARED=
20128 fi
20129
20130         ;;
20131 esac
20132
20133 echo "$as_me:20133: checking where we will install curses.h" >&5
20134 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20135 test "$with_overwrite" = no && \
20136 test "x$includedir" = 'x${prefix}/include' && \
20137         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20138 echo "$as_me:20138: result: $includedir" >&5
20139 echo "${ECHO_T}$includedir" >&6
20140
20141 ### Resolve a conflict between normal and wide-curses by forcing applications
20142 ### that will need libutf8 to add it to their configure script.
20143 if test "$with_overwrite" != no ; then
20144 if test "$NCURSES_LIBUTF8" = 1 ; then
20145         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20146         { echo "$as_me:20146: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20147 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20148 fi
20149 fi
20150 WITH_OVERWRITE=$with_overwrite
20151
20152 # used to separate tack out of the tree
20153 NCURSES_TREE=
20154
20155 ### predefined stuff for the test programs
20156 cat >>confdefs.h <<\EOF
20157 #define HAVE_SLK_COLOR 1
20158 EOF
20159
20160 ### Construct the list of subdirectories for which we'll customize makefiles
20161 ### with the appropriate compile-rules.
20162
20163 echo "$as_me:20163: checking for src modules" >&5
20164 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20165
20166 # dependencies and linker-arguments for test-programs
20167 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20168 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20169 if test "$DFT_LWR_MODEL" = "libtool"; then
20170         TEST_ARGS="${TEST_DEPS}"
20171         TEST_ARG2="${TEST_DEP2}"
20172 else
20173         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20174         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20175 fi
20176
20177 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20178 cf_cv_src_modules=
20179 for cf_dir in $modules_to_build
20180 do
20181         if test -f $srcdir/$cf_dir/modules; then
20182
20183                 # We may/may not have tack in the distribution, though the
20184                 # makefile is.
20185                 if test $cf_dir = tack ; then
20186                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20187                                 continue
20188                         fi
20189                 fi
20190
20191                 if test -z "$cf_cv_src_modules"; then
20192                         cf_cv_src_modules=$cf_dir
20193                 else
20194                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20195                 fi
20196
20197                 # Make the ncurses_cfg.h file record the library interface files as
20198                 # well.  These are header files that are the same name as their
20199                 # directory.  Ncurses is the only library that does not follow
20200                 # that pattern.
20201                 if test $cf_dir = tack ; then
20202                         continue
20203                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20204
20205 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20206
20207                         cat >>confdefs.h <<EOF
20208 #define HAVE_${cf_have_include}_H 1
20209 EOF
20210
20211                         cat >>confdefs.h <<EOF
20212 #define HAVE_LIB${cf_have_include} 1
20213 EOF
20214
20215                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20216                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20217                         if test "$DFT_LWR_MODEL" = "libtool"; then
20218                                 TEST_ARGS="${TEST_DEPS}"
20219                                 TEST_ARG2="${TEST_DEP2}"
20220                         else
20221                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20222                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20223                         fi
20224                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20225                 fi
20226         fi
20227 done
20228 echo "$as_me:20228: result: $cf_cv_src_modules" >&5
20229 echo "${ECHO_T}$cf_cv_src_modules" >&6
20230
20231 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20232 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20233
20234 SRC_SUBDIRS=
20235 if test "x$cf_with_manpages" != xno ; then
20236         SRC_SUBDIRS="$SRC_SUBDIRS man"
20237 fi
20238 SRC_SUBDIRS="$SRC_SUBDIRS include"
20239 for cf_dir in $cf_cv_src_modules
20240 do
20241         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20242 done
20243 if test "x$cf_with_tests" != "xno" ; then
20244         SRC_SUBDIRS="$SRC_SUBDIRS test"
20245 fi
20246 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20247 if test "$cf_with_cxx_binding" != no; then
20248         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20249         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20250 fi
20251
20252 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20253 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20254
20255 ADA_SUBDIRS=
20256 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20257         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20258         ADA_SUBDIRS="gen src"
20259         if test "x$cf_with_tests" != "xno" ; then
20260                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20261         fi
20262 fi
20263
20264 SUB_MAKEFILES=
20265 for cf_dir in $SRC_SUBDIRS
20266 do
20267         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20268 done
20269
20270 if test -n "$ADA_SUBDIRS"; then
20271         for cf_dir in $ADA_SUBDIRS
20272         do
20273                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20274         done
20275
20276 fi
20277
20278 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20279    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20280    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20281 fi
20282
20283 DIRS_TO_MAKE="lib"
20284 for cf_item in $cf_list_models
20285 do
20286
20287         case $cf_item in
20288         libtool) cf_subdir='obj_lo'  ;;
20289         normal)  cf_subdir='objects' ;;
20290         debug)   cf_subdir='obj_g' ;;
20291         profile) cf_subdir='obj_p' ;;
20292         shared)
20293                 case $cf_cv_system_name in #(vi
20294                 cygwin) #(vi
20295                         cf_subdir='objects' ;;
20296                 *)
20297                         cf_subdir='obj_s' ;;
20298                 esac
20299         esac
20300
20301         for cf_item2 in $DIRS_TO_MAKE
20302         do
20303                 test $cf_item2 = $cf_subdir && break
20304         done
20305         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20306 done
20307 for cf_dir in $DIRS_TO_MAKE
20308 do
20309         test ! -d $cf_dir && mkdir $cf_dir
20310 done
20311
20312 # symbols that differ when compiling Ada95 by itself.
20313 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20314
20315 # values to use as strings
20316 cat >>confdefs.h <<EOF
20317 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20318 EOF
20319
20320 cat >>confdefs.h <<EOF
20321 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20322 EOF
20323
20324 ### Now that we're done running tests, add the compiler-warnings, if any
20325
20326 cf_fix_cppflags=no
20327 cf_new_cflags=
20328 cf_new_cppflags=
20329 cf_new_extra_cppflags=
20330
20331 for cf_add_cflags in $EXTRA_CFLAGS
20332 do
20333 case $cf_fix_cppflags in
20334 no)
20335         case $cf_add_cflags in #(vi
20336         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20337                 case $cf_add_cflags in
20338                 -D*)
20339                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20340
20341                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20342                                 && test -z "${cf_tst_cflags}" \
20343                                 && cf_fix_cppflags=yes
20344
20345                         if test $cf_fix_cppflags = yes ; then
20346                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20347                                 continue
20348                         elif test "${cf_tst_cflags}" = "\"'" ; then
20349                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20350                                 continue
20351                         fi
20352                         ;;
20353                 esac
20354                 case "$CPPFLAGS" in
20355                 *$cf_add_cflags) #(vi
20356                         ;;
20357                 *) #(vi
20358                         case $cf_add_cflags in #(vi
20359                         -D*)
20360                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20361
20362 CPPFLAGS=`echo "$CPPFLAGS" | \
20363         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20364                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20365
20366                                 ;;
20367                         esac
20368                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20369                         ;;
20370                 esac
20371                 ;;
20372         *)
20373                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20374                 ;;
20375         esac
20376         ;;
20377 yes)
20378         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20379
20380         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20381
20382         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20383                 && test -z "${cf_tst_cflags}" \
20384                 && cf_fix_cppflags=no
20385         ;;
20386 esac
20387 done
20388
20389 if test -n "$cf_new_cflags" ; then
20390
20391         CFLAGS="$CFLAGS $cf_new_cflags"
20392 fi
20393
20394 if test -n "$cf_new_cppflags" ; then
20395
20396         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20397 fi
20398
20399 if test -n "$cf_new_extra_cppflags" ; then
20400
20401         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20402 fi
20403
20404 ### Define substitutions for header files to avoid name-pollution
20405
20406 if test "$cf_cv_have_tcgetattr" = yes ; then
20407         HAVE_TCGETATTR=1
20408 else
20409         HAVE_TCGETATTR=0
20410 fi
20411
20412 if test "$ac_cv_header_termio_h" = yes ; then
20413         HAVE_TERMIO_H=1
20414 else
20415         HAVE_TERMIO_H=0
20416 fi
20417
20418 if test "$ac_cv_header_termios_h" = yes ; then
20419         HAVE_TERMIOS_H=1
20420 else
20421         HAVE_TERMIOS_H=0
20422 fi
20423
20424 ################################################################################
20425 test "$use_database" = yes && \
20426 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20427
20428 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20429 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20430
20431 if test x"$enable_pc_files" = xyes ; then \
20432 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20433 MAKE_PC_FILES=
20434 else
20435 MAKE_PC_FILES="#"
20436 fi
20437
20438 # Extract the first word of "tic", so it can be a program name with args.
20439 set dummy tic; ac_word=$2
20440 echo "$as_me:20440: checking for $ac_word" >&5
20441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20442 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20443   echo $ECHO_N "(cached) $ECHO_C" >&6
20444 else
20445   case $TIC_PATH in
20446   [\\/]* | ?:[\\/]*)
20447   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20448   ;;
20449   *)
20450   ac_save_IFS=$IFS; IFS=$ac_path_separator
20451 ac_dummy="$PATH:/usr/local/ncurses/bin"
20452 for ac_dir in $ac_dummy; do
20453   IFS=$ac_save_IFS
20454   test -z "$ac_dir" && ac_dir=.
20455   if $as_executable_p "$ac_dir/$ac_word"; then
20456    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20457    echo "$as_me:20457: found $ac_dir/$ac_word" >&5
20458    break
20459 fi
20460 done
20461
20462   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20463   ;;
20464 esac
20465 fi
20466 TIC_PATH=$ac_cv_path_TIC_PATH
20467
20468 if test -n "$TIC_PATH"; then
20469   echo "$as_me:20469: result: $TIC_PATH" >&5
20470 echo "${ECHO_T}$TIC_PATH" >&6
20471 else
20472   echo "$as_me:20472: result: no" >&5
20473 echo "${ECHO_T}no" >&6
20474 fi
20475
20476 if test -n "$FALLBACK_LIST"
20477 then
20478         if test "$TIC_PATH" = unknown
20479         then
20480                 { echo "$as_me:20480: WARNING: no tic program found for fallbacks" >&5
20481 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20482         fi
20483 fi
20484
20485 if test "x$cf_with_tests" != xno ; then
20486         MAKE_TESTS=
20487 else
20488         MAKE_TESTS="#"
20489 fi
20490
20491 ADAHTML_DIR=../../doc/html/ada
20492
20493 SUB_SCRIPTS=
20494
20495 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"
20496 ac_config_commands="$ac_config_commands default"
20497 cat >confcache <<\_ACEOF
20498 # This file is a shell script that caches the results of configure
20499 # tests run on this system so they can be shared between configure
20500 # scripts and configure runs, see configure's option --config-cache.
20501 # It is not useful on other systems.  If it contains results you don't
20502 # want to keep, you may remove or edit it.
20503 #
20504 # config.status only pays attention to the cache file if you give it
20505 # the --recheck option to rerun configure.
20506 #
20507 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20508 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20509 # following values.
20510
20511 _ACEOF
20512
20513 # The following way of writing the cache mishandles newlines in values,
20514 # but we know of no workaround that is simple, portable, and efficient.
20515 # So, don't put newlines in cache variables' values.
20516 # Ultrix sh set writes to stderr and can't be redirected directly,
20517 # and sets the high bit in the cache file unless we assign to the vars.
20518 {
20519   (set) 2>&1 |
20520     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20521     *ac_space=\ *)
20522       # `set' does not quote correctly, so add quotes (double-quote
20523       # substitution turns \\\\ into \\, and sed turns \\ into \).
20524       sed -n \
20525         "s/'/'\\\\''/g;
20526           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20527       ;;
20528     *)
20529       # `set' quotes correctly as required by POSIX, so do not add quotes.
20530       sed -n \
20531         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20532       ;;
20533     esac;
20534 } |
20535   sed '
20536      t clear
20537      : clear
20538      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20539      t end
20540      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20541      : end' >>confcache
20542 if cmp -s $cache_file confcache; then :; else
20543   if test -w $cache_file; then
20544     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20545     cat confcache >$cache_file
20546   else
20547     echo "not updating unwritable cache $cache_file"
20548   fi
20549 fi
20550 rm -f confcache
20551
20552 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20553 # Let make expand exec_prefix.
20554 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20555
20556 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20557 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20558 # trailing colons and then remove the whole line if VPATH becomes empty
20559 # (actually we leave an empty line to preserve line numbers).
20560 if test "x$srcdir" = x.; then
20561   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20562 s/:*\$(srcdir):*/:/;
20563 s/:*\${srcdir}:*/:/;
20564 s/:*@srcdir@:*/:/;
20565 s/^\([^=]*=[    ]*\):*/\1/;
20566 s/:*$//;
20567 s/^[^=]*=[      ]*$//;
20568 }'
20569 fi
20570
20571 DEFS=-DHAVE_CONFIG_H
20572
20573 : ${CONFIG_STATUS=./config.status}
20574 ac_clean_files_save=$ac_clean_files
20575 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20576 { echo "$as_me:20576: creating $CONFIG_STATUS" >&5
20577 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20578 cat >$CONFIG_STATUS <<_ACEOF
20579 #! $SHELL
20580 # Generated automatically by configure.
20581 # Run this file to recreate the current configuration.
20582 # Compiler output produced by configure, useful for debugging
20583 # configure, is in config.log if it exists.
20584
20585 debug=false
20586 SHELL=\${CONFIG_SHELL-$SHELL}
20587 ac_cs_invocation="\$0 \$@"
20588
20589 _ACEOF
20590
20591 cat >>$CONFIG_STATUS <<\_ACEOF
20592 # Be Bourne compatible
20593 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20594   emulate sh
20595   NULLCMD=:
20596 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20597   set -o posix
20598 fi
20599
20600 # Name of the executable.
20601 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20602
20603 if expr a : '\(a\)' >/dev/null 2>&1; then
20604   as_expr=expr
20605 else
20606   as_expr=false
20607 fi
20608
20609 rm -f conf$$ conf$$.exe conf$$.file
20610 echo >conf$$.file
20611 if ln -s conf$$.file conf$$ 2>/dev/null; then
20612   # We could just check for DJGPP; but this test a) works b) is more generic
20613   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20614   if test -f conf$$.exe; then
20615     # Don't use ln at all; we don't have any links
20616     as_ln_s='cp -p'
20617   else
20618     as_ln_s='ln -s'
20619   fi
20620 elif ln conf$$.file conf$$ 2>/dev/null; then
20621   as_ln_s=ln
20622 else
20623   as_ln_s='cp -p'
20624 fi
20625 rm -f conf$$ conf$$.exe conf$$.file
20626
20627 as_executable_p="test -f"
20628
20629 # Support unset when possible.
20630 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20631   as_unset=unset
20632 else
20633   as_unset=false
20634 fi
20635
20636 # NLS nuisances.
20637 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20638 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20639 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20640 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20641 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20642 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20643 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20644 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20645
20646 # IFS
20647 # We need space, tab and new line, in precisely that order.
20648 as_nl='
20649 '
20650 IFS="   $as_nl"
20651
20652 # CDPATH.
20653 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20654
20655 exec 6>&1
20656
20657 _ACEOF
20658
20659 # Files that config.status was made for.
20660 if test -n "$ac_config_files"; then
20661   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20662 fi
20663
20664 if test -n "$ac_config_headers"; then
20665   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20666 fi
20667
20668 if test -n "$ac_config_links"; then
20669   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20670 fi
20671
20672 if test -n "$ac_config_commands"; then
20673   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20674 fi
20675
20676 cat >>$CONFIG_STATUS <<\EOF
20677
20678 ac_cs_usage="\
20679 \`$as_me' instantiates files from templates according to the
20680 current configuration.
20681
20682 Usage: $0 [OPTIONS] [FILE]...
20683
20684   -h, --help       print this help, then exit
20685   -V, --version    print version number, then exit
20686   -d, --debug      don't remove temporary files
20687       --recheck    update $as_me by reconfiguring in the same conditions
20688   --file=FILE[:TEMPLATE]
20689                    instantiate the configuration file FILE
20690   --header=FILE[:TEMPLATE]
20691                    instantiate the configuration header FILE
20692
20693 Configuration files:
20694 $config_files
20695
20696 Configuration headers:
20697 $config_headers
20698
20699 Configuration commands:
20700 $config_commands
20701
20702 Report bugs to <dickey@invisible-island.net>."
20703 EOF
20704
20705 cat >>$CONFIG_STATUS <<EOF
20706 ac_cs_version="\\
20707 config.status
20708 configured by $0, generated by GNU Autoconf 2.52.20101002,
20709   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20710
20711 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20712 Free Software Foundation, Inc.
20713 This config.status script is free software; the Free Software Foundation
20714 gives unlimited permission to copy, distribute and modify it."
20715 srcdir=$srcdir
20716 INSTALL="$INSTALL"
20717 EOF
20718
20719 cat >>$CONFIG_STATUS <<\EOF
20720 # If no file are specified by the user, then we need to provide default
20721 # value.  By we need to know if files were specified by the user.
20722 ac_need_defaults=:
20723 while test $# != 0
20724 do
20725   case $1 in
20726   --*=*)
20727     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20728     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20729     shift
20730     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20731     shift
20732     ;;
20733   -*);;
20734   *) # This is not an option, so the user has probably given explicit
20735      # arguments.
20736      ac_need_defaults=false;;
20737   esac
20738
20739   case $1 in
20740   # Handling of the options.
20741 EOF
20742 cat >>$CONFIG_STATUS <<EOF
20743   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20744     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20745     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20746 EOF
20747 cat >>$CONFIG_STATUS <<\EOF
20748   --version | --vers* | -V )
20749     echo "$ac_cs_version"; exit 0 ;;
20750   --he | --h)
20751     # Conflict between --help and --header
20752     { { echo "$as_me:20752: error: ambiguous option: $1
20753 Try \`$0 --help' for more information." >&5
20754 echo "$as_me: error: ambiguous option: $1
20755 Try \`$0 --help' for more information." >&2;}
20756    { (exit 1); exit 1; }; };;
20757   --help | --hel | -h )
20758     echo "$ac_cs_usage"; exit 0 ;;
20759   --debug | --d* | -d )
20760     debug=: ;;
20761   --file | --fil | --fi | --f )
20762     shift
20763     CONFIG_FILES="$CONFIG_FILES $1"
20764     ac_need_defaults=false;;
20765   --header | --heade | --head | --hea )
20766     shift
20767     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20768     ac_need_defaults=false;;
20769
20770   # This is an error.
20771   -*) { { echo "$as_me:20771: error: unrecognized option: $1
20772 Try \`$0 --help' for more information." >&5
20773 echo "$as_me: error: unrecognized option: $1
20774 Try \`$0 --help' for more information." >&2;}
20775    { (exit 1); exit 1; }; } ;;
20776
20777   *) ac_config_targets="$ac_config_targets $1" ;;
20778
20779   esac
20780   shift
20781 done
20782
20783 exec 5>>config.log
20784 cat >&5 << _ACEOF
20785
20786 ## ----------------------- ##
20787 ## Running config.status.  ##
20788 ## ----------------------- ##
20789
20790 This file was extended by $as_me 2.52.20101002, executed with
20791   CONFIG_FILES    = $CONFIG_FILES
20792   CONFIG_HEADERS  = $CONFIG_HEADERS
20793   CONFIG_LINKS    = $CONFIG_LINKS
20794   CONFIG_COMMANDS = $CONFIG_COMMANDS
20795   > $ac_cs_invocation
20796 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20797
20798 _ACEOF
20799 EOF
20800
20801 cat >>$CONFIG_STATUS <<EOF
20802 #
20803 # INIT-COMMANDS section.
20804 #
20805
20806 ### Special initialization commands, used to pass information from the
20807 ### configuration-run into config.status
20808
20809 AWK="$AWK"
20810 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20811 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20812 ECHO_LINK="$ECHO_LINK"
20813 LDCONFIG="$LDCONFIG"
20814 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20815 LIB_NAME="$LIB_NAME"
20816 LIB_PREFIX="$LIB_PREFIX"
20817 LIB_SUBSETS="$LIB_SUBSETS"
20818 LIB_SUFFIX="$LIB_SUFFIX"
20819 LIB_TRACING="$LIB_TRACING"
20820 LN_S="$LN_S"
20821 MAKE_TERMINFO="$MAKE_TERMINFO"
20822 NCURSES_MAJOR="$NCURSES_MAJOR"
20823 NCURSES_MINOR="$NCURSES_MINOR"
20824 NCURSES_OSPEED="$NCURSES_OSPEED"
20825 NCURSES_PATCH="$NCURSES_PATCH"
20826 SRC_SUBDIRS="$SRC_SUBDIRS"
20827 TERMINFO="$TERMINFO"
20828 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20829 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20830 TICS_NAME="$TICS_NAME"
20831 TIC_PATH="$TIC_PATH"
20832 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20833 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20834 TINFO_NAME="$TINFO_NAME"
20835 TINFO_SUFFIX="$TINFO_SUFFIX"
20836 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20837 WITH_CURSES_H="$with_curses_h"
20838 WITH_ECHO="$with_echo"
20839 WITH_OVERWRITE="$with_overwrite"
20840 cf_LIST_MODELS="$cf_list_models"
20841 cf_cv_abi_version="$cf_cv_abi_version"
20842 cf_cv_do_relink="$cf_cv_do_relink"
20843 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20844 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20845 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20846 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20847 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20848 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20849 cf_cv_rel_version="$cf_cv_rel_version"
20850 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20851 cf_cv_shared_soname='$cf_cv_shared_soname'
20852 cf_cv_shlib_version="$cf_cv_shlib_version"
20853 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20854 cf_cv_system_name="$cf_cv_system_name"
20855 cf_cv_term_driver="$with_term_driver"
20856 cf_with_ada="$cf_with_ada"
20857 cf_with_cxx_binding="$cf_with_cxx_binding"
20858 cf_with_manpages="$cf_with_manpages"
20859 cf_with_tests="$cf_with_tests"
20860 host="$host"
20861 target="$target"
20862
20863 EOF
20864
20865 cat >>$CONFIG_STATUS <<\EOF
20866 for ac_config_target in $ac_config_targets
20867 do
20868   case "$ac_config_target" in
20869   # Handling of arguments.
20870   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20871   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20872   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20873   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20874   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20875   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20876   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20877   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20878   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20879   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20880   *) { { echo "$as_me:20880: error: invalid argument: $ac_config_target" >&5
20881 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20882    { (exit 1); exit 1; }; };;
20883   esac
20884 done
20885
20886 # If the user did not use the arguments to specify the items to instantiate,
20887 # then the envvar interface is used.  Set only those that are not.
20888 # We use the long form for the default assignment because of an extremely
20889 # bizarre bug on SunOS 4.1.3.
20890 if $ac_need_defaults; then
20891   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20892   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20893   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20894 fi
20895
20896 # Create a temporary directory, and hook for its removal unless debugging.
20897 $debug ||
20898 {
20899   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20900   trap '{ (exit 1); exit 1; }' 1 2 13 15
20901 }
20902
20903 # Create a (secure) tmp directory for tmp files.
20904 : ${TMPDIR=/tmp}
20905 {
20906   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20907   test -n "$tmp" && test -d "$tmp"
20908 }  ||
20909 {
20910   tmp=$TMPDIR/cs$$-$RANDOM
20911   (umask 077 && mkdir $tmp)
20912 } ||
20913 {
20914    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20915    { (exit 1); exit 1; }
20916 }
20917
20918 EOF
20919
20920 cat >>$CONFIG_STATUS <<EOF
20921
20922 #
20923 # CONFIG_FILES section.
20924 #
20925
20926 # No need to generate the scripts if there are no CONFIG_FILES.
20927 # This happens for instance when ./config.status config.h
20928 if test -n "\$CONFIG_FILES"; then
20929   # Protect against being on the right side of a sed subst in config.status.
20930   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20931    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20932 s,@SHELL@,$SHELL,;t t
20933 s,@exec_prefix@,$exec_prefix,;t t
20934 s,@prefix@,$prefix,;t t
20935 s,@program_transform_name@,$program_transform_name,;t t
20936 s,@bindir@,$bindir,;t t
20937 s,@sbindir@,$sbindir,;t t
20938 s,@libexecdir@,$libexecdir,;t t
20939 s,@datadir@,$datadir,;t t
20940 s,@sysconfdir@,$sysconfdir,;t t
20941 s,@sharedstatedir@,$sharedstatedir,;t t
20942 s,@localstatedir@,$localstatedir,;t t
20943 s,@libdir@,$libdir,;t t
20944 s,@includedir@,$includedir,;t t
20945 s,@oldincludedir@,$oldincludedir,;t t
20946 s,@infodir@,$infodir,;t t
20947 s,@mandir@,$mandir,;t t
20948 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20949 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20950 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20951 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20952 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20953 s,@build_alias@,$build_alias,;t t
20954 s,@host_alias@,$host_alias,;t t
20955 s,@target_alias@,$target_alias,;t t
20956 s,@ECHO_C@,$ECHO_C,;t t
20957 s,@ECHO_N@,$ECHO_N,;t t
20958 s,@ECHO_T@,$ECHO_T,;t t
20959 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20960 s,@DEFS@,$DEFS,;t t
20961 s,@LIBS@,$LIBS,;t t
20962 s,@top_builddir@,$top_builddir,;t t
20963 s,@EGREP@,$EGREP,;t t
20964 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20965 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20966 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20967 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20968 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20969 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20970 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20971 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20972 s,@build@,$build,;t t
20973 s,@build_cpu@,$build_cpu,;t t
20974 s,@build_vendor@,$build_vendor,;t t
20975 s,@build_os@,$build_os,;t t
20976 s,@host@,$host,;t t
20977 s,@host_cpu@,$host_cpu,;t t
20978 s,@host_vendor@,$host_vendor,;t t
20979 s,@host_os@,$host_os,;t t
20980 s,@target@,$target,;t t
20981 s,@target_cpu@,$target_cpu,;t t
20982 s,@target_vendor@,$target_vendor,;t t
20983 s,@target_os@,$target_os,;t t
20984 s,@CC@,$CC,;t t
20985 s,@CFLAGS@,$CFLAGS,;t t
20986 s,@LDFLAGS@,$LDFLAGS,;t t
20987 s,@CPPFLAGS@,$CPPFLAGS,;t t
20988 s,@ac_ct_CC@,$ac_ct_CC,;t t
20989 s,@EXEEXT@,$EXEEXT,;t t
20990 s,@OBJEXT@,$OBJEXT,;t t
20991 s,@CPP@,$CPP,;t t
20992 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20993 s,@PROG_EXT@,$PROG_EXT,;t t
20994 s,@LDCONFIG@,$LDCONFIG,;t t
20995 s,@CXX@,$CXX,;t t
20996 s,@CXXFLAGS@,$CXXFLAGS,;t t
20997 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20998 s,@AWK@,$AWK,;t t
20999 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21000 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21001 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21002 s,@LINT@,$LINT,;t t
21003 s,@LINT_OPTS@,$LINT_OPTS,;t t
21004 s,@LN_S@,$LN_S,;t t
21005 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21006 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21007 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21008 s,@SET_MAKE@,$SET_MAKE,;t t
21009 s,@CTAGS@,$CTAGS,;t t
21010 s,@ETAGS@,$ETAGS,;t t
21011 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21012 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21013 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21014 s,@RANLIB@,$RANLIB,;t t
21015 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21016 s,@LD@,$LD,;t t
21017 s,@ac_ct_LD@,$ac_ct_LD,;t t
21018 s,@AR@,$AR,;t t
21019 s,@ac_ct_AR@,$ac_ct_AR,;t t
21020 s,@ARFLAGS@,$ARFLAGS,;t t
21021 s,@DESTDIR@,$DESTDIR,;t t
21022 s,@BUILD_CC@,$BUILD_CC,;t t
21023 s,@BUILD_CPP@,$BUILD_CPP,;t t
21024 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21025 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21026 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21027 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21028 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21029 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21030 s,@cf_list_models@,$cf_list_models,;t t
21031 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21032 s,@LIBTOOL@,$LIBTOOL,;t t
21033 s,@LT_UNDEF@,$LT_UNDEF,;t t
21034 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21035 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21036 s,@LIB_CREATE@,$LIB_CREATE,;t t
21037 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21038 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21039 s,@LIB_PREP@,$LIB_PREP,;t t
21040 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21041 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21042 s,@LIB_LINK@,$LIB_LINK,;t t
21043 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21044 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21045 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21046 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21047 s,@TICS_NAME@,$TICS_NAME,;t t
21048 s,@TINFO_NAME@,$TINFO_NAME,;t t
21049 s,@LIB_NAME@,$LIB_NAME,;t t
21050 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21051 s,@CC_G_OPT@,$CC_G_OPT,;t t
21052 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21053 s,@LD_MODEL@,$LD_MODEL,;t t
21054 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21055 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21056 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21057 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21058 s,@LINK_PROGS@,$LINK_PROGS,;t t
21059 s,@LINK_TESTS@,$LINK_TESTS,;t t
21060 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21061 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21062 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21063 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21064 s,@RPATH_LIST@,$RPATH_LIST,;t t
21065 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21066 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21067 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21068 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21069 s,@XTERM_KBS@,$XTERM_KBS,;t t
21070 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21071 s,@TERMINFO@,$TERMINFO,;t t
21072 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21073 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21074 s,@TERMPATH@,$TERMPATH,;t t
21075 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21076 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21077 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21078 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21079 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21080 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21081 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21082 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21083 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21084 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21085 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21086 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21087 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21088 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21089 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21090 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21091 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21092 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21093 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21094 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21095 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21096 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21097 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21098 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21099 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21100 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21101 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21102 s,@PTHREAD@,$PTHREAD,;t t
21103 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21104 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21105 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21106 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21107 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21108 s,@ECHO_LINK@,$ECHO_LINK,;t t
21109 s,@ADAFLAGS@,$ADAFLAGS,;t t
21110 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21111 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21112 s,@ADA_TRACE@,$ADA_TRACE,;t t
21113 s,@MATH_LIB@,$MATH_LIB,;t t
21114 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21115 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21116 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21117 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21118 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21119 s,@TEST_LIBS@,$TEST_LIBS,;t t
21120 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21121 s,@CXXCPP@,$CXXCPP,;t t
21122 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21123 s,@CXX_AR@,$CXX_AR,;t t
21124 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21125 s,@CXXLIBS@,$CXXLIBS,;t t
21126 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21127 s,@gnat_exists@,$gnat_exists,;t t
21128 s,@M4_exists@,$M4_exists,;t t
21129 s,@cf_ada_make@,$cf_ada_make,;t t
21130 s,@cf_compile_generics@,$cf_compile_generics,;t t
21131 s,@cf_generic_objects@,$cf_generic_objects,;t t
21132 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21133 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21134 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21135 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21136 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21137 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21138 s,@cf_ada_package@,$cf_ada_package,;t t
21139 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21140 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21141 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21142 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21143 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21144 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21145 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21146 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21147 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21148 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21149 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21150 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21151 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21152 s,@TICS_LIBS@,$TICS_LIBS,;t t
21153 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21154 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21155 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21156 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21157 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21158 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21159 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21160 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21161 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21162 s,@TICS_LIST@,$TICS_LIST,;t t
21163 s,@TINFO_LIST@,$TINFO_LIST,;t t
21164 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21165 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21166 s,@TEST_ARGS@,$TEST_ARGS,;t t
21167 s,@TEST_DEPS@,$TEST_DEPS,;t t
21168 s,@TEST_ARG2@,$TEST_ARG2,;t t
21169 s,@TEST_DEP2@,$TEST_DEP2,;t t
21170 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21171 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21172 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21173 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21174 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21175 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21176 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21177 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21178 s,@cross_compiling@,$cross_compiling,;t t
21179 s,@TIC_PATH@,$TIC_PATH,;t t
21180 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21181 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21182 CEOF
21183
21184 EOF
21185
21186   cat >>$CONFIG_STATUS <<\EOF
21187   # Split the substitutions into bite-sized pieces for seds with
21188   # small command number limits, like on Digital OSF/1 and HP-UX.
21189   ac_max_sed_lines=48
21190   ac_sed_frag=1 # Number of current file.
21191   ac_beg=1 # First line for current file.
21192   ac_end=$ac_max_sed_lines # Line after last line for current file.
21193   ac_more_lines=:
21194   ac_sed_cmds=
21195   while $ac_more_lines; do
21196     if test $ac_beg -gt 1; then
21197       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21198     else
21199       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21200     fi
21201     if test ! -s $tmp/subs.frag; then
21202       ac_more_lines=false
21203     else
21204       # The purpose of the label and of the branching condition is to
21205       # speed up the sed processing (if there are no `@' at all, there
21206       # is no need to browse any of the substitutions).
21207       # These are the two extra sed commands mentioned above.
21208       (echo ':t
21209   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21210       if test -z "$ac_sed_cmds"; then
21211         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21212       else
21213         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21214       fi
21215       ac_sed_frag=`expr $ac_sed_frag + 1`
21216       ac_beg=$ac_end
21217       ac_end=`expr $ac_end + $ac_max_sed_lines`
21218     fi
21219   done
21220   if test -z "$ac_sed_cmds"; then
21221     ac_sed_cmds=cat
21222   fi
21223 fi # test -n "$CONFIG_FILES"
21224
21225 EOF
21226 cat >>$CONFIG_STATUS <<\EOF
21227 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21228   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21229   case $ac_file in
21230   - | *:- | *:-:* ) # input from stdin
21231         cat >$tmp/stdin
21232         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21233         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21234   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21235         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21236   * )   ac_file_in=$ac_file.in ;;
21237   esac
21238
21239   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21240   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21241          X"$ac_file" : 'X\(//\)[^/]' \| \
21242          X"$ac_file" : 'X\(//\)$' \| \
21243          X"$ac_file" : 'X\(/\)' \| \
21244          .     : '\(.\)' 2>/dev/null ||
21245 echo X"$ac_file" |
21246     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21247           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21248           /^X\(\/\/\)$/{ s//\1/; q; }
21249           /^X\(\/\).*/{ s//\1/; q; }
21250           s/.*/./; q'`
21251   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21252     { case "$ac_dir" in
21253   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21254   *)                      as_incr_dir=.;;
21255 esac
21256 as_dummy="$ac_dir"
21257 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21258   case $as_mkdir_dir in
21259     # Skip DOS drivespec
21260     ?:) as_incr_dir=$as_mkdir_dir ;;
21261     *)
21262       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21263       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21264     ;;
21265   esac
21266 done; }
21267
21268     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21269     # A "../" for each directory in $ac_dir_suffix.
21270     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21271   else
21272     ac_dir_suffix= ac_dots=
21273   fi
21274
21275   case $srcdir in
21276   .)  ac_srcdir=.
21277       if test -z "$ac_dots"; then
21278          ac_top_srcdir=.
21279       else
21280          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21281       fi ;;
21282   [\\/]* | ?:[\\/]* )
21283       ac_srcdir=$srcdir$ac_dir_suffix;
21284       ac_top_srcdir=$srcdir ;;
21285   *) # Relative path.
21286     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21287     ac_top_srcdir=$ac_dots$srcdir ;;
21288   esac
21289
21290   case $INSTALL in
21291   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21292   *) ac_INSTALL=$ac_dots$INSTALL ;;
21293   esac
21294
21295   if test x"$ac_file" != x-; then
21296     { echo "$as_me:21296: creating $ac_file" >&5
21297 echo "$as_me: creating $ac_file" >&6;}
21298     rm -f "$ac_file"
21299   fi
21300   # Let's still pretend it is `configure' which instantiates (i.e., don't
21301   # use $as_me), people would be surprised to read:
21302   #    /* config.h.  Generated automatically by config.status.  */
21303   configure_input="Generated automatically from `echo $ac_file_in |
21304                                                  sed 's,.*/,,'` by configure."
21305
21306   # First look for the input files in the build tree, otherwise in the
21307   # src tree.
21308   ac_file_inputs=`IFS=:
21309     for f in $ac_file_in; do
21310       case $f in
21311       -) echo $tmp/stdin ;;
21312       [\\/$]*)
21313          # Absolute (can't be DOS-style, as IFS=:)
21314          test -f "$f" || { { echo "$as_me:21314: error: cannot find input file: $f" >&5
21315 echo "$as_me: error: cannot find input file: $f" >&2;}
21316    { (exit 1); exit 1; }; }
21317          echo $f;;
21318       *) # Relative
21319          if test -f "$f"; then
21320            # Build tree
21321            echo $f
21322          elif test -f "$srcdir/$f"; then
21323            # Source tree
21324            echo $srcdir/$f
21325          else
21326            # /dev/null tree
21327            { { echo "$as_me:21327: error: cannot find input file: $f" >&5
21328 echo "$as_me: error: cannot find input file: $f" >&2;}
21329    { (exit 1); exit 1; }; }
21330          fi;;
21331       esac
21332     done` || { (exit 1); exit 1; }
21333 EOF
21334 cat >>$CONFIG_STATUS <<EOF
21335   sed "$ac_vpsub
21336 $extrasub
21337 EOF
21338 cat >>$CONFIG_STATUS <<\EOF
21339 :t
21340 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21341 s,@configure_input@,$configure_input,;t t
21342 s,@srcdir@,$ac_srcdir,;t t
21343 s,@top_srcdir@,$ac_top_srcdir,;t t
21344 s,@INSTALL@,$ac_INSTALL,;t t
21345 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21346   rm -f $tmp/stdin
21347   if test x"$ac_file" != x-; then
21348     mv $tmp/out $ac_file
21349   else
21350     cat $tmp/out
21351     rm -f $tmp/out
21352   fi
21353
21354 done
21355 EOF
21356 cat >>$CONFIG_STATUS <<\EOF
21357
21358 #
21359 # CONFIG_HEADER section.
21360 #
21361
21362 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21363 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21364 #
21365 # ac_d sets the value in "#define NAME VALUE" lines.
21366 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21367 ac_dB='[        ].*$,\1#\2'
21368 ac_dC=' '
21369 ac_dD=',;t'
21370 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21371 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21372 ac_iB='\([      ]\),\1#\2define\3'
21373 ac_iC=' '
21374 ac_iD='\4,;t'
21375 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21376 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21377 ac_uB='$,\1#\2define\3'
21378 ac_uC=' '
21379 ac_uD=',;t'
21380
21381 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21382   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21383   case $ac_file in
21384   - | *:- | *:-:* ) # input from stdin
21385         cat >$tmp/stdin
21386         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21387         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21388   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21389         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21390   * )   ac_file_in=$ac_file.in ;;
21391   esac
21392
21393   test x"$ac_file" != x- && { echo "$as_me:21393: creating $ac_file" >&5
21394 echo "$as_me: creating $ac_file" >&6;}
21395
21396   # First look for the input files in the build tree, otherwise in the
21397   # src tree.
21398   ac_file_inputs=`IFS=:
21399     for f in $ac_file_in; do
21400       case $f in
21401       -) echo $tmp/stdin ;;
21402       [\\/$]*)
21403          # Absolute (can't be DOS-style, as IFS=:)
21404          test -f "$f" || { { echo "$as_me:21404: error: cannot find input file: $f" >&5
21405 echo "$as_me: error: cannot find input file: $f" >&2;}
21406    { (exit 1); exit 1; }; }
21407          echo $f;;
21408       *) # Relative
21409          if test -f "$f"; then
21410            # Build tree
21411            echo $f
21412          elif test -f "$srcdir/$f"; then
21413            # Source tree
21414            echo $srcdir/$f
21415          else
21416            # /dev/null tree
21417            { { echo "$as_me:21417: error: cannot find input file: $f" >&5
21418 echo "$as_me: error: cannot find input file: $f" >&2;}
21419    { (exit 1); exit 1; }; }
21420          fi;;
21421       esac
21422     done` || { (exit 1); exit 1; }
21423   # Remove the trailing spaces.
21424   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21425
21426 EOF
21427
21428 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21429 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21430 # be either 'cat' or 'sort'.
21431 cat confdefs.h | uniq >conftest.vals
21432
21433 # Break up conftest.vals because some shells have a limit on
21434 # the size of here documents, and old seds have small limits too.
21435
21436 rm -f conftest.tail
21437 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21438 while grep . conftest.vals >/dev/null
21439 do
21440   # Write chunks of a limited-size here document to conftest.frag.
21441   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21442   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21443   echo 'CEOF' >> $CONFIG_STATUS
21444   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21445   rm -f conftest.vals
21446   mv conftest.tail conftest.vals
21447 done
21448 rm -f conftest.vals
21449
21450 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21451 # marker @DEFS@.
21452 echo '  cat >> conftest.edit <<CEOF
21453 /@DEFS@/r conftest.frag
21454 /@DEFS@/d
21455 CEOF
21456 sed -f conftest.edit $tmp/in > $tmp/out
21457 rm -f $tmp/in
21458 mv $tmp/out $tmp/in
21459 rm -f conftest.edit conftest.frag
21460 ' >> $CONFIG_STATUS
21461
21462 cat >>$CONFIG_STATUS <<\EOF
21463   # Let's still pretend it is `configure' which instantiates (i.e., don't
21464   # use $as_me), people would be surprised to read:
21465   #    /* config.h.  Generated automatically by config.status.  */
21466   if test x"$ac_file" = x-; then
21467     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21468   else
21469     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21470   fi
21471   cat $tmp/in >>$tmp/config.h
21472   rm -f $tmp/in
21473   if test x"$ac_file" != x-; then
21474     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21475       { echo "$as_me:21475: $ac_file is unchanged" >&5
21476 echo "$as_me: $ac_file is unchanged" >&6;}
21477     else
21478       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21479          X"$ac_file" : 'X\(//\)[^/]' \| \
21480          X"$ac_file" : 'X\(//\)$' \| \
21481          X"$ac_file" : 'X\(/\)' \| \
21482          .     : '\(.\)' 2>/dev/null ||
21483 echo X"$ac_file" |
21484     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21485           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21486           /^X\(\/\/\)$/{ s//\1/; q; }
21487           /^X\(\/\).*/{ s//\1/; q; }
21488           s/.*/./; q'`
21489       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21490         { case "$ac_dir" in
21491   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21492   *)                      as_incr_dir=.;;
21493 esac
21494 as_dummy="$ac_dir"
21495 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21496   case $as_mkdir_dir in
21497     # Skip DOS drivespec
21498     ?:) as_incr_dir=$as_mkdir_dir ;;
21499     *)
21500       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21501       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21502     ;;
21503   esac
21504 done; }
21505
21506       fi
21507       rm -f $ac_file
21508       mv $tmp/config.h $ac_file
21509     fi
21510   else
21511     cat $tmp/config.h
21512     rm -f $tmp/config.h
21513   fi
21514 done
21515 EOF
21516 cat >>$CONFIG_STATUS <<\EOF
21517 #
21518 # CONFIG_COMMANDS section.
21519 #
21520 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21521   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21522   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21523
21524   case $ac_dest in
21525     default )
21526 if test "x$cf_with_tests" != xno ; then
21527
21528 for cf_dir in test
21529 do
21530         if test ! -d $srcdir/$cf_dir; then
21531                 continue
21532         elif test -f $srcdir/$cf_dir/programs; then
21533                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21534         fi
21535 done
21536
21537 fi
21538
21539 cf_prefix=$LIB_PREFIX
21540
21541 if test $cf_cv_shlib_version = cygdll ; then
21542         TINFO_NAME=$TINFO_ARG_SUFFIX
21543         TINFO_SUFFIX=.dll
21544 fi
21545
21546 if test -n "$TINFO_SUFFIX" ; then
21547         case $TINFO_SUFFIX in
21548         tw*)
21549                 TINFO_NAME="${TINFO_NAME}tw"
21550                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21551                 ;;
21552         t*)
21553                 TINFO_NAME="${TINFO_NAME}t"
21554                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21555                 ;;
21556         w*)
21557                 TINFO_NAME="${TINFO_NAME}w"
21558                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21559                 ;;
21560         esac
21561 fi
21562
21563 for cf_dir in $SRC_SUBDIRS
21564 do
21565         if test ! -d $srcdir/$cf_dir ; then
21566                 continue
21567         elif test -f $srcdir/$cf_dir/modules; then
21568
21569                 SHARED_LIB=
21570                 LIBS_TO_MAKE=
21571                 for cf_item in $cf_LIST_MODELS
21572                 do
21573
21574         case $cf_item in #(vi
21575         libtool) #(vi
21576                 cf_suffix='.la'
21577                 cf_depsuf=$cf_suffix
21578                 ;;
21579         normal) #(vi
21580                 cf_suffix='.a'
21581                 cf_depsuf=$cf_suffix
21582                 ;;
21583         debug) #(vi
21584                 cf_suffix='_g.a'
21585                 cf_depsuf=$cf_suffix
21586                 ;;
21587         profile) #(vi
21588                 cf_suffix='_p.a'
21589                 cf_depsuf=$cf_suffix
21590                 ;;
21591         shared) #(vi
21592                 case $cf_cv_system_name in
21593                 aix[5-7]*) #(vi
21594                         cf_suffix='.a'
21595                         cf_depsuf=$cf_suffix
21596                         ;;
21597                 cygwin*) #(vi
21598                         cf_suffix='.dll'
21599                         cf_depsuf='.dll.a'
21600                         ;;
21601                 darwin*) #(vi
21602                         cf_suffix='.dylib'
21603                         cf_depsuf=$cf_suffix
21604                         ;;
21605                 hpux*) #(vi
21606                         case $target in
21607                         ia64*) #(vi
21608                                 cf_suffix='.so'
21609                                 cf_depsuf=$cf_suffix
21610                                 ;;
21611                         *) #(vi
21612                                 cf_suffix='.sl'
21613                                 cf_depsuf=$cf_suffix
21614                                 ;;
21615                         esac
21616                         ;;
21617                 *)      cf_suffix='.so'
21618                         cf_depsuf=$cf_suffix
21619                         ;;
21620                 esac
21621         esac
21622         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21623         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21624
21625                         if test $cf_item = shared ; then
21626                         if test "$cf_cv_do_symlinks" = yes ; then
21627                                 case "$cf_cv_shlib_version" in #(vi
21628                                 rel) #(vi
21629                                         case "$cf_cv_system_name" in #(vi
21630                                         darwin*)
21631                                         case .${LIB_SUFFIX} in
21632                                         .tw*)
21633                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21634                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21635                                                 ;;
21636                                         .t*)
21637                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21638                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21639                                                 ;;
21640                                         .w*)
21641                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21642                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21643                                                 ;;
21644                                         *)
21645                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21646                                                 ;;
21647                                         esac
21648                                         ;; #(vi
21649                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21650                                         esac
21651                                         ;;
21652                                 abi)
21653                                         case "$cf_cv_system_name" in #(vi
21654                                         darwin*)
21655                                         case .${LIB_SUFFIX} in
21656                                         .tw*)
21657                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21658                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21659                                                 ;;
21660                                         .t*)
21661                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21662                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21663                                                 ;;
21664                                         .w*)
21665                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21666                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21667                                                 ;;
21668                                         *)
21669                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21670                                                 ;;
21671                                         esac
21672                                         ;; #(vi
21673                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21674                                         esac
21675                                         ;;
21676                                 esac
21677                         fi
21678                         # cygwin needs import library, and has unique naming convention
21679                         # use autodetected ${cf_prefix} for import lib and static lib, but
21680                         # use 'cyg' prefix for shared lib.
21681                         if test $cf_cv_shlib_version = cygdll ; then
21682                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21683                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
21684                                 continue
21685                         fi
21686                         fi
21687                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21688                 done
21689
21690                 if test $cf_dir = ncurses ; then
21691                         cf_subsets="$LIB_SUBSETS"
21692                         cf_r_parts="$cf_subsets"
21693                         cf_liblist="$LIBS_TO_MAKE"
21694
21695                         while test -n "$cf_r_parts"
21696                         do
21697                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21698                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21699                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21700                                         cf_item=
21701                                         case $cf_l_parts in #(vi
21702                                         *termlib*) #(vi
21703                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21704                                                 ;;
21705                                         *ticlib*)
21706                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21707                                                 ;;
21708                                         *)
21709                                                 break
21710                                                 ;;
21711                                         esac
21712                                         if test -n "$cf_item"; then
21713                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
21714                                         fi
21715                                 else
21716                                         break
21717                                 fi
21718                         done
21719                 else
21720                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21721                 fi
21722
21723                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
21724                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21725                         $cf_dir/Makefile >$cf_dir/Makefile.out
21726                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21727
21728                 $AWK -f $srcdir/mk-0th.awk \
21729                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
21730                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21731
21732                 for cf_subset in $cf_subsets
21733                 do
21734                         cf_subdirs=
21735                         for cf_item in $cf_LIST_MODELS
21736                         do
21737                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21738
21739 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21740
21741         case $cf_item in #(vi
21742         libtool) #(vi
21743                 cf_suffix='.la'
21744                 cf_depsuf=$cf_suffix
21745                 ;;
21746         normal) #(vi
21747                 cf_suffix='.a'
21748                 cf_depsuf=$cf_suffix
21749                 ;;
21750         debug) #(vi
21751                 cf_suffix='_g.a'
21752                 cf_depsuf=$cf_suffix
21753                 ;;
21754         profile) #(vi
21755                 cf_suffix='_p.a'
21756                 cf_depsuf=$cf_suffix
21757                 ;;
21758         shared) #(vi
21759                 case $cf_cv_system_name in
21760                 aix[5-7]*) #(vi
21761                         cf_suffix='.a'
21762                         cf_depsuf=$cf_suffix
21763                         ;;
21764                 cygwin*) #(vi
21765                         cf_suffix='.dll'
21766                         cf_depsuf='.dll.a'
21767                         ;;
21768                 darwin*) #(vi
21769                         cf_suffix='.dylib'
21770                         cf_depsuf=$cf_suffix
21771                         ;;
21772                 hpux*) #(vi
21773                         case $target in
21774                         ia64*) #(vi
21775                                 cf_suffix='.so'
21776                                 cf_depsuf=$cf_suffix
21777                                 ;;
21778                         *) #(vi
21779                                 cf_suffix='.sl'
21780                                 cf_depsuf=$cf_suffix
21781                                 ;;
21782                         esac
21783                         ;;
21784                 *)      cf_suffix='.so'
21785                         cf_depsuf=$cf_suffix
21786                         ;;
21787                 esac
21788         esac
21789         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21790         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21791
21792         case $cf_item in
21793         libtool) cf_subdir='obj_lo'  ;;
21794         normal)  cf_subdir='objects' ;;
21795         debug)   cf_subdir='obj_g' ;;
21796         profile) cf_subdir='obj_p' ;;
21797         shared)
21798                 case $cf_cv_system_name in #(vi
21799                 cygwin) #(vi
21800                         cf_subdir='objects' ;;
21801                 *)
21802                         cf_subdir='obj_s' ;;
21803                 esac
21804         esac
21805
21806                         # Test for case where we build libtinfo with a different name.
21807                         cf_libname=$cf_dir
21808                         if test $cf_dir = ncurses ; then
21809                                 case $cf_subset in
21810                                 *base*)
21811                                         cf_libname=${cf_libname}$LIB_SUFFIX
21812                                         ;;
21813                                 *termlib*)
21814                                         cf_libname=$TINFO_LIB_SUFFIX
21815                                         ;;
21816                                 ticlib*)
21817                                         cf_libname=$TICS_LIB_SUFFIX
21818                                         ;;
21819                                 esac
21820                         else
21821                                 cf_libname=${cf_libname}$LIB_SUFFIX
21822                         fi
21823                         if test -n "${DFT_ARG_SUFFIX}" ; then
21824                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21825                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21826                         fi
21827
21828                         # These dependencies really are for development, not
21829                         # builds, but they are useful in porting, too.
21830                         cf_depend="../include/ncurses_cfg.h"
21831                         if test "$srcdir" = "."; then
21832                                 cf_reldir="."
21833                         else
21834                                 cf_reldir="\${srcdir}"
21835                         fi
21836
21837                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21838                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21839                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21840                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21841                         fi
21842
21843                         cf_dir_suffix=
21844                         old_cf_suffix="$cf_suffix"
21845                         if test "$cf_cv_shlib_version_infix" = yes ; then
21846                         if test -n "$LIB_SUFFIX" ; then
21847                                 case $LIB_SUFFIX in
21848                                 tw*)
21849                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21850                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21851                                         cf_dir_suffix=tw
21852                                         ;;
21853                                 t*)
21854                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21855                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21856                                         cf_dir_suffix=t
21857                                         ;;
21858                                 w*)
21859                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21860                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21861                                         cf_dir_suffix=w
21862                                         ;;
21863                                 esac
21864                         fi
21865                         fi
21866
21867                         $AWK -f $srcdir/mk-1st.awk \
21868                                 name=${cf_libname}${cf_dir_suffix} \
21869                                 traces=$LIB_TRACING \
21870                                 MODEL=$cf_ITEM \
21871                                 model=$cf_subdir \
21872                                 prefix=$cf_prefix \
21873                                 suffix=$cf_suffix \
21874                                 subset=$cf_subset \
21875                                 driver=$cf_cv_term_driver \
21876                                 SymLink="$LN_S" \
21877                                 TermlibRoot=$TINFO_NAME \
21878                                 TermlibSuffix=$TINFO_SUFFIX \
21879                                 ShlibVer=$cf_cv_shlib_version \
21880                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21881                                 ReLink=${cf_cv_do_relink:-no} \
21882                                 DoLinks=$cf_cv_do_symlinks \
21883                                 rmSoLocs=$cf_cv_rm_so_locs \
21884                                 ldconfig="$LDCONFIG" \
21885                                 overwrite=$WITH_OVERWRITE \
21886                                 depend="$cf_depend" \
21887                                 host="$host" \
21888                                 libtool_version="$LIBTOOL_VERSION" \
21889                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21890
21891                         cf_suffix="$old_cf_suffix"
21892
21893                         for cf_subdir2 in $cf_subdirs lib
21894                         do
21895                                 test $cf_subdir = $cf_subdir2 && break
21896                         done
21897                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21898                         $AWK -f $srcdir/mk-2nd.awk \
21899                                 name=$cf_dir \
21900                                 traces=$LIB_TRACING \
21901                                 MODEL=$cf_ITEM \
21902                                 model=$cf_subdir \
21903                                 subset=$cf_subset \
21904                                 srcdir=$srcdir \
21905                                 echo=$WITH_ECHO \
21906                                 crenames=$cf_cv_prog_CC_c_o \
21907                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21908                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21909                         cf_subdirs="$cf_subdirs $cf_subdir"
21910                         done
21911                 done
21912         fi
21913
21914         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21915 done
21916
21917 for cf_dir in $SRC_SUBDIRS
21918 do
21919         if test ! -d $srcdir/$cf_dir ; then
21920                 continue
21921         fi
21922
21923         if test -f $cf_dir/Makefile ; then
21924                 case "$cf_dir" in
21925                 Ada95) #(vi
21926                         echo 'libs \' >> Makefile
21927                         echo 'install.libs \' >> Makefile
21928                         echo 'uninstall.libs ::' >> Makefile
21929                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21930                         ;;
21931                 esac
21932         fi
21933
21934         if test -f $srcdir/$cf_dir/modules; then
21935                 echo >> Makefile
21936                 if test -f $srcdir/$cf_dir/headers; then
21937 cat >> Makefile <<CF_EOF
21938 install.includes \\
21939 uninstall.includes \\
21940 CF_EOF
21941                 fi
21942 if test "$cf_dir" != "c++" ; then
21943 echo 'lint \' >> Makefile
21944 fi
21945 cat >> Makefile <<CF_EOF
21946 libs \\
21947 lintlib \\
21948 install.libs \\
21949 uninstall.libs \\
21950 install.$cf_dir \\
21951 uninstall.$cf_dir ::
21952         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21953 CF_EOF
21954         elif test -f $srcdir/$cf_dir/headers; then
21955 cat >> Makefile <<CF_EOF
21956
21957 libs \\
21958 install.libs \\
21959 uninstall.libs \\
21960 install.includes \\
21961 uninstall.includes ::
21962         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21963 CF_EOF
21964 fi
21965 done
21966
21967 cat >> Makefile <<CF_EOF
21968
21969 install.libs uninstall.libs \\
21970 install.data uninstall.data ::
21971 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21972 CF_EOF
21973
21974 if test "x$cf_with_manpages" = xyes; then
21975 cat >> Makefile <<CF_EOF
21976
21977 install.man \\
21978 uninstall.man ::
21979         cd man && \${MAKE} \${CF_MFLAGS} \$@
21980 CF_EOF
21981 fi
21982
21983 cat >> Makefile <<CF_EOF
21984
21985 distclean ::
21986         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21987         rm -f headers.sh headers.sed mk_shared_lib.sh
21988         rm -f edit_man.* man_alias.*
21989         rm -rf \${DIRS_TO_MAKE}
21990 CF_EOF
21991
21992 # Special case: tack's manpage lives in its own directory.
21993 if test "x$cf_with_manpages" = xyes; then
21994 if test -d tack ; then
21995 if test -f $srcdir/$tack.h; then
21996 cat >> Makefile <<CF_EOF
21997
21998 install.man \\
21999 uninstall.man ::
22000         cd tack && \${MAKE} \${CF_MFLAGS} \$@
22001 CF_EOF
22002 fi
22003 fi
22004 fi
22005
22006 rm -f headers.sed headers.sh
22007
22008 echo creating headers.sh
22009 cat >headers.sh <<CF_EOF
22010 #! /bin/sh
22011 # This shell script is generated by the 'configure' script.  It is invoked in a
22012 # subdirectory of the build tree.  It generates a sed-script in the parent
22013 # directory that is used to adjust includes for header files that reside in a
22014 # subdirectory of /usr/include, etc.
22015 PRG=""
22016 while test \$# != 3
22017 do
22018 PRG="\$PRG \$1"; shift
22019 done
22020 DST=\$1
22021 REF=\$2
22022 SRC=\$3
22023 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22024 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22025 echo installing \$SRC in \$DST
22026 CF_EOF
22027
22028 if test $WITH_CURSES_H = yes; then
22029         cat >>headers.sh <<CF_EOF
22030 case \$DST in
22031 /*/include/*)
22032         END=\`basename \$DST\`
22033         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22034         do
22035                 NAME=\`basename \$i\`
22036                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22037         done
22038         ;;
22039 *)
22040         echo "" >> \$TMPSED
22041         ;;
22042 esac
22043 CF_EOF
22044
22045 else
22046         cat >>headers.sh <<CF_EOF
22047 case \$DST in
22048 /*/include/*)
22049         END=\`basename \$DST\`
22050         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22051         do
22052                 NAME=\`basename \$i\`
22053                 if test "\$NAME" = "curses.h"
22054                 then
22055                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22056                         NAME=ncurses.h
22057                 fi
22058                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22059         done
22060         ;;
22061 *)
22062         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22063         ;;
22064 esac
22065 CF_EOF
22066 fi
22067 cat >>headers.sh <<CF_EOF
22068 rm -f \$TMPSRC
22069 sed -f \$TMPSED \$SRC > \$TMPSRC
22070 NAME=\`basename \$SRC\`
22071 CF_EOF
22072 if test $WITH_CURSES_H != yes; then
22073         cat >>headers.sh <<CF_EOF
22074 test "\$NAME" = "curses.h" && NAME=ncurses.h
22075 CF_EOF
22076 fi
22077 cat >>headers.sh <<CF_EOF
22078 # Just in case someone gzip'd manpages, remove the conflicting copy.
22079 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22080
22081 eval \$PRG \$TMPSRC \$DST/\$NAME
22082 rm -f \$TMPSRC \$TMPSED
22083 CF_EOF
22084
22085 chmod 0755 headers.sh
22086
22087 for cf_dir in $SRC_SUBDIRS
22088 do
22089         if test ! -d $srcdir/$cf_dir ; then
22090                 continue
22091         fi
22092
22093         if test -f $srcdir/$cf_dir/headers; then
22094                 $AWK -f $srcdir/mk-hdr.awk \
22095                         subset="$LIB_SUBSETS" \
22096                         compat="$WITH_CURSES_H" \
22097                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22098         fi
22099
22100         if test -f $srcdir/$cf_dir/modules; then
22101                 if test "$cf_dir" != "c++" ; then
22102                         cat >>$cf_dir/Makefile <<"CF_EOF"
22103 depend : ${AUTO_SRC}
22104         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22105
22106 # DO NOT DELETE THIS LINE -- make depend depends on it.
22107 CF_EOF
22108                 fi
22109         fi
22110 done
22111
22112 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22113 if test -z "$USE_OLD_MAKERULES" ; then
22114         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22115 fi
22116 fi
22117  ;;
22118   esac
22119 done
22120 EOF
22121
22122 cat >>$CONFIG_STATUS <<\EOF
22123
22124 { (exit 0); exit 0; }
22125 EOF
22126 chmod +x $CONFIG_STATUS
22127 ac_clean_files=$ac_clean_files_save
22128
22129 # configure is writing to config.log, and then calls config.status.
22130 # config.status does its own redirection, appending to config.log.
22131 # Unfortunately, on DOS this fails, as config.log is still kept open
22132 # by configure, so config.status won't be able to write to it; its
22133 # output is simply discarded.  So we exec the FD to /dev/null,
22134 # effectively closing config.log, so it can be properly (re)opened and
22135 # appended to by config.status.  When coming back to configure, we
22136 # need to make the FD available again.
22137 if test "$no_create" != yes; then
22138   ac_cs_success=:
22139   exec 5>/dev/null
22140   $SHELL $CONFIG_STATUS || ac_cs_success=false
22141   exec 5>>config.log
22142   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22143   # would make configure fail if this is the last instruction.
22144   $ac_cs_success || { (exit 1); exit 1; }
22145 fi
22146 ${MAKE:-make} preinstall