]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100717
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.501 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100530.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-shared           generate shared-libraries
718   --with-normal           generate normal-libraries (default)
719   --with-debug            generate debug-libraries (default)
720   --with-profile          generate profile-libraries
721   --with-termlib          generate separate terminfo library
722   --with-ticlib           generate separate tic library
723   --with-gpm              use Alessandro Rubini's GPM library
724   --without-dlsym         do not use dlsym() to load GPM dynamically
725   --with-sysmouse         use sysmouse (FreeBSD console)
726   --enable-rpath          use rpath option when generating shared libraries
727   --disable-relink        relink shared libraries during install
728   --with-shlib-version=X  Specify rel or abi version for shared libs
729   --disable-rpath-hack    don't add rpath options for additional libraries
730 Fine-Tuning Your Configuration:
731   --disable-overwrite     leave out the link to -lcurses
732   --disable-database      do not use terminfo, only fallbacks/termcap
733   --with-database=XXX     specify terminfo source to install
734   --with-hashed-db        specify hashed-database library
735   --with-fallbacks=XXX    specify list of fallback terminal descriptions
736   --without-xterm-new     specify if xterm terminfo should be old version
737   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
738   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
739   --disable-big-core      assume machine has little memory
740   --disable-big-strings   assume compiler has only standard-size strings
741   --enable-termcap        compile in termcap fallback support
742   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
743   --enable-getcap         fast termcap load, no xrefs to terminfo
744   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
745   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
746   --disable-root-environ  restrict environment when running as root
747   --enable-symlinks       make tic use symbolic links not hard links
748   --enable-broken_linker  compile with broken-linker support code
749   --enable-bsdpad         recognize BSD-style prefix padding
750   --enable-widec          compile with wide-char/UTF-8 code
751   --disable-lp64          allow chtype to be long (ignore _LP64)
752   --disable-largefile     omit support for large files
753   --disable-tparm-varargs compile tparm() without varargs interface
754   --disable-tic-depends   link tic library without explicit dependency on ncurses library
755   --with-bool=TYPE        override fallback type of bool variable
756   --with-caps=alt         compile with alternate Caps file
757   --with-chtype=TYPE      override type of chtype
758   --with-ospeed=TYPE      override type of ospeed variable
759   --with-mmask-t=TYPE     override type of mmask_t
760   --with-ccharw-max=XXX   override size CCHARW_MAX
761   --with-rcs-ids          compile-in RCS identifiers
762 Options to Specify How Manpages are Installed:
763   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
764                           optionally formatted/catonly, e.g., gzip,formatted
765   --with-manpage-renames  specify manpage-renaming
766   --with-manpage-aliases  specify manpage-aliases using .so
767   --with-manpage-symlinks specify manpage-aliases using symlinks
768   --with-manpage-tbl      specify manpage processing with tbl
769 Extensions:
770   --disable-ext-funcs     disable function-extensions
771   --enable-sp-funcs       enable experimental SCREEN-extensions
772   --enable-term-driver    enable experimental terminal-driver
773   --enable-const          compile with extra/non-standard const
774   --enable-ext-colors     compile for 256-color support
775   --enable-ext-mouse      compile for extended mouse-encoding
776   --enable-no-padding     compile with $NCURSES_NO_PADDING code
777   --enable-signed-char    compile using signed Boolean's in term.h
778   --enable-sigwinch       compile with SIGWINCH handler
779   --enable-tcap-names     compile with user-definable terminal capabilities
780 Development Code:
781   --without-develop       disable development options
782   --enable-hard-tabs      compile with hard-tabs code
783   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
784 Experimental Code:
785   --disable-assumed-color do not assume anything about default-colors
786   --disable-hashmap       compile without hashmap scrolling-optimization
787   --enable-colorfgbg      compile-in experimental $COLORFGBG code
788   --enable-interop        compile-in experimental interop bindings
789   --with-pthread          use POSIX thread library
790   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
791   --enable-weak-symbols   enable weak-symbols for pthreads
792   --enable-reentrant      compile with experimental reentrant code
793   --with-wrap-prefix=XXX  override prefix used for public variables
794   --enable-safe-sprintf   compile with experimental safe-sprintf code
795   --disable-scroll-hints  compile without scroll-hints code
796   --enable-wgetch-events  compile with experimental wgetch-events code
797 Testing/development Options:
798   --enable-echo           build: display "compiling" commands (default)
799   --enable-warnings       build: turn on GCC compiler warnings
800   --enable-assertions     test: turn on generation of assertion code
801   --with-dmalloc          test: use Gray Watson's dmalloc library
802   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
803   --with-valgrind         test: use valgrind
804   --disable-leaks         test: free permanent memory, analyze leaks
805   --enable-expanded       test: generate functions for certain macros
806   --disable-macros        test: use functions rather than macros
807   --with-trace            test: add trace() function to all models of ncurses
808 Ada95 Binding Options:
809   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
810   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
811   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
812   --with-ada-sharedlib=XX build Ada95 shared-library
813
814 Some influential environment variables:
815   CC          C compiler command
816   CFLAGS      C compiler flags
817   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
818               nonstandard directory <lib dir>
819   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
820               headers in a nonstandard directory <include dir>
821   CPP         C preprocessor
822   CXX         C++ compiler command
823   CXXFLAGS    C++ compiler flags
824   CXXCPP      C++ preprocessor
825
826 Use these variables to override the choices made by `configure' or to help
827 it to find libraries and programs with nonstandard names/locations.
828
829 EOF
830 fi
831
832 if test "$ac_init_help" = "recursive"; then
833   # If there are subdirs, report their specific --help.
834   ac_popdir=`pwd`
835   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
836     cd $ac_subdir
837     # A "../" for each directory in /$ac_subdir.
838     ac_dots=`echo $ac_subdir |
839              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
840
841     case $srcdir in
842     .) # No --srcdir option.  We are building in place.
843       ac_sub_srcdir=$srcdir ;;
844     [\\/]* | ?:[\\/]* ) # Absolute path.
845       ac_sub_srcdir=$srcdir/$ac_subdir ;;
846     *) # Relative path.
847       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
848     esac
849
850     # Check for guested configure; otherwise get Cygnus style configure.
851     if test -f $ac_sub_srcdir/configure.gnu; then
852       echo
853       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
854     elif test -f $ac_sub_srcdir/configure; then
855       echo
856       $SHELL $ac_sub_srcdir/configure  --help=recursive
857     elif test -f $ac_sub_srcdir/configure.ac ||
858            test -f $ac_sub_srcdir/configure.in; then
859       echo
860       $ac_configure --help
861     else
862       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
863     fi
864     cd $ac_popdir
865   done
866 fi
867
868 test -n "$ac_init_help" && exit 0
869 if $ac_init_version; then
870   cat <<\EOF
871
872 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
873 Free Software Foundation, Inc.
874 This configure script is free software; the Free Software Foundation
875 gives unlimited permission to copy, distribute and modify it.
876 EOF
877   exit 0
878 fi
879 exec 5>config.log
880 cat >&5 <<EOF
881 This file contains any messages produced by compilers while
882 running configure, to aid debugging if configure makes a mistake.
883
884 It was created by $as_me, which was
885 generated by GNU Autoconf 2.52.20100530.  Invocation command line was
886
887   $ $0 $@
888
889 EOF
890 {
891 cat <<_ASUNAME
892 ## ---------- ##
893 ## Platform.  ##
894 ## ---------- ##
895
896 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
897 uname -m = `(uname -m) 2>/dev/null || echo unknown`
898 uname -r = `(uname -r) 2>/dev/null || echo unknown`
899 uname -s = `(uname -s) 2>/dev/null || echo unknown`
900 uname -v = `(uname -v) 2>/dev/null || echo unknown`
901
902 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
903 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
904
905 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
906 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
907 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
908 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
909 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
910 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
911 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
912
913 PATH = $PATH
914
915 _ASUNAME
916 } >&5
917
918 cat >&5 <<EOF
919 ## ------------ ##
920 ## Core tests.  ##
921 ## ------------ ##
922
923 EOF
924
925 # Keep a trace of the command line.
926 # Strip out --no-create and --no-recursion so they do not pile up.
927 # Also quote any args containing shell meta-characters.
928 ac_configure_args=
929 ac_sep=
930 for ac_arg
931 do
932   case $ac_arg in
933   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
934   | --no-cr | --no-c) ;;
935   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
936   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
937   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
938     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
939     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
940     ac_sep=" " ;;
941   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
942      ac_sep=" " ;;
943   esac
944   # Get rid of the leading space.
945 done
946
947 # When interrupted or exit'd, cleanup temporary files, and complete
948 # config.log.  We remove comments because anyway the quotes in there
949 # would cause problems or look ugly.
950 trap 'exit_status=$?
951   # Save into config.log some information that might help in debugging.
952   echo >&5
953   echo "## ----------------- ##" >&5
954   echo "## Cache variables.  ##" >&5
955   echo "## ----------------- ##" >&5
956   echo >&5
957   # The following way of writing the cache mishandles newlines in values,
958 {
959   (set) 2>&1 |
960     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
961     *ac_space=\ *)
962       sed -n \
963         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
964           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
965       ;;
966     *)
967       sed -n \
968         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
969       ;;
970     esac;
971 } >&5
972   sed "/^$/d" confdefs.h >conftest.log
973   if test -s conftest.log; then
974     echo >&5
975     echo "## ------------ ##" >&5
976     echo "## confdefs.h.  ##" >&5
977     echo "## ------------ ##" >&5
978     echo >&5
979     cat conftest.log >&5
980   fi
981   (echo; echo) >&5
982   test "$ac_signal" != 0 &&
983     echo "$as_me: caught signal $ac_signal" >&5
984   echo "$as_me: exit $exit_status" >&5
985   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
986     exit $exit_status
987      ' 0
988 for ac_signal in 1 2 13 15; do
989   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
990 done
991 ac_signal=0
992
993 # confdefs.h avoids OS command line length limits that DEFS can exceed.
994 rm -rf conftest* confdefs.h
995 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
996 echo >confdefs.h
997
998 # Let the site file select an alternate cache file if it wants to.
999 # Prefer explicitly selected file to automatically selected ones.
1000 if test -z "$CONFIG_SITE"; then
1001   if test "x$prefix" != xNONE; then
1002     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1003   else
1004     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1005   fi
1006 fi
1007 for ac_site_file in $CONFIG_SITE; do
1008   if test -r "$ac_site_file"; then
1009     { echo "$as_me:1009: loading site script $ac_site_file" >&5
1010 echo "$as_me: loading site script $ac_site_file" >&6;}
1011     cat "$ac_site_file" >&5
1012     . "$ac_site_file"
1013   fi
1014 done
1015
1016 if test -r "$cache_file"; then
1017   # Some versions of bash will fail to source /dev/null (special
1018   # files actually), so we avoid doing that.
1019   if test -f "$cache_file"; then
1020     { echo "$as_me:1020: loading cache $cache_file" >&5
1021 echo "$as_me: loading cache $cache_file" >&6;}
1022     case $cache_file in
1023       [\\/]* | ?:[\\/]* ) . $cache_file;;
1024       *)                      . ./$cache_file;;
1025     esac
1026   fi
1027 else
1028   { echo "$as_me:1028: creating cache $cache_file" >&5
1029 echo "$as_me: creating cache $cache_file" >&6;}
1030   >$cache_file
1031 fi
1032
1033 # Check that the precious variables saved in the cache have kept the same
1034 # value.
1035 ac_cache_corrupted=false
1036 for ac_var in `(set) 2>&1 |
1037                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1038   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1039   eval ac_new_set=\$ac_env_${ac_var}_set
1040   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1041   eval ac_new_val="\$ac_env_${ac_var}_value"
1042   case $ac_old_set,$ac_new_set in
1043     set,)
1044       { echo "$as_me:1044: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,set)
1048       { echo "$as_me:1048: error: \`$ac_var' was not set in the previous run" >&5
1049 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1050       ac_cache_corrupted=: ;;
1051     ,);;
1052     *)
1053       if test "x$ac_old_val" != "x$ac_new_val"; then
1054         { echo "$as_me:1054: error: \`$ac_var' has changed since the previous run:" >&5
1055 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1056         { echo "$as_me:1056:   former value:  $ac_old_val" >&5
1057 echo "$as_me:   former value:  $ac_old_val" >&2;}
1058         { echo "$as_me:1058:   current value: $ac_new_val" >&5
1059 echo "$as_me:   current value: $ac_new_val" >&2;}
1060         ac_cache_corrupted=:
1061       fi;;
1062   esac
1063   # Pass precious variables to config.status.  It doesn't matter if
1064   # we pass some twice (in addition to the command line arguments).
1065   if test "$ac_new_set" = set; then
1066     case $ac_new_val in
1067     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1068       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1069       ac_configure_args="$ac_configure_args '$ac_arg'"
1070       ;;
1071     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1072        ;;
1073     esac
1074   fi
1075 done
1076 if $ac_cache_corrupted; then
1077   { echo "$as_me:1077: error: changes in the environment can compromise the build" >&5
1078 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1079   { { echo "$as_me:1079: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1080 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1081    { (exit 1); exit 1; }; }
1082 fi
1083
1084 ac_ext=c
1085 ac_cpp='$CPP $CPPFLAGS'
1086 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1087 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1088 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1089 ac_main_return=return
1090
1091 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1092   *c*,-n*) ECHO_N= ECHO_C='
1093 ' ECHO_T='      ' ;;
1094   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1095   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1096 esac
1097 echo "#! $SHELL" >conftest.sh
1098 echo  "exit 0"   >>conftest.sh
1099 chmod +x conftest.sh
1100 if { (echo "$as_me:1100: PATH=\".;.\"; conftest.sh") >&5
1101   (PATH=".;."; conftest.sh) 2>&5
1102   ac_status=$?
1103   echo "$as_me:1103: \$? = $ac_status" >&5
1104   (exit $ac_status); }; then
1105   ac_path_separator=';'
1106 else
1107   ac_path_separator=:
1108 fi
1109 PATH_SEPARATOR="$ac_path_separator"
1110 rm -f conftest.sh
1111
1112 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1113
1114 top_builddir=`pwd`
1115
1116 echo "$as_me:1116: checking for egrep" >&5
1117 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1118 if test "${ac_cv_prog_egrep+set}" = set; then
1119   echo $ECHO_N "(cached) $ECHO_C" >&6
1120 else
1121   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1122     then ac_cv_prog_egrep='grep -E'
1123     else ac_cv_prog_egrep='egrep'
1124     fi
1125 fi
1126 echo "$as_me:1126: result: $ac_cv_prog_egrep" >&5
1127 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1128  EGREP=$ac_cv_prog_egrep
1129
1130 test -z "$EGREP" && { { echo "$as_me:1130: error: No egrep program found" >&5
1131 echo "$as_me: error: No egrep program found" >&2;}
1132    { (exit 1); exit 1; }; }
1133
1134 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 cf_cv_abi_version=${NCURSES_MAJOR}
1138 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1139 cf_cv_timestamp=`date`
1140 echo "$as_me:1140: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1141 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1142
1143 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1144
1145 # Check whether --with-rel-version or --without-rel-version was given.
1146 if test "${with_rel_version+set}" = set; then
1147   withval="$with_rel_version"
1148   { echo "$as_me:1148: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1149 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1150  cf_cv_rel_version=$withval
1151 fi;
1152
1153  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1154  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1155
1156 if test -n "$NCURSES_MAJOR" ; then
1157   case $NCURSES_MAJOR in #(vi
1158   [0-9]*) #(vi
1159         ;;
1160   *)
1161         { { echo "$as_me:1161: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1162 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1163    { (exit 1); exit 1; }; }
1164         ;;
1165   esac
1166 else
1167   { { echo "$as_me:1167: error: Release major-version value is empty" >&5
1168 echo "$as_me: error: Release major-version value is empty" >&2;}
1169    { (exit 1); exit 1; }; }
1170 fi
1171
1172 if test -n "$NCURSES_MINOR" ; then
1173   case $NCURSES_MINOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1178 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release minor-version value is empty" >&5
1184 echo "$as_me: error: Release minor-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1189
1190 # Check whether --with-abi-version or --without-abi-version was given.
1191 if test "${with_abi_version+set}" = set; then
1192   withval="$with_abi_version"
1193   { echo "$as_me:1193: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1194 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1195  cf_cv_abi_version=$withval
1196 fi;
1197
1198 if test -n "$cf_cv_abi_version" ; then
1199   case $cf_cv_abi_version in #(vi
1200   [0-9]*) #(vi
1201         ;;
1202   *)
1203         { { echo "$as_me:1203: error: ABI version is not a number: $cf_cv_abi_version" >&5
1204 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1205    { (exit 1); exit 1; }; }
1206         ;;
1207   esac
1208 else
1209   { { echo "$as_me:1209: error: ABI version value is empty" >&5
1210 echo "$as_me: error: ABI version value is empty" >&2;}
1211    { (exit 1); exit 1; }; }
1212 fi
1213
1214 ac_aux_dir=
1215 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1216   if test -f $ac_dir/install-sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install-sh -c"
1219     break
1220   elif test -f $ac_dir/install.sh; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/install.sh -c"
1223     break
1224   elif test -f $ac_dir/shtool; then
1225     ac_aux_dir=$ac_dir
1226     ac_install_sh="$ac_aux_dir/shtool install -c"
1227     break
1228   fi
1229 done
1230 if test -z "$ac_aux_dir"; then
1231   { { echo "$as_me:1231: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1232 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1233    { (exit 1); exit 1; }; }
1234 fi
1235 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1236 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1237 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1238
1239 # Make sure we can run config.sub.
1240 $ac_config_sub sun4 >/dev/null 2>&1 ||
1241   { { echo "$as_me:1241: error: cannot run $ac_config_sub" >&5
1242 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1243    { (exit 1); exit 1; }; }
1244
1245 echo "$as_me:1245: checking build system type" >&5
1246 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1247 if test "${ac_cv_build+set}" = set; then
1248   echo $ECHO_N "(cached) $ECHO_C" >&6
1249 else
1250   ac_cv_build_alias=$build_alias
1251 test -z "$ac_cv_build_alias" &&
1252   ac_cv_build_alias=`$ac_config_guess`
1253 test -z "$ac_cv_build_alias" &&
1254   { { echo "$as_me:1254: error: cannot guess build type; you must specify one" >&5
1255 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1256    { (exit 1); exit 1; }; }
1257 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1258   { { echo "$as_me:1258: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1259 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1260    { (exit 1); exit 1; }; }
1261
1262 fi
1263 echo "$as_me:1263: result: $ac_cv_build" >&5
1264 echo "${ECHO_T}$ac_cv_build" >&6
1265 build=$ac_cv_build
1266 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1267 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1268 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1269
1270 echo "$as_me:1270: checking host system type" >&5
1271 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1272 if test "${ac_cv_host+set}" = set; then
1273   echo $ECHO_N "(cached) $ECHO_C" >&6
1274 else
1275   ac_cv_host_alias=$host_alias
1276 test -z "$ac_cv_host_alias" &&
1277   ac_cv_host_alias=$ac_cv_build_alias
1278 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1279   { { echo "$as_me:1279: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1280 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1281    { (exit 1); exit 1; }; }
1282
1283 fi
1284 echo "$as_me:1284: result: $ac_cv_host" >&5
1285 echo "${ECHO_T}$ac_cv_host" >&6
1286 host=$ac_cv_host
1287 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1288 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1289 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1290
1291 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1292         echo "$as_me:1292: checking target system type" >&5
1293 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1294 if test "${ac_cv_target+set}" = set; then
1295   echo $ECHO_N "(cached) $ECHO_C" >&6
1296 else
1297   ac_cv_target_alias=$target_alias
1298 test "x$ac_cv_target_alias" = "x" &&
1299   ac_cv_target_alias=$ac_cv_host_alias
1300 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1301   { { echo "$as_me:1301: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1302 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1303    { (exit 1); exit 1; }; }
1304
1305 fi
1306 echo "$as_me:1306: result: $ac_cv_target" >&5
1307 echo "${ECHO_T}$ac_cv_target" >&6
1308 target=$ac_cv_target
1309 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1310 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1311 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1312
1313 # The aliases save the names the user supplied, while $host etc.
1314 # will get canonicalized.
1315 test -n "$target_alias" &&
1316   test "$program_prefix$program_suffix$program_transform_name" = \
1317     NONENONEs,x,x, &&
1318   program_prefix=${target_alias}-
1319         system_name="$host_os"
1320 else
1321         system_name="`(uname -s -r) 2>/dev/null`"
1322         if test -z "$system_name" ; then
1323                 system_name="`(hostname) 2>/dev/null`"
1324         fi
1325 fi
1326 test -n "$system_name" && cat >>confdefs.h <<EOF
1327 #define SYSTEM_NAME "$system_name"
1328 EOF
1329
1330 if test "${cf_cv_system_name+set}" = set; then
1331   echo $ECHO_N "(cached) $ECHO_C" >&6
1332 else
1333   cf_cv_system_name="$system_name"
1334 fi
1335
1336 test -z "$system_name" && system_name="$cf_cv_system_name"
1337 test -n "$cf_cv_system_name" && echo "$as_me:1337: result: Configuring for $cf_cv_system_name" >&5
1338 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1339
1340 if test ".$system_name" != ".$cf_cv_system_name" ; then
1341         echo "$as_me:1341: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1342 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1343         { { echo "$as_me:1343: error: \"Please remove config.cache and try again.\"" >&5
1344 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1345    { (exit 1); exit 1; }; }
1346 fi
1347
1348 # Check whether --with-system-type or --without-system-type was given.
1349 if test "${with_system_type+set}" = set; then
1350   withval="$with_system_type"
1351   { echo "$as_me:1351: WARNING: overriding system type to $withval" >&5
1352 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1353  cf_cv_system_name=$withval
1354 fi;
1355
1356 ###     Save the given $CFLAGS to allow user-override.
1357 cf_user_CFLAGS="$CFLAGS"
1358
1359 ###     Default install-location
1360
1361 echo "$as_me:1361: checking for prefix" >&5
1362 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1363 if test "x$prefix" = "xNONE" ; then
1364         case "$cf_cv_system_name" in
1365                 # non-vendor systems don't have a conflict
1366         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1367                 prefix=/usr
1368                 ;;
1369         *)      prefix=$ac_default_prefix
1370                 ;;
1371         esac
1372 fi
1373 echo "$as_me:1373: result: $prefix" >&5
1374 echo "${ECHO_T}$prefix" >&6
1375
1376 if test "x$prefix" = "xNONE" ; then
1377 echo "$as_me:1377: checking for default include-directory" >&5
1378 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1379 test -n "$verbose" && echo 1>&6
1380 for cf_symbol in \
1381         $includedir \
1382         $includedir/ncurses \
1383         $prefix/include \
1384         $prefix/include/ncurses \
1385         /usr/local/include \
1386         /usr/local/include/ncurses \
1387         /usr/include \
1388         /usr/include/ncurses
1389 do
1390         cf_dir=`eval echo $cf_symbol`
1391         if test -f $cf_dir/curses.h ; then
1392         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1393                 includedir="$cf_symbol"
1394                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1395                 break
1396         fi
1397         fi
1398         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1399 done
1400 echo "$as_me:1400: result: $includedir" >&5
1401 echo "${ECHO_T}$includedir" >&6
1402 fi
1403
1404 ###     Checks for programs.
1405 ac_ext=c
1406 ac_cpp='$CPP $CPPFLAGS'
1407 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1408 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1409 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1410 ac_main_return=return
1411 if test -n "$ac_tool_prefix"; then
1412   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1413 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1414 echo "$as_me:1414: checking for $ac_word" >&5
1415 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1416 if test "${ac_cv_prog_CC+set}" = set; then
1417   echo $ECHO_N "(cached) $ECHO_C" >&6
1418 else
1419   if test -n "$CC"; then
1420   ac_cv_prog_CC="$CC" # Let the user override the test.
1421 else
1422   ac_save_IFS=$IFS; IFS=$ac_path_separator
1423 ac_dummy="$PATH"
1424 for ac_dir in $ac_dummy; do
1425   IFS=$ac_save_IFS
1426   test -z "$ac_dir" && ac_dir=.
1427   $as_executable_p "$ac_dir/$ac_word" || continue
1428 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1429 echo "$as_me:1429: found $ac_dir/$ac_word" >&5
1430 break
1431 done
1432
1433 fi
1434 fi
1435 CC=$ac_cv_prog_CC
1436 if test -n "$CC"; then
1437   echo "$as_me:1437: result: $CC" >&5
1438 echo "${ECHO_T}$CC" >&6
1439 else
1440   echo "$as_me:1440: result: no" >&5
1441 echo "${ECHO_T}no" >&6
1442 fi
1443
1444 fi
1445 if test -z "$ac_cv_prog_CC"; then
1446   ac_ct_CC=$CC
1447   # Extract the first word of "gcc", so it can be a program name with args.
1448 set dummy gcc; ac_word=$2
1449 echo "$as_me:1449: checking for $ac_word" >&5
1450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1451 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1452   echo $ECHO_N "(cached) $ECHO_C" >&6
1453 else
1454   if test -n "$ac_ct_CC"; then
1455   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1456 else
1457   ac_save_IFS=$IFS; IFS=$ac_path_separator
1458 ac_dummy="$PATH"
1459 for ac_dir in $ac_dummy; do
1460   IFS=$ac_save_IFS
1461   test -z "$ac_dir" && ac_dir=.
1462   $as_executable_p "$ac_dir/$ac_word" || continue
1463 ac_cv_prog_ac_ct_CC="gcc"
1464 echo "$as_me:1464: found $ac_dir/$ac_word" >&5
1465 break
1466 done
1467
1468 fi
1469 fi
1470 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1471 if test -n "$ac_ct_CC"; then
1472   echo "$as_me:1472: result: $ac_ct_CC" >&5
1473 echo "${ECHO_T}$ac_ct_CC" >&6
1474 else
1475   echo "$as_me:1475: result: no" >&5
1476 echo "${ECHO_T}no" >&6
1477 fi
1478
1479   CC=$ac_ct_CC
1480 else
1481   CC="$ac_cv_prog_CC"
1482 fi
1483
1484 if test -z "$CC"; then
1485   if test -n "$ac_tool_prefix"; then
1486   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1487 set dummy ${ac_tool_prefix}cc; ac_word=$2
1488 echo "$as_me:1488: checking for $ac_word" >&5
1489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490 if test "${ac_cv_prog_CC+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   if test -n "$CC"; then
1494   ac_cv_prog_CC="$CC" # Let the user override the test.
1495 else
1496   ac_save_IFS=$IFS; IFS=$ac_path_separator
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499   IFS=$ac_save_IFS
1500   test -z "$ac_dir" && ac_dir=.
1501   $as_executable_p "$ac_dir/$ac_word" || continue
1502 ac_cv_prog_CC="${ac_tool_prefix}cc"
1503 echo "$as_me:1503: found $ac_dir/$ac_word" >&5
1504 break
1505 done
1506
1507 fi
1508 fi
1509 CC=$ac_cv_prog_CC
1510 if test -n "$CC"; then
1511   echo "$as_me:1511: result: $CC" >&5
1512 echo "${ECHO_T}$CC" >&6
1513 else
1514   echo "$as_me:1514: result: no" >&5
1515 echo "${ECHO_T}no" >&6
1516 fi
1517
1518 fi
1519 if test -z "$ac_cv_prog_CC"; then
1520   ac_ct_CC=$CC
1521   # Extract the first word of "cc", so it can be a program name with args.
1522 set dummy cc; ac_word=$2
1523 echo "$as_me:1523: checking for $ac_word" >&5
1524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1525 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1526   echo $ECHO_N "(cached) $ECHO_C" >&6
1527 else
1528   if test -n "$ac_ct_CC"; then
1529   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1530 else
1531   ac_save_IFS=$IFS; IFS=$ac_path_separator
1532 ac_dummy="$PATH"
1533 for ac_dir in $ac_dummy; do
1534   IFS=$ac_save_IFS
1535   test -z "$ac_dir" && ac_dir=.
1536   $as_executable_p "$ac_dir/$ac_word" || continue
1537 ac_cv_prog_ac_ct_CC="cc"
1538 echo "$as_me:1538: found $ac_dir/$ac_word" >&5
1539 break
1540 done
1541
1542 fi
1543 fi
1544 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1545 if test -n "$ac_ct_CC"; then
1546   echo "$as_me:1546: result: $ac_ct_CC" >&5
1547 echo "${ECHO_T}$ac_ct_CC" >&6
1548 else
1549   echo "$as_me:1549: result: no" >&5
1550 echo "${ECHO_T}no" >&6
1551 fi
1552
1553   CC=$ac_ct_CC
1554 else
1555   CC="$ac_cv_prog_CC"
1556 fi
1557
1558 fi
1559 if test -z "$CC"; then
1560   # Extract the first word of "cc", so it can be a program name with args.
1561 set dummy cc; ac_word=$2
1562 echo "$as_me:1562: checking for $ac_word" >&5
1563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1564 if test "${ac_cv_prog_CC+set}" = set; then
1565   echo $ECHO_N "(cached) $ECHO_C" >&6
1566 else
1567   if test -n "$CC"; then
1568   ac_cv_prog_CC="$CC" # Let the user override the test.
1569 else
1570   ac_prog_rejected=no
1571   ac_save_IFS=$IFS; IFS=$ac_path_separator
1572 ac_dummy="$PATH"
1573 for ac_dir in $ac_dummy; do
1574   IFS=$ac_save_IFS
1575   test -z "$ac_dir" && ac_dir=.
1576   $as_executable_p "$ac_dir/$ac_word" || continue
1577 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1578   ac_prog_rejected=yes
1579   continue
1580 fi
1581 ac_cv_prog_CC="cc"
1582 echo "$as_me:1582: found $ac_dir/$ac_word" >&5
1583 break
1584 done
1585
1586 if test $ac_prog_rejected = yes; then
1587   # We found a bogon in the path, so make sure we never use it.
1588   set dummy $ac_cv_prog_CC
1589   shift
1590   if test $# != 0; then
1591     # We chose a different compiler from the bogus one.
1592     # However, it has the same basename, so the bogon will be chosen
1593     # first if we set CC to just the basename; use the full file name.
1594     shift
1595     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1596     shift
1597     ac_cv_prog_CC="$@"
1598   fi
1599 fi
1600 fi
1601 fi
1602 CC=$ac_cv_prog_CC
1603 if test -n "$CC"; then
1604   echo "$as_me:1604: result: $CC" >&5
1605 echo "${ECHO_T}$CC" >&6
1606 else
1607   echo "$as_me:1607: result: no" >&5
1608 echo "${ECHO_T}no" >&6
1609 fi
1610
1611 fi
1612 if test -z "$CC"; then
1613   if test -n "$ac_tool_prefix"; then
1614   for ac_prog in cl
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in cl
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 fi
1694
1695 test -z "$CC" && { { echo "$as_me:1695: error: no acceptable cc found in \$PATH" >&5
1696 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1697    { (exit 1); exit 1; }; }
1698
1699 # Provide some information about the compiler.
1700 echo "$as_me:1700:" \
1701      "checking for C compiler version" >&5
1702 ac_compiler=`set X $ac_compile; echo $2`
1703 { (eval echo "$as_me:1703: \"$ac_compiler --version </dev/null >&5\"") >&5
1704   (eval $ac_compiler --version </dev/null >&5) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }
1708 { (eval echo "$as_me:1708: \"$ac_compiler -v </dev/null >&5\"") >&5
1709   (eval $ac_compiler -v </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
1719 cat >conftest.$ac_ext <<_ACEOF
1720 #line 1720 "configure"
1721 #include "confdefs.h"
1722
1723 int
1724 main ()
1725 {
1726
1727   ;
1728   return 0;
1729 }
1730 _ACEOF
1731 ac_clean_files_save=$ac_clean_files
1732 ac_clean_files="$ac_clean_files a.out a.exe"
1733 # Try to create an executable without -o first, disregard a.out.
1734 # It will help us diagnose broken compilers, and finding out an intuition
1735 # of exeext.
1736 echo "$as_me:1736: checking for C compiler default output" >&5
1737 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1738 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1739 if { (eval echo "$as_me:1739: \"$ac_link_default\"") >&5
1740   (eval $ac_link_default) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); }; then
1744   # Find the output, starting from the most likely.  This scheme is
1745 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1746 # resort.
1747 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1748                 ls a.out conftest 2>/dev/null;
1749                 ls a.* conftest.* 2>/dev/null`; do
1750   case $ac_file in
1751     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1752     a.out ) # We found the default executable, but exeext='' is most
1753             # certainly right.
1754             break;;
1755     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1756           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1757           export ac_cv_exeext
1758           break;;
1759     * ) break;;
1760   esac
1761 done
1762 else
1763   echo "$as_me: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 { { echo "$as_me:1765: error: C compiler cannot create executables" >&5
1766 echo "$as_me: error: C compiler cannot create executables" >&2;}
1767    { (exit 77); exit 77; }; }
1768 fi
1769
1770 ac_exeext=$ac_cv_exeext
1771 echo "$as_me:1771: result: $ac_file" >&5
1772 echo "${ECHO_T}$ac_file" >&6
1773
1774 # Check the compiler produces executables we can run.  If not, either
1775 # the compiler is broken, or we cross compile.
1776 echo "$as_me:1776: checking whether the C compiler works" >&5
1777 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1778 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1779 # If not cross compiling, check that we can run a simple program.
1780 if test "$cross_compiling" != yes; then
1781   if { ac_try='./$ac_file'
1782   { (eval echo "$as_me:1782: \"$ac_try\"") >&5
1783   (eval $ac_try) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); }; }; then
1787     cross_compiling=no
1788   else
1789     if test "$cross_compiling" = maybe; then
1790         cross_compiling=yes
1791     else
1792         { { echo "$as_me:1792: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&5
1794 echo "$as_me: error: cannot run C compiled programs.
1795 If you meant to cross compile, use \`--host'." >&2;}
1796    { (exit 1); exit 1; }; }
1797     fi
1798   fi
1799 fi
1800 echo "$as_me:1800: result: yes" >&5
1801 echo "${ECHO_T}yes" >&6
1802
1803 rm -f a.out a.exe conftest$ac_cv_exeext
1804 ac_clean_files=$ac_clean_files_save
1805 # Check the compiler produces executables we can run.  If not, either
1806 # the compiler is broken, or we cross compile.
1807 echo "$as_me:1807: checking whether we are cross compiling" >&5
1808 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1809 echo "$as_me:1809: result: $cross_compiling" >&5
1810 echo "${ECHO_T}$cross_compiling" >&6
1811
1812 echo "$as_me:1812: checking for executable suffix" >&5
1813 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1814 if { (eval echo "$as_me:1814: \"$ac_link\"") >&5
1815   (eval $ac_link) 2>&5
1816   ac_status=$?
1817   echo "$as_me:1817: \$? = $ac_status" >&5
1818   (exit $ac_status); }; then
1819   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1820 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1821 # work properly (i.e., refer to `conftest.exe'), while it won't with
1822 # `rm'.
1823 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1824   case $ac_file in
1825     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1826     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1827           export ac_cv_exeext
1828           break;;
1829     * ) break;;
1830   esac
1831 done
1832 else
1833   { { echo "$as_me:1833: error: cannot compute EXEEXT: cannot compile and link" >&5
1834 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1835    { (exit 1); exit 1; }; }
1836 fi
1837
1838 rm -f conftest$ac_cv_exeext
1839 echo "$as_me:1839: result: $ac_cv_exeext" >&5
1840 echo "${ECHO_T}$ac_cv_exeext" >&6
1841
1842 rm -f conftest.$ac_ext
1843 EXEEXT=$ac_cv_exeext
1844 ac_exeext=$EXEEXT
1845 echo "$as_me:1845: checking for object suffix" >&5
1846 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1847 if test "${ac_cv_objext+set}" = set; then
1848   echo $ECHO_N "(cached) $ECHO_C" >&6
1849 else
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853
1854 int
1855 main ()
1856 {
1857
1858   ;
1859   return 0;
1860 }
1861 _ACEOF
1862 rm -f conftest.o conftest.obj
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864   (eval $ac_compile) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit $ac_status); }; then
1868   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1869   case $ac_file in
1870     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1871     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1872        break;;
1873   esac
1874 done
1875 else
1876   echo "$as_me: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
1878 { { echo "$as_me:1878: error: cannot compute OBJEXT: cannot compile" >&5
1879 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1880    { (exit 1); exit 1; }; }
1881 fi
1882
1883 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1884 fi
1885 echo "$as_me:1885: result: $ac_cv_objext" >&5
1886 echo "${ECHO_T}$ac_cv_objext" >&6
1887 OBJEXT=$ac_cv_objext
1888 ac_objext=$OBJEXT
1889 echo "$as_me:1889: checking whether we are using the GNU C compiler" >&5
1890 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1891 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1892   echo $ECHO_N "(cached) $ECHO_C" >&6
1893 else
1894   cat >conftest.$ac_ext <<_ACEOF
1895 #line 1895 "configure"
1896 #include "confdefs.h"
1897
1898 int
1899 main ()
1900 {
1901 #ifndef __GNUC__
1902        choke me
1903 #endif
1904
1905   ;
1906   return 0;
1907 }
1908 _ACEOF
1909 rm -f conftest.$ac_objext
1910 if { (eval echo "$as_me:1910: \"$ac_compile\"") >&5
1911   (eval $ac_compile) 2>&5
1912   ac_status=$?
1913   echo "$as_me:1913: \$? = $ac_status" >&5
1914   (exit $ac_status); } &&
1915          { ac_try='test -s conftest.$ac_objext'
1916   { (eval echo "$as_me:1916: \"$ac_try\"") >&5
1917   (eval $ac_try) 2>&5
1918   ac_status=$?
1919   echo "$as_me:1919: \$? = $ac_status" >&5
1920   (exit $ac_status); }; }; then
1921   ac_compiler_gnu=yes
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 ac_compiler_gnu=no
1926 fi
1927 rm -f conftest.$ac_objext conftest.$ac_ext
1928 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1929
1930 fi
1931 echo "$as_me:1931: result: $ac_cv_c_compiler_gnu" >&5
1932 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1933 GCC=`test $ac_compiler_gnu = yes && echo yes`
1934 ac_test_CFLAGS=${CFLAGS+set}
1935 ac_save_CFLAGS=$CFLAGS
1936 CFLAGS="-g"
1937 echo "$as_me:1937: checking whether $CC accepts -g" >&5
1938 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1939 if test "${ac_cv_prog_cc_g+set}" = set; then
1940   echo $ECHO_N "(cached) $ECHO_C" >&6
1941 else
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945
1946 int
1947 main ()
1948 {
1949
1950   ;
1951   return 0;
1952 }
1953 _ACEOF
1954 rm -f conftest.$ac_objext
1955 if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956   (eval $ac_compile) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); } &&
1960          { ac_try='test -s conftest.$ac_objext'
1961   { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962   (eval $ac_try) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); }; }; then
1966   ac_cv_prog_cc_g=yes
1967 else
1968   echo "$as_me: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 ac_cv_prog_cc_g=no
1971 fi
1972 rm -f conftest.$ac_objext conftest.$ac_ext
1973 fi
1974 echo "$as_me:1974: result: $ac_cv_prog_cc_g" >&5
1975 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1976 if test "$ac_test_CFLAGS" = set; then
1977   CFLAGS=$ac_save_CFLAGS
1978 elif test $ac_cv_prog_cc_g = yes; then
1979   if test "$GCC" = yes; then
1980     CFLAGS="-g -O2"
1981   else
1982     CFLAGS="-g"
1983   fi
1984 else
1985   if test "$GCC" = yes; then
1986     CFLAGS="-O2"
1987   else
1988     CFLAGS=
1989   fi
1990 fi
1991 # Some people use a C++ compiler to compile C.  Since we use `exit',
1992 # in C++ we need to declare it.  In case someone uses the same compiler
1993 # for both compiling C and C++ we need to have the C++ compiler decide
1994 # the declaration of exit, since it's the most demanding environment.
1995 cat >conftest.$ac_ext <<_ACEOF
1996 #ifndef __cplusplus
1997   choke me
1998 #endif
1999 _ACEOF
2000 rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   for ac_declaration in \
2013    ''\
2014    '#include <stdlib.h>' \
2015    'extern "C" void std::exit (int) throw (); using std::exit;' \
2016    'extern "C" void std::exit (int); using std::exit;' \
2017    'extern "C" void exit (int) throw ();' \
2018    'extern "C" void exit (int);' \
2019    'void exit (int);'
2020 do
2021   cat >conftest.$ac_ext <<_ACEOF
2022 #line 2022 "configure"
2023 #include "confdefs.h"
2024 #include <stdlib.h>
2025 $ac_declaration
2026 int
2027 main ()
2028 {
2029 exit (42);
2030   ;
2031   return 0;
2032 }
2033 _ACEOF
2034 rm -f conftest.$ac_objext
2035 if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036   (eval $ac_compile) 2>&5
2037   ac_status=$?
2038   echo "$as_me:2038: \$? = $ac_status" >&5
2039   (exit $ac_status); } &&
2040          { ac_try='test -s conftest.$ac_objext'
2041   { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042   (eval $ac_try) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); }; }; then
2046   :
2047 else
2048   echo "$as_me: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 continue
2051 fi
2052 rm -f conftest.$ac_objext conftest.$ac_ext
2053   cat >conftest.$ac_ext <<_ACEOF
2054 #line 2054 "configure"
2055 #include "confdefs.h"
2056 $ac_declaration
2057 int
2058 main ()
2059 {
2060 exit (42);
2061   ;
2062   return 0;
2063 }
2064 _ACEOF
2065 rm -f conftest.$ac_objext
2066 if { (eval echo "$as_me:2066: \"$ac_compile\"") >&5
2067   (eval $ac_compile) 2>&5
2068   ac_status=$?
2069   echo "$as_me:2069: \$? = $ac_status" >&5
2070   (exit $ac_status); } &&
2071          { ac_try='test -s conftest.$ac_objext'
2072   { (eval echo "$as_me:2072: \"$ac_try\"") >&5
2073   (eval $ac_try) 2>&5
2074   ac_status=$?
2075   echo "$as_me:2075: \$? = $ac_status" >&5
2076   (exit $ac_status); }; }; then
2077   break
2078 else
2079   echo "$as_me: failed program was:" >&5
2080 cat conftest.$ac_ext >&5
2081 fi
2082 rm -f conftest.$ac_objext conftest.$ac_ext
2083 done
2084 rm -f conftest*
2085 if test -n "$ac_declaration"; then
2086   echo '#ifdef __cplusplus' >>confdefs.h
2087   echo $ac_declaration      >>confdefs.h
2088   echo '#endif'             >>confdefs.h
2089 fi
2090
2091 else
2092   echo "$as_me: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 fi
2095 rm -f conftest.$ac_objext conftest.$ac_ext
2096 ac_ext=c
2097 ac_cpp='$CPP $CPPFLAGS'
2098 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2099 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2100 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2101 ac_main_return=return
2102
2103 GCC_VERSION=none
2104 if test "$GCC" = yes ; then
2105         echo "$as_me:2105: checking version of $CC" >&5
2106 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2107         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2108         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2109         echo "$as_me:2109: result: $GCC_VERSION" >&5
2110 echo "${ECHO_T}$GCC_VERSION" >&6
2111 fi
2112
2113 ac_ext=c
2114 ac_cpp='$CPP $CPPFLAGS'
2115 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2116 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2117 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2118 ac_main_return=return
2119 echo "$as_me:2119: checking how to run the C preprocessor" >&5
2120 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2121 # On Suns, sometimes $CPP names a directory.
2122 if test -n "$CPP" && test -d "$CPP"; then
2123   CPP=
2124 fi
2125 if test -z "$CPP"; then
2126   if test "${ac_cv_prog_CPP+set}" = set; then
2127   echo $ECHO_N "(cached) $ECHO_C" >&6
2128 else
2129       # Double quotes because CPP needs to be expanded
2130     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2131     do
2132       ac_preproc_ok=false
2133 for ac_c_preproc_warn_flag in '' yes
2134 do
2135   # Use a header file that comes with gcc, so configuring glibc
2136   # with a fresh cross-compiler works.
2137   # On the NeXT, cc -E runs the code through the compiler's parser,
2138   # not just through cpp. "Syntax error" is here to catch this case.
2139   cat >conftest.$ac_ext <<_ACEOF
2140 #line 2140 "configure"
2141 #include "confdefs.h"
2142 #include <assert.h>
2143                      Syntax error
2144 _ACEOF
2145 if { (eval echo "$as_me:2145: \"$ac_cpp conftest.$ac_ext\"") >&5
2146   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2147   ac_status=$?
2148   egrep -v '^ *\+' conftest.er1 >conftest.err
2149   rm -f conftest.er1
2150   cat conftest.err >&5
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } >/dev/null; then
2153   if test -s conftest.err; then
2154     ac_cpp_err=$ac_c_preproc_warn_flag
2155   else
2156     ac_cpp_err=
2157   fi
2158 else
2159   ac_cpp_err=yes
2160 fi
2161 if test -z "$ac_cpp_err"; then
2162   :
2163 else
2164   echo "$as_me: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   # Broken: fails on valid input.
2167 continue
2168 fi
2169 rm -f conftest.err conftest.$ac_ext
2170
2171   # OK, works on sane cases.  Now check whether non-existent headers
2172   # can be detected and how.
2173   cat >conftest.$ac_ext <<_ACEOF
2174 #line 2174 "configure"
2175 #include "confdefs.h"
2176 #include <ac_nonexistent.h>
2177 _ACEOF
2178 if { (eval echo "$as_me:2178: \"$ac_cpp conftest.$ac_ext\"") >&5
2179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2180   ac_status=$?
2181   egrep -v '^ *\+' conftest.er1 >conftest.err
2182   rm -f conftest.er1
2183   cat conftest.err >&5
2184   echo "$as_me:2184: \$? = $ac_status" >&5
2185   (exit $ac_status); } >/dev/null; then
2186   if test -s conftest.err; then
2187     ac_cpp_err=$ac_c_preproc_warn_flag
2188   else
2189     ac_cpp_err=
2190   fi
2191 else
2192   ac_cpp_err=yes
2193 fi
2194 if test -z "$ac_cpp_err"; then
2195   # Broken: success on invalid input.
2196 continue
2197 else
2198   echo "$as_me: failed program was:" >&5
2199   cat conftest.$ac_ext >&5
2200   # Passes both tests.
2201 ac_preproc_ok=:
2202 break
2203 fi
2204 rm -f conftest.err conftest.$ac_ext
2205
2206 done
2207 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2208 rm -f conftest.err conftest.$ac_ext
2209 if $ac_preproc_ok; then
2210   break
2211 fi
2212
2213     done
2214     ac_cv_prog_CPP=$CPP
2215
2216 fi
2217   CPP=$ac_cv_prog_CPP
2218 else
2219   ac_cv_prog_CPP=$CPP
2220 fi
2221 echo "$as_me:2221: result: $CPP" >&5
2222 echo "${ECHO_T}$CPP" >&6
2223 ac_preproc_ok=false
2224 for ac_c_preproc_warn_flag in '' yes
2225 do
2226   # Use a header file that comes with gcc, so configuring glibc
2227   # with a fresh cross-compiler works.
2228   # On the NeXT, cc -E runs the code through the compiler's parser,
2229   # not just through cpp. "Syntax error" is here to catch this case.
2230   cat >conftest.$ac_ext <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234                      Syntax error
2235 _ACEOF
2236 if { (eval echo "$as_me:2236: \"$ac_cpp conftest.$ac_ext\"") >&5
2237   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2238   ac_status=$?
2239   egrep -v '^ *\+' conftest.er1 >conftest.err
2240   rm -f conftest.er1
2241   cat conftest.err >&5
2242   echo "$as_me:2242: \$? = $ac_status" >&5
2243   (exit $ac_status); } >/dev/null; then
2244   if test -s conftest.err; then
2245     ac_cpp_err=$ac_c_preproc_warn_flag
2246   else
2247     ac_cpp_err=
2248   fi
2249 else
2250   ac_cpp_err=yes
2251 fi
2252 if test -z "$ac_cpp_err"; then
2253   :
2254 else
2255   echo "$as_me: failed program was:" >&5
2256   cat conftest.$ac_ext >&5
2257   # Broken: fails on valid input.
2258 continue
2259 fi
2260 rm -f conftest.err conftest.$ac_ext
2261
2262   # OK, works on sane cases.  Now check whether non-existent headers
2263   # can be detected and how.
2264   cat >conftest.$ac_ext <<_ACEOF
2265 #line 2265 "configure"
2266 #include "confdefs.h"
2267 #include <ac_nonexistent.h>
2268 _ACEOF
2269 if { (eval echo "$as_me:2269: \"$ac_cpp conftest.$ac_ext\"") >&5
2270   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2271   ac_status=$?
2272   egrep -v '^ *\+' conftest.er1 >conftest.err
2273   rm -f conftest.er1
2274   cat conftest.err >&5
2275   echo "$as_me:2275: \$? = $ac_status" >&5
2276   (exit $ac_status); } >/dev/null; then
2277   if test -s conftest.err; then
2278     ac_cpp_err=$ac_c_preproc_warn_flag
2279   else
2280     ac_cpp_err=
2281   fi
2282 else
2283   ac_cpp_err=yes
2284 fi
2285 if test -z "$ac_cpp_err"; then
2286   # Broken: success on invalid input.
2287 continue
2288 else
2289   echo "$as_me: failed program was:" >&5
2290   cat conftest.$ac_ext >&5
2291   # Passes both tests.
2292 ac_preproc_ok=:
2293 break
2294 fi
2295 rm -f conftest.err conftest.$ac_ext
2296
2297 done
2298 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2299 rm -f conftest.err conftest.$ac_ext
2300 if $ac_preproc_ok; then
2301   :
2302 else
2303   { { echo "$as_me:2303: error: C preprocessor \"$CPP\" fails sanity check" >&5
2304 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2305    { (exit 1); exit 1; }; }
2306 fi
2307
2308 ac_ext=c
2309 ac_cpp='$CPP $CPPFLAGS'
2310 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2311 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2312 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2313 ac_main_return=return
2314
2315 if test $ac_cv_c_compiler_gnu = yes; then
2316     echo "$as_me:2316: checking whether $CC needs -traditional" >&5
2317 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2318 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2319   echo $ECHO_N "(cached) $ECHO_C" >&6
2320 else
2321     ac_pattern="Autoconf.*'x'"
2322   cat >conftest.$ac_ext <<_ACEOF
2323 #line 2323 "configure"
2324 #include "confdefs.h"
2325 #include <sgtty.h>
2326 int Autoconf = TIOCGETP;
2327 _ACEOF
2328 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2329   egrep "$ac_pattern" >/dev/null 2>&1; then
2330   ac_cv_prog_gcc_traditional=yes
2331 else
2332   ac_cv_prog_gcc_traditional=no
2333 fi
2334 rm -f conftest*
2335
2336   if test $ac_cv_prog_gcc_traditional = no; then
2337     cat >conftest.$ac_ext <<_ACEOF
2338 #line 2338 "configure"
2339 #include "confdefs.h"
2340 #include <termio.h>
2341 int Autoconf = TCGETA;
2342 _ACEOF
2343 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344   egrep "$ac_pattern" >/dev/null 2>&1; then
2345   ac_cv_prog_gcc_traditional=yes
2346 fi
2347 rm -f conftest*
2348
2349   fi
2350 fi
2351 echo "$as_me:2351: result: $ac_cv_prog_gcc_traditional" >&5
2352 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2353   if test $ac_cv_prog_gcc_traditional = yes; then
2354     CC="$CC -traditional"
2355   fi
2356 fi
2357
2358 echo "$as_me:2358: checking whether $CC understands -c and -o together" >&5
2359 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2360 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2361   echo $ECHO_N "(cached) $ECHO_C" >&6
2362 else
2363
2364 cat > conftest.$ac_ext <<CF_EOF
2365 #include <stdio.h>
2366 int main()
2367 {
2368         ${cf_cv_main_return:-return}(0);
2369 }
2370 CF_EOF
2371 # We do the test twice because some compilers refuse to overwrite an
2372 # existing .o file with -o, though they will create one.
2373 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2374 if { (eval echo "$as_me:2374: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit $ac_status); } &&
2379   test -f conftest2.$ac_objext && { (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 then
2385   eval cf_cv_prog_CC_c_o=yes
2386 else
2387   eval cf_cv_prog_CC_c_o=no
2388 fi
2389 rm -f conftest*
2390
2391 fi
2392 if test $cf_cv_prog_CC_c_o = yes; then
2393   echo "$as_me:2393: result: yes" >&5
2394 echo "${ECHO_T}yes" >&6
2395 else
2396   echo "$as_me:2396: result: no" >&5
2397 echo "${ECHO_T}no" >&6
2398 fi
2399
2400 echo "$as_me:2400: checking for POSIXized ISC" >&5
2401 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2402 if test -d /etc/conf/kconfig.d &&
2403    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2404 then
2405   echo "$as_me:2405: result: yes" >&5
2406 echo "${ECHO_T}yes" >&6
2407   ISC=yes # If later tests want to check for ISC.
2408
2409 cat >>confdefs.h <<\EOF
2410 #define _POSIX_SOURCE 1
2411 EOF
2412
2413   if test "$GCC" = yes; then
2414     CC="$CC -posix"
2415   else
2416     CC="$CC -Xp"
2417   fi
2418 else
2419   echo "$as_me:2419: result: no" >&5
2420 echo "${ECHO_T}no" >&6
2421   ISC=
2422 fi
2423
2424 echo "$as_me:2424: checking for ${CC-cc} option to accept ANSI C" >&5
2425 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2426 if test "${cf_cv_ansi_cc+set}" = set; then
2427   echo $ECHO_N "(cached) $ECHO_C" >&6
2428 else
2429
2430 cf_cv_ansi_cc=no
2431 cf_save_CFLAGS="$CFLAGS"
2432 cf_save_CPPFLAGS="$CPPFLAGS"
2433 # Don't try gcc -ansi; that turns off useful extensions and
2434 # breaks some systems' header files.
2435 # AIX                   -qlanglvl=ansi
2436 # Ultrix and OSF/1      -std1
2437 # HP-UX                 -Aa -D_HPUX_SOURCE
2438 # SVR4                  -Xc
2439 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2440 for cf_arg in "-DCC_HAS_PROTOS" \
2441         "" \
2442         -qlanglvl=ansi \
2443         -std1 \
2444         -Ae \
2445         "-Aa -D_HPUX_SOURCE" \
2446         -Xc
2447 do
2448
2449 cf_fix_cppflags=no
2450 cf_new_cflags=
2451 cf_new_cppflags=
2452 cf_new_extra_cppflags=
2453
2454 for cf_add_cflags in $cf_arg
2455 do
2456 case $cf_fix_cppflags in
2457 no)
2458         case $cf_add_cflags in #(vi
2459         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2460                 case $cf_add_cflags in
2461                 -D*)
2462                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2463
2464                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2465                                 && test -z "${cf_tst_cflags}" \
2466                                 && cf_fix_cppflags=yes
2467
2468                         if test $cf_fix_cppflags = yes ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         elif test "${cf_tst_cflags}" = "\"'" ; then
2472                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2473                                 continue
2474                         fi
2475                         ;;
2476                 esac
2477                 case "$CPPFLAGS" in
2478                 *$cf_add_cflags) #(vi
2479                         ;;
2480                 *) #(vi
2481                         case $cf_add_cflags in #(vi
2482                         -D*)
2483                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2484
2485 CPPFLAGS=`echo "$CPPFLAGS" | \
2486         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2487                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2488
2489                                 ;;
2490                         esac
2491                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2492                         ;;
2493                 esac
2494                 ;;
2495         *)
2496                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2497                 ;;
2498         esac
2499         ;;
2500 yes)
2501         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2502
2503         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2504
2505         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2506                 && test -z "${cf_tst_cflags}" \
2507                 && cf_fix_cppflags=no
2508         ;;
2509 esac
2510 done
2511
2512 if test -n "$cf_new_cflags" ; then
2513
2514         CFLAGS="$CFLAGS $cf_new_cflags"
2515 fi
2516
2517 if test -n "$cf_new_cppflags" ; then
2518
2519         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2520 fi
2521
2522 if test -n "$cf_new_extra_cppflags" ; then
2523
2524         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2525 fi
2526
2527         cat >conftest.$ac_ext <<_ACEOF
2528 #line 2528 "configure"
2529 #include "confdefs.h"
2530
2531 #ifndef CC_HAS_PROTOS
2532 #if !defined(__STDC__) || (__STDC__ != 1)
2533 choke me
2534 #endif
2535 #endif
2536
2537 int
2538 main ()
2539 {
2540
2541         int test (int i, double x);
2542         struct s1 {int (*f) (int a);};
2543         struct s2 {int (*f) (double a);};
2544   ;
2545   return 0;
2546 }
2547 _ACEOF
2548 rm -f conftest.$ac_objext
2549 if { (eval echo "$as_me:2549: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>&5
2551   ac_status=$?
2552   echo "$as_me:2552: \$? = $ac_status" >&5
2553   (exit $ac_status); } &&
2554          { ac_try='test -s conftest.$ac_objext'
2555   { (eval echo "$as_me:2555: \"$ac_try\"") >&5
2556   (eval $ac_try) 2>&5
2557   ac_status=$?
2558   echo "$as_me:2558: \$? = $ac_status" >&5
2559   (exit $ac_status); }; }; then
2560   cf_cv_ansi_cc="$cf_arg"; break
2561 else
2562   echo "$as_me: failed program was:" >&5
2563 cat conftest.$ac_ext >&5
2564 fi
2565 rm -f conftest.$ac_objext conftest.$ac_ext
2566 done
2567 CFLAGS="$cf_save_CFLAGS"
2568 CPPFLAGS="$cf_save_CPPFLAGS"
2569
2570 fi
2571 echo "$as_me:2571: result: $cf_cv_ansi_cc" >&5
2572 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2573
2574 if test "$cf_cv_ansi_cc" != "no"; then
2575 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2576
2577 cf_fix_cppflags=no
2578 cf_new_cflags=
2579 cf_new_cppflags=
2580 cf_new_extra_cppflags=
2581
2582 for cf_add_cflags in $cf_cv_ansi_cc
2583 do
2584 case $cf_fix_cppflags in
2585 no)
2586         case $cf_add_cflags in #(vi
2587         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2588                 case $cf_add_cflags in
2589                 -D*)
2590                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2591
2592                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2593                                 && test -z "${cf_tst_cflags}" \
2594                                 && cf_fix_cppflags=yes
2595
2596                         if test $cf_fix_cppflags = yes ; then
2597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598                                 continue
2599                         elif test "${cf_tst_cflags}" = "\"'" ; then
2600                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601                                 continue
2602                         fi
2603                         ;;
2604                 esac
2605                 case "$CPPFLAGS" in
2606                 *$cf_add_cflags) #(vi
2607                         ;;
2608                 *) #(vi
2609                         case $cf_add_cflags in #(vi
2610                         -D*)
2611                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2612
2613 CPPFLAGS=`echo "$CPPFLAGS" | \
2614         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2615                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2616
2617                                 ;;
2618                         esac
2619                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2620                         ;;
2621                 esac
2622                 ;;
2623         *)
2624                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2625                 ;;
2626         esac
2627         ;;
2628 yes)
2629         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2630
2631         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2632
2633         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2634                 && test -z "${cf_tst_cflags}" \
2635                 && cf_fix_cppflags=no
2636         ;;
2637 esac
2638 done
2639
2640 if test -n "$cf_new_cflags" ; then
2641
2642         CFLAGS="$CFLAGS $cf_new_cflags"
2643 fi
2644
2645 if test -n "$cf_new_cppflags" ; then
2646
2647         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2648 fi
2649
2650 if test -n "$cf_new_extra_cppflags" ; then
2651
2652         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2653 fi
2654
2655 else
2656         cat >>confdefs.h <<\EOF
2657 #define CC_HAS_PROTOS 1
2658 EOF
2659
2660 fi
2661 fi
2662
2663 if test "$cf_cv_ansi_cc" = "no"; then
2664         { { echo "$as_me:2664: error: Your compiler does not appear to recognize prototypes.
2665 You have the following choices:
2666         a. adjust your compiler options
2667         b. get an up-to-date compiler
2668         c. use a wrapper such as unproto" >&5
2669 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2670 You have the following choices:
2671         a. adjust your compiler options
2672         b. get an up-to-date compiler
2673         c. use a wrapper such as unproto" >&2;}
2674    { (exit 1); exit 1; }; }
2675 fi
2676
2677 case $cf_cv_system_name in
2678 os2*)
2679     CFLAGS="$CFLAGS -Zmt"
2680     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2681     CXXFLAGS="$CXXFLAGS -Zmt"
2682     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2683     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2684     ac_cv_exeext=.exe
2685     ;;
2686 esac
2687
2688 PROG_EXT="$EXEEXT"
2689
2690 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2691 #define PROG_EXT "$PROG_EXT"
2692 EOF
2693
2694 if test "$cross_compiling" = yes ; then
2695   LDCONFIG=:
2696 else
2697 case "$cf_cv_system_name" in #(vi
2698 dragonfly*|freebsd*) #(vi
2699   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2700   ;;
2701 *) LDPATH=$PATH:/sbin:/usr/sbin
2702   # Extract the first word of "ldconfig", so it can be a program name with args.
2703 set dummy ldconfig; ac_word=$2
2704 echo "$as_me:2704: checking for $ac_word" >&5
2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2706 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2707   echo $ECHO_N "(cached) $ECHO_C" >&6
2708 else
2709   case $LDCONFIG in
2710   [\\/]* | ?:[\\/]*)
2711   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2712   ;;
2713   *)
2714   ac_save_IFS=$IFS; IFS=$ac_path_separator
2715 ac_dummy="$LDPATH"
2716 for ac_dir in $ac_dummy; do
2717   IFS=$ac_save_IFS
2718   test -z "$ac_dir" && ac_dir=.
2719   if $as_executable_p "$ac_dir/$ac_word"; then
2720    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2721    echo "$as_me:2721: found $ac_dir/$ac_word" >&5
2722    break
2723 fi
2724 done
2725
2726   ;;
2727 esac
2728 fi
2729 LDCONFIG=$ac_cv_path_LDCONFIG
2730
2731 if test -n "$LDCONFIG"; then
2732   echo "$as_me:2732: result: $LDCONFIG" >&5
2733 echo "${ECHO_T}$LDCONFIG" >&6
2734 else
2735   echo "$as_me:2735: result: no" >&5
2736 echo "${ECHO_T}no" >&6
2737 fi
2738
2739   ;;
2740 esac
2741 fi
2742
2743 echo "$as_me:2743: checking if you want to ensure bool is consistent with C++" >&5
2744 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2745
2746 # Check whether --with-cxx or --without-cxx was given.
2747 if test "${with_cxx+set}" = set; then
2748   withval="$with_cxx"
2749   cf_with_cxx=$withval
2750 else
2751   cf_with_cxx=yes
2752 fi;
2753 echo "$as_me:2753: result: $cf_with_cxx" >&5
2754 echo "${ECHO_T}$cf_with_cxx" >&6
2755 if test "X$cf_with_cxx" = Xno ; then
2756         CXX=""
2757         GXX=""
2758 else
2759         # with autoconf 2.13, we can change the error to a warning:
2760                 ac_ext=cc
2761 ac_cpp='$CXXCPP $CPPFLAGS'
2762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2763 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2765 ac_main_return=return
2766 if test -n "$ac_tool_prefix"; then
2767   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2768   do
2769     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2770 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2771 echo "$as_me:2771: checking for $ac_word" >&5
2772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2773 if test "${ac_cv_prog_CXX+set}" = set; then
2774   echo $ECHO_N "(cached) $ECHO_C" >&6
2775 else
2776   if test -n "$CXX"; then
2777   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2778 else
2779   ac_save_IFS=$IFS; IFS=$ac_path_separator
2780 ac_dummy="$PATH"
2781 for ac_dir in $ac_dummy; do
2782   IFS=$ac_save_IFS
2783   test -z "$ac_dir" && ac_dir=.
2784   $as_executable_p "$ac_dir/$ac_word" || continue
2785 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2786 echo "$as_me:2786: found $ac_dir/$ac_word" >&5
2787 break
2788 done
2789
2790 fi
2791 fi
2792 CXX=$ac_cv_prog_CXX
2793 if test -n "$CXX"; then
2794   echo "$as_me:2794: result: $CXX" >&5
2795 echo "${ECHO_T}$CXX" >&6
2796 else
2797   echo "$as_me:2797: result: no" >&5
2798 echo "${ECHO_T}no" >&6
2799 fi
2800
2801     test -n "$CXX" && break
2802   done
2803 fi
2804 if test -z "$CXX"; then
2805   ac_ct_CXX=$CXX
2806   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2807 do
2808   # Extract the first word of "$ac_prog", so it can be a program name with args.
2809 set dummy $ac_prog; ac_word=$2
2810 echo "$as_me:2810: checking for $ac_word" >&5
2811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2812 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2813   echo $ECHO_N "(cached) $ECHO_C" >&6
2814 else
2815   if test -n "$ac_ct_CXX"; then
2816   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2817 else
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$PATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   $as_executable_p "$ac_dir/$ac_word" || continue
2824 ac_cv_prog_ac_ct_CXX="$ac_prog"
2825 echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826 break
2827 done
2828
2829 fi
2830 fi
2831 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2832 if test -n "$ac_ct_CXX"; then
2833   echo "$as_me:2833: result: $ac_ct_CXX" >&5
2834 echo "${ECHO_T}$ac_ct_CXX" >&6
2835 else
2836   echo "$as_me:2836: result: no" >&5
2837 echo "${ECHO_T}no" >&6
2838 fi
2839
2840   test -n "$ac_ct_CXX" && break
2841 done
2842 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2843
2844   CXX=$ac_ct_CXX
2845 fi
2846
2847 # Provide some information about the compiler.
2848 echo "$as_me:2848:" \
2849      "checking for C++ compiler version" >&5
2850 ac_compiler=`set X $ac_compile; echo $2`
2851 { (eval echo "$as_me:2851: \"$ac_compiler --version </dev/null >&5\"") >&5
2852   (eval $ac_compiler --version </dev/null >&5) 2>&5
2853   ac_status=$?
2854   echo "$as_me:2854: \$? = $ac_status" >&5
2855   (exit $ac_status); }
2856 { (eval echo "$as_me:2856: \"$ac_compiler -v </dev/null >&5\"") >&5
2857   (eval $ac_compiler -v </dev/null >&5) 2>&5
2858   ac_status=$?
2859   echo "$as_me:2859: \$? = $ac_status" >&5
2860   (exit $ac_status); }
2861 { (eval echo "$as_me:2861: \"$ac_compiler -V </dev/null >&5\"") >&5
2862   (eval $ac_compiler -V </dev/null >&5) 2>&5
2863   ac_status=$?
2864   echo "$as_me:2864: \$? = $ac_status" >&5
2865   (exit $ac_status); }
2866
2867 echo "$as_me:2867: checking whether we are using the GNU C++ compiler" >&5
2868 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2869 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875
2876 int
2877 main ()
2878 {
2879 #ifndef __GNUC__
2880        choke me
2881 #endif
2882
2883   ;
2884   return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (eval echo "$as_me:2888: \"$ac_compile\"") >&5
2889   (eval $ac_compile) 2>&5
2890   ac_status=$?
2891   echo "$as_me:2891: \$? = $ac_status" >&5
2892   (exit $ac_status); } &&
2893          { ac_try='test -s conftest.$ac_objext'
2894   { (eval echo "$as_me:2894: \"$ac_try\"") >&5
2895   (eval $ac_try) 2>&5
2896   ac_status=$?
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit $ac_status); }; }; then
2899   ac_compiler_gnu=yes
2900 else
2901   echo "$as_me: failed program was:" >&5
2902 cat conftest.$ac_ext >&5
2903 ac_compiler_gnu=no
2904 fi
2905 rm -f conftest.$ac_objext conftest.$ac_ext
2906 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2907
2908 fi
2909 echo "$as_me:2909: result: $ac_cv_cxx_compiler_gnu" >&5
2910 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2911 GXX=`test $ac_compiler_gnu = yes && echo yes`
2912 ac_test_CXXFLAGS=${CXXFLAGS+set}
2913 ac_save_CXXFLAGS=$CXXFLAGS
2914 CXXFLAGS="-g"
2915 echo "$as_me:2915: checking whether $CXX accepts -g" >&5
2916 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2917 if test "${ac_cv_prog_cxx_g+set}" = set; then
2918   echo $ECHO_N "(cached) $ECHO_C" >&6
2919 else
2920   cat >conftest.$ac_ext <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923
2924 int
2925 main ()
2926 {
2927
2928   ;
2929   return 0;
2930 }
2931 _ACEOF
2932 rm -f conftest.$ac_objext
2933 if { (eval echo "$as_me:2933: \"$ac_compile\"") >&5
2934   (eval $ac_compile) 2>&5
2935   ac_status=$?
2936   echo "$as_me:2936: \$? = $ac_status" >&5
2937   (exit $ac_status); } &&
2938          { ac_try='test -s conftest.$ac_objext'
2939   { (eval echo "$as_me:2939: \"$ac_try\"") >&5
2940   (eval $ac_try) 2>&5
2941   ac_status=$?
2942   echo "$as_me:2942: \$? = $ac_status" >&5
2943   (exit $ac_status); }; }; then
2944   ac_cv_prog_cxx_g=yes
2945 else
2946   echo "$as_me: failed program was:" >&5
2947 cat conftest.$ac_ext >&5
2948 ac_cv_prog_cxx_g=no
2949 fi
2950 rm -f conftest.$ac_objext conftest.$ac_ext
2951 fi
2952 echo "$as_me:2952: result: $ac_cv_prog_cxx_g" >&5
2953 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2954 if test "$ac_test_CXXFLAGS" = set; then
2955   CXXFLAGS=$ac_save_CXXFLAGS
2956 elif test $ac_cv_prog_cxx_g = yes; then
2957   if test "$GXX" = yes; then
2958     CXXFLAGS="-g -O2"
2959   else
2960     CXXFLAGS="-g"
2961   fi
2962 else
2963   if test "$GXX" = yes; then
2964     CXXFLAGS="-O2"
2965   else
2966     CXXFLAGS=
2967   fi
2968 fi
2969 for ac_declaration in \
2970    ''\
2971    '#include <stdlib.h>' \
2972    'extern "C" void std::exit (int) throw (); using std::exit;' \
2973    'extern "C" void std::exit (int); using std::exit;' \
2974    'extern "C" void exit (int) throw ();' \
2975    'extern "C" void exit (int);' \
2976    'void exit (int);'
2977 do
2978   cat >conftest.$ac_ext <<_ACEOF
2979 #line 2979 "configure"
2980 #include "confdefs.h"
2981 #include <stdlib.h>
2982 $ac_declaration
2983 int
2984 main ()
2985 {
2986 exit (42);
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   :
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 continue
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010   cat >conftest.$ac_ext <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 $ac_declaration
3014 int
3015 main ()
3016 {
3017 exit (42);
3018   ;
3019   return 0;
3020 }
3021 _ACEOF
3022 rm -f conftest.$ac_objext
3023 if { (eval echo "$as_me:3023: \"$ac_compile\"") >&5
3024   (eval $ac_compile) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); } &&
3028          { ac_try='test -s conftest.$ac_objext'
3029   { (eval echo "$as_me:3029: \"$ac_try\"") >&5
3030   (eval $ac_try) 2>&5
3031   ac_status=$?
3032   echo "$as_me:3032: \$? = $ac_status" >&5
3033   (exit $ac_status); }; }; then
3034   break
3035 else
3036   echo "$as_me: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
3038 fi
3039 rm -f conftest.$ac_objext conftest.$ac_ext
3040 done
3041 rm -f conftest*
3042 if test -n "$ac_declaration"; then
3043   echo '#ifdef __cplusplus' >>confdefs.h
3044   echo $ac_declaration      >>confdefs.h
3045   echo '#endif'             >>confdefs.h
3046 fi
3047
3048 ac_ext=c
3049 ac_cpp='$CPP $CPPFLAGS'
3050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3053 ac_main_return=return
3054
3055                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3056         if test "$CXX" = "g++" ; then
3057                 # Extract the first word of "g++", so it can be a program name with args.
3058 set dummy g++; ac_word=$2
3059 echo "$as_me:3059: checking for $ac_word" >&5
3060 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3061 if test "${ac_cv_path_CXX+set}" = set; then
3062   echo $ECHO_N "(cached) $ECHO_C" >&6
3063 else
3064   case $CXX in
3065   [\\/]* | ?:[\\/]*)
3066   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3067   ;;
3068   *)
3069   ac_save_IFS=$IFS; IFS=$ac_path_separator
3070 ac_dummy="$PATH"
3071 for ac_dir in $ac_dummy; do
3072   IFS=$ac_save_IFS
3073   test -z "$ac_dir" && ac_dir=.
3074   if $as_executable_p "$ac_dir/$ac_word"; then
3075    ac_cv_path_CXX="$ac_dir/$ac_word"
3076    echo "$as_me:3076: found $ac_dir/$ac_word" >&5
3077    break
3078 fi
3079 done
3080
3081   ;;
3082 esac
3083 fi
3084 CXX=$ac_cv_path_CXX
3085
3086 if test -n "$CXX"; then
3087   echo "$as_me:3087: result: $CXX" >&5
3088 echo "${ECHO_T}$CXX" >&6
3089 else
3090   echo "$as_me:3090: result: no" >&5
3091 echo "${ECHO_T}no" >&6
3092 fi
3093
3094         fi
3095         if test "$CXX" = "g++" ; then
3096                 { echo "$as_me:3096: WARNING: ignoring hardcoded g++" >&5
3097 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3098                 cf_with_cxx=no; CXX=""; GXX="";
3099         fi
3100 fi
3101
3102 GXX_VERSION=none
3103 if test "$GXX" = yes; then
3104         echo "$as_me:3104: checking version of g++" >&5
3105 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3106         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3107         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3108         echo "$as_me:3108: result: $GXX_VERSION" >&5
3109 echo "${ECHO_T}$GXX_VERSION" >&6
3110 fi
3111
3112 case $GXX_VERSION in
3113 1*|2.[0-6]*)
3114         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3115         # cf_cxx_library=no
3116         { echo "$as_me:3116: WARNING: templates do not work" >&5
3117 echo "$as_me: WARNING: templates do not work" >&2;}
3118         ;;
3119 esac
3120
3121 echo "$as_me:3121: checking if you want to build C++ binding and demo" >&5
3122 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3123
3124 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3125 if test "${with_cxx_binding+set}" = set; then
3126   withval="$with_cxx_binding"
3127   cf_with_cxx_binding=$withval
3128 else
3129   cf_with_cxx_binding=$cf_with_cxx
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_cxx_binding" >&5
3132 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3133
3134 echo "$as_me:3134: checking if you want to build with Ada95" >&5
3135 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3136
3137 # Check whether --with-ada or --without-ada was given.
3138 if test "${with_ada+set}" = set; then
3139   withval="$with_ada"
3140   cf_with_ada=$withval
3141 else
3142   cf_with_ada=yes
3143 fi;
3144 echo "$as_me:3144: result: $cf_with_ada" >&5
3145 echo "${ECHO_T}$cf_with_ada" >&6
3146
3147 echo "$as_me:3147: checking if you want to install manpages" >&5
3148 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3149
3150 # Check whether --with-manpages or --without-manpages was given.
3151 if test "${with_manpages+set}" = set; then
3152   withval="$with_manpages"
3153   cf_with_manpages=$withval
3154 else
3155   cf_with_manpages=yes
3156 fi;
3157 echo "$as_me:3157: result: $cf_with_manpages" >&5
3158 echo "${ECHO_T}$cf_with_manpages" >&6
3159
3160 echo "$as_me:3160: checking if you want to build programs such as tic" >&5
3161 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3162
3163 # Check whether --with-progs or --without-progs was given.
3164 if test "${with_progs+set}" = set; then
3165   withval="$with_progs"
3166   cf_with_progs=$withval
3167 else
3168   cf_with_progs=yes
3169 fi;
3170 echo "$as_me:3170: result: $cf_with_progs" >&5
3171 echo "${ECHO_T}$cf_with_progs" >&6
3172
3173 echo "$as_me:3173: checking if you wish to install curses.h" >&5
3174 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3175
3176 # Check whether --with-curses-h or --without-curses-h was given.
3177 if test "${with_curses_h+set}" = set; then
3178   withval="$with_curses_h"
3179   with_curses_h=$withval
3180 else
3181   with_curses_h=yes
3182 fi;
3183 echo "$as_me:3183: result: $with_curses_h" >&5
3184 echo "${ECHO_T}$with_curses_h" >&6
3185
3186 modules_to_build="ncurses"
3187 if test "X$cf_with_progs" != Xno ; then
3188 modules_to_build="$modules_to_build progs tack"
3189 fi
3190 modules_to_build="$modules_to_build panel menu form"
3191
3192 test "$program_prefix" != NONE &&
3193   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3194 # Use a double $ so make ignores it.
3195 test "$program_suffix" != NONE &&
3196   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3197 # Double any \ or $.  echo might interpret backslashes.
3198 # By default was `s,x,x', remove it if useless.
3199 cat <<\_ACEOF >conftest.sed
3200 s/[\\$]/&&/g;s/;s,x,x,$//
3201 _ACEOF
3202 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3203 rm conftest.sed
3204
3205 for ac_prog in mawk gawk nawk awk
3206 do
3207   # Extract the first word of "$ac_prog", so it can be a program name with args.
3208 set dummy $ac_prog; ac_word=$2
3209 echo "$as_me:3209: checking for $ac_word" >&5
3210 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3211 if test "${ac_cv_prog_AWK+set}" = set; then
3212   echo $ECHO_N "(cached) $ECHO_C" >&6
3213 else
3214   if test -n "$AWK"; then
3215   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3216 else
3217   ac_save_IFS=$IFS; IFS=$ac_path_separator
3218 ac_dummy="$PATH"
3219 for ac_dir in $ac_dummy; do
3220   IFS=$ac_save_IFS
3221   test -z "$ac_dir" && ac_dir=.
3222   $as_executable_p "$ac_dir/$ac_word" || continue
3223 ac_cv_prog_AWK="$ac_prog"
3224 echo "$as_me:3224: found $ac_dir/$ac_word" >&5
3225 break
3226 done
3227
3228 fi
3229 fi
3230 AWK=$ac_cv_prog_AWK
3231 if test -n "$AWK"; then
3232   echo "$as_me:3232: result: $AWK" >&5
3233 echo "${ECHO_T}$AWK" >&6
3234 else
3235   echo "$as_me:3235: result: no" >&5
3236 echo "${ECHO_T}no" >&6
3237 fi
3238
3239   test -n "$AWK" && break
3240 done
3241
3242 test -z "$AWK" && { { echo "$as_me:3242: error: No awk program found" >&5
3243 echo "$as_me: error: No awk program found" >&2;}
3244    { (exit 1); exit 1; }; }
3245
3246 echo "$as_me:3246: checking for egrep" >&5
3247 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3248 if test "${ac_cv_prog_egrep+set}" = set; then
3249   echo $ECHO_N "(cached) $ECHO_C" >&6
3250 else
3251   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3252     then ac_cv_prog_egrep='grep -E'
3253     else ac_cv_prog_egrep='egrep'
3254     fi
3255 fi
3256 echo "$as_me:3256: result: $ac_cv_prog_egrep" >&5
3257 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3258  EGREP=$ac_cv_prog_egrep
3259
3260 test -z "$EGREP" && { { echo "$as_me:3260: error: No egrep program found" >&5
3261 echo "$as_me: error: No egrep program found" >&2;}
3262    { (exit 1); exit 1; }; }
3263
3264 # Find a good install program.  We prefer a C program (faster),
3265 # so one script is as good as another.  But avoid the broken or
3266 # incompatible versions:
3267 # SysV /etc/install, /usr/sbin/install
3268 # SunOS /usr/etc/install
3269 # IRIX /sbin/install
3270 # AIX /bin/install
3271 # AmigaOS /C/install, which installs bootblocks on floppy discs
3272 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3273 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3274 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3275 # ./install, which can be erroneously created by make from ./install.sh.
3276 echo "$as_me:3276: checking for a BSD compatible install" >&5
3277 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3278 if test -z "$INSTALL"; then
3279 if test "${ac_cv_path_install+set}" = set; then
3280   echo $ECHO_N "(cached) $ECHO_C" >&6
3281 else
3282     ac_save_IFS=$IFS; IFS=$ac_path_separator
3283   for ac_dir in $PATH; do
3284     IFS=$ac_save_IFS
3285     # Account for people who put trailing slashes in PATH elements.
3286     case $ac_dir/ in
3287     / | ./ | .// | /cC/* \
3288     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3289     | /usr/ucb/* ) ;;
3290     *)
3291       # OSF1 and SCO ODT 3.0 have their own names for install.
3292       # Don't use installbsd from OSF since it installs stuff as root
3293       # by default.
3294       for ac_prog in ginstall scoinst install; do
3295         if $as_executable_p "$ac_dir/$ac_prog"; then
3296           if test $ac_prog = install &&
3297             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # AIX install.  It has an incompatible calling convention.
3299             :
3300           elif test $ac_prog = install &&
3301             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3302             # program-specific install script used by HP pwplus--don't use.
3303             :
3304           else
3305             ac_cv_path_install="$ac_dir/$ac_prog -c"
3306             break 2
3307           fi
3308         fi
3309       done
3310       ;;
3311     esac
3312   done
3313
3314 fi
3315   if test "${ac_cv_path_install+set}" = set; then
3316     INSTALL=$ac_cv_path_install
3317   else
3318     # As a last resort, use the slow shell script.  We don't cache a
3319     # path for INSTALL within a source directory, because that will
3320     # break other packages using the cache if that directory is
3321     # removed, or if the path is relative.
3322     INSTALL=$ac_install_sh
3323   fi
3324 fi
3325 echo "$as_me:3325: result: $INSTALL" >&5
3326 echo "${ECHO_T}$INSTALL" >&6
3327
3328 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3329 # It thinks the first close brace ends the variable substitution.
3330 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3331
3332 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3333
3334 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3335
3336 case $INSTALL in
3337 /*)
3338   ;;
3339 *)
3340   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3341   test -z "$cf_dir" && cf_dir=.
3342   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3343   ;;
3344 esac
3345
3346 for ac_prog in tdlint lint alint splint lclint
3347 do
3348   # Extract the first word of "$ac_prog", so it can be a program name with args.
3349 set dummy $ac_prog; ac_word=$2
3350 echo "$as_me:3350: checking for $ac_word" >&5
3351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3352 if test "${ac_cv_prog_LINT+set}" = set; then
3353   echo $ECHO_N "(cached) $ECHO_C" >&6
3354 else
3355   if test -n "$LINT"; then
3356   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3357 else
3358   ac_save_IFS=$IFS; IFS=$ac_path_separator
3359 ac_dummy="$PATH"
3360 for ac_dir in $ac_dummy; do
3361   IFS=$ac_save_IFS
3362   test -z "$ac_dir" && ac_dir=.
3363   $as_executable_p "$ac_dir/$ac_word" || continue
3364 ac_cv_prog_LINT="$ac_prog"
3365 echo "$as_me:3365: found $ac_dir/$ac_word" >&5
3366 break
3367 done
3368
3369 fi
3370 fi
3371 LINT=$ac_cv_prog_LINT
3372 if test -n "$LINT"; then
3373   echo "$as_me:3373: result: $LINT" >&5
3374 echo "${ECHO_T}$LINT" >&6
3375 else
3376   echo "$as_me:3376: result: no" >&5
3377 echo "${ECHO_T}no" >&6
3378 fi
3379
3380   test -n "$LINT" && break
3381 done
3382
3383 echo "$as_me:3383: checking whether ln -s works" >&5
3384 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3385 LN_S=$as_ln_s
3386 if test "$LN_S" = "ln -s"; then
3387   echo "$as_me:3387: result: yes" >&5
3388 echo "${ECHO_T}yes" >&6
3389 else
3390   echo "$as_me:3390: result: no, using $LN_S" >&5
3391 echo "${ECHO_T}no, using $LN_S" >&6
3392 fi
3393
3394 echo "$as_me:3394: checking for long file names" >&5
3395 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3396 if test "${ac_cv_sys_long_file_names+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   ac_cv_sys_long_file_names=yes
3400 # Test for long file names in all the places we know might matter:
3401 #      .                the current directory, where building will happen
3402 #      $prefix/lib      where we will be installing things
3403 #      $exec_prefix/lib likewise
3404 # eval it to expand exec_prefix.
3405 #      $TMPDIR          if set, where it might want to write temporary files
3406 # if $TMPDIR is not set:
3407 #      /tmp             where it might want to write temporary files
3408 #      /var/tmp         likewise
3409 #      /usr/tmp         likewise
3410 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3411   ac_tmpdirs=$TMPDIR
3412 else
3413   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3414 fi
3415 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3416   test -d $ac_dir || continue
3417   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3418   ac_xdir=$ac_dir/cf$$
3419   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3420   ac_tf1=$ac_xdir/conftest9012345
3421   ac_tf2=$ac_xdir/conftest9012346
3422   (echo 1 >$ac_tf1) 2>/dev/null
3423   (echo 2 >$ac_tf2) 2>/dev/null
3424   ac_val=`cat $ac_tf1 2>/dev/null`
3425   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3426     ac_cv_sys_long_file_names=no
3427     rm -rf $ac_xdir 2>/dev/null
3428     break
3429   fi
3430   rm -rf $ac_xdir 2>/dev/null
3431 done
3432 fi
3433 echo "$as_me:3433: result: $ac_cv_sys_long_file_names" >&5
3434 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3435 if test $ac_cv_sys_long_file_names = yes; then
3436
3437 cat >>confdefs.h <<\EOF
3438 #define HAVE_LONG_FILE_NAMES 1
3439 EOF
3440
3441 fi
3442
3443 # if we find pkg-config, check if we should install the ".pc" files.
3444
3445 echo "$as_me:3445: checking if you want to use pkg-config" >&5
3446 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3447
3448 # Check whether --with-pkg-config or --without-pkg-config was given.
3449 if test "${with_pkg_config+set}" = set; then
3450   withval="$with_pkg_config"
3451   cf_pkg_config=$withval
3452 else
3453   cf_pkg_config=yes
3454 fi;
3455 echo "$as_me:3455: result: $cf_pkg_config" >&5
3456 echo "${ECHO_T}$cf_pkg_config" >&6
3457
3458 case $cf_pkg_config in #(vi
3459 no) #(vi
3460         PKG_CONFIG=none
3461         ;;
3462 yes) #(vi
3463         # Extract the first word of "pkg-config", so it can be a program name with args.
3464 set dummy pkg-config; ac_word=$2
3465 echo "$as_me:3465: checking for $ac_word" >&5
3466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3467 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470   case $PKG_CONFIG in
3471   [\\/]* | ?:[\\/]*)
3472   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3473   ;;
3474   *)
3475   ac_save_IFS=$IFS; IFS=$ac_path_separator
3476 ac_dummy="$PATH"
3477 for ac_dir in $ac_dummy; do
3478   IFS=$ac_save_IFS
3479   test -z "$ac_dir" && ac_dir=.
3480   if $as_executable_p "$ac_dir/$ac_word"; then
3481    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3482    echo "$as_me:3482: found $ac_dir/$ac_word" >&5
3483    break
3484 fi
3485 done
3486
3487   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3488   ;;
3489 esac
3490 fi
3491 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3492
3493 if test -n "$PKG_CONFIG"; then
3494   echo "$as_me:3494: result: $PKG_CONFIG" >&5
3495 echo "${ECHO_T}$PKG_CONFIG" >&6
3496 else
3497   echo "$as_me:3497: result: no" >&5
3498 echo "${ECHO_T}no" >&6
3499 fi
3500
3501         ;;
3502 *)
3503         PKG_CONFIG=$withval
3504         ;;
3505 esac
3506
3507 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3508 if test "$PKG_CONFIG" != none ; then
3509
3510 if test "x$prefix" != xNONE; then
3511   cf_path_syntax="$prefix"
3512 else
3513   cf_path_syntax="$ac_default_prefix"
3514 fi
3515
3516 case ".$PKG_CONFIG" in #(vi
3517 .\$\(*\)*|.\'*\'*) #(vi
3518   ;;
3519 ..|./*|.\\*) #(vi
3520   ;;
3521 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3522   ;;
3523 .\${*prefix}*) #(vi
3524   eval PKG_CONFIG="$PKG_CONFIG"
3525   case ".$PKG_CONFIG" in #(vi
3526   .NONE/*)
3527     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3528     ;;
3529   esac
3530   ;; #(vi
3531 .no|.NONE/*)
3532   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3533   ;;
3534 *)
3535   { { echo "$as_me:3535: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3536 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3537    { (exit 1); exit 1; }; }
3538   ;;
3539 esac
3540
3541 fi
3542
3543 if test "$PKG_CONFIG" != no ; then
3544         echo "$as_me:3544: checking if we should install .pc files for $PKG_CONFIG" >&5
3545 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3546
3547         # Leave this as something that can be overridden in the environment.
3548         if test -z "$PKG_CONFIG_LIBDIR" ; then
3549                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3550         fi
3551         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3552         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3553
3554 # Check whether --enable-pc-files or --disable-pc-files was given.
3555 if test "${enable_pc_files+set}" = set; then
3556   enableval="$enable_pc_files"
3557   enable_pc_files=$enableval
3558 else
3559   enable_pc_files=no
3560 fi;
3561                 echo "$as_me:3561: result: $enable_pc_files" >&5
3562 echo "${ECHO_T}$enable_pc_files" >&6
3563         else
3564                 echo "$as_me:3564: result: no" >&5
3565 echo "${ECHO_T}no" >&6
3566                 { echo "$as_me:3566: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3567 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3568                 enable_pc_files=no
3569         fi
3570 fi
3571
3572 echo "$as_me:3572: checking if we should assume mixed-case filenames" >&5
3573 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3574
3575 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3576 if test "${enable_mixed_case+set}" = set; then
3577   enableval="$enable_mixed_case"
3578   enable_mixedcase=$enableval
3579 else
3580   enable_mixedcase=auto
3581 fi;
3582 echo "$as_me:3582: result: $enable_mixedcase" >&5
3583 echo "${ECHO_T}$enable_mixedcase" >&6
3584 if test "$enable_mixedcase" = "auto" ; then
3585
3586 echo "$as_me:3586: checking if filesystem supports mixed-case filenames" >&5
3587 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3588 if test "${cf_cv_mixedcase+set}" = set; then
3589   echo $ECHO_N "(cached) $ECHO_C" >&6
3590 else
3591
3592 if test "$cross_compiling" = yes ; then
3593         case $target_alias in #(vi
3594         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3595                 cf_cv_mixedcase=no
3596                 ;;
3597         *)
3598                 cf_cv_mixedcase=yes
3599                 ;;
3600         esac
3601 else
3602         rm -f conftest CONFTEST
3603         echo test >conftest
3604         if test -f CONFTEST ; then
3605                 cf_cv_mixedcase=no
3606         else
3607                 cf_cv_mixedcase=yes
3608         fi
3609         rm -f conftest CONFTEST
3610 fi
3611
3612 fi
3613 echo "$as_me:3613: result: $cf_cv_mixedcase" >&5
3614 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3615 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3616 #define MIXEDCASE_FILENAMES 1
3617 EOF
3618
3619 else
3620     cf_cv_mixedcase=$enable_mixedcase
3621     if test "$enable_mixedcase" = "yes" ; then
3622         cat >>confdefs.h <<\EOF
3623 #define MIXEDCASE_FILENAMES 1
3624 EOF
3625
3626     fi
3627 fi
3628
3629 # do this after mixed-case option (tags/TAGS is not as important as tic).
3630 echo "$as_me:3630: checking whether ${MAKE-make} sets \${MAKE}" >&5
3631 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3632 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3633 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   cat >conftest.make <<\EOF
3637 all:
3638         @echo 'ac_maketemp="${MAKE}"'
3639 EOF
3640 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3641 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3642 if test -n "$ac_maketemp"; then
3643   eval ac_cv_prog_make_${ac_make}_set=yes
3644 else
3645   eval ac_cv_prog_make_${ac_make}_set=no
3646 fi
3647 rm -f conftest.make
3648 fi
3649 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3650   echo "$as_me:3650: result: yes" >&5
3651 echo "${ECHO_T}yes" >&6
3652   SET_MAKE=
3653 else
3654   echo "$as_me:3654: result: no" >&5
3655 echo "${ECHO_T}no" >&6
3656   SET_MAKE="MAKE=${MAKE-make}"
3657 fi
3658
3659 for ac_prog in exctags ctags
3660 do
3661   # Extract the first word of "$ac_prog", so it can be a program name with args.
3662 set dummy $ac_prog; ac_word=$2
3663 echo "$as_me:3663: checking for $ac_word" >&5
3664 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3665 if test "${ac_cv_prog_CTAGS+set}" = set; then
3666   echo $ECHO_N "(cached) $ECHO_C" >&6
3667 else
3668   if test -n "$CTAGS"; then
3669   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3670 else
3671   ac_save_IFS=$IFS; IFS=$ac_path_separator
3672 ac_dummy="$PATH"
3673 for ac_dir in $ac_dummy; do
3674   IFS=$ac_save_IFS
3675   test -z "$ac_dir" && ac_dir=.
3676   $as_executable_p "$ac_dir/$ac_word" || continue
3677 ac_cv_prog_CTAGS="$ac_prog"
3678 echo "$as_me:3678: found $ac_dir/$ac_word" >&5
3679 break
3680 done
3681
3682 fi
3683 fi
3684 CTAGS=$ac_cv_prog_CTAGS
3685 if test -n "$CTAGS"; then
3686   echo "$as_me:3686: result: $CTAGS" >&5
3687 echo "${ECHO_T}$CTAGS" >&6
3688 else
3689   echo "$as_me:3689: result: no" >&5
3690 echo "${ECHO_T}no" >&6
3691 fi
3692
3693   test -n "$CTAGS" && break
3694 done
3695
3696 for ac_prog in exetags etags
3697 do
3698   # Extract the first word of "$ac_prog", so it can be a program name with args.
3699 set dummy $ac_prog; ac_word=$2
3700 echo "$as_me:3700: checking for $ac_word" >&5
3701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3702 if test "${ac_cv_prog_ETAGS+set}" = set; then
3703   echo $ECHO_N "(cached) $ECHO_C" >&6
3704 else
3705   if test -n "$ETAGS"; then
3706   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3707 else
3708   ac_save_IFS=$IFS; IFS=$ac_path_separator
3709 ac_dummy="$PATH"
3710 for ac_dir in $ac_dummy; do
3711   IFS=$ac_save_IFS
3712   test -z "$ac_dir" && ac_dir=.
3713   $as_executable_p "$ac_dir/$ac_word" || continue
3714 ac_cv_prog_ETAGS="$ac_prog"
3715 echo "$as_me:3715: found $ac_dir/$ac_word" >&5
3716 break
3717 done
3718
3719 fi
3720 fi
3721 ETAGS=$ac_cv_prog_ETAGS
3722 if test -n "$ETAGS"; then
3723   echo "$as_me:3723: result: $ETAGS" >&5
3724 echo "${ECHO_T}$ETAGS" >&6
3725 else
3726   echo "$as_me:3726: result: no" >&5
3727 echo "${ECHO_T}no" >&6
3728 fi
3729
3730   test -n "$ETAGS" && break
3731 done
3732
3733 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3734 set dummy ${CTAGS-ctags}; ac_word=$2
3735 echo "$as_me:3735: checking for $ac_word" >&5
3736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3737 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3738   echo $ECHO_N "(cached) $ECHO_C" >&6
3739 else
3740   if test -n "$MAKE_LOWER_TAGS"; then
3741   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3742 else
3743   ac_save_IFS=$IFS; IFS=$ac_path_separator
3744 ac_dummy="$PATH"
3745 for ac_dir in $ac_dummy; do
3746   IFS=$ac_save_IFS
3747   test -z "$ac_dir" && ac_dir=.
3748   $as_executable_p "$ac_dir/$ac_word" || continue
3749 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3750 echo "$as_me:3750: found $ac_dir/$ac_word" >&5
3751 break
3752 done
3753
3754   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3755 fi
3756 fi
3757 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3758 if test -n "$MAKE_LOWER_TAGS"; then
3759   echo "$as_me:3759: result: $MAKE_LOWER_TAGS" >&5
3760 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3761 else
3762   echo "$as_me:3762: result: no" >&5
3763 echo "${ECHO_T}no" >&6
3764 fi
3765
3766 if test "$cf_cv_mixedcase" = yes ; then
3767         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3768 set dummy ${ETAGS-etags}; ac_word=$2
3769 echo "$as_me:3769: checking for $ac_word" >&5
3770 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3771 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3772   echo $ECHO_N "(cached) $ECHO_C" >&6
3773 else
3774   if test -n "$MAKE_UPPER_TAGS"; then
3775   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3776 else
3777   ac_save_IFS=$IFS; IFS=$ac_path_separator
3778 ac_dummy="$PATH"
3779 for ac_dir in $ac_dummy; do
3780   IFS=$ac_save_IFS
3781   test -z "$ac_dir" && ac_dir=.
3782   $as_executable_p "$ac_dir/$ac_word" || continue
3783 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3784 echo "$as_me:3784: found $ac_dir/$ac_word" >&5
3785 break
3786 done
3787
3788   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3789 fi
3790 fi
3791 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3792 if test -n "$MAKE_UPPER_TAGS"; then
3793   echo "$as_me:3793: result: $MAKE_UPPER_TAGS" >&5
3794 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3795 else
3796   echo "$as_me:3796: result: no" >&5
3797 echo "${ECHO_T}no" >&6
3798 fi
3799
3800 else
3801         MAKE_UPPER_TAGS=no
3802 fi
3803
3804 if test "$MAKE_UPPER_TAGS" = yes ; then
3805         MAKE_UPPER_TAGS=
3806 else
3807         MAKE_UPPER_TAGS="#"
3808 fi
3809
3810 if test "$MAKE_LOWER_TAGS" = yes ; then
3811         MAKE_LOWER_TAGS=
3812 else
3813         MAKE_LOWER_TAGS="#"
3814 fi
3815
3816 echo "$as_me:3816: checking for makeflags variable" >&5
3817 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3818 if test "${cf_cv_makeflags+set}" = set; then
3819   echo $ECHO_N "(cached) $ECHO_C" >&6
3820 else
3821
3822         cf_cv_makeflags=''
3823         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3824         do
3825                 cat >cf_makeflags.tmp <<CF_EOF
3826 SHELL = /bin/sh
3827 all :
3828         @ echo '.$cf_option'
3829 CF_EOF
3830                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3831                 case "$cf_result" in
3832                 .*k)
3833                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3834                         case "$cf_result" in
3835                         .*CC=*) cf_cv_makeflags=
3836                                 ;;
3837                         *)      cf_cv_makeflags=$cf_option
3838                                 ;;
3839                         esac
3840                         break
3841                         ;;
3842                 .-)     ;;
3843                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3844                         ;;
3845                 esac
3846         done
3847         rm -f cf_makeflags.tmp
3848
3849 fi
3850 echo "$as_me:3850: result: $cf_cv_makeflags" >&5
3851 echo "${ECHO_T}$cf_cv_makeflags" >&6
3852
3853 if test -n "$ac_tool_prefix"; then
3854   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3855 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3856 echo "$as_me:3856: checking for $ac_word" >&5
3857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3858 if test "${ac_cv_prog_RANLIB+set}" = set; then
3859   echo $ECHO_N "(cached) $ECHO_C" >&6
3860 else
3861   if test -n "$RANLIB"; then
3862   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3863 else
3864   ac_save_IFS=$IFS; IFS=$ac_path_separator
3865 ac_dummy="$PATH"
3866 for ac_dir in $ac_dummy; do
3867   IFS=$ac_save_IFS
3868   test -z "$ac_dir" && ac_dir=.
3869   $as_executable_p "$ac_dir/$ac_word" || continue
3870 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3871 echo "$as_me:3871: found $ac_dir/$ac_word" >&5
3872 break
3873 done
3874
3875 fi
3876 fi
3877 RANLIB=$ac_cv_prog_RANLIB
3878 if test -n "$RANLIB"; then
3879   echo "$as_me:3879: result: $RANLIB" >&5
3880 echo "${ECHO_T}$RANLIB" >&6
3881 else
3882   echo "$as_me:3882: result: no" >&5
3883 echo "${ECHO_T}no" >&6
3884 fi
3885
3886 fi
3887 if test -z "$ac_cv_prog_RANLIB"; then
3888   ac_ct_RANLIB=$RANLIB
3889   # Extract the first word of "ranlib", so it can be a program name with args.
3890 set dummy ranlib; ac_word=$2
3891 echo "$as_me:3891: checking for $ac_word" >&5
3892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3893 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3894   echo $ECHO_N "(cached) $ECHO_C" >&6
3895 else
3896   if test -n "$ac_ct_RANLIB"; then
3897   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3898 else
3899   ac_save_IFS=$IFS; IFS=$ac_path_separator
3900 ac_dummy="$PATH"
3901 for ac_dir in $ac_dummy; do
3902   IFS=$ac_save_IFS
3903   test -z "$ac_dir" && ac_dir=.
3904   $as_executable_p "$ac_dir/$ac_word" || continue
3905 ac_cv_prog_ac_ct_RANLIB="ranlib"
3906 echo "$as_me:3906: found $ac_dir/$ac_word" >&5
3907 break
3908 done
3909
3910   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3911 fi
3912 fi
3913 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3914 if test -n "$ac_ct_RANLIB"; then
3915   echo "$as_me:3915: result: $ac_ct_RANLIB" >&5
3916 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3917 else
3918   echo "$as_me:3918: result: no" >&5
3919 echo "${ECHO_T}no" >&6
3920 fi
3921
3922   RANLIB=$ac_ct_RANLIB
3923 else
3924   RANLIB="$ac_cv_prog_RANLIB"
3925 fi
3926
3927 if test -n "$ac_tool_prefix"; then
3928   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3929 set dummy ${ac_tool_prefix}ld; ac_word=$2
3930 echo "$as_me:3930: checking for $ac_word" >&5
3931 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3932 if test "${ac_cv_prog_LD+set}" = set; then
3933   echo $ECHO_N "(cached) $ECHO_C" >&6
3934 else
3935   if test -n "$LD"; then
3936   ac_cv_prog_LD="$LD" # Let the user override the test.
3937 else
3938   ac_save_IFS=$IFS; IFS=$ac_path_separator
3939 ac_dummy="$PATH"
3940 for ac_dir in $ac_dummy; do
3941   IFS=$ac_save_IFS
3942   test -z "$ac_dir" && ac_dir=.
3943   $as_executable_p "$ac_dir/$ac_word" || continue
3944 ac_cv_prog_LD="${ac_tool_prefix}ld"
3945 echo "$as_me:3945: found $ac_dir/$ac_word" >&5
3946 break
3947 done
3948
3949 fi
3950 fi
3951 LD=$ac_cv_prog_LD
3952 if test -n "$LD"; then
3953   echo "$as_me:3953: result: $LD" >&5
3954 echo "${ECHO_T}$LD" >&6
3955 else
3956   echo "$as_me:3956: result: no" >&5
3957 echo "${ECHO_T}no" >&6
3958 fi
3959
3960 fi
3961 if test -z "$ac_cv_prog_LD"; then
3962   ac_ct_LD=$LD
3963   # Extract the first word of "ld", so it can be a program name with args.
3964 set dummy ld; ac_word=$2
3965 echo "$as_me:3965: checking for $ac_word" >&5
3966 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3967 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3968   echo $ECHO_N "(cached) $ECHO_C" >&6
3969 else
3970   if test -n "$ac_ct_LD"; then
3971   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3972 else
3973   ac_save_IFS=$IFS; IFS=$ac_path_separator
3974 ac_dummy="$PATH"
3975 for ac_dir in $ac_dummy; do
3976   IFS=$ac_save_IFS
3977   test -z "$ac_dir" && ac_dir=.
3978   $as_executable_p "$ac_dir/$ac_word" || continue
3979 ac_cv_prog_ac_ct_LD="ld"
3980 echo "$as_me:3980: found $ac_dir/$ac_word" >&5
3981 break
3982 done
3983
3984   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3985 fi
3986 fi
3987 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3988 if test -n "$ac_ct_LD"; then
3989   echo "$as_me:3989: result: $ac_ct_LD" >&5
3990 echo "${ECHO_T}$ac_ct_LD" >&6
3991 else
3992   echo "$as_me:3992: result: no" >&5
3993 echo "${ECHO_T}no" >&6
3994 fi
3995
3996   LD=$ac_ct_LD
3997 else
3998   LD="$ac_cv_prog_LD"
3999 fi
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}ar; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_prog_AR+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   if test -n "$AR"; then
4010   ac_cv_prog_AR="$AR" # Let the user override the test.
4011 else
4012   ac_save_IFS=$IFS; IFS=$ac_path_separator
4013 ac_dummy="$PATH"
4014 for ac_dir in $ac_dummy; do
4015   IFS=$ac_save_IFS
4016   test -z "$ac_dir" && ac_dir=.
4017   $as_executable_p "$ac_dir/$ac_word" || continue
4018 ac_cv_prog_AR="${ac_tool_prefix}ar"
4019 echo "$as_me:4019: found $ac_dir/$ac_word" >&5
4020 break
4021 done
4022
4023 fi
4024 fi
4025 AR=$ac_cv_prog_AR
4026 if test -n "$AR"; then
4027   echo "$as_me:4027: result: $AR" >&5
4028 echo "${ECHO_T}$AR" >&6
4029 else
4030   echo "$as_me:4030: result: no" >&5
4031 echo "${ECHO_T}no" >&6
4032 fi
4033
4034 fi
4035 if test -z "$ac_cv_prog_AR"; then
4036   ac_ct_AR=$AR
4037   # Extract the first word of "ar", so it can be a program name with args.
4038 set dummy ar; ac_word=$2
4039 echo "$as_me:4039: checking for $ac_word" >&5
4040 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4041 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4042   echo $ECHO_N "(cached) $ECHO_C" >&6
4043 else
4044   if test -n "$ac_ct_AR"; then
4045   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4046 else
4047   ac_save_IFS=$IFS; IFS=$ac_path_separator
4048 ac_dummy="$PATH"
4049 for ac_dir in $ac_dummy; do
4050   IFS=$ac_save_IFS
4051   test -z "$ac_dir" && ac_dir=.
4052   $as_executable_p "$ac_dir/$ac_word" || continue
4053 ac_cv_prog_ac_ct_AR="ar"
4054 echo "$as_me:4054: found $ac_dir/$ac_word" >&5
4055 break
4056 done
4057
4058   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4059 fi
4060 fi
4061 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4062 if test -n "$ac_ct_AR"; then
4063   echo "$as_me:4063: result: $ac_ct_AR" >&5
4064 echo "${ECHO_T}$ac_ct_AR" >&6
4065 else
4066   echo "$as_me:4066: result: no" >&5
4067 echo "${ECHO_T}no" >&6
4068 fi
4069
4070   AR=$ac_ct_AR
4071 else
4072   AR="$ac_cv_prog_AR"
4073 fi
4074
4075 if test -n "$ac_tool_prefix"; then
4076   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4077 set dummy ${ac_tool_prefix}ar; ac_word=$2
4078 echo "$as_me:4078: checking for $ac_word" >&5
4079 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4080 if test "${ac_cv_prog_AR+set}" = set; then
4081   echo $ECHO_N "(cached) $ECHO_C" >&6
4082 else
4083   if test -n "$AR"; then
4084   ac_cv_prog_AR="$AR" # Let the user override the test.
4085 else
4086   ac_save_IFS=$IFS; IFS=$ac_path_separator
4087 ac_dummy="$PATH"
4088 for ac_dir in $ac_dummy; do
4089   IFS=$ac_save_IFS
4090   test -z "$ac_dir" && ac_dir=.
4091   $as_executable_p "$ac_dir/$ac_word" || continue
4092 ac_cv_prog_AR="${ac_tool_prefix}ar"
4093 echo "$as_me:4093: found $ac_dir/$ac_word" >&5
4094 break
4095 done
4096
4097 fi
4098 fi
4099 AR=$ac_cv_prog_AR
4100 if test -n "$AR"; then
4101   echo "$as_me:4101: result: $AR" >&5
4102 echo "${ECHO_T}$AR" >&6
4103 else
4104   echo "$as_me:4104: result: no" >&5
4105 echo "${ECHO_T}no" >&6
4106 fi
4107
4108 fi
4109 if test -z "$ac_cv_prog_AR"; then
4110   ac_ct_AR=$AR
4111   # Extract the first word of "ar", so it can be a program name with args.
4112 set dummy ar; ac_word=$2
4113 echo "$as_me:4113: checking for $ac_word" >&5
4114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4115 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4116   echo $ECHO_N "(cached) $ECHO_C" >&6
4117 else
4118   if test -n "$ac_ct_AR"; then
4119   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4120 else
4121   ac_save_IFS=$IFS; IFS=$ac_path_separator
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124   IFS=$ac_save_IFS
4125   test -z "$ac_dir" && ac_dir=.
4126   $as_executable_p "$ac_dir/$ac_word" || continue
4127 ac_cv_prog_ac_ct_AR="ar"
4128 echo "$as_me:4128: found $ac_dir/$ac_word" >&5
4129 break
4130 done
4131
4132   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4133 fi
4134 fi
4135 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4136 if test -n "$ac_ct_AR"; then
4137   echo "$as_me:4137: result: $ac_ct_AR" >&5
4138 echo "${ECHO_T}$ac_ct_AR" >&6
4139 else
4140   echo "$as_me:4140: result: no" >&5
4141 echo "${ECHO_T}no" >&6
4142 fi
4143
4144   AR=$ac_ct_AR
4145 else
4146   AR="$ac_cv_prog_AR"
4147 fi
4148
4149 echo "$as_me:4149: checking for options to update archives" >&5
4150 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4151 if test "${cf_cv_ar_flags+set}" = set; then
4152   echo $ECHO_N "(cached) $ECHO_C" >&6
4153 else
4154
4155         cf_cv_ar_flags=unknown
4156         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4157         do
4158
4159                 # check if $ARFLAGS already contains this choice
4160                 if test "x$ARFLAGS" != "x" ; then
4161                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4162                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4163                                 cf_cv_ar_flags=
4164                                 break
4165                         fi
4166                 fi
4167
4168                 rm -f conftest.$ac_cv_objext
4169                 rm -f conftest.a
4170
4171                 cat >conftest.$ac_ext <<EOF
4172 #line 4172 "configure"
4173 int     testdata[3] = { 123, 456, 789 };
4174 EOF
4175                 if { (eval echo "$as_me:4175: \"$ac_compile\"") >&5
4176   (eval $ac_compile) 2>&5
4177   ac_status=$?
4178   echo "$as_me:4178: \$? = $ac_status" >&5
4179   (exit $ac_status); } ; then
4180                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4181                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4182                         if test -f conftest.a ; then
4183                                 cf_cv_ar_flags=$cf_ar_flags
4184                                 break
4185                         fi
4186                 else
4187                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4188
4189 echo "${as_me-configure}:4189: testing cannot compile test-program ..." 1>&5
4190
4191                         break
4192                 fi
4193         done
4194         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4195
4196 fi
4197 echo "$as_me:4197: result: $cf_cv_ar_flags" >&5
4198 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4199
4200 if test -n "$ARFLAGS" ; then
4201         if test -n "$cf_cv_ar_flags" ; then
4202                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4203         fi
4204 else
4205         ARFLAGS=$cf_cv_ar_flags
4206 fi
4207
4208 echo "$as_me:4208: checking if you have specified an install-prefix" >&5
4209 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4210
4211 # Check whether --with-install-prefix or --without-install-prefix was given.
4212 if test "${with_install_prefix+set}" = set; then
4213   withval="$with_install_prefix"
4214   case "$withval" in #(vi
4215         yes|no) #(vi
4216                 ;;
4217         *)      DESTDIR="$withval"
4218                 ;;
4219         esac
4220 fi;
4221 echo "$as_me:4221: result: $DESTDIR" >&5
4222 echo "${ECHO_T}$DESTDIR" >&6
4223
4224 ###############################################################################
4225
4226 # If we're cross-compiling, allow the user to override the tools and their
4227 # options.  The configure script is oriented toward identifying the host
4228 # compiler, etc., but we need a build compiler to generate parts of the source.
4229
4230 if test "$cross_compiling" = yes ; then
4231
4232         # defaults that we might want to override
4233         : ${BUILD_CFLAGS:=''}
4234         : ${BUILD_CPPFLAGS:=''}
4235         : ${BUILD_LDFLAGS:=''}
4236         : ${BUILD_LIBS:=''}
4237         : ${BUILD_EXEEXT:='$x'}
4238         : ${BUILD_OBJEXT:='o'}
4239
4240 # Check whether --with-build-cc or --without-build-cc was given.
4241 if test "${with_build_cc+set}" = set; then
4242   withval="$with_build_cc"
4243   BUILD_CC="$withval"
4244 else
4245   for ac_prog in gcc cc cl
4246 do
4247   # Extract the first word of "$ac_prog", so it can be a program name with args.
4248 set dummy $ac_prog; ac_word=$2
4249 echo "$as_me:4249: checking for $ac_word" >&5
4250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4251 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4252   echo $ECHO_N "(cached) $ECHO_C" >&6
4253 else
4254   if test -n "$BUILD_CC"; then
4255   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4256 else
4257   ac_save_IFS=$IFS; IFS=$ac_path_separator
4258 ac_dummy="$PATH"
4259 for ac_dir in $ac_dummy; do
4260   IFS=$ac_save_IFS
4261   test -z "$ac_dir" && ac_dir=.
4262   $as_executable_p "$ac_dir/$ac_word" || continue
4263 ac_cv_prog_BUILD_CC="$ac_prog"
4264 echo "$as_me:4264: found $ac_dir/$ac_word" >&5
4265 break
4266 done
4267
4268 fi
4269 fi
4270 BUILD_CC=$ac_cv_prog_BUILD_CC
4271 if test -n "$BUILD_CC"; then
4272   echo "$as_me:4272: result: $BUILD_CC" >&5
4273 echo "${ECHO_T}$BUILD_CC" >&6
4274 else
4275   echo "$as_me:4275: result: no" >&5
4276 echo "${ECHO_T}no" >&6
4277 fi
4278
4279   test -n "$BUILD_CC" && break
4280 done
4281
4282 fi;
4283         echo "$as_me:4283: checking for native build C compiler" >&5
4284 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4285         echo "$as_me:4285: result: $BUILD_CC" >&5
4286 echo "${ECHO_T}$BUILD_CC" >&6
4287
4288         echo "$as_me:4288: checking for native build C preprocessor" >&5
4289 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4290
4291 # Check whether --with-build-cpp or --without-build-cpp was given.
4292 if test "${with_build_cpp+set}" = set; then
4293   withval="$with_build_cpp"
4294   BUILD_CPP="$withval"
4295 else
4296   BUILD_CPP='${BUILD_CC} -E'
4297 fi;
4298         echo "$as_me:4298: result: $BUILD_CPP" >&5
4299 echo "${ECHO_T}$BUILD_CPP" >&6
4300
4301         echo "$as_me:4301: checking for native build C flags" >&5
4302 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4303
4304 # Check whether --with-build-cflags or --without-build-cflags was given.
4305 if test "${with_build_cflags+set}" = set; then
4306   withval="$with_build_cflags"
4307   BUILD_CFLAGS="$withval"
4308 fi;
4309         echo "$as_me:4309: result: $BUILD_CFLAGS" >&5
4310 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4311
4312         echo "$as_me:4312: checking for native build C preprocessor-flags" >&5
4313 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4314
4315 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4316 if test "${with_build_cppflags+set}" = set; then
4317   withval="$with_build_cppflags"
4318   BUILD_CPPFLAGS="$withval"
4319 fi;
4320         echo "$as_me:4320: result: $BUILD_CPPFLAGS" >&5
4321 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4322
4323         echo "$as_me:4323: checking for native build linker-flags" >&5
4324 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4325
4326 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4327 if test "${with_build_ldflags+set}" = set; then
4328   withval="$with_build_ldflags"
4329   BUILD_LDFLAGS="$withval"
4330 fi;
4331         echo "$as_me:4331: result: $BUILD_LDFLAGS" >&5
4332 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4333
4334         echo "$as_me:4334: checking for native build linker-libraries" >&5
4335 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4336
4337 # Check whether --with-build-libs or --without-build-libs was given.
4338 if test "${with_build_libs+set}" = set; then
4339   withval="$with_build_libs"
4340   BUILD_LIBS="$withval"
4341 fi;
4342         echo "$as_me:4342: result: $BUILD_LIBS" >&5
4343 echo "${ECHO_T}$BUILD_LIBS" >&6
4344
4345         # this assumes we're on Unix.
4346         BUILD_EXEEXT=
4347         BUILD_OBJEXT=o
4348
4349         : ${BUILD_CC:='${CC}'}
4350
4351         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4352                 { { echo "$as_me:4352: error: Cross-build requires two compilers.
4353 Use --with-build-cc to specify the native compiler." >&5
4354 echo "$as_me: error: Cross-build requires two compilers.
4355 Use --with-build-cc to specify the native compiler." >&2;}
4356    { (exit 1); exit 1; }; }
4357         fi
4358
4359 else
4360         : ${BUILD_CC:='${CC}'}
4361         : ${BUILD_CPP:='${CPP}'}
4362         : ${BUILD_CFLAGS:='${CFLAGS}'}
4363         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4364         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4365         : ${BUILD_LIBS:='${LIBS}'}
4366         : ${BUILD_EXEEXT:='$x'}
4367         : ${BUILD_OBJEXT:='o'}
4368 fi
4369
4370 ###############################################################################
4371
4372 ### Options to allow the user to specify the set of libraries which are used.
4373 ### Use "--without-normal --with-shared" to allow the default model to be
4374 ### shared, for example.
4375 cf_list_models=""
4376
4377 echo "$as_me:4377: checking if libtool -version-number should be used" >&5
4378 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4379
4380 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4381 if test "${enable_libtool_version+set}" = set; then
4382   enableval="$enable_libtool_version"
4383   test "$enableval" != no && enableval=yes
4384   if test "$enableval" != "yes" ; then
4385     cf_libtool_version=no
4386   else
4387     cf_libtool_version=yes
4388   fi
4389 else
4390   enableval=yes
4391   cf_libtool_version=yes
4392
4393 fi;
4394 echo "$as_me:4394: result: $cf_libtool_version" >&5
4395 echo "${ECHO_T}$cf_libtool_version" >&6
4396
4397 if test "$cf_libtool_version" = yes ; then
4398         LIBTOOL_VERSION="-version-number"
4399 else
4400         LIBTOOL_VERSION="-version-info"
4401 fi
4402
4403 LIBTOOL=
4404
4405 # common library maintenance symbols that are convenient for libtool scripts:
4406 LIB_CREATE='${AR} -cr'
4407 LIB_OBJECT='${OBJECTS}'
4408 LIB_SUFFIX=.a
4409 LIB_PREP="$RANLIB"
4410
4411 # symbols used to prop libtool up to enable it to determine what it should be
4412 # doing:
4413 LIB_CLEAN=
4414 LIB_COMPILE=
4415 LIB_LINK='${CC}'
4416 LIB_INSTALL=
4417 LIB_UNINSTALL=
4418
4419 echo "$as_me:4419: checking if you want to build libraries with libtool" >&5
4420 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4421
4422 # Check whether --with-libtool or --without-libtool was given.
4423 if test "${with_libtool+set}" = set; then
4424   withval="$with_libtool"
4425   with_libtool=$withval
4426 else
4427   with_libtool=no
4428 fi;
4429 echo "$as_me:4429: result: $with_libtool" >&5
4430 echo "${ECHO_T}$with_libtool" >&6
4431 if test "$with_libtool" != "no"; then
4432
4433         if test "$with_libtool" != "yes" ; then
4434
4435 if test "x$prefix" != xNONE; then
4436   cf_path_syntax="$prefix"
4437 else
4438   cf_path_syntax="$ac_default_prefix"
4439 fi
4440
4441 case ".$with_libtool" in #(vi
4442 .\$\(*\)*|.\'*\'*) #(vi
4443   ;;
4444 ..|./*|.\\*) #(vi
4445   ;;
4446 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4447   ;;
4448 .\${*prefix}*) #(vi
4449   eval with_libtool="$with_libtool"
4450   case ".$with_libtool" in #(vi
4451   .NONE/*)
4452     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4453     ;;
4454   esac
4455   ;; #(vi
4456 .no|.NONE/*)
4457   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4458   ;;
4459 *)
4460   { { echo "$as_me:4460: error: expected a pathname, not \"$with_libtool\"" >&5
4461 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4462    { (exit 1); exit 1; }; }
4463   ;;
4464 esac
4465
4466                 LIBTOOL=$with_libtool
4467         else
4468                 # Extract the first word of "libtool", so it can be a program name with args.
4469 set dummy libtool; 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_path_LIBTOOL+set}" = set; then
4473   echo $ECHO_N "(cached) $ECHO_C" >&6
4474 else
4475   case $LIBTOOL in
4476   [\\/]* | ?:[\\/]*)
4477   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4478   ;;
4479   *)
4480   ac_save_IFS=$IFS; IFS=$ac_path_separator
4481 ac_dummy="$PATH"
4482 for ac_dir in $ac_dummy; do
4483   IFS=$ac_save_IFS
4484   test -z "$ac_dir" && ac_dir=.
4485   if $as_executable_p "$ac_dir/$ac_word"; then
4486    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4487    echo "$as_me:4487: found $ac_dir/$ac_word" >&5
4488    break
4489 fi
4490 done
4491
4492   ;;
4493 esac
4494 fi
4495 LIBTOOL=$ac_cv_path_LIBTOOL
4496
4497 if test -n "$LIBTOOL"; then
4498   echo "$as_me:4498: result: $LIBTOOL" >&5
4499 echo "${ECHO_T}$LIBTOOL" >&6
4500 else
4501   echo "$as_me:4501: result: no" >&5
4502 echo "${ECHO_T}no" >&6
4503 fi
4504
4505         fi
4506         if test -z "$LIBTOOL" ; then
4507                 { { echo "$as_me:4507: error: Cannot find libtool" >&5
4508 echo "$as_me: error: Cannot find libtool" >&2;}
4509    { (exit 1); exit 1; }; }
4510         fi
4511         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4512         LIB_OBJECT='${OBJECTS:.o=.lo}'
4513         LIB_SUFFIX=.la
4514         LIB_CLEAN='${LIBTOOL} --mode=clean'
4515         LIB_COMPILE='${LIBTOOL} --mode=compile'
4516         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4517         LIB_INSTALL='${LIBTOOL} --mode=install'
4518         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4519         LIB_PREP=:
4520
4521         # Show the version of libtool
4522         echo "$as_me:4522: checking version of libtool" >&5
4523 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4524
4525         # Save the version in a cache variable - this is not entirely a good
4526         # thing, but the version string from libtool is very ugly, and for
4527         # bug reports it might be useful to have the original string. "("
4528         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.].*//'`
4529         echo "$as_me:4529: result: $cf_cv_libtool_version" >&5
4530 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4531         if test -z "$cf_cv_libtool_version" ; then
4532                 { { echo "$as_me:4532: error: This is not GNU libtool" >&5
4533 echo "$as_me: error: This is not GNU libtool" >&2;}
4534    { (exit 1); exit 1; }; }
4535         fi
4536
4537         # special hack to add -no-undefined (which libtool should do for itself)
4538         LT_UNDEF=
4539         case "$cf_cv_system_name" in #(vi
4540         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4541                 LT_UNDEF=-no-undefined
4542                 ;;
4543         esac
4544
4545         # special hack to add --tag option for C++ compiler
4546         case $cf_cv_libtool_version in #(vi
4547         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4548                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4549                 LIBTOOL="$LIBTOOL --tag=CC"
4550                 ;;
4551         *)
4552                 LIBTOOL_CXX="$LIBTOOL"
4553                 ;;
4554         esac
4555 else
4556         LIBTOOL=""
4557         LIBTOOL_CXX=""
4558 fi
4559
4560 test -z "$LIBTOOL" && ECHO_LT=
4561
4562 if test "$with_libtool" != "no" ; then
4563
4564 cf_list_models="$cf_list_models libtool"
4565
4566 else
4567
4568 echo "$as_me:4568: checking if you want to build shared libraries" >&5
4569 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4570
4571 # Check whether --with-shared or --without-shared was given.
4572 if test "${with_shared+set}" = set; then
4573   withval="$with_shared"
4574   with_shared=$withval
4575 else
4576   with_shared=no
4577 fi;
4578 echo "$as_me:4578: result: $with_shared" >&5
4579 echo "${ECHO_T}$with_shared" >&6
4580 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4581
4582 echo "$as_me:4582: checking if you want to build static libraries" >&5
4583 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4584
4585 # Check whether --with-normal or --without-normal was given.
4586 if test "${with_normal+set}" = set; then
4587   withval="$with_normal"
4588   with_normal=$withval
4589 else
4590   with_normal=yes
4591 fi;
4592 echo "$as_me:4592: result: $with_normal" >&5
4593 echo "${ECHO_T}$with_normal" >&6
4594 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4595
4596 echo "$as_me:4596: checking if you want to build debug libraries" >&5
4597 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4598
4599 # Check whether --with-debug or --without-debug was given.
4600 if test "${with_debug+set}" = set; then
4601   withval="$with_debug"
4602   with_debug=$withval
4603 else
4604   with_debug=yes
4605 fi;
4606 echo "$as_me:4606: result: $with_debug" >&5
4607 echo "${ECHO_T}$with_debug" >&6
4608 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4609
4610 echo "$as_me:4610: checking if you want to build profiling libraries" >&5
4611 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4612
4613 # Check whether --with-profile or --without-profile was given.
4614 if test "${with_profile+set}" = set; then
4615   withval="$with_profile"
4616   with_profile=$withval
4617 else
4618   with_profile=no
4619 fi;
4620 echo "$as_me:4620: result: $with_profile" >&5
4621 echo "${ECHO_T}$with_profile" >&6
4622 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4623
4624 fi
4625
4626 ###############################################################################
4627
4628 echo "$as_me:4628: checking for specified models" >&5
4629 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4630 test -z "$cf_list_models" && cf_list_models=normal
4631 test "$with_libtool" != "no" && cf_list_models=libtool
4632 echo "$as_me:4632: result: $cf_list_models" >&5
4633 echo "${ECHO_T}$cf_list_models" >&6
4634
4635 ### Use the first model as the default, and save its suffix for use in building
4636 ### up test-applications.
4637 echo "$as_me:4637: checking for default model" >&5
4638 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4639 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4640 echo "$as_me:4640: result: $DFT_LWR_MODEL" >&5
4641 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4642
4643 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4644
4645 TICS_NAME=tic
4646
4647 TINFO_NAME=tinfo
4648
4649 LIB_NAME=ncurses
4650
4651 LIB_DIR=../lib
4652 LIB_2ND=../../lib
4653
4654         case $cf_cv_system_name in #(vi
4655         OS/2*|os2*) #(vi
4656         LIB_PREFIX=''
4657         ;;
4658         *)      LIB_PREFIX='lib'
4659         ;;
4660         esac
4661 cf_prefix=$LIB_PREFIX
4662
4663 LIB_PREFIX=$cf_prefix
4664
4665 LIB_SUFFIX=
4666
4667 ###############################################################################
4668
4669 echo "$as_me:4669: checking if you want to build a separate terminfo library" >&5
4670 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4671
4672 # Check whether --with-termlib or --without-termlib was given.
4673 if test "${with_termlib+set}" = set; then
4674   withval="$with_termlib"
4675   with_termlib=$withval
4676 else
4677   with_termlib=no
4678 fi;
4679 echo "$as_me:4679: result: $with_termlib" >&5
4680 echo "${ECHO_T}$with_termlib" >&6
4681
4682 echo "$as_me:4682: checking if you want to build a separate tic library" >&5
4683 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4684
4685 # Check whether --with-ticlib or --without-ticlib was given.
4686 if test "${with_ticlib+set}" = set; then
4687   withval="$with_ticlib"
4688   with_ticlib=$withval
4689 else
4690   with_ticlib=no
4691 fi;
4692 echo "$as_me:4692: result: $with_ticlib" >&5
4693 echo "${ECHO_T}$with_ticlib" >&6
4694
4695 ### Checks for special libraries, must be done up-front.
4696 SHLIB_LIST=""
4697
4698 echo "$as_me:4698: checking if you want to link with the GPM mouse library" >&5
4699 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4700
4701 # Check whether --with-gpm or --without-gpm was given.
4702 if test "${with_gpm+set}" = set; then
4703   withval="$with_gpm"
4704   with_gpm=$withval
4705 else
4706   with_gpm=maybe
4707 fi;
4708 echo "$as_me:4708: result: $with_gpm" >&5
4709 echo "${ECHO_T}$with_gpm" >&6
4710
4711 if test "$with_gpm" != no ; then
4712         echo "$as_me:4712: checking for gpm.h" >&5
4713 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4714 if test "${ac_cv_header_gpm_h+set}" = set; then
4715   echo $ECHO_N "(cached) $ECHO_C" >&6
4716 else
4717   cat >conftest.$ac_ext <<_ACEOF
4718 #line 4718 "configure"
4719 #include "confdefs.h"
4720 #include <gpm.h>
4721 _ACEOF
4722 if { (eval echo "$as_me:4722: \"$ac_cpp conftest.$ac_ext\"") >&5
4723   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4724   ac_status=$?
4725   egrep -v '^ *\+' conftest.er1 >conftest.err
4726   rm -f conftest.er1
4727   cat conftest.err >&5
4728   echo "$as_me:4728: \$? = $ac_status" >&5
4729   (exit $ac_status); } >/dev/null; then
4730   if test -s conftest.err; then
4731     ac_cpp_err=$ac_c_preproc_warn_flag
4732   else
4733     ac_cpp_err=
4734   fi
4735 else
4736   ac_cpp_err=yes
4737 fi
4738 if test -z "$ac_cpp_err"; then
4739   ac_cv_header_gpm_h=yes
4740 else
4741   echo "$as_me: failed program was:" >&5
4742   cat conftest.$ac_ext >&5
4743   ac_cv_header_gpm_h=no
4744 fi
4745 rm -f conftest.err conftest.$ac_ext
4746 fi
4747 echo "$as_me:4747: result: $ac_cv_header_gpm_h" >&5
4748 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4749 if test $ac_cv_header_gpm_h = yes; then
4750
4751                 cat >>confdefs.h <<\EOF
4752 #define HAVE_GPM_H 1
4753 EOF
4754
4755                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4756                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4757
4758 echo "${as_me-configure}:4758: testing assuming we really have GPM library ..." 1>&5
4759
4760                         cat >>confdefs.h <<\EOF
4761 #define HAVE_LIBGPM 1
4762 EOF
4763
4764                 else
4765                         echo "$as_me:4765: checking for Gpm_Open in -lgpm" >&5
4766 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4767 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4768   echo $ECHO_N "(cached) $ECHO_C" >&6
4769 else
4770   ac_check_lib_save_LIBS=$LIBS
4771 LIBS="-lgpm  $LIBS"
4772 cat >conftest.$ac_ext <<_ACEOF
4773 #line 4773 "configure"
4774 #include "confdefs.h"
4775
4776 /* Override any gcc2 internal prototype to avoid an error.  */
4777 #ifdef __cplusplus
4778 extern "C"
4779 #endif
4780 /* We use char because int might match the return type of a gcc2
4781    builtin and then its argument prototype would still apply.  */
4782 char Gpm_Open ();
4783 int
4784 main ()
4785 {
4786 Gpm_Open ();
4787   ;
4788   return 0;
4789 }
4790 _ACEOF
4791 rm -f conftest.$ac_objext conftest$ac_exeext
4792 if { (eval echo "$as_me:4792: \"$ac_link\"") >&5
4793   (eval $ac_link) 2>&5
4794   ac_status=$?
4795   echo "$as_me:4795: \$? = $ac_status" >&5
4796   (exit $ac_status); } &&
4797          { ac_try='test -s conftest$ac_exeext'
4798   { (eval echo "$as_me:4798: \"$ac_try\"") >&5
4799   (eval $ac_try) 2>&5
4800   ac_status=$?
4801   echo "$as_me:4801: \$? = $ac_status" >&5
4802   (exit $ac_status); }; }; then
4803   ac_cv_lib_gpm_Gpm_Open=yes
4804 else
4805   echo "$as_me: failed program was:" >&5
4806 cat conftest.$ac_ext >&5
4807 ac_cv_lib_gpm_Gpm_Open=no
4808 fi
4809 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4810 LIBS=$ac_check_lib_save_LIBS
4811 fi
4812 echo "$as_me:4812: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4813 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4814 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4815   :
4816 else
4817
4818                                 { { echo "$as_me:4818: error: Cannot link with GPM library" >&5
4819 echo "$as_me: error: Cannot link with GPM library" >&2;}
4820    { (exit 1); exit 1; }; }
4821                 fi
4822                 with_gpm=yes
4823
4824 fi
4825
4826 else
4827
4828                 test "$with_gpm" != maybe && { echo "$as_me:4828: WARNING: Cannot find GPM header" >&5
4829 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4830                 with_gpm=no
4831
4832 fi
4833
4834 fi
4835
4836 if test "$with_gpm" != no ; then
4837         echo "$as_me:4837: checking if you want to load GPM dynamically" >&5
4838 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4839
4840 # Check whether --with-dlsym or --without-dlsym was given.
4841 if test "${with_dlsym+set}" = set; then
4842   withval="$with_dlsym"
4843   with_dlsym=$withval
4844 else
4845   with_dlsym=yes
4846 fi;
4847         echo "$as_me:4847: result: $with_dlsym" >&5
4848 echo "${ECHO_T}$with_dlsym" >&6
4849         if test "$with_dlsym" = yes ; then
4850
4851 cf_have_dlsym=no
4852 echo "$as_me:4852: checking for dlsym" >&5
4853 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4854 if test "${ac_cv_func_dlsym+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   cat >conftest.$ac_ext <<_ACEOF
4858 #line 4858 "configure"
4859 #include "confdefs.h"
4860 /* System header to define __stub macros and hopefully few prototypes,
4861     which can conflict with char dlsym (); below.  */
4862 #include <assert.h>
4863 /* Override any gcc2 internal prototype to avoid an error.  */
4864 #ifdef __cplusplus
4865 extern "C"
4866 #endif
4867 /* We use char because int might match the return type of a gcc2
4868    builtin and then its argument prototype would still apply.  */
4869 char dlsym ();
4870 char (*f) ();
4871
4872 int
4873 main ()
4874 {
4875 /* The GNU C library defines this for functions which it implements
4876     to always fail with ENOSYS.  Some functions are actually named
4877     something starting with __ and the normal name is an alias.  */
4878 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4879 choke me
4880 #else
4881 f = dlsym;
4882 #endif
4883
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 rm -f conftest.$ac_objext conftest$ac_exeext
4889 if { (eval echo "$as_me:4889: \"$ac_link\"") >&5
4890   (eval $ac_link) 2>&5
4891   ac_status=$?
4892   echo "$as_me:4892: \$? = $ac_status" >&5
4893   (exit $ac_status); } &&
4894          { ac_try='test -s conftest$ac_exeext'
4895   { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896   (eval $ac_try) 2>&5
4897   ac_status=$?
4898   echo "$as_me:4898: \$? = $ac_status" >&5
4899   (exit $ac_status); }; }; then
4900   ac_cv_func_dlsym=yes
4901 else
4902   echo "$as_me: failed program was:" >&5
4903 cat conftest.$ac_ext >&5
4904 ac_cv_func_dlsym=no
4905 fi
4906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4907 fi
4908 echo "$as_me:4908: result: $ac_cv_func_dlsym" >&5
4909 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4910 if test $ac_cv_func_dlsym = yes; then
4911   cf_have_dlsym=yes
4912 else
4913
4914 cf_have_libdl=no
4915 echo "$as_me:4915: checking for dlsym in -ldl" >&5
4916 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4917 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4918   echo $ECHO_N "(cached) $ECHO_C" >&6
4919 else
4920   ac_check_lib_save_LIBS=$LIBS
4921 LIBS="-ldl  $LIBS"
4922 cat >conftest.$ac_ext <<_ACEOF
4923 #line 4923 "configure"
4924 #include "confdefs.h"
4925
4926 /* Override any gcc2 internal prototype to avoid an error.  */
4927 #ifdef __cplusplus
4928 extern "C"
4929 #endif
4930 /* We use char because int might match the return type of a gcc2
4931    builtin and then its argument prototype would still apply.  */
4932 char dlsym ();
4933 int
4934 main ()
4935 {
4936 dlsym ();
4937   ;
4938   return 0;
4939 }
4940 _ACEOF
4941 rm -f conftest.$ac_objext conftest$ac_exeext
4942 if { (eval echo "$as_me:4942: \"$ac_link\"") >&5
4943   (eval $ac_link) 2>&5
4944   ac_status=$?
4945   echo "$as_me:4945: \$? = $ac_status" >&5
4946   (exit $ac_status); } &&
4947          { ac_try='test -s conftest$ac_exeext'
4948   { (eval echo "$as_me:4948: \"$ac_try\"") >&5
4949   (eval $ac_try) 2>&5
4950   ac_status=$?
4951   echo "$as_me:4951: \$? = $ac_status" >&5
4952   (exit $ac_status); }; }; then
4953   ac_cv_lib_dl_dlsym=yes
4954 else
4955   echo "$as_me: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 ac_cv_lib_dl_dlsym=no
4958 fi
4959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4960 LIBS=$ac_check_lib_save_LIBS
4961 fi
4962 echo "$as_me:4962: result: $ac_cv_lib_dl_dlsym" >&5
4963 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4964 if test $ac_cv_lib_dl_dlsym = yes; then
4965
4966         cf_have_dlsym=yes
4967         cf_have_libdl=yes
4968 fi
4969
4970 fi
4971
4972 if test "$cf_have_dlsym" = yes ; then
4973         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4974
4975         echo "$as_me:4975: checking whether able to link to dl*() functions" >&5
4976 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4977         cat >conftest.$ac_ext <<_ACEOF
4978 #line 4978 "configure"
4979 #include "confdefs.h"
4980 #include <dlfcn.h>
4981 int
4982 main ()
4983 {
4984
4985                 void *obj;
4986                 if ((obj = dlopen("filename", 0)) != 0) {
4987                         if (dlsym(obj, "symbolname") == 0) {
4988                         dlclose(obj);
4989                         }
4990                 }
4991   ;
4992   return 0;
4993 }
4994 _ACEOF
4995 rm -f conftest.$ac_objext conftest$ac_exeext
4996 if { (eval echo "$as_me:4996: \"$ac_link\"") >&5
4997   (eval $ac_link) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); } &&
5001          { ac_try='test -s conftest$ac_exeext'
5002   { (eval echo "$as_me:5002: \"$ac_try\"") >&5
5003   (eval $ac_try) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit $ac_status); }; }; then
5007
5008                 cat >>confdefs.h <<\EOF
5009 #define HAVE_LIBDL 1
5010 EOF
5011
5012 else
5013   echo "$as_me: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
5015
5016                 { { echo "$as_me:5016: error: Cannot link test program for libdl" >&5
5017 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5018    { (exit 1); exit 1; }; }
5019 fi
5020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5021         echo "$as_me:5021: result: ok" >&5
5022 echo "${ECHO_T}ok" >&6
5023 else
5024         { { echo "$as_me:5024: error: Cannot find dlsym function" >&5
5025 echo "$as_me: error: Cannot find dlsym function" >&2;}
5026    { (exit 1); exit 1; }; }
5027 fi
5028
5029                 if test "$with_gpm" != yes ; then
5030                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5031
5032 echo "${as_me-configure}:5032: testing assuming soname for gpm is $with_gpm ..." 1>&5
5033
5034                         cf_cv_gpm_soname="$with_gpm"
5035                 else
5036
5037 echo "$as_me:5037: checking for soname of gpm library" >&5
5038 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5039 if test "${cf_cv_gpm_soname+set}" = set; then
5040   echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042
5043 cf_cv_gpm_soname=unknown
5044 if test "$cross_compiling" != yes ; then
5045 cat >conftest.$ac_ext <<CF_EOF
5046 #include <gpm.h>
5047 int main()
5048 {
5049 if (Gpm_Open(0,0)) Gpm_Close();
5050         ${cf_cv_main_return:-return}(0);
5051 }
5052 CF_EOF
5053 cf_save_LIBS="$LIBS"
5054         LIBS="-lgpm $LIBS"
5055         if { (eval echo "$as_me:5055: \"$ac_compile\"") >&5
5056   (eval $ac_compile) 2>&5
5057   ac_status=$?
5058   echo "$as_me:5058: \$? = $ac_status" >&5
5059   (exit $ac_status); } ; then
5060                 if { (eval echo "$as_me:5060: \"$ac_link\"") >&5
5061   (eval $ac_link) 2>&5
5062   ac_status=$?
5063   echo "$as_me:5063: \$? = $ac_status" >&5
5064   (exit $ac_status); } ; then
5065                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5066                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5067                 fi
5068         fi
5069 rm -f conftest*
5070 LIBS="$cf_save_LIBS"
5071 fi
5072
5073 fi
5074 echo "$as_me:5074: result: $cf_cv_gpm_soname" >&5
5075 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5076
5077                 fi
5078                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5079 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5080 EOF
5081
5082                 SHLIB_LIST="-ldl $SHLIB_LIST"
5083         else
5084                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5085                 TEST_LIBS="-lgpm $TEST_LIBS"
5086         fi
5087         cat >>confdefs.h <<\EOF
5088 #define HAVE_LIBGPM 1
5089 EOF
5090
5091 echo "$as_me:5091: checking for Gpm_Wgetch in -lgpm" >&5
5092 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5093 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5094   echo $ECHO_N "(cached) $ECHO_C" >&6
5095 else
5096   ac_check_lib_save_LIBS=$LIBS
5097 LIBS="-lgpm  $LIBS"
5098 cat >conftest.$ac_ext <<_ACEOF
5099 #line 5099 "configure"
5100 #include "confdefs.h"
5101
5102 /* Override any gcc2 internal prototype to avoid an error.  */
5103 #ifdef __cplusplus
5104 extern "C"
5105 #endif
5106 /* We use char because int might match the return type of a gcc2
5107    builtin and then its argument prototype would still apply.  */
5108 char Gpm_Wgetch ();
5109 int
5110 main ()
5111 {
5112 Gpm_Wgetch ();
5113   ;
5114   return 0;
5115 }
5116 _ACEOF
5117 rm -f conftest.$ac_objext conftest$ac_exeext
5118 if { (eval echo "$as_me:5118: \"$ac_link\"") >&5
5119   (eval $ac_link) 2>&5
5120   ac_status=$?
5121   echo "$as_me:5121: \$? = $ac_status" >&5
5122   (exit $ac_status); } &&
5123          { ac_try='test -s conftest$ac_exeext'
5124   { (eval echo "$as_me:5124: \"$ac_try\"") >&5
5125   (eval $ac_try) 2>&5
5126   ac_status=$?
5127   echo "$as_me:5127: \$? = $ac_status" >&5
5128   (exit $ac_status); }; }; then
5129   ac_cv_lib_gpm_Gpm_Wgetch=yes
5130 else
5131   echo "$as_me: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 ac_cv_lib_gpm_Gpm_Wgetch=no
5134 fi
5135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5136 LIBS=$ac_check_lib_save_LIBS
5137 fi
5138 echo "$as_me:5138: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5139 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5140 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5141
5142 echo "$as_me:5142: checking if GPM is weakly bound to curses library" >&5
5143 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5144 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5145   echo $ECHO_N "(cached) $ECHO_C" >&6
5146 else
5147
5148 cf_cv_check_gpm_wgetch=unknown
5149 if test "$cross_compiling" != yes ; then
5150
5151 cat >conftest.$ac_ext <<CF_EOF
5152 #include <gpm.h>
5153 int main()
5154 {
5155         Gpm_Wgetch();
5156         ${cf_cv_main_return:-return}(0);
5157 }
5158 CF_EOF
5159
5160         cf_save_LIBS="$LIBS"
5161         # This only works if we can look at the symbol table.  If a shared
5162         # library is stripped for install, we cannot use that.  So we're forced
5163         # to rely on the static library, noting that some packagers may not
5164         # include it.
5165         LIBS="-static -lgpm -dynamic $LIBS"
5166         if { (eval echo "$as_me:5166: \"$ac_compile\"") >&5
5167   (eval $ac_compile) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); } ; then
5171                 if { (eval echo "$as_me:5171: \"$ac_link\"") >&5
5172   (eval $ac_link) 2>&5
5173   ac_status=$?
5174   echo "$as_me:5174: \$? = $ac_status" >&5
5175   (exit $ac_status); } ; then
5176                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5177                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5178                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5179                 fi
5180         fi
5181         rm -f conftest*
5182         LIBS="$cf_save_LIBS"
5183 fi
5184
5185 fi
5186 echo "$as_me:5186: result: $cf_cv_check_gpm_wgetch" >&5
5187 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5188
5189 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5190         { echo "$as_me:5190: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5191 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5192 fi
5193
5194 fi
5195
5196 fi
5197
5198 # not everyone has "test -c"
5199 if test -c /dev/sysmouse 2>/dev/null ; then
5200 echo "$as_me:5200: checking if you want to use sysmouse" >&5
5201 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5202
5203 # Check whether --with-sysmouse or --without-sysmouse was given.
5204 if test "${with_sysmouse+set}" = set; then
5205   withval="$with_sysmouse"
5206   cf_with_sysmouse=$withval
5207 else
5208   cf_with_sysmouse=maybe
5209 fi;
5210         if test "$cf_with_sysmouse" != no ; then
5211         cat >conftest.$ac_ext <<_ACEOF
5212 #line 5212 "configure"
5213 #include "confdefs.h"
5214
5215 #include <osreldate.h>
5216 #if (__FreeBSD_version >= 400017)
5217 #include <sys/consio.h>
5218 #include <sys/fbio.h>
5219 #else
5220 #include <machine/console.h>
5221 #endif
5222
5223 int
5224 main ()
5225 {
5226
5227         struct mouse_info the_mouse;
5228         ioctl(0, CONS_MOUSECTL, &the_mouse);
5229
5230   ;
5231   return 0;
5232 }
5233 _ACEOF
5234 rm -f conftest.$ac_objext
5235 if { (eval echo "$as_me:5235: \"$ac_compile\"") >&5
5236   (eval $ac_compile) 2>&5
5237   ac_status=$?
5238   echo "$as_me:5238: \$? = $ac_status" >&5
5239   (exit $ac_status); } &&
5240          { ac_try='test -s conftest.$ac_objext'
5241   { (eval echo "$as_me:5241: \"$ac_try\"") >&5
5242   (eval $ac_try) 2>&5
5243   ac_status=$?
5244   echo "$as_me:5244: \$? = $ac_status" >&5
5245   (exit $ac_status); }; }; then
5246   cf_with_sysmouse=yes
5247 else
5248   echo "$as_me: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5250 cf_with_sysmouse=no
5251 fi
5252 rm -f conftest.$ac_objext conftest.$ac_ext
5253         fi
5254 echo "$as_me:5254: result: $cf_with_sysmouse" >&5
5255 echo "${ECHO_T}$cf_with_sysmouse" >&6
5256 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5257 #define USE_SYSMOUSE 1
5258 EOF
5259
5260 fi
5261
5262 if test X"$CC_G_OPT" = X"" ; then
5263         CC_G_OPT='-g'
5264         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5265 fi
5266
5267 if test X"$CXX_G_OPT" = X"" ; then
5268         CXX_G_OPT='-g'
5269         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5270 fi
5271
5272 echo "$as_me:5272: checking for default loader flags" >&5
5273 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5274 case $DFT_LWR_MODEL in
5275 libtool) LD_MODEL=''   ;;
5276 normal)  LD_MODEL=''   ;;
5277 debug)   LD_MODEL=$CC_G_OPT ;;
5278 profile) LD_MODEL='-pg';;
5279 shared)  LD_MODEL=''   ;;
5280 esac
5281 echo "$as_me:5281: result: $LD_MODEL" >&5
5282 echo "${ECHO_T}$LD_MODEL" >&6
5283
5284 case $DFT_LWR_MODEL in
5285 shared)
5286
5287 echo "$as_me:5287: checking if rpath option should be used" >&5
5288 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5289
5290 # Check whether --enable-rpath or --disable-rpath was given.
5291 if test "${enable_rpath+set}" = set; then
5292   enableval="$enable_rpath"
5293   cf_cv_enable_rpath=$enableval
5294 else
5295   cf_cv_enable_rpath=no
5296 fi;
5297 echo "$as_me:5297: result: $cf_cv_enable_rpath" >&5
5298 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5299
5300 echo "$as_me:5300: checking if shared libraries should be relinked during install" >&5
5301 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5302
5303 # Check whether --enable-relink or --disable-relink was given.
5304 if test "${enable_relink+set}" = set; then
5305   enableval="$enable_relink"
5306   cf_cv_do_relink=$enableval
5307 else
5308   cf_cv_do_relink=yes
5309 fi;
5310 echo "$as_me:5310: result: $cf_cv_do_relink" >&5
5311 echo "${ECHO_T}$cf_cv_do_relink" >&6
5312         ;;
5313 esac
5314
5315 LD_RPATH_OPT=
5316 echo "$as_me:5316: checking for an rpath option" >&5
5317 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5318 case $cf_cv_system_name in #(vi
5319 irix*) #(vi
5320         if test "$GCC" = yes; then
5321                 LD_RPATH_OPT="-Wl,-rpath,"
5322         else
5323                 LD_RPATH_OPT="-rpath "
5324         fi
5325         ;;
5326 linux*|gnu*|k*bsd*-gnu) #(vi
5327         LD_RPATH_OPT="-Wl,-rpath,"
5328         ;;
5329 openbsd[2-9].*) #(vi
5330         LD_RPATH_OPT="-Wl,-rpath,"
5331         ;;
5332 freebsd*) #(vi
5333         LD_RPATH_OPT="-rpath "
5334         ;;
5335 netbsd*) #(vi
5336         LD_RPATH_OPT="-Wl,-rpath,"
5337         ;;
5338 osf*|mls+*) #(vi
5339         LD_RPATH_OPT="-rpath "
5340         ;;
5341 solaris2*) #(vi
5342         LD_RPATH_OPT="-R"
5343         ;;
5344 *)
5345         ;;
5346 esac
5347 echo "$as_me:5347: result: $LD_RPATH_OPT" >&5
5348 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5349
5350 case "x$LD_RPATH_OPT" in #(vi
5351 x-R*)
5352         echo "$as_me:5352: checking if we need a space after rpath option" >&5
5353 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5354         cf_save_LIBS="$LIBS"
5355         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5356         cat >conftest.$ac_ext <<_ACEOF
5357 #line 5357 "configure"
5358 #include "confdefs.h"
5359
5360 int
5361 main ()
5362 {
5363
5364   ;
5365   return 0;
5366 }
5367 _ACEOF
5368 rm -f conftest.$ac_objext conftest$ac_exeext
5369 if { (eval echo "$as_me:5369: \"$ac_link\"") >&5
5370   (eval $ac_link) 2>&5
5371   ac_status=$?
5372   echo "$as_me:5372: \$? = $ac_status" >&5
5373   (exit $ac_status); } &&
5374          { ac_try='test -s conftest$ac_exeext'
5375   { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376   (eval $ac_try) 2>&5
5377   ac_status=$?
5378   echo "$as_me:5378: \$? = $ac_status" >&5
5379   (exit $ac_status); }; }; then
5380   cf_rpath_space=no
5381 else
5382   echo "$as_me: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 cf_rpath_space=yes
5385 fi
5386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5387         LIBS="$cf_save_LIBS"
5388         echo "$as_me:5388: result: $cf_rpath_space" >&5
5389 echo "${ECHO_T}$cf_rpath_space" >&6
5390         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5391         ;;
5392 esac
5393
5394         LOCAL_LDFLAGS=
5395         LOCAL_LDFLAGS2=
5396         LD_SHARED_OPTS=
5397         INSTALL_LIB="-m 644"
5398
5399         cf_cv_do_symlinks=no
5400         cf_ld_rpath_opt=
5401         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5402
5403         echo "$as_me:5403: checking if release/abi version should be used for shared libs" >&5
5404 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5405
5406 # Check whether --with-shlib-version or --without-shlib-version was given.
5407 if test "${with_shlib_version+set}" = set; then
5408   withval="$with_shlib_version"
5409   test -z "$withval" && withval=auto
5410         case $withval in #(vi
5411         yes) #(vi
5412                 cf_cv_shlib_version=auto
5413                 ;;
5414         rel|abi|auto|no) #(vi
5415                 cf_cv_shlib_version=$withval
5416                 ;;
5417         *)
5418                 { { echo "$as_me:5418: error: option value must be one of: rel, abi, auto or no" >&5
5419 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5420    { (exit 1); exit 1; }; }
5421                 ;;
5422         esac
5423
5424 else
5425   cf_cv_shlib_version=auto
5426 fi;
5427         echo "$as_me:5427: result: $cf_cv_shlib_version" >&5
5428 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5429
5430         cf_cv_rm_so_locs=no
5431
5432         # Some less-capable ports of gcc support only -fpic
5433         CC_SHARED_OPTS=
5434         if test "$GCC" = yes
5435         then
5436                 echo "$as_me:5436: checking which $CC option to use" >&5
5437 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5438                 cf_save_CFLAGS="$CFLAGS"
5439                 for CC_SHARED_OPTS in -fPIC -fpic ''
5440                 do
5441                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5442                         cat >conftest.$ac_ext <<_ACEOF
5443 #line 5443 "configure"
5444 #include "confdefs.h"
5445 #include <stdio.h>
5446 int
5447 main ()
5448 {
5449 int x = 1
5450   ;
5451   return 0;
5452 }
5453 _ACEOF
5454 rm -f conftest.$ac_objext
5455 if { (eval echo "$as_me:5455: \"$ac_compile\"") >&5
5456   (eval $ac_compile) 2>&5
5457   ac_status=$?
5458   echo "$as_me:5458: \$? = $ac_status" >&5
5459   (exit $ac_status); } &&
5460          { ac_try='test -s conftest.$ac_objext'
5461   { (eval echo "$as_me:5461: \"$ac_try\"") >&5
5462   (eval $ac_try) 2>&5
5463   ac_status=$?
5464   echo "$as_me:5464: \$? = $ac_status" >&5
5465   (exit $ac_status); }; }; then
5466   break
5467 else
5468   echo "$as_me: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 fi
5471 rm -f conftest.$ac_objext conftest.$ac_ext
5472                 done
5473                 echo "$as_me:5473: result: $CC_SHARED_OPTS" >&5
5474 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5475                 CFLAGS="$cf_save_CFLAGS"
5476         fi
5477
5478         cf_cv_shlib_version_infix=no
5479
5480         case $cf_cv_system_name in #(vi
5481         aix[56]*) #(vi
5482                 if test "$GCC" = yes; then
5483                         CC_SHARED_OPTS=
5484                         MK_SHARED_LIB='$(CC) -shared'
5485                 fi
5486                 ;;
5487         beos*) #(vi
5488                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5489                 ;;
5490         cygwin*) #(vi
5491                 CC_SHARED_OPTS=
5492                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5493                 cf_cv_shlib_version=cygdll
5494                 cf_cv_shlib_version_infix=cygdll
5495                 cat >mk_shared_lib.sh <<-CF_EOF
5496                 #!/bin/sh
5497                 SHARED_LIB=\$1
5498                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5499                 shift
5500                 cat <<-EOF
5501                 Linking shared library
5502                 ** SHARED_LIB \$SHARED_LIB
5503                 ** IMPORT_LIB \$IMPORT_LIB
5504 EOF
5505                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5506 CF_EOF
5507                 chmod +x mk_shared_lib.sh
5508                 ;;
5509         darwin*) #(vi
5510                 EXTRA_CFLAGS="-no-cpp-precomp"
5511                 CC_SHARED_OPTS="-dynamic"
5512                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5513                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5514                 cf_cv_shlib_version_infix=yes
5515                 echo "$as_me:5515: checking if ld -search_paths_first works" >&5
5516 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5517 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5518   echo $ECHO_N "(cached) $ECHO_C" >&6
5519 else
5520
5521                         cf_save_LDFLAGS=$LDFLAGS
5522                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5523                         cat >conftest.$ac_ext <<_ACEOF
5524 #line 5524 "configure"
5525 #include "confdefs.h"
5526
5527 int
5528 main ()
5529 {
5530 int i;
5531   ;
5532   return 0;
5533 }
5534 _ACEOF
5535 rm -f conftest.$ac_objext conftest$ac_exeext
5536 if { (eval echo "$as_me:5536: \"$ac_link\"") >&5
5537   (eval $ac_link) 2>&5
5538   ac_status=$?
5539   echo "$as_me:5539: \$? = $ac_status" >&5
5540   (exit $ac_status); } &&
5541          { ac_try='test -s conftest$ac_exeext'
5542   { (eval echo "$as_me:5542: \"$ac_try\"") >&5
5543   (eval $ac_try) 2>&5
5544   ac_status=$?
5545   echo "$as_me:5545: \$? = $ac_status" >&5
5546   (exit $ac_status); }; }; then
5547   cf_cv_ldflags_search_paths_first=yes
5548 else
5549   echo "$as_me: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5551 cf_cv_ldflags_search_paths_first=no
5552 fi
5553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5554                                 LDFLAGS=$cf_save_LDFLAGS
5555 fi
5556 echo "$as_me:5556: result: $cf_cv_ldflags_search_paths_first" >&5
5557 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5558                 if test $cf_cv_ldflags_search_paths_first = yes; then
5559                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5560                 fi
5561                 ;;
5562         hpux*) #(vi
5563                 # (tested with gcc 2.7.2 -- I don't have c89)
5564                 if test "$GCC" = yes; then
5565                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5566                 else
5567                         CC_SHARED_OPTS='+Z'
5568                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5569                 fi
5570                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5571                 # HP-UX shared libraries must be executable, and should be
5572                 # readonly to exploit a quirk in the memory manager.
5573                 INSTALL_LIB="-m 555"
5574                 ;;
5575         irix*) #(vi
5576                 if test "$cf_cv_enable_rpath" = yes ; then
5577                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5578                 fi
5579                 # tested with IRIX 5.2 and 'cc'.
5580                 if test "$GCC" != yes; then
5581                         CC_SHARED_OPTS='-KPIC'
5582                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5583                 else
5584                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5585                 fi
5586                 cf_cv_rm_so_locs=yes
5587                 ;;
5588         linux*|gnu*|k*bsd*-gnu) #(vi
5589                 if test "$DFT_LWR_MODEL" = "shared" ; then
5590                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5591                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5592                 fi
5593                 if test "$cf_cv_enable_rpath" = yes ; then
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5595                 fi
5596
5597         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5598         if test "$cf_cv_shlib_version" = rel; then
5599                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5600         else
5601                 cf_cv_shared_soname='`basename $@`'
5602         fi
5603
5604                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5605                 ;;
5606         openbsd[2-9].*) #(vi
5607                 if test "$DFT_LWR_MODEL" = "shared" ; then
5608                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5609                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5610                 fi
5611                 if test "$cf_cv_enable_rpath" = yes ; then
5612                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5613                 fi
5614                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5615
5616         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5617         if test "$cf_cv_shlib_version" = rel; then
5618                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5619         else
5620                 cf_cv_shared_soname='`basename $@`'
5621         fi
5622
5623                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5624                 ;;
5625         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5626                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5627                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5628                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5629                 ;;
5630         freebsd*) #(vi
5631                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5632                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5633                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5634                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5635                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5636                 fi
5637
5638         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5639         if test "$cf_cv_shlib_version" = rel; then
5640                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5641         else
5642                 cf_cv_shared_soname='`basename $@`'
5643         fi
5644
5645                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5646                 ;;
5647         netbsd*) #(vi
5648                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5649                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5650                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5651                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5652                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5653                         if test "$cf_cv_shlib_version" = auto; then
5654                         if test -f /usr/libexec/ld.elf_so; then
5655                                 cf_cv_shlib_version=abi
5656                         else
5657                                 cf_cv_shlib_version=rel
5658                         fi
5659                         fi
5660
5661         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5662         if test "$cf_cv_shlib_version" = rel; then
5663                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5664         else
5665                 cf_cv_shared_soname='`basename $@`'
5666         fi
5667
5668                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5669                 else
5670                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5671                 fi
5672                 ;;
5673         osf*|mls+*) #(vi
5674                 # tested with OSF/1 V3.2 and 'cc'
5675                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5676                 # link with shared libs).
5677                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5678                 case $host_os in #(vi
5679                 osf4*)
5680                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5681                         ;;
5682                 esac
5683                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5684                 if test "$DFT_LWR_MODEL" = "shared" ; then
5685                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5686                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5687                 fi
5688                 cf_cv_rm_so_locs=yes
5689                 ;;
5690         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5691                 # tested with osr5.0.5
5692                 if test "$GCC" != yes; then
5693                         CC_SHARED_OPTS='-belf -KPIC'
5694                 fi
5695                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5696                 if test "$cf_cv_enable_rpath" = yes ; then
5697                         # only way is to set LD_RUN_PATH but no switch for it
5698                         RUN_PATH=$libdir
5699                 fi
5700                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5701                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5702                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5703                 ;;
5704         sunos4*) #(vi
5705                 # tested with SunOS 4.1.1 and gcc 2.7.0
5706                 if test "$GCC" != yes; then
5707                         CC_SHARED_OPTS='-KPIC'
5708                 fi
5709                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5710                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5711                 ;;
5712         solaris2*) #(vi
5713                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5714                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5715                 if test "$DFT_LWR_MODEL" = "shared" ; then
5716                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5717                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5718                 fi
5719                 if test "$cf_cv_enable_rpath" = yes ; then
5720                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5721                 fi
5722
5723         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5724         if test "$cf_cv_shlib_version" = rel; then
5725                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5726         else
5727                 cf_cv_shared_soname='`basename $@`'
5728         fi
5729
5730                 if test "$GCC" != yes; then
5731                         cf_save_CFLAGS="$CFLAGS"
5732                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5733                         do
5734                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5735                                 cat >conftest.$ac_ext <<_ACEOF
5736 #line 5736 "configure"
5737 #include "confdefs.h"
5738 #include <stdio.h>
5739 int
5740 main ()
5741 {
5742 printf("Hello\n");
5743   ;
5744   return 0;
5745 }
5746 _ACEOF
5747 rm -f conftest.$ac_objext
5748 if { (eval echo "$as_me:5748: \"$ac_compile\"") >&5
5749   (eval $ac_compile) 2>&5
5750   ac_status=$?
5751   echo "$as_me:5751: \$? = $ac_status" >&5
5752   (exit $ac_status); } &&
5753          { ac_try='test -s conftest.$ac_objext'
5754   { (eval echo "$as_me:5754: \"$ac_try\"") >&5
5755   (eval $ac_try) 2>&5
5756   ac_status=$?
5757   echo "$as_me:5757: \$? = $ac_status" >&5
5758   (exit $ac_status); }; }; then
5759   break
5760 else
5761   echo "$as_me: failed program was:" >&5
5762 cat conftest.$ac_ext >&5
5763 fi
5764 rm -f conftest.$ac_objext conftest.$ac_ext
5765                         done
5766                         CFLAGS="$cf_save_CFLAGS"
5767                         CC_SHARED_OPTS=$cf_shared_opts
5768                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5769                 else
5770                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5771                 fi
5772                 ;;
5773         sysv5uw7*|unix_sv*) #(vi
5774                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5775                 if test "$GCC" != yes; then
5776                         CC_SHARED_OPTS='-KPIC'
5777                 fi
5778                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5779                 ;;
5780         *)
5781                 CC_SHARED_OPTS='unknown'
5782                 MK_SHARED_LIB='echo unknown'
5783                 ;;
5784         esac
5785
5786         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5787         case "$cf_cv_shlib_version" in #(vi
5788         rel|abi)
5789                 case "$MK_SHARED_LIB" in #(vi
5790                 *'-o $@') #(vi
5791                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5792                         ;;
5793                 *)
5794                         { echo "$as_me:5794: WARNING: ignored --with-shlib-version" >&5
5795 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5796                         ;;
5797                 esac
5798                 ;;
5799         esac
5800
5801         if test -n "$cf_ld_rpath_opt" ; then
5802                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5803         fi
5804
5805 if test "$CC_SHARED_OPTS" = "unknown"; then
5806         for model in $cf_list_models; do
5807                 if test "$model" = "shared"; then
5808                         { { echo "$as_me:5808: error: Shared libraries are not supported in this version" >&5
5809 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5810    { (exit 1); exit 1; }; }
5811                 fi
5812         done
5813 fi
5814
5815 ### If we're building with rpath, try to link non-standard libs that way too.
5816 if test "$DFT_LWR_MODEL" = "shared"; then
5817
5818 echo "$as_me:5818: checking if rpath should be not be set" >&5
5819 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
5820
5821 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5822 if test "${enable_rpath_hack+set}" = set; then
5823   enableval="$enable_rpath_hack"
5824   test "$enableval" != no && enableval=yes
5825   if test "$enableval" != "yes" ; then
5826     cf_disable_rpath_hack=yes
5827   else
5828     cf_disable_rpath_hack=no
5829   fi
5830 else
5831   enableval=yes
5832   cf_disable_rpath_hack=no
5833
5834 fi;
5835 echo "$as_me:5835: result: $cf_disable_rpath_hack" >&5
5836 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5837 if test "$cf_disable_rpath_hack" = no ; then
5838
5839 echo "$as_me:5839: checking for updated LDFLAGS" >&5
5840 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5841 if test -n "$LD_RPATH_OPT" ; then
5842         echo "$as_me:5842: result: maybe" >&5
5843 echo "${ECHO_T}maybe" >&6
5844
5845         for ac_prog in ldd
5846 do
5847   # Extract the first word of "$ac_prog", so it can be a program name with args.
5848 set dummy $ac_prog; ac_word=$2
5849 echo "$as_me:5849: checking for $ac_word" >&5
5850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5851 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5852   echo $ECHO_N "(cached) $ECHO_C" >&6
5853 else
5854   if test -n "$cf_ldd_prog"; then
5855   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5856 else
5857   ac_save_IFS=$IFS; IFS=$ac_path_separator
5858 ac_dummy="$PATH"
5859 for ac_dir in $ac_dummy; do
5860   IFS=$ac_save_IFS
5861   test -z "$ac_dir" && ac_dir=.
5862   $as_executable_p "$ac_dir/$ac_word" || continue
5863 ac_cv_prog_cf_ldd_prog="$ac_prog"
5864 echo "$as_me:5864: found $ac_dir/$ac_word" >&5
5865 break
5866 done
5867
5868 fi
5869 fi
5870 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5871 if test -n "$cf_ldd_prog"; then
5872   echo "$as_me:5872: result: $cf_ldd_prog" >&5
5873 echo "${ECHO_T}$cf_ldd_prog" >&6
5874 else
5875   echo "$as_me:5875: result: no" >&5
5876 echo "${ECHO_T}no" >&6
5877 fi
5878
5879   test -n "$cf_ldd_prog" && break
5880 done
5881 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5882
5883         cf_rpath_list="/usr/lib /lib"
5884         if test "$cf_ldd_prog" != no
5885         then
5886 cat >conftest.$ac_ext <<_ACEOF
5887 #line 5887 "configure"
5888 #include "confdefs.h"
5889 #include <stdio.h>
5890 int
5891 main ()
5892 {
5893 printf("Hello");
5894   ;
5895   return 0;
5896 }
5897 _ACEOF
5898 rm -f conftest.$ac_objext conftest$ac_exeext
5899 if { (eval echo "$as_me:5899: \"$ac_link\"") >&5
5900   (eval $ac_link) 2>&5
5901   ac_status=$?
5902   echo "$as_me:5902: \$? = $ac_status" >&5
5903   (exit $ac_status); } &&
5904          { ac_try='test -s conftest$ac_exeext'
5905   { (eval echo "$as_me:5905: \"$ac_try\"") >&5
5906   (eval $ac_try) 2>&5
5907   ac_status=$?
5908   echo "$as_me:5908: \$? = $ac_status" >&5
5909   (exit $ac_status); }; }; then
5910   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5911 else
5912   echo "$as_me: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 fi
5915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5916         fi
5917
5918         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5919
5920 echo "${as_me-configure}:5920: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5921
5922 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5923
5924 echo "${as_me-configure}:5924: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5925
5926 cf_rpath_dst=
5927 for cf_rpath_src in $LDFLAGS
5928 do
5929         case $cf_rpath_src in #(vi
5930         -L*) #(vi
5931
5932                 # check if this refers to a directory which we will ignore
5933                 cf_rpath_skip=no
5934                 if test -n "$cf_rpath_list"
5935                 then
5936                         for cf_rpath_item in $cf_rpath_list
5937                         do
5938                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5939                                 then
5940                                         cf_rpath_skip=yes
5941                                         break
5942                                 fi
5943                         done
5944                 fi
5945
5946                 if test "$cf_rpath_skip" = no
5947                 then
5948                         # transform the option
5949                         if test "$LD_RPATH_OPT" = "-R " ; then
5950                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5951                         else
5952                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5953                         fi
5954
5955                         # if we have not already added this, add it now
5956                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5957                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5958                         then
5959                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5960
5961 echo "${as_me-configure}:5961: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5962
5963                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5964                         fi
5965                 fi
5966                 ;;
5967         esac
5968         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5969 done
5970 LDFLAGS=$cf_rpath_dst
5971
5972 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5973
5974 echo "${as_me-configure}:5974: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5975
5976 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5977
5978 echo "${as_me-configure}:5978: testing ...checking LIBS $LIBS ..." 1>&5
5979
5980 cf_rpath_dst=
5981 for cf_rpath_src in $LIBS
5982 do
5983         case $cf_rpath_src in #(vi
5984         -L*) #(vi
5985
5986                 # check if this refers to a directory which we will ignore
5987                 cf_rpath_skip=no
5988                 if test -n "$cf_rpath_list"
5989                 then
5990                         for cf_rpath_item in $cf_rpath_list
5991                         do
5992                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5993                                 then
5994                                         cf_rpath_skip=yes
5995                                         break
5996                                 fi
5997                         done
5998                 fi
5999
6000                 if test "$cf_rpath_skip" = no
6001                 then
6002                         # transform the option
6003                         if test "$LD_RPATH_OPT" = "-R " ; then
6004                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6005                         else
6006                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6007                         fi
6008
6009                         # if we have not already added this, add it now
6010                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6011                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6012                         then
6013                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6014
6015 echo "${as_me-configure}:6015: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6016
6017                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6018                         fi
6019                 fi
6020                 ;;
6021         esac
6022         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6023 done
6024 LIBS=$cf_rpath_dst
6025
6026 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6027
6028 echo "${as_me-configure}:6028: testing ...checked LIBS $LIBS ..." 1>&5
6029
6030         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6031
6032 echo "${as_me-configure}:6032: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6033
6034 fi
6035
6036 fi
6037
6038 fi
6039
6040 ###############################################################################
6041
6042 ###     use option --disable-overwrite to leave out the link to -lcurses
6043 echo "$as_me:6043: checking if you wish to install ncurses overwriting curses" >&5
6044 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6045
6046 # Check whether --enable-overwrite or --disable-overwrite was given.
6047 if test "${enable_overwrite+set}" = set; then
6048   enableval="$enable_overwrite"
6049   with_overwrite=$enableval
6050 else
6051   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6052 fi;
6053 echo "$as_me:6053: result: $with_overwrite" >&5
6054 echo "${ECHO_T}$with_overwrite" >&6
6055
6056 echo "$as_me:6056: checking if external terminfo-database is used" >&5
6057 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6058
6059 # Check whether --enable-database or --disable-database was given.
6060 if test "${enable_database+set}" = set; then
6061   enableval="$enable_database"
6062   use_database=$enableval
6063 else
6064   use_database=yes
6065 fi;
6066 echo "$as_me:6066: result: $use_database" >&5
6067 echo "${ECHO_T}$use_database" >&6
6068
6069 case $host_os in #(vi
6070 os2*) #(vi
6071         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6072         ;;
6073 *) #(vi
6074         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6075         ;;
6076 esac
6077
6078         case $cf_cv_system_name in
6079         os2*)   PATH_SEPARATOR=';'  ;;
6080         *)      PATH_SEPARATOR=':'  ;;
6081         esac
6082
6083 if test "$use_database" != no ; then
6084         cat >>confdefs.h <<\EOF
6085 #define USE_DATABASE 1
6086 EOF
6087
6088         echo "$as_me:6088: checking which terminfo source-file will be installed" >&5
6089 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6090
6091 # Check whether --with-database or --without-database was given.
6092 if test "${with_database+set}" = set; then
6093   withval="$with_database"
6094   TERMINFO_SRC=$withval
6095 fi;
6096         echo "$as_me:6096: result: $TERMINFO_SRC" >&5
6097 echo "${ECHO_T}$TERMINFO_SRC" >&6
6098
6099         echo "$as_me:6099: checking whether to use hashed database instead of directory/tree" >&5
6100 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6101
6102 # Check whether --with-hashed-db or --without-hashed-db was given.
6103 if test "${with_hashed_db+set}" = set; then
6104   withval="$with_hashed_db"
6105
6106 else
6107   with_hashed_db=no
6108 fi;
6109         echo "$as_me:6109: result: $with_hashed_db" >&5
6110 echo "${ECHO_T}$with_hashed_db" >&6
6111 else
6112         with_hashed_db=no
6113 fi
6114
6115 echo "$as_me:6115: checking for list of fallback descriptions" >&5
6116 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6117
6118 # Check whether --with-fallbacks or --without-fallbacks was given.
6119 if test "${with_fallbacks+set}" = set; then
6120   withval="$with_fallbacks"
6121   with_fallback=$withval
6122 else
6123   with_fallback=
6124 fi;
6125 echo "$as_me:6125: result: $with_fallback" >&5
6126 echo "${ECHO_T}$with_fallback" >&6
6127 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6128
6129 echo "$as_me:6129: checking if you want modern xterm or antique" >&5
6130 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6131
6132 # Check whether --with-xterm-new or --without-xterm-new was given.
6133 if test "${with_xterm_new+set}" = set; then
6134   withval="$with_xterm_new"
6135   with_xterm_new=$withval
6136 else
6137   with_xterm_new=yes
6138 fi;
6139 case $with_xterm_new in
6140 no)     with_xterm_new=xterm-old;;
6141 *)      with_xterm_new=xterm-new;;
6142 esac
6143 echo "$as_me:6143: result: $with_xterm_new" >&5
6144 echo "${ECHO_T}$with_xterm_new" >&6
6145 WHICH_XTERM=$with_xterm_new
6146
6147 MAKE_TERMINFO=
6148 if test "$use_database" = no ; then
6149         TERMINFO="${datadir}/terminfo"
6150         MAKE_TERMINFO="#"
6151 else
6152
6153 echo "$as_me:6153: checking for list of terminfo directories" >&5
6154 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6155
6156 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6157 if test "${with_terminfo_dirs+set}" = set; then
6158   withval="$with_terminfo_dirs"
6159
6160 else
6161   withval=${TERMINFO_DIRS-${datadir}/terminfo}
6162 fi;
6163 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6164 cf_dst_path=
6165 for cf_src_path in $withval
6166 do
6167
6168 if test "x$prefix" != xNONE; then
6169   cf_path_syntax="$prefix"
6170 else
6171   cf_path_syntax="$ac_default_prefix"
6172 fi
6173
6174 case ".$cf_src_path" in #(vi
6175 .\$\(*\)*|.\'*\'*) #(vi
6176   ;;
6177 ..|./*|.\\*) #(vi
6178   ;;
6179 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6180   ;;
6181 .\${*prefix}*) #(vi
6182   eval cf_src_path="$cf_src_path"
6183   case ".$cf_src_path" in #(vi
6184   .NONE/*)
6185     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6186     ;;
6187   esac
6188   ;; #(vi
6189 .no|.NONE/*)
6190   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6191   ;;
6192 *)
6193   { { echo "$as_me:6193: error: expected a pathname, not \"$cf_src_path\"" >&5
6194 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6195    { (exit 1); exit 1; }; }
6196   ;;
6197 esac
6198
6199   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6200   cf_dst_path="${cf_dst_path}${cf_src_path}"
6201 done
6202 IFS="$ac_save_ifs"
6203
6204 eval 'TERMINFO_DIRS="$cf_dst_path"'
6205
6206 echo "$as_me:6206: result: $TERMINFO_DIRS" >&5
6207 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6208 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6209 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6210 EOF
6211
6212 echo "$as_me:6212: checking for default terminfo directory" >&5
6213 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6214
6215 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6216 if test "${with_default_terminfo_dir+set}" = set; then
6217   withval="$with_default_terminfo_dir"
6218
6219 else
6220   withval="${TERMINFO-${datadir}/terminfo}"
6221 fi; if test -n "${datadir}/terminfo" ; then
6222
6223 if test "x$prefix" != xNONE; then
6224   cf_path_syntax="$prefix"
6225 else
6226   cf_path_syntax="$ac_default_prefix"
6227 fi
6228
6229 case ".$withval" in #(vi
6230 .\$\(*\)*|.\'*\'*) #(vi
6231   ;;
6232 ..|./*|.\\*) #(vi
6233   ;;
6234 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6235   ;;
6236 .\${*prefix}*) #(vi
6237   eval withval="$withval"
6238   case ".$withval" in #(vi
6239   .NONE/*)
6240     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6241     ;;
6242   esac
6243   ;; #(vi
6244 .no|.NONE/*)
6245   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6246   ;;
6247 *)
6248   { { echo "$as_me:6248: error: expected a pathname, not \"$withval\"" >&5
6249 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6250    { (exit 1); exit 1; }; }
6251   ;;
6252 esac
6253
6254 fi
6255 TERMINFO="$withval"
6256
6257 echo "$as_me:6257: result: $TERMINFO" >&5
6258 echo "${ECHO_T}$TERMINFO" >&6
6259 cat >>confdefs.h <<EOF
6260 #define TERMINFO "$TERMINFO"
6261 EOF
6262
6263 fi
6264
6265 ###     use option --disable-big-core to make tic run on small machines
6266 ###     We need 4Mb, check if we can allocate 50% more than that.
6267 echo "$as_me:6267: checking if big-core option selected" >&5
6268 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6269
6270 # Check whether --enable-big-core or --disable-big-core was given.
6271 if test "${enable_big_core+set}" = set; then
6272   enableval="$enable_big_core"
6273   with_big_core=$enableval
6274 else
6275   if test "$cross_compiling" = yes; then
6276   with_big_core=no
6277 else
6278   cat >conftest.$ac_ext <<_ACEOF
6279 #line 6279 "configure"
6280 #include "confdefs.h"
6281
6282 #include <stdlib.h>
6283 #include <string.h>
6284 int main() {
6285         unsigned long n = 6000000L;
6286         char *s = malloc(n);
6287         if (s != 0)
6288                 s[0] = s[n-1] = 0;
6289         ${cf_cv_main_return:-return}(s == 0);
6290 }
6291 _ACEOF
6292 rm -f conftest$ac_exeext
6293 if { (eval echo "$as_me:6293: \"$ac_link\"") >&5
6294   (eval $ac_link) 2>&5
6295   ac_status=$?
6296   echo "$as_me:6296: \$? = $ac_status" >&5
6297   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6298   { (eval echo "$as_me:6298: \"$ac_try\"") >&5
6299   (eval $ac_try) 2>&5
6300   ac_status=$?
6301   echo "$as_me:6301: \$? = $ac_status" >&5
6302   (exit $ac_status); }; }; then
6303   with_big_core=yes
6304 else
6305   echo "$as_me: program exited with status $ac_status" >&5
6306 echo "$as_me: failed program was:" >&5
6307 cat conftest.$ac_ext >&5
6308 with_big_core=no
6309 fi
6310 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6311 fi
6312 fi;
6313 echo "$as_me:6313: result: $with_big_core" >&5
6314 echo "${ECHO_T}$with_big_core" >&6
6315 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6316 #define HAVE_BIG_CORE 1
6317 EOF
6318
6319 ### ISO C only guarantees 512-char strings, we have tables which load faster
6320 ### when constructed using "big" strings.  More than the C compiler, the awk
6321 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6322 echo "$as_me:6322: checking if big-strings option selected" >&5
6323 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6324
6325 # Check whether --enable-big-strings or --disable-big-strings was given.
6326 if test "${enable_big_strings+set}" = set; then
6327   enableval="$enable_big_strings"
6328   with_big_strings=$enableval
6329 else
6330
6331         case x$AWK in #(vi
6332         x)
6333                 eval with_big_strings=no
6334                 ;;
6335         *) #(vi
6336                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6337                         | $AWK '{ printf "%d\n", length($0); }' | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
6338                         eval with_big_strings=yes
6339                 else
6340                         eval with_big_strings=no
6341                 fi
6342                 ;;
6343         esac
6344
6345 fi;
6346 echo "$as_me:6346: result: $with_big_strings" >&5
6347 echo "${ECHO_T}$with_big_strings" >&6
6348
6349 USE_BIG_STRINGS=0
6350 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6351
6352 ###     use option --enable-termcap to compile in the termcap fallback support
6353 echo "$as_me:6353: checking if you want termcap-fallback support" >&5
6354 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6355
6356 # Check whether --enable-termcap or --disable-termcap was given.
6357 if test "${enable_termcap+set}" = set; then
6358   enableval="$enable_termcap"
6359   with_termcap=$enableval
6360 else
6361   with_termcap=no
6362 fi;
6363 echo "$as_me:6363: result: $with_termcap" >&5
6364 echo "${ECHO_T}$with_termcap" >&6
6365
6366 if test "$with_termcap" != "yes" ; then
6367         if test "$use_database" = no ; then
6368                 if test -z "$with_fallback" ; then
6369                         { { echo "$as_me:6369: error: You have disabled the database w/o specifying fallbacks" >&5
6370 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6371    { (exit 1); exit 1; }; }
6372                 fi
6373         fi
6374         cat >>confdefs.h <<\EOF
6375 #define PURE_TERMINFO 1
6376 EOF
6377
6378 else
6379
6380 if test "$with_ticlib" != no ; then
6381         { { echo "$as_me:6381: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6382 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6383    { (exit 1); exit 1; }; }
6384 fi
6385
6386 cat >>confdefs.h <<\EOF
6387 #define USE_TERMCAP 1
6388 EOF
6389
6390 echo "$as_me:6390: checking for list of termcap files" >&5
6391 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6392
6393 # Check whether --with-termpath or --without-termpath was given.
6394 if test "${with_termpath+set}" = set; then
6395   withval="$with_termpath"
6396
6397 else
6398   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6399 fi;
6400 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6401 cf_dst_path=
6402 for cf_src_path in $withval
6403 do
6404
6405 if test "x$prefix" != xNONE; then
6406   cf_path_syntax="$prefix"
6407 else
6408   cf_path_syntax="$ac_default_prefix"
6409 fi
6410
6411 case ".$cf_src_path" in #(vi
6412 .\$\(*\)*|.\'*\'*) #(vi
6413   ;;
6414 ..|./*|.\\*) #(vi
6415   ;;
6416 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6417   ;;
6418 .\${*prefix}*) #(vi
6419   eval cf_src_path="$cf_src_path"
6420   case ".$cf_src_path" in #(vi
6421   .NONE/*)
6422     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6423     ;;
6424   esac
6425   ;; #(vi
6426 .no|.NONE/*)
6427   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6428   ;;
6429 *)
6430   { { echo "$as_me:6430: error: expected a pathname, not \"$cf_src_path\"" >&5
6431 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6432    { (exit 1); exit 1; }; }
6433   ;;
6434 esac
6435
6436   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6437   cf_dst_path="${cf_dst_path}${cf_src_path}"
6438 done
6439 IFS="$ac_save_ifs"
6440
6441 eval 'TERMPATH="$cf_dst_path"'
6442
6443 echo "$as_me:6443: result: $TERMPATH" >&5
6444 echo "${ECHO_T}$TERMPATH" >&6
6445 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6446 #define TERMPATH "$TERMPATH"
6447 EOF
6448
6449 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6450 echo "$as_me:6450: checking if fast termcap-loader is needed" >&5
6451 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6452
6453 # Check whether --enable-getcap or --disable-getcap was given.
6454 if test "${enable_getcap+set}" = set; then
6455   enableval="$enable_getcap"
6456   with_getcap=$enableval
6457 else
6458   with_getcap=no
6459 fi;
6460 echo "$as_me:6460: result: $with_getcap" >&5
6461 echo "${ECHO_T}$with_getcap" >&6
6462 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6463 #define USE_GETCAP 1
6464 EOF
6465
6466 echo "$as_me:6466: checking if translated termcaps will be cached in ~/.terminfo" >&5
6467 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6468
6469 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6470 if test "${enable_getcap_cache+set}" = set; then
6471   enableval="$enable_getcap_cache"
6472   with_getcap_cache=$enableval
6473 else
6474   with_getcap_cache=no
6475 fi;
6476 echo "$as_me:6476: result: $with_getcap_cache" >&5
6477 echo "${ECHO_T}$with_getcap_cache" >&6
6478 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6479 #define USE_GETCAP_CACHE 1
6480 EOF
6481
6482 fi
6483
6484 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6485 echo "$as_me:6485: checking if ~/.terminfo is wanted" >&5
6486 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6487
6488 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6489 if test "${enable_home_terminfo+set}" = set; then
6490   enableval="$enable_home_terminfo"
6491   with_home_terminfo=$enableval
6492 else
6493   with_home_terminfo=yes
6494 fi;
6495 echo "$as_me:6495: result: $with_home_terminfo" >&5
6496 echo "${ECHO_T}$with_home_terminfo" >&6
6497 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6498 #define USE_HOME_TERMINFO 1
6499 EOF
6500
6501 echo "$as_me:6501: checking if you want to use restricted environment when running as root" >&5
6502 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6503
6504 # Check whether --enable-root-environ or --disable-root-environ was given.
6505 if test "${enable_root_environ+set}" = set; then
6506   enableval="$enable_root_environ"
6507   with_root_environ=$enableval
6508 else
6509   with_root_environ=yes
6510 fi;
6511 echo "$as_me:6511: result: $with_root_environ" >&5
6512 echo "${ECHO_T}$with_root_environ" >&6
6513 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6514 #define USE_ROOT_ENVIRON 1
6515 EOF
6516
6517 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6518 ###   to reduce storage requirements for the terminfo database.
6519
6520 for ac_func in \
6521         remove \
6522         unlink
6523 do
6524 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6525 echo "$as_me:6525: checking for $ac_func" >&5
6526 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6527 if eval "test \"\${$as_ac_var+set}\" = set"; then
6528   echo $ECHO_N "(cached) $ECHO_C" >&6
6529 else
6530   cat >conftest.$ac_ext <<_ACEOF
6531 #line 6531 "configure"
6532 #include "confdefs.h"
6533 /* System header to define __stub macros and hopefully few prototypes,
6534     which can conflict with char $ac_func (); below.  */
6535 #include <assert.h>
6536 /* Override any gcc2 internal prototype to avoid an error.  */
6537 #ifdef __cplusplus
6538 extern "C"
6539 #endif
6540 /* We use char because int might match the return type of a gcc2
6541    builtin and then its argument prototype would still apply.  */
6542 char $ac_func ();
6543 char (*f) ();
6544
6545 int
6546 main ()
6547 {
6548 /* The GNU C library defines this for functions which it implements
6549     to always fail with ENOSYS.  Some functions are actually named
6550     something starting with __ and the normal name is an alias.  */
6551 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6552 choke me
6553 #else
6554 f = $ac_func;
6555 #endif
6556
6557   ;
6558   return 0;
6559 }
6560 _ACEOF
6561 rm -f conftest.$ac_objext conftest$ac_exeext
6562 if { (eval echo "$as_me:6562: \"$ac_link\"") >&5
6563   (eval $ac_link) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); } &&
6567          { ac_try='test -s conftest$ac_exeext'
6568   { (eval echo "$as_me:6568: \"$ac_try\"") >&5
6569   (eval $ac_try) 2>&5
6570   ac_status=$?
6571   echo "$as_me:6571: \$? = $ac_status" >&5
6572   (exit $ac_status); }; }; then
6573   eval "$as_ac_var=yes"
6574 else
6575   echo "$as_me: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6577 eval "$as_ac_var=no"
6578 fi
6579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6580 fi
6581 echo "$as_me:6581: result: `eval echo '${'$as_ac_var'}'`" >&5
6582 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6583 if test `eval echo '${'$as_ac_var'}'` = yes; then
6584   cat >>confdefs.h <<EOF
6585 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6586 EOF
6587
6588 fi
6589 done
6590
6591 if test "$cross_compiling" = yes ; then
6592
6593 for ac_func in \
6594                 link \
6595                 symlink
6596 do
6597 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6598 echo "$as_me:6598: checking for $ac_func" >&5
6599 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6600 if eval "test \"\${$as_ac_var+set}\" = set"; then
6601   echo $ECHO_N "(cached) $ECHO_C" >&6
6602 else
6603   cat >conftest.$ac_ext <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6606 /* System header to define __stub macros and hopefully few prototypes,
6607     which can conflict with char $ac_func (); below.  */
6608 #include <assert.h>
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 #ifdef __cplusplus
6611 extern "C"
6612 #endif
6613 /* We use char because int might match the return type of a gcc2
6614    builtin and then its argument prototype would still apply.  */
6615 char $ac_func ();
6616 char (*f) ();
6617
6618 int
6619 main ()
6620 {
6621 /* The GNU C library defines this for functions which it implements
6622     to always fail with ENOSYS.  Some functions are actually named
6623     something starting with __ and the normal name is an alias.  */
6624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6625 choke me
6626 #else
6627 f = $ac_func;
6628 #endif
6629
6630   ;
6631   return 0;
6632 }
6633 _ACEOF
6634 rm -f conftest.$ac_objext conftest$ac_exeext
6635 if { (eval echo "$as_me:6635: \"$ac_link\"") >&5
6636   (eval $ac_link) 2>&5
6637   ac_status=$?
6638   echo "$as_me:6638: \$? = $ac_status" >&5
6639   (exit $ac_status); } &&
6640          { ac_try='test -s conftest$ac_exeext'
6641   { (eval echo "$as_me:6641: \"$ac_try\"") >&5
6642   (eval $ac_try) 2>&5
6643   ac_status=$?
6644   echo "$as_me:6644: \$? = $ac_status" >&5
6645   (exit $ac_status); }; }; then
6646   eval "$as_ac_var=yes"
6647 else
6648   echo "$as_me: failed program was:" >&5
6649 cat conftest.$ac_ext >&5
6650 eval "$as_ac_var=no"
6651 fi
6652 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6653 fi
6654 echo "$as_me:6654: result: `eval echo '${'$as_ac_var'}'`" >&5
6655 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6656 if test `eval echo '${'$as_ac_var'}'` = yes; then
6657   cat >>confdefs.h <<EOF
6658 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6659 EOF
6660
6661 fi
6662 done
6663
6664 else
6665         echo "$as_me:6665: checking if link/symlink functions work" >&5
6666 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6667 if test "${cf_cv_link_funcs+set}" = set; then
6668   echo $ECHO_N "(cached) $ECHO_C" >&6
6669 else
6670
6671                 cf_cv_link_funcs=
6672                 for cf_func in link symlink ; do
6673                         if test "$cross_compiling" = yes; then
6674
6675                         eval 'ac_cv_func_'$cf_func'=error'
6676 else
6677   cat >conftest.$ac_ext <<_ACEOF
6678 #line 6678 "configure"
6679 #include "confdefs.h"
6680
6681 #include <sys/types.h>
6682 #include <sys/stat.h>
6683 #ifdef HAVE_UNISTD_H
6684 #include <unistd.h>
6685 #endif
6686 int main()
6687 {
6688         int fail = 0;
6689         char *src = "config.log";
6690         char *dst = "conftest.chk";
6691         struct stat src_sb;
6692         struct stat dst_sb;
6693
6694         stat(src, &src_sb);
6695         fail = ($cf_func("config.log", "conftest.chk") < 0)
6696             || (stat(dst, &dst_sb) < 0)
6697             || (dst_sb.st_mtime != src_sb.st_mtime);
6698 #ifdef HAVE_UNLINK
6699         unlink(dst);
6700 #else
6701         remove(dst);
6702 #endif
6703         ${cf_cv_main_return:-return} (fail);
6704 }
6705
6706 _ACEOF
6707 rm -f conftest$ac_exeext
6708 if { (eval echo "$as_me:6708: \"$ac_link\"") >&5
6709   (eval $ac_link) 2>&5
6710   ac_status=$?
6711   echo "$as_me:6711: \$? = $ac_status" >&5
6712   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6713   { (eval echo "$as_me:6713: \"$ac_try\"") >&5
6714   (eval $ac_try) 2>&5
6715   ac_status=$?
6716   echo "$as_me:6716: \$? = $ac_status" >&5
6717   (exit $ac_status); }; }; then
6718
6719                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6720                         eval 'ac_cv_func_'$cf_func'=yes'
6721 else
6722   echo "$as_me: program exited with status $ac_status" >&5
6723 echo "$as_me: failed program was:" >&5
6724 cat conftest.$ac_ext >&5
6725
6726                         eval 'ac_cv_func_'$cf_func'=no'
6727 fi
6728 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6729 fi
6730                 done
6731                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6732
6733 fi
6734 echo "$as_me:6734: result: $cf_cv_link_funcs" >&5
6735 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6736         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6737 #define HAVE_LINK 1
6738 EOF
6739
6740         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6741 #define HAVE_SYMLINK 1
6742 EOF
6743
6744 fi
6745
6746 with_links=no
6747 with_symlinks=no
6748
6749 # soft links (symbolic links) are useful for some systems where hard links do
6750 # not work, or to make it simpler to copy terminfo trees around.
6751 if test "$ac_cv_func_symlink" = yes ; then
6752     echo "$as_me:6752: checking if tic should use symbolic links" >&5
6753 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6754
6755 # Check whether --enable-symlinks or --disable-symlinks was given.
6756 if test "${enable_symlinks+set}" = set; then
6757   enableval="$enable_symlinks"
6758   with_symlinks=$enableval
6759 else
6760   with_symlinks=no
6761 fi;
6762     echo "$as_me:6762: result: $with_symlinks" >&5
6763 echo "${ECHO_T}$with_symlinks" >&6
6764 fi
6765
6766 # If we have hard links and did not choose to use soft links instead, there is
6767 # no reason to make this choice optional - use the hard links.
6768 if test "$with_symlinks" = no ; then
6769     echo "$as_me:6769: checking if tic should use hard links" >&5
6770 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6771     if test "$ac_cv_func_link" = yes ; then
6772         with_links=yes
6773     else
6774         with_links=no
6775     fi
6776     echo "$as_me:6776: result: $with_links" >&5
6777 echo "${ECHO_T}$with_links" >&6
6778 fi
6779
6780 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6781 #define USE_LINKS 1
6782 EOF
6783
6784 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6785 #define USE_SYMLINKS 1
6786 EOF
6787
6788 ###   use option --enable-broken-linker to force on use of broken-linker support
6789 echo "$as_me:6789: checking if you want broken-linker support code" >&5
6790 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6791
6792 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6793 if test "${enable_broken_linker+set}" = set; then
6794   enableval="$enable_broken_linker"
6795   with_broken_linker=$enableval
6796 else
6797   with_broken_linker=${BROKEN_LINKER-no}
6798 fi;
6799 echo "$as_me:6799: result: $with_broken_linker" >&5
6800 echo "${ECHO_T}$with_broken_linker" >&6
6801
6802 BROKEN_LINKER=0
6803 if test "$with_broken_linker" = yes ; then
6804         cat >>confdefs.h <<\EOF
6805 #define BROKEN_LINKER 1
6806 EOF
6807
6808         BROKEN_LINKER=1
6809 elif test "$DFT_LWR_MODEL" = shared ; then
6810         case $cf_cv_system_name in #(vi
6811         cygwin*)
6812                 cat >>confdefs.h <<\EOF
6813 #define BROKEN_LINKER 1
6814 EOF
6815
6816                 BROKEN_LINKER=1
6817                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6818
6819 echo "${as_me-configure}:6819: testing cygwin linker is broken anyway ..." 1>&5
6820
6821                 ;;
6822         esac
6823 fi
6824
6825 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6826 echo "$as_me:6826: checking if tputs should process BSD-style prefix padding" >&5
6827 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6828
6829 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6830 if test "${enable_bsdpad+set}" = set; then
6831   enableval="$enable_bsdpad"
6832   with_bsdpad=$enableval
6833 else
6834   with_bsdpad=no
6835 fi;
6836 echo "$as_me:6836: result: $with_bsdpad" >&5
6837 echo "${ECHO_T}$with_bsdpad" >&6
6838 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6839 #define BSD_TPUTS 1
6840 EOF
6841
6842 ###   use option --enable-widec to turn on use of wide-character support
6843 NCURSES_CH_T=chtype
6844 NCURSES_LIBUTF8=0
6845
6846 NEED_WCHAR_H=0
6847 NCURSES_MBSTATE_T=0
6848 NCURSES_WCHAR_T=0
6849 NCURSES_WINT_T=0
6850
6851 # Check to define _XOPEN_SOURCE "automatically"
6852
6853 cf_XOPEN_SOURCE=500
6854 cf_POSIX_C_SOURCE=199506L
6855 cf_xopen_source=
6856
6857 case $host_os in #(vi
6858 aix[456]*) #(vi
6859         cf_xopen_source="-D_ALL_SOURCE"
6860         ;;
6861 darwin[0-8].*) #(vi
6862         cf_xopen_source="-D_APPLE_C_SOURCE"
6863         ;;
6864 darwin*) #(vi
6865         cf_xopen_source="-D_DARWIN_C_SOURCE"
6866         ;;
6867 freebsd*|dragonfly*) #(vi
6868         # 5.x headers associate
6869         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6870         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6871         cf_POSIX_C_SOURCE=200112L
6872         cf_XOPEN_SOURCE=600
6873         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6874         ;;
6875 hpux11*) #(vi
6876         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6877         ;;
6878 hpux*) #(vi
6879         cf_xopen_source="-D_HPUX_SOURCE"
6880         ;;
6881 irix[56].*) #(vi
6882         cf_xopen_source="-D_SGI_SOURCE"
6883         ;;
6884 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6885
6886 echo "$as_me:6886: checking if we must define _GNU_SOURCE" >&5
6887 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6888 if test "${cf_cv_gnu_source+set}" = set; then
6889   echo $ECHO_N "(cached) $ECHO_C" >&6
6890 else
6891
6892 cat >conftest.$ac_ext <<_ACEOF
6893 #line 6893 "configure"
6894 #include "confdefs.h"
6895 #include <sys/types.h>
6896 int
6897 main ()
6898 {
6899
6900 #ifndef _XOPEN_SOURCE
6901 make an error
6902 #endif
6903   ;
6904   return 0;
6905 }
6906 _ACEOF
6907 rm -f conftest.$ac_objext
6908 if { (eval echo "$as_me:6908: \"$ac_compile\"") >&5
6909   (eval $ac_compile) 2>&5
6910   ac_status=$?
6911   echo "$as_me:6911: \$? = $ac_status" >&5
6912   (exit $ac_status); } &&
6913          { ac_try='test -s conftest.$ac_objext'
6914   { (eval echo "$as_me:6914: \"$ac_try\"") >&5
6915   (eval $ac_try) 2>&5
6916   ac_status=$?
6917   echo "$as_me:6917: \$? = $ac_status" >&5
6918   (exit $ac_status); }; }; then
6919   cf_cv_gnu_source=no
6920 else
6921   echo "$as_me: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6923 cf_save="$CPPFLAGS"
6924          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6925          cat >conftest.$ac_ext <<_ACEOF
6926 #line 6926 "configure"
6927 #include "confdefs.h"
6928 #include <sys/types.h>
6929 int
6930 main ()
6931 {
6932
6933 #ifdef _XOPEN_SOURCE
6934 make an error
6935 #endif
6936   ;
6937   return 0;
6938 }
6939 _ACEOF
6940 rm -f conftest.$ac_objext
6941 if { (eval echo "$as_me:6941: \"$ac_compile\"") >&5
6942   (eval $ac_compile) 2>&5
6943   ac_status=$?
6944   echo "$as_me:6944: \$? = $ac_status" >&5
6945   (exit $ac_status); } &&
6946          { ac_try='test -s conftest.$ac_objext'
6947   { (eval echo "$as_me:6947: \"$ac_try\"") >&5
6948   (eval $ac_try) 2>&5
6949   ac_status=$?
6950   echo "$as_me:6950: \$? = $ac_status" >&5
6951   (exit $ac_status); }; }; then
6952   cf_cv_gnu_source=no
6953 else
6954   echo "$as_me: failed program was:" >&5
6955 cat conftest.$ac_ext >&5
6956 cf_cv_gnu_source=yes
6957 fi
6958 rm -f conftest.$ac_objext conftest.$ac_ext
6959         CPPFLAGS="$cf_save"
6960
6961 fi
6962 rm -f conftest.$ac_objext conftest.$ac_ext
6963
6964 fi
6965 echo "$as_me:6965: result: $cf_cv_gnu_source" >&5
6966 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6967 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6968
6969         ;;
6970 mirbsd*) #(vi
6971         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6972         ;;
6973 netbsd*) #(vi
6974         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6975         ;;
6976 openbsd*) #(vi
6977         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6978         ;;
6979 osf[45]*) #(vi
6980         cf_xopen_source="-D_OSF_SOURCE"
6981         ;;
6982 nto-qnx*) #(vi
6983         cf_xopen_source="-D_QNX_SOURCE"
6984         ;;
6985 sco*) #(vi
6986         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6987         ;;
6988 solaris2.1[0-9]) #(vi
6989         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6990         ;;
6991 solaris2.[1-9]) #(vi
6992         cf_xopen_source="-D__EXTENSIONS__"
6993         ;;
6994 *)
6995         echo "$as_me:6995: checking if we should define _XOPEN_SOURCE" >&5
6996 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6997 if test "${cf_cv_xopen_source+set}" = set; then
6998   echo $ECHO_N "(cached) $ECHO_C" >&6
6999 else
7000
7001         cat >conftest.$ac_ext <<_ACEOF
7002 #line 7002 "configure"
7003 #include "confdefs.h"
7004 #include <sys/types.h>
7005 int
7006 main ()
7007 {
7008
7009 #ifndef _XOPEN_SOURCE
7010 make an error
7011 #endif
7012   ;
7013   return 0;
7014 }
7015 _ACEOF
7016 rm -f conftest.$ac_objext
7017 if { (eval echo "$as_me:7017: \"$ac_compile\"") >&5
7018   (eval $ac_compile) 2>&5
7019   ac_status=$?
7020   echo "$as_me:7020: \$? = $ac_status" >&5
7021   (exit $ac_status); } &&
7022          { ac_try='test -s conftest.$ac_objext'
7023   { (eval echo "$as_me:7023: \"$ac_try\"") >&5
7024   (eval $ac_try) 2>&5
7025   ac_status=$?
7026   echo "$as_me:7026: \$? = $ac_status" >&5
7027   (exit $ac_status); }; }; then
7028   cf_cv_xopen_source=no
7029 else
7030   echo "$as_me: failed program was:" >&5
7031 cat conftest.$ac_ext >&5
7032 cf_save="$CPPFLAGS"
7033          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7034          cat >conftest.$ac_ext <<_ACEOF
7035 #line 7035 "configure"
7036 #include "confdefs.h"
7037 #include <sys/types.h>
7038 int
7039 main ()
7040 {
7041
7042 #ifdef _XOPEN_SOURCE
7043 make an error
7044 #endif
7045   ;
7046   return 0;
7047 }
7048 _ACEOF
7049 rm -f conftest.$ac_objext
7050 if { (eval echo "$as_me:7050: \"$ac_compile\"") >&5
7051   (eval $ac_compile) 2>&5
7052   ac_status=$?
7053   echo "$as_me:7053: \$? = $ac_status" >&5
7054   (exit $ac_status); } &&
7055          { ac_try='test -s conftest.$ac_objext'
7056   { (eval echo "$as_me:7056: \"$ac_try\"") >&5
7057   (eval $ac_try) 2>&5
7058   ac_status=$?
7059   echo "$as_me:7059: \$? = $ac_status" >&5
7060   (exit $ac_status); }; }; then
7061   cf_cv_xopen_source=no
7062 else
7063   echo "$as_me: failed program was:" >&5
7064 cat conftest.$ac_ext >&5
7065 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7066 fi
7067 rm -f conftest.$ac_objext conftest.$ac_ext
7068         CPPFLAGS="$cf_save"
7069
7070 fi
7071 rm -f conftest.$ac_objext conftest.$ac_ext
7072
7073 fi
7074 echo "$as_me:7074: result: $cf_cv_xopen_source" >&5
7075 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7076         if test "$cf_cv_xopen_source" != no ; then
7077
7078 CFLAGS=`echo "$CFLAGS" | \
7079         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7080                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7081
7082 CPPFLAGS=`echo "$CPPFLAGS" | \
7083         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7084                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7085
7086                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7087
7088 cf_fix_cppflags=no
7089 cf_new_cflags=
7090 cf_new_cppflags=
7091 cf_new_extra_cppflags=
7092
7093 for cf_add_cflags in $cf_temp_xopen_source
7094 do
7095 case $cf_fix_cppflags in
7096 no)
7097         case $cf_add_cflags in #(vi
7098         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7099                 case $cf_add_cflags in
7100                 -D*)
7101                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7102
7103                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7104                                 && test -z "${cf_tst_cflags}" \
7105                                 && cf_fix_cppflags=yes
7106
7107                         if test $cf_fix_cppflags = yes ; then
7108                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7109                                 continue
7110                         elif test "${cf_tst_cflags}" = "\"'" ; then
7111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7112                                 continue
7113                         fi
7114                         ;;
7115                 esac
7116                 case "$CPPFLAGS" in
7117                 *$cf_add_cflags) #(vi
7118                         ;;
7119                 *) #(vi
7120                         case $cf_add_cflags in #(vi
7121                         -D*)
7122                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7123
7124 CPPFLAGS=`echo "$CPPFLAGS" | \
7125         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7126                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7127
7128                                 ;;
7129                         esac
7130                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7131                         ;;
7132                 esac
7133                 ;;
7134         *)
7135                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7136                 ;;
7137         esac
7138         ;;
7139 yes)
7140         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7141
7142         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7143
7144         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7145                 && test -z "${cf_tst_cflags}" \
7146                 && cf_fix_cppflags=no
7147         ;;
7148 esac
7149 done
7150
7151 if test -n "$cf_new_cflags" ; then
7152
7153         CFLAGS="$CFLAGS $cf_new_cflags"
7154 fi
7155
7156 if test -n "$cf_new_cppflags" ; then
7157
7158         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7159 fi
7160
7161 if test -n "$cf_new_extra_cppflags" ; then
7162
7163         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7164 fi
7165
7166         fi
7167
7168 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7169
7170 cf_save_CFLAGS="$CFLAGS"
7171 cf_save_CPPFLAGS="$CPPFLAGS"
7172
7173 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7174         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7175                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7176
7177 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7178         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7179                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7180
7181 echo "$as_me:7181: checking if we should define _POSIX_C_SOURCE" >&5
7182 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7183 if test "${cf_cv_posix_c_source+set}" = set; then
7184   echo $ECHO_N "(cached) $ECHO_C" >&6
7185 else
7186
7187 echo "${as_me-configure}:7187: testing if the symbol is already defined go no further ..." 1>&5
7188
7189         cat >conftest.$ac_ext <<_ACEOF
7190 #line 7190 "configure"
7191 #include "confdefs.h"
7192 #include <sys/types.h>
7193 int
7194 main ()
7195 {
7196
7197 #ifndef _POSIX_C_SOURCE
7198 make an error
7199 #endif
7200   ;
7201   return 0;
7202 }
7203 _ACEOF
7204 rm -f conftest.$ac_objext
7205 if { (eval echo "$as_me:7205: \"$ac_compile\"") >&5
7206   (eval $ac_compile) 2>&5
7207   ac_status=$?
7208   echo "$as_me:7208: \$? = $ac_status" >&5
7209   (exit $ac_status); } &&
7210          { ac_try='test -s conftest.$ac_objext'
7211   { (eval echo "$as_me:7211: \"$ac_try\"") >&5
7212   (eval $ac_try) 2>&5
7213   ac_status=$?
7214   echo "$as_me:7214: \$? = $ac_status" >&5
7215   (exit $ac_status); }; }; then
7216   cf_cv_posix_c_source=no
7217 else
7218   echo "$as_me: failed program was:" >&5
7219 cat conftest.$ac_ext >&5
7220 cf_want_posix_source=no
7221          case .$cf_POSIX_C_SOURCE in #(vi
7222          .[12]??*) #(vi
7223                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7224                 ;;
7225          .2) #(vi
7226                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7227                 cf_want_posix_source=yes
7228                 ;;
7229          .*)
7230                 cf_want_posix_source=yes
7231                 ;;
7232          esac
7233          if test "$cf_want_posix_source" = yes ; then
7234                 cat >conftest.$ac_ext <<_ACEOF
7235 #line 7235 "configure"
7236 #include "confdefs.h"
7237 #include <sys/types.h>
7238 int
7239 main ()
7240 {
7241
7242 #ifdef _POSIX_SOURCE
7243 make an error
7244 #endif
7245   ;
7246   return 0;
7247 }
7248 _ACEOF
7249 rm -f conftest.$ac_objext
7250 if { (eval echo "$as_me:7250: \"$ac_compile\"") >&5
7251   (eval $ac_compile) 2>&5
7252   ac_status=$?
7253   echo "$as_me:7253: \$? = $ac_status" >&5
7254   (exit $ac_status); } &&
7255          { ac_try='test -s conftest.$ac_objext'
7256   { (eval echo "$as_me:7256: \"$ac_try\"") >&5
7257   (eval $ac_try) 2>&5
7258   ac_status=$?
7259   echo "$as_me:7259: \$? = $ac_status" >&5
7260   (exit $ac_status); }; }; then
7261   :
7262 else
7263   echo "$as_me: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7266 fi
7267 rm -f conftest.$ac_objext conftest.$ac_ext
7268          fi
7269
7270 echo "${as_me-configure}:7270: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7271
7272          CFLAGS="$cf_trim_CFLAGS"
7273          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7274
7275 echo "${as_me-configure}:7275: testing if the second compile does not leave our definition intact error ..." 1>&5
7276
7277          cat >conftest.$ac_ext <<_ACEOF
7278 #line 7278 "configure"
7279 #include "confdefs.h"
7280 #include <sys/types.h>
7281 int
7282 main ()
7283 {
7284
7285 #ifndef _POSIX_C_SOURCE
7286 make an error
7287 #endif
7288   ;
7289   return 0;
7290 }
7291 _ACEOF
7292 rm -f conftest.$ac_objext
7293 if { (eval echo "$as_me:7293: \"$ac_compile\"") >&5
7294   (eval $ac_compile) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); } &&
7298          { ac_try='test -s conftest.$ac_objext'
7299   { (eval echo "$as_me:7299: \"$ac_try\"") >&5
7300   (eval $ac_try) 2>&5
7301   ac_status=$?
7302   echo "$as_me:7302: \$? = $ac_status" >&5
7303   (exit $ac_status); }; }; then
7304   :
7305 else
7306   echo "$as_me: failed program was:" >&5
7307 cat conftest.$ac_ext >&5
7308 cf_cv_posix_c_source=no
7309 fi
7310 rm -f conftest.$ac_objext conftest.$ac_ext
7311          CFLAGS="$cf_save_CFLAGS"
7312          CPPFLAGS="$cf_save_CPPFLAGS"
7313
7314 fi
7315 rm -f conftest.$ac_objext conftest.$ac_ext
7316
7317 fi
7318 echo "$as_me:7318: result: $cf_cv_posix_c_source" >&5
7319 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7320
7321 if test "$cf_cv_posix_c_source" != no ; then
7322         CFLAGS="$cf_trim_CFLAGS"
7323         CPPFLAGS="$cf_trim_CPPFLAGS"
7324
7325 cf_fix_cppflags=no
7326 cf_new_cflags=
7327 cf_new_cppflags=
7328 cf_new_extra_cppflags=
7329
7330 for cf_add_cflags in $cf_cv_posix_c_source
7331 do
7332 case $cf_fix_cppflags in
7333 no)
7334         case $cf_add_cflags in #(vi
7335         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7336                 case $cf_add_cflags in
7337                 -D*)
7338                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7339
7340                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7341                                 && test -z "${cf_tst_cflags}" \
7342                                 && cf_fix_cppflags=yes
7343
7344                         if test $cf_fix_cppflags = yes ; then
7345                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7346                                 continue
7347                         elif test "${cf_tst_cflags}" = "\"'" ; then
7348                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7349                                 continue
7350                         fi
7351                         ;;
7352                 esac
7353                 case "$CPPFLAGS" in
7354                 *$cf_add_cflags) #(vi
7355                         ;;
7356                 *) #(vi
7357                         case $cf_add_cflags in #(vi
7358                         -D*)
7359                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7360
7361 CPPFLAGS=`echo "$CPPFLAGS" | \
7362         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7363                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7364
7365                                 ;;
7366                         esac
7367                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7368                         ;;
7369                 esac
7370                 ;;
7371         *)
7372                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7373                 ;;
7374         esac
7375         ;;
7376 yes)
7377         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7378
7379         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7380
7381         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7382                 && test -z "${cf_tst_cflags}" \
7383                 && cf_fix_cppflags=no
7384         ;;
7385 esac
7386 done
7387
7388 if test -n "$cf_new_cflags" ; then
7389
7390         CFLAGS="$CFLAGS $cf_new_cflags"
7391 fi
7392
7393 if test -n "$cf_new_cppflags" ; then
7394
7395         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7396 fi
7397
7398 if test -n "$cf_new_extra_cppflags" ; then
7399
7400         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7401 fi
7402
7403 fi
7404
7405         ;;
7406 esac
7407
7408 if test -n "$cf_xopen_source" ; then
7409
7410 cf_fix_cppflags=no
7411 cf_new_cflags=
7412 cf_new_cppflags=
7413 cf_new_extra_cppflags=
7414
7415 for cf_add_cflags in $cf_xopen_source
7416 do
7417 case $cf_fix_cppflags in
7418 no)
7419         case $cf_add_cflags in #(vi
7420         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7421                 case $cf_add_cflags in
7422                 -D*)
7423                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7424
7425                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7426                                 && test -z "${cf_tst_cflags}" \
7427                                 && cf_fix_cppflags=yes
7428
7429                         if test $cf_fix_cppflags = yes ; then
7430                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7431                                 continue
7432                         elif test "${cf_tst_cflags}" = "\"'" ; then
7433                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7434                                 continue
7435                         fi
7436                         ;;
7437                 esac
7438                 case "$CPPFLAGS" in
7439                 *$cf_add_cflags) #(vi
7440                         ;;
7441                 *) #(vi
7442                         case $cf_add_cflags in #(vi
7443                         -D*)
7444                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7445
7446 CPPFLAGS=`echo "$CPPFLAGS" | \
7447         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7448                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7449
7450                                 ;;
7451                         esac
7452                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7453                         ;;
7454                 esac
7455                 ;;
7456         *)
7457                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7458                 ;;
7459         esac
7460         ;;
7461 yes)
7462         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7463
7464         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7465
7466         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7467                 && test -z "${cf_tst_cflags}" \
7468                 && cf_fix_cppflags=no
7469         ;;
7470 esac
7471 done
7472
7473 if test -n "$cf_new_cflags" ; then
7474
7475         CFLAGS="$CFLAGS $cf_new_cflags"
7476 fi
7477
7478 if test -n "$cf_new_cppflags" ; then
7479
7480         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7481 fi
7482
7483 if test -n "$cf_new_extra_cppflags" ; then
7484
7485         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7486 fi
7487
7488 fi
7489
7490 # Work around breakage on OS X
7491
7492 echo "$as_me:7492: checking if SIGWINCH is defined" >&5
7493 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7494 if test "${cf_cv_define_sigwinch+set}" = set; then
7495   echo $ECHO_N "(cached) $ECHO_C" >&6
7496 else
7497
7498         cat >conftest.$ac_ext <<_ACEOF
7499 #line 7499 "configure"
7500 #include "confdefs.h"
7501
7502 #include <sys/types.h>
7503 #include <sys/signal.h>
7504
7505 int
7506 main ()
7507 {
7508 int x = SIGWINCH
7509   ;
7510   return 0;
7511 }
7512 _ACEOF
7513 rm -f conftest.$ac_objext
7514 if { (eval echo "$as_me:7514: \"$ac_compile\"") >&5
7515   (eval $ac_compile) 2>&5
7516   ac_status=$?
7517   echo "$as_me:7517: \$? = $ac_status" >&5
7518   (exit $ac_status); } &&
7519          { ac_try='test -s conftest.$ac_objext'
7520   { (eval echo "$as_me:7520: \"$ac_try\"") >&5
7521   (eval $ac_try) 2>&5
7522   ac_status=$?
7523   echo "$as_me:7523: \$? = $ac_status" >&5
7524   (exit $ac_status); }; }; then
7525   cf_cv_define_sigwinch=yes
7526 else
7527   echo "$as_me: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529 cat >conftest.$ac_ext <<_ACEOF
7530 #line 7530 "configure"
7531 #include "confdefs.h"
7532
7533 #undef _XOPEN_SOURCE
7534 #undef _POSIX_SOURCE
7535 #undef _POSIX_C_SOURCE
7536 #include <sys/types.h>
7537 #include <sys/signal.h>
7538
7539 int
7540 main ()
7541 {
7542 int x = SIGWINCH
7543   ;
7544   return 0;
7545 }
7546 _ACEOF
7547 rm -f conftest.$ac_objext
7548 if { (eval echo "$as_me:7548: \"$ac_compile\"") >&5
7549   (eval $ac_compile) 2>&5
7550   ac_status=$?
7551   echo "$as_me:7551: \$? = $ac_status" >&5
7552   (exit $ac_status); } &&
7553          { ac_try='test -s conftest.$ac_objext'
7554   { (eval echo "$as_me:7554: \"$ac_try\"") >&5
7555   (eval $ac_try) 2>&5
7556   ac_status=$?
7557   echo "$as_me:7557: \$? = $ac_status" >&5
7558   (exit $ac_status); }; }; then
7559   cf_cv_define_sigwinch=maybe
7560 else
7561   echo "$as_me: failed program was:" >&5
7562 cat conftest.$ac_ext >&5
7563 cf_cv_define_sigwinch=no
7564 fi
7565 rm -f conftest.$ac_objext conftest.$ac_ext
7566
7567 fi
7568 rm -f conftest.$ac_objext conftest.$ac_ext
7569
7570 fi
7571 echo "$as_me:7571: result: $cf_cv_define_sigwinch" >&5
7572 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7573
7574 if test "$cf_cv_define_sigwinch" = maybe ; then
7575 echo "$as_me:7575: checking for actual SIGWINCH definition" >&5
7576 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7577 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7578   echo $ECHO_N "(cached) $ECHO_C" >&6
7579 else
7580
7581 cf_cv_fixup_sigwinch=unknown
7582 cf_sigwinch=32
7583 while test $cf_sigwinch != 1
7584 do
7585         cat >conftest.$ac_ext <<_ACEOF
7586 #line 7586 "configure"
7587 #include "confdefs.h"
7588
7589 #undef _XOPEN_SOURCE
7590 #undef _POSIX_SOURCE
7591 #undef _POSIX_C_SOURCE
7592 #include <sys/types.h>
7593 #include <sys/signal.h>
7594
7595 int
7596 main ()
7597 {
7598
7599 #if SIGWINCH != $cf_sigwinch
7600 make an error
7601 #endif
7602 int x = SIGWINCH
7603   ;
7604   return 0;
7605 }
7606 _ACEOF
7607 rm -f conftest.$ac_objext
7608 if { (eval echo "$as_me:7608: \"$ac_compile\"") >&5
7609   (eval $ac_compile) 2>&5
7610   ac_status=$?
7611   echo "$as_me:7611: \$? = $ac_status" >&5
7612   (exit $ac_status); } &&
7613          { ac_try='test -s conftest.$ac_objext'
7614   { (eval echo "$as_me:7614: \"$ac_try\"") >&5
7615   (eval $ac_try) 2>&5
7616   ac_status=$?
7617   echo "$as_me:7617: \$? = $ac_status" >&5
7618   (exit $ac_status); }; }; then
7619   cf_cv_fixup_sigwinch=$cf_sigwinch
7620          break
7621 else
7622   echo "$as_me: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 fi
7625 rm -f conftest.$ac_objext conftest.$ac_ext
7626
7627 cf_sigwinch=`expr $cf_sigwinch - 1`
7628 done
7629
7630 fi
7631 echo "$as_me:7631: result: $cf_cv_fixup_sigwinch" >&5
7632 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7633
7634         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7635                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7636         fi
7637 fi
7638
7639 # Checks for CODESET support.
7640
7641   echo "$as_me:7641: checking for nl_langinfo and CODESET" >&5
7642 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7643 if test "${am_cv_langinfo_codeset+set}" = set; then
7644   echo $ECHO_N "(cached) $ECHO_C" >&6
7645 else
7646   cat >conftest.$ac_ext <<_ACEOF
7647 #line 7647 "configure"
7648 #include "confdefs.h"
7649 #include <langinfo.h>
7650 int
7651 main ()
7652 {
7653 char* cs = nl_langinfo(CODESET);
7654   ;
7655   return 0;
7656 }
7657 _ACEOF
7658 rm -f conftest.$ac_objext conftest$ac_exeext
7659 if { (eval echo "$as_me:7659: \"$ac_link\"") >&5
7660   (eval $ac_link) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit $ac_status); } &&
7664          { ac_try='test -s conftest$ac_exeext'
7665   { (eval echo "$as_me:7665: \"$ac_try\"") >&5
7666   (eval $ac_try) 2>&5
7667   ac_status=$?
7668   echo "$as_me:7668: \$? = $ac_status" >&5
7669   (exit $ac_status); }; }; then
7670   am_cv_langinfo_codeset=yes
7671 else
7672   echo "$as_me: failed program was:" >&5
7673 cat conftest.$ac_ext >&5
7674 am_cv_langinfo_codeset=no
7675 fi
7676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7677
7678 fi
7679 echo "$as_me:7679: result: $am_cv_langinfo_codeset" >&5
7680 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7681   if test $am_cv_langinfo_codeset = yes; then
7682
7683 cat >>confdefs.h <<\EOF
7684 #define HAVE_LANGINFO_CODESET 1
7685 EOF
7686
7687   fi
7688
7689 # use these variables to work around a defect in gcc's fixincludes.
7690 NCURSES_OK_WCHAR_T=
7691 NCURSES_OK_WINT_T=
7692
7693 echo "$as_me:7693: checking if you want wide-character code" >&5
7694 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7695
7696 # Check whether --enable-widec or --disable-widec was given.
7697 if test "${enable_widec+set}" = set; then
7698   enableval="$enable_widec"
7699   with_widec=$enableval
7700 else
7701   with_widec=no
7702 fi;
7703 echo "$as_me:7703: result: $with_widec" >&5
7704 echo "${ECHO_T}$with_widec" >&6
7705 if test "$with_widec" = yes ; then
7706         LIB_SUFFIX="w${LIB_SUFFIX}"
7707         cat >>confdefs.h <<\EOF
7708 #define USE_WIDEC_SUPPORT 1
7709 EOF
7710
7711         case "$CFLAGS $CPPFLAGS" in #(vi
7712         *-D_XOPEN_SOURCE=500) #(vi
7713                 ;;
7714         *)
7715
7716 echo "$as_me:7716: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7717 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7718 cat >conftest.$ac_ext <<_ACEOF
7719 #line 7719 "configure"
7720 #include "confdefs.h"
7721 #include <sys/types.h>
7722
7723 int
7724 main ()
7725 {
7726
7727 #ifndef _XOPEN_SOURCE_EXTENDED
7728 make an error
7729 #endif
7730   ;
7731   return 0;
7732 }
7733 _ACEOF
7734 rm -f conftest.$ac_objext
7735 if { (eval echo "$as_me:7735: \"$ac_compile\"") >&5
7736   (eval $ac_compile) 2>&5
7737   ac_status=$?
7738   echo "$as_me:7738: \$? = $ac_status" >&5
7739   (exit $ac_status); } &&
7740          { ac_try='test -s conftest.$ac_objext'
7741   { (eval echo "$as_me:7741: \"$ac_try\"") >&5
7742   (eval $ac_try) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); }; }; then
7746   cf_result=no
7747 else
7748   echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
7750 cf_result=yes
7751 fi
7752 rm -f conftest.$ac_objext conftest.$ac_ext
7753 echo "$as_me:7753: result: $cf_result" >&5
7754 echo "${ECHO_T}$cf_result" >&6
7755
7756 if test "$cf_result" = yes ; then
7757         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7758 elif test "x" != "x" ; then
7759         echo "$as_me:7759: checking checking for compatible value versus " >&5
7760 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7761         cat >conftest.$ac_ext <<_ACEOF
7762 #line 7762 "configure"
7763 #include "confdefs.h"
7764 #include <sys/types.h>
7765
7766 int
7767 main ()
7768 {
7769
7770 #if _XOPEN_SOURCE_EXTENDED- < 0
7771 make an error
7772 #endif
7773   ;
7774   return 0;
7775 }
7776 _ACEOF
7777 rm -f conftest.$ac_objext
7778 if { (eval echo "$as_me:7778: \"$ac_compile\"") >&5
7779   (eval $ac_compile) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit $ac_status); } &&
7783          { ac_try='test -s conftest.$ac_objext'
7784   { (eval echo "$as_me:7784: \"$ac_try\"") >&5
7785   (eval $ac_try) 2>&5
7786   ac_status=$?
7787   echo "$as_me:7787: \$? = $ac_status" >&5
7788   (exit $ac_status); }; }; then
7789   cf_result=yes
7790 else
7791   echo "$as_me: failed program was:" >&5
7792 cat conftest.$ac_ext >&5
7793 cf_result=no
7794 fi
7795 rm -f conftest.$ac_objext conftest.$ac_ext
7796         echo "$as_me:7796: result: $cf_result" >&5
7797 echo "${ECHO_T}$cf_result" >&6
7798         if test "$cf_result" = no ; then
7799                 # perhaps we can override it - try...
7800                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7801         fi
7802 fi
7803
7804                 ;;
7805         esac
7806
7807         # with_overwrite=no
7808         NCURSES_CH_T=cchar_t
7809
7810 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7811 do
7812 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7813 echo "$as_me:7813: checking for $ac_func" >&5
7814 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7815 if eval "test \"\${$as_ac_var+set}\" = set"; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818   cat >conftest.$ac_ext <<_ACEOF
7819 #line 7819 "configure"
7820 #include "confdefs.h"
7821 /* System header to define __stub macros and hopefully few prototypes,
7822     which can conflict with char $ac_func (); below.  */
7823 #include <assert.h>
7824 /* Override any gcc2 internal prototype to avoid an error.  */
7825 #ifdef __cplusplus
7826 extern "C"
7827 #endif
7828 /* We use char because int might match the return type of a gcc2
7829    builtin and then its argument prototype would still apply.  */
7830 char $ac_func ();
7831 char (*f) ();
7832
7833 int
7834 main ()
7835 {
7836 /* The GNU C library defines this for functions which it implements
7837     to always fail with ENOSYS.  Some functions are actually named
7838     something starting with __ and the normal name is an alias.  */
7839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7840 choke me
7841 #else
7842 f = $ac_func;
7843 #endif
7844
7845   ;
7846   return 0;
7847 }
7848 _ACEOF
7849 rm -f conftest.$ac_objext conftest$ac_exeext
7850 if { (eval echo "$as_me:7850: \"$ac_link\"") >&5
7851   (eval $ac_link) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit $ac_status); } &&
7855          { ac_try='test -s conftest$ac_exeext'
7856   { (eval echo "$as_me:7856: \"$ac_try\"") >&5
7857   (eval $ac_try) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit $ac_status); }; }; then
7861   eval "$as_ac_var=yes"
7862 else
7863   echo "$as_me: failed program was:" >&5
7864 cat conftest.$ac_ext >&5
7865 eval "$as_ac_var=no"
7866 fi
7867 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7868 fi
7869 echo "$as_me:7869: result: `eval echo '${'$as_ac_var'}'`" >&5
7870 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7871 if test `eval echo '${'$as_ac_var'}'` = yes; then
7872   cat >>confdefs.h <<EOF
7873 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7874 EOF
7875
7876 fi
7877 done
7878
7879         if test "$ac_cv_func_putwc" != yes ; then
7880
7881 echo "$as_me:7881: checking for multibyte character support" >&5
7882 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7883 if test "${cf_cv_utf8_lib+set}" = set; then
7884   echo $ECHO_N "(cached) $ECHO_C" >&6
7885 else
7886
7887         cf_save_LIBS="$LIBS"
7888         cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7891
7892 #include <stdlib.h>
7893 int
7894 main ()
7895 {
7896 putwc(0,0);
7897   ;
7898   return 0;
7899 }
7900 _ACEOF
7901 rm -f conftest.$ac_objext conftest$ac_exeext
7902 if { (eval echo "$as_me:7902: \"$ac_link\"") >&5
7903   (eval $ac_link) 2>&5
7904   ac_status=$?
7905   echo "$as_me:7905: \$? = $ac_status" >&5
7906   (exit $ac_status); } &&
7907          { ac_try='test -s conftest$ac_exeext'
7908   { (eval echo "$as_me:7908: \"$ac_try\"") >&5
7909   (eval $ac_try) 2>&5
7910   ac_status=$?
7911   echo "$as_me:7911: \$? = $ac_status" >&5
7912   (exit $ac_status); }; }; then
7913   cf_cv_utf8_lib=yes
7914 else
7915   echo "$as_me: failed program was:" >&5
7916 cat conftest.$ac_ext >&5
7917
7918 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7919 # will be set on completion of the AC_TRY_LINK below.
7920 cf_cv_header_path_utf8=
7921 cf_cv_library_path_utf8=
7922
7923 echo "${as_me-configure}:7923: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7924
7925 cf_save_LIBS="$LIBS"
7926
7927 cat >conftest.$ac_ext <<_ACEOF
7928 #line 7928 "configure"
7929 #include "confdefs.h"
7930
7931 #include <libutf8.h>
7932 int
7933 main ()
7934 {
7935 putwc(0,0);
7936   ;
7937   return 0;
7938 }
7939 _ACEOF
7940 rm -f conftest.$ac_objext conftest$ac_exeext
7941 if { (eval echo "$as_me:7941: \"$ac_link\"") >&5
7942   (eval $ac_link) 2>&5
7943   ac_status=$?
7944   echo "$as_me:7944: \$? = $ac_status" >&5
7945   (exit $ac_status); } &&
7946          { ac_try='test -s conftest$ac_exeext'
7947   { (eval echo "$as_me:7947: \"$ac_try\"") >&5
7948   (eval $ac_try) 2>&5
7949   ac_status=$?
7950   echo "$as_me:7950: \$? = $ac_status" >&5
7951   (exit $ac_status); }; }; then
7952
7953         cf_cv_find_linkage_utf8=yes
7954         cf_cv_header_path_utf8=/usr/include
7955         cf_cv_library_path_utf8=/usr/lib
7956
7957 else
7958   echo "$as_me: failed program was:" >&5
7959 cat conftest.$ac_ext >&5
7960
7961 LIBS="-lutf8  $cf_save_LIBS"
7962
7963 cat >conftest.$ac_ext <<_ACEOF
7964 #line 7964 "configure"
7965 #include "confdefs.h"
7966
7967 #include <libutf8.h>
7968 int
7969 main ()
7970 {
7971 putwc(0,0);
7972   ;
7973   return 0;
7974 }
7975 _ACEOF
7976 rm -f conftest.$ac_objext conftest$ac_exeext
7977 if { (eval echo "$as_me:7977: \"$ac_link\"") >&5
7978   (eval $ac_link) 2>&5
7979   ac_status=$?
7980   echo "$as_me:7980: \$? = $ac_status" >&5
7981   (exit $ac_status); } &&
7982          { ac_try='test -s conftest$ac_exeext'
7983   { (eval echo "$as_me:7983: \"$ac_try\"") >&5
7984   (eval $ac_try) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit $ac_status); }; }; then
7988
7989         cf_cv_find_linkage_utf8=yes
7990         cf_cv_header_path_utf8=/usr/include
7991         cf_cv_library_path_utf8=/usr/lib
7992         cf_cv_library_file_utf8="-lutf8"
7993
7994 else
7995   echo "$as_me: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7997
7998         cf_cv_find_linkage_utf8=no
7999         LIBS="$cf_save_LIBS"
8000
8001     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8002
8003 echo "${as_me-configure}:8003: testing find linkage for utf8 library ..." 1>&5
8004
8005 echo "${as_me-configure}:8005: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8006
8007     cf_save_CPPFLAGS="$CPPFLAGS"
8008     cf_test_CPPFLAGS="$CPPFLAGS"
8009
8010 cf_search=
8011
8012 # collect the current set of include-directories from compiler flags
8013 cf_header_path_list=""
8014 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8015         for cf_header_path in $CPPFLAGS $CFLAGS
8016         do
8017                 case $cf_header_path in #(vi
8018                 -I*)
8019                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8020
8021 test "$cf_header_path" != "NONE" && \
8022 test -d "$cf_header_path" && \
8023  {
8024         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8025         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8026         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8027         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8028         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8029         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8030 }
8031
8032                         cf_header_path_list="$cf_header_path_list $cf_search"
8033                         ;;
8034                 esac
8035         done
8036 fi
8037
8038 # add the variations for the package we are looking for
8039
8040 cf_search=
8041
8042 test "/usr" != "$prefix" && \
8043 test -d "/usr" && \
8044 (test $prefix = NONE || test -d $prefix) && {
8045         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8046         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8047         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8048         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8049         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8050         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8051 }
8052
8053 test "$prefix" != "NONE" && \
8054 test -d "$prefix" && \
8055  {
8056         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8057         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8058         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8059         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8060         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8061         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8062 }
8063
8064 test "/usr/local" != "$prefix" && \
8065 test -d "/usr/local" && \
8066 (test $prefix = NONE || test -d $prefix) && {
8067         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8068         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8069         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8070         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8071         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8072         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8073 }
8074
8075 test "/opt" != "$prefix" && \
8076 test -d "/opt" && \
8077 (test $prefix = NONE || test -d $prefix) && {
8078         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8079         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8080         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8081         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8082         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8083         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8084 }
8085
8086 test "$HOME" != "$prefix" && \
8087 test -d "$HOME" && \
8088 (test $prefix = NONE || test -d $prefix) && {
8089         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8090         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8091         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8092         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8093         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8094         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8095 }
8096
8097 test "$includedir" != NONE && \
8098 test "$includedir" != "/usr/include" && \
8099 test -d "$includedir" && {
8100         test -d $includedir &&    cf_search="$cf_search $includedir"
8101         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8102 }
8103
8104 test "$oldincludedir" != NONE && \
8105 test "$oldincludedir" != "/usr/include" && \
8106 test -d "$oldincludedir" && {
8107         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8108         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8109 }
8110
8111 cf_search="$cf_search $cf_header_path_list"
8112
8113     for cf_cv_header_path_utf8 in $cf_search
8114     do
8115       if test -d $cf_cv_header_path_utf8 ; then
8116         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8117
8118 echo "${as_me-configure}:8118: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8119
8120         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8121         cat >conftest.$ac_ext <<_ACEOF
8122 #line 8122 "configure"
8123 #include "confdefs.h"
8124
8125 #include <libutf8.h>
8126 int
8127 main ()
8128 {
8129 putwc(0,0);
8130   ;
8131   return 0;
8132 }
8133 _ACEOF
8134 rm -f conftest.$ac_objext
8135 if { (eval echo "$as_me:8135: \"$ac_compile\"") >&5
8136   (eval $ac_compile) 2>&5
8137   ac_status=$?
8138   echo "$as_me:8138: \$? = $ac_status" >&5
8139   (exit $ac_status); } &&
8140          { ac_try='test -s conftest.$ac_objext'
8141   { (eval echo "$as_me:8141: \"$ac_try\"") >&5
8142   (eval $ac_try) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); }; }; then
8146
8147             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8148
8149 echo "${as_me-configure}:8149: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8150
8151             cf_cv_find_linkage_utf8=maybe
8152             cf_test_CPPFLAGS="$CPPFLAGS"
8153             break
8154 else
8155   echo "$as_me: failed program was:" >&5
8156 cat conftest.$ac_ext >&5
8157
8158             CPPFLAGS="$cf_save_CPPFLAGS"
8159
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162       fi
8163     done
8164
8165     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8166
8167 echo "${as_me-configure}:8167: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8168
8169       cf_save_LIBS="$LIBS"
8170       cf_save_LDFLAGS="$LDFLAGS"
8171
8172       if test "$cf_cv_find_linkage_utf8" != yes ; then
8173
8174 cf_search=
8175 cf_library_path_list=""
8176 if test -n "${LDFLAGS}${LIBS}" ; then
8177         for cf_library_path in $LDFLAGS $LIBS
8178         do
8179                 case $cf_library_path in #(vi
8180                 -L*)
8181                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8182
8183 test "$cf_library_path" != "NONE" && \
8184 test -d "$cf_library_path" && \
8185  {
8186         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8187         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8188         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8189         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8190         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8191         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8192 }
8193
8194                         cf_library_path_list="$cf_library_path_list $cf_search"
8195                         ;;
8196                 esac
8197         done
8198 fi
8199
8200 cf_search=
8201
8202 test "/usr" != "$prefix" && \
8203 test -d "/usr" && \
8204 (test $prefix = NONE || test -d $prefix) && {
8205         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8206         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8207         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8208         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8209         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8210         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8211 }
8212
8213 test "$prefix" != "NONE" && \
8214 test -d "$prefix" && \
8215  {
8216         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8217         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8218         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8219         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8220         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8221         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8222 }
8223
8224 test "/usr/local" != "$prefix" && \
8225 test -d "/usr/local" && \
8226 (test $prefix = NONE || test -d $prefix) && {
8227         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8228         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8229         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8230         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8231         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8232         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8233 }
8234
8235 test "/opt" != "$prefix" && \
8236 test -d "/opt" && \
8237 (test $prefix = NONE || test -d $prefix) && {
8238         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8239         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8240         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8241         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8242         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8243         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8244 }
8245
8246 test "$HOME" != "$prefix" && \
8247 test -d "$HOME" && \
8248 (test $prefix = NONE || test -d $prefix) && {
8249         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8250         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8251         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8252         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8253         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8254         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8255 }
8256
8257 cf_search="$cf_library_path_list $cf_search"
8258
8259         for cf_cv_library_path_utf8 in $cf_search
8260         do
8261           if test -d $cf_cv_library_path_utf8 ; then
8262             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8263
8264 echo "${as_me-configure}:8264: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8265
8266             CPPFLAGS="$cf_test_CPPFLAGS"
8267             LIBS="-lutf8  $cf_save_LIBS"
8268             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8269             cat >conftest.$ac_ext <<_ACEOF
8270 #line 8270 "configure"
8271 #include "confdefs.h"
8272
8273 #include <libutf8.h>
8274 int
8275 main ()
8276 {
8277 putwc(0,0);
8278   ;
8279   return 0;
8280 }
8281 _ACEOF
8282 rm -f conftest.$ac_objext conftest$ac_exeext
8283 if { (eval echo "$as_me:8283: \"$ac_link\"") >&5
8284   (eval $ac_link) 2>&5
8285   ac_status=$?
8286   echo "$as_me:8286: \$? = $ac_status" >&5
8287   (exit $ac_status); } &&
8288          { ac_try='test -s conftest$ac_exeext'
8289   { (eval echo "$as_me:8289: \"$ac_try\"") >&5
8290   (eval $ac_try) 2>&5
8291   ac_status=$?
8292   echo "$as_me:8292: \$? = $ac_status" >&5
8293   (exit $ac_status); }; }; then
8294
8295                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8296
8297 echo "${as_me-configure}:8297: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8298
8299                 cf_cv_find_linkage_utf8=yes
8300                 cf_cv_library_file_utf8="-lutf8"
8301                 break
8302 else
8303   echo "$as_me: failed program was:" >&5
8304 cat conftest.$ac_ext >&5
8305
8306                 CPPFLAGS="$cf_save_CPPFLAGS"
8307                 LIBS="$cf_save_LIBS"
8308                 LDFLAGS="$cf_save_LDFLAGS"
8309
8310 fi
8311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8312           fi
8313         done
8314         CPPFLAGS="$cf_save_CPPFLAGS"
8315         LDFLAGS="$cf_save_LDFLAGS"
8316       fi
8317
8318     else
8319       cf_cv_find_linkage_utf8=no
8320     fi
8321
8322 fi
8323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8324
8325 fi
8326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8327
8328 LIBS="$cf_save_LIBS"
8329
8330 if test "$cf_cv_find_linkage_utf8" = yes ; then
8331 cf_cv_utf8_lib=add-on
8332 else
8333 cf_cv_utf8_lib=no
8334 fi
8335
8336 fi
8337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8338 fi
8339 echo "$as_me:8339: result: $cf_cv_utf8_lib" >&5
8340 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8341
8342 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8343 # ncurses/ncursesw:
8344 if test "$cf_cv_utf8_lib" = "add-on" ; then
8345         cat >>confdefs.h <<\EOF
8346 #define HAVE_LIBUTF8_H 1
8347 EOF
8348
8349 if test -n "$cf_cv_header_path_utf8" ; then
8350   for cf_add_incdir in $cf_cv_header_path_utf8
8351   do
8352         while test $cf_add_incdir != /usr/include
8353         do
8354           if test -d $cf_add_incdir
8355           then
8356                 cf_have_incdir=no
8357                 if test -n "$CFLAGS$CPPFLAGS" ; then
8358                   # a loop is needed to ensure we can add subdirs of existing dirs
8359                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8360                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8361                           cf_have_incdir=yes; break
8362                         fi
8363                   done
8364                 fi
8365
8366                 if test "$cf_have_incdir" = no ; then
8367                   if test "$cf_add_incdir" = /usr/local/include ; then
8368                         if test "$GCC" = yes
8369                         then
8370                           cf_save_CPPFLAGS=$CPPFLAGS
8371                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8372                           cat >conftest.$ac_ext <<_ACEOF
8373 #line 8373 "configure"
8374 #include "confdefs.h"
8375 #include <stdio.h>
8376 int
8377 main ()
8378 {
8379 printf("Hello")
8380   ;
8381   return 0;
8382 }
8383 _ACEOF
8384 rm -f conftest.$ac_objext
8385 if { (eval echo "$as_me:8385: \"$ac_compile\"") >&5
8386   (eval $ac_compile) 2>&5
8387   ac_status=$?
8388   echo "$as_me:8388: \$? = $ac_status" >&5
8389   (exit $ac_status); } &&
8390          { ac_try='test -s conftest.$ac_objext'
8391   { (eval echo "$as_me:8391: \"$ac_try\"") >&5
8392   (eval $ac_try) 2>&5
8393   ac_status=$?
8394   echo "$as_me:8394: \$? = $ac_status" >&5
8395   (exit $ac_status); }; }; then
8396   :
8397 else
8398   echo "$as_me: failed program was:" >&5
8399 cat conftest.$ac_ext >&5
8400 cf_have_incdir=yes
8401 fi
8402 rm -f conftest.$ac_objext conftest.$ac_ext
8403                           CPPFLAGS=$cf_save_CPPFLAGS
8404                         fi
8405                   fi
8406                 fi
8407
8408                 if test "$cf_have_incdir" = no ; then
8409                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8410
8411 echo "${as_me-configure}:8411: testing adding $cf_add_incdir to include-path ..." 1>&5
8412
8413                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8414
8415                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8416                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8417                   cf_add_incdir="$cf_top_incdir"
8418                 else
8419                   break
8420                 fi
8421           fi
8422         done
8423   done
8424 fi
8425
8426 if test -n "$cf_cv_library_path_utf8" ; then
8427   for cf_add_libdir in $cf_cv_library_path_utf8
8428   do
8429     if test $cf_add_libdir = /usr/lib ; then
8430       :
8431     elif test -d $cf_add_libdir
8432     then
8433       cf_have_libdir=no
8434       if test -n "$LDFLAGS$LIBS" ; then
8435         # a loop is needed to ensure we can add subdirs of existing dirs
8436         for cf_test_libdir in $LDFLAGS $LIBS ; do
8437           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8438             cf_have_libdir=yes; break
8439           fi
8440         done
8441       fi
8442       if test "$cf_have_libdir" = no ; then
8443         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8444
8445 echo "${as_me-configure}:8445: testing adding $cf_add_libdir to library-path ..." 1>&5
8446
8447         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8448       fi
8449     fi
8450   done
8451 fi
8452
8453         LIBS="$cf_cv_library_file_utf8 $LIBS"
8454 fi
8455
8456                 if test "$cf_cv_utf8_lib" != no ; then
8457                         NCURSES_LIBUTF8=1
8458                 fi
8459         fi
8460
8461 # This is needed on Tru64 5.0 to declare mbstate_t
8462 echo "$as_me:8462: checking if we must include wchar.h to declare mbstate_t" >&5
8463 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8464 if test "${cf_cv_mbstate_t+set}" = set; then
8465   echo $ECHO_N "(cached) $ECHO_C" >&6
8466 else
8467
8468 cat >conftest.$ac_ext <<_ACEOF
8469 #line 8469 "configure"
8470 #include "confdefs.h"
8471
8472 #include <stdlib.h>
8473 #include <stdarg.h>
8474 #include <stdio.h>
8475 #ifdef HAVE_LIBUTF8_H
8476 #include <libutf8.h>
8477 #endif
8478 int
8479 main ()
8480 {
8481 mbstate_t state
8482   ;
8483   return 0;
8484 }
8485 _ACEOF
8486 rm -f conftest.$ac_objext
8487 if { (eval echo "$as_me:8487: \"$ac_compile\"") >&5
8488   (eval $ac_compile) 2>&5
8489   ac_status=$?
8490   echo "$as_me:8490: \$? = $ac_status" >&5
8491   (exit $ac_status); } &&
8492          { ac_try='test -s conftest.$ac_objext'
8493   { (eval echo "$as_me:8493: \"$ac_try\"") >&5
8494   (eval $ac_try) 2>&5
8495   ac_status=$?
8496   echo "$as_me:8496: \$? = $ac_status" >&5
8497   (exit $ac_status); }; }; then
8498   cf_cv_mbstate_t=no
8499 else
8500   echo "$as_me: failed program was:" >&5
8501 cat conftest.$ac_ext >&5
8502 cat >conftest.$ac_ext <<_ACEOF
8503 #line 8503 "configure"
8504 #include "confdefs.h"
8505
8506 #include <stdlib.h>
8507 #include <stdarg.h>
8508 #include <stdio.h>
8509 #include <wchar.h>
8510 #ifdef HAVE_LIBUTF8_H
8511 #include <libutf8.h>
8512 #endif
8513 int
8514 main ()
8515 {
8516 mbstate_t value
8517   ;
8518   return 0;
8519 }
8520 _ACEOF
8521 rm -f conftest.$ac_objext
8522 if { (eval echo "$as_me:8522: \"$ac_compile\"") >&5
8523   (eval $ac_compile) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit $ac_status); } &&
8527          { ac_try='test -s conftest.$ac_objext'
8528   { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8529   (eval $ac_try) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); }; }; then
8533   cf_cv_mbstate_t=yes
8534 else
8535   echo "$as_me: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537 cf_cv_mbstate_t=unknown
8538 fi
8539 rm -f conftest.$ac_objext conftest.$ac_ext
8540 fi
8541 rm -f conftest.$ac_objext conftest.$ac_ext
8542 fi
8543 echo "$as_me:8543: result: $cf_cv_mbstate_t" >&5
8544 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8545
8546 if test "$cf_cv_mbstate_t" = yes ; then
8547         cat >>confdefs.h <<\EOF
8548 #define NEED_WCHAR_H 1
8549 EOF
8550
8551         NEED_WCHAR_H=1
8552 fi
8553
8554 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8555 if test "$cf_cv_mbstate_t" = unknown ; then
8556         NCURSES_MBSTATE_T=1
8557 fi
8558
8559 # This is needed on Tru64 5.0 to declare wchar_t
8560 echo "$as_me:8560: checking if we must include wchar.h to declare wchar_t" >&5
8561 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8562 if test "${cf_cv_wchar_t+set}" = set; then
8563   echo $ECHO_N "(cached) $ECHO_C" >&6
8564 else
8565
8566 cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569
8570 #include <stdlib.h>
8571 #include <stdarg.h>
8572 #include <stdio.h>
8573 #ifdef HAVE_LIBUTF8_H
8574 #include <libutf8.h>
8575 #endif
8576 int
8577 main ()
8578 {
8579 wchar_t state
8580   ;
8581   return 0;
8582 }
8583 _ACEOF
8584 rm -f conftest.$ac_objext
8585 if { (eval echo "$as_me:8585: \"$ac_compile\"") >&5
8586   (eval $ac_compile) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); } &&
8590          { ac_try='test -s conftest.$ac_objext'
8591   { (eval echo "$as_me:8591: \"$ac_try\"") >&5
8592   (eval $ac_try) 2>&5
8593   ac_status=$?
8594   echo "$as_me:8594: \$? = $ac_status" >&5
8595   (exit $ac_status); }; }; then
8596   cf_cv_wchar_t=no
8597 else
8598   echo "$as_me: failed program was:" >&5
8599 cat conftest.$ac_ext >&5
8600 cat >conftest.$ac_ext <<_ACEOF
8601 #line 8601 "configure"
8602 #include "confdefs.h"
8603
8604 #include <stdlib.h>
8605 #include <stdarg.h>
8606 #include <stdio.h>
8607 #include <wchar.h>
8608 #ifdef HAVE_LIBUTF8_H
8609 #include <libutf8.h>
8610 #endif
8611 int
8612 main ()
8613 {
8614 wchar_t value
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 rm -f conftest.$ac_objext
8620 if { (eval echo "$as_me:8620: \"$ac_compile\"") >&5
8621   (eval $ac_compile) 2>&5
8622   ac_status=$?
8623   echo "$as_me:8623: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -s conftest.$ac_objext'
8626   { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:8629: \$? = $ac_status" >&5
8630   (exit $ac_status); }; }; then
8631   cf_cv_wchar_t=yes
8632 else
8633   echo "$as_me: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 cf_cv_wchar_t=unknown
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638 fi
8639 rm -f conftest.$ac_objext conftest.$ac_ext
8640 fi
8641 echo "$as_me:8641: result: $cf_cv_wchar_t" >&5
8642 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8643
8644 if test "$cf_cv_wchar_t" = yes ; then
8645         cat >>confdefs.h <<\EOF
8646 #define NEED_WCHAR_H 1
8647 EOF
8648
8649         NEED_WCHAR_H=1
8650 fi
8651
8652 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8653 if test "$cf_cv_wchar_t" = unknown ; then
8654         NCURSES_WCHAR_T=1
8655 fi
8656
8657 # if we find wchar_t in either place, use substitution to provide a fallback.
8658 if test "$cf_cv_wchar_t" != unknown ; then
8659         NCURSES_OK_WCHAR_T=1
8660 fi
8661
8662 # This is needed on Tru64 5.0 to declare wint_t
8663 echo "$as_me:8663: checking if we must include wchar.h to declare wint_t" >&5
8664 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8665 if test "${cf_cv_wint_t+set}" = set; then
8666   echo $ECHO_N "(cached) $ECHO_C" >&6
8667 else
8668
8669 cat >conftest.$ac_ext <<_ACEOF
8670 #line 8670 "configure"
8671 #include "confdefs.h"
8672
8673 #include <stdlib.h>
8674 #include <stdarg.h>
8675 #include <stdio.h>
8676 #ifdef HAVE_LIBUTF8_H
8677 #include <libutf8.h>
8678 #endif
8679 int
8680 main ()
8681 {
8682 wint_t state
8683   ;
8684   return 0;
8685 }
8686 _ACEOF
8687 rm -f conftest.$ac_objext
8688 if { (eval echo "$as_me:8688: \"$ac_compile\"") >&5
8689   (eval $ac_compile) 2>&5
8690   ac_status=$?
8691   echo "$as_me:8691: \$? = $ac_status" >&5
8692   (exit $ac_status); } &&
8693          { ac_try='test -s conftest.$ac_objext'
8694   { (eval echo "$as_me:8694: \"$ac_try\"") >&5
8695   (eval $ac_try) 2>&5
8696   ac_status=$?
8697   echo "$as_me:8697: \$? = $ac_status" >&5
8698   (exit $ac_status); }; }; then
8699   cf_cv_wint_t=no
8700 else
8701   echo "$as_me: failed program was:" >&5
8702 cat conftest.$ac_ext >&5
8703 cat >conftest.$ac_ext <<_ACEOF
8704 #line 8704 "configure"
8705 #include "confdefs.h"
8706
8707 #include <stdlib.h>
8708 #include <stdarg.h>
8709 #include <stdio.h>
8710 #include <wchar.h>
8711 #ifdef HAVE_LIBUTF8_H
8712 #include <libutf8.h>
8713 #endif
8714 int
8715 main ()
8716 {
8717 wint_t value
8718   ;
8719   return 0;
8720 }
8721 _ACEOF
8722 rm -f conftest.$ac_objext
8723 if { (eval echo "$as_me:8723: \"$ac_compile\"") >&5
8724   (eval $ac_compile) 2>&5
8725   ac_status=$?
8726   echo "$as_me:8726: \$? = $ac_status" >&5
8727   (exit $ac_status); } &&
8728          { ac_try='test -s conftest.$ac_objext'
8729   { (eval echo "$as_me:8729: \"$ac_try\"") >&5
8730   (eval $ac_try) 2>&5
8731   ac_status=$?
8732   echo "$as_me:8732: \$? = $ac_status" >&5
8733   (exit $ac_status); }; }; then
8734   cf_cv_wint_t=yes
8735 else
8736   echo "$as_me: failed program was:" >&5
8737 cat conftest.$ac_ext >&5
8738 cf_cv_wint_t=unknown
8739 fi
8740 rm -f conftest.$ac_objext conftest.$ac_ext
8741 fi
8742 rm -f conftest.$ac_objext conftest.$ac_ext
8743 fi
8744 echo "$as_me:8744: result: $cf_cv_wint_t" >&5
8745 echo "${ECHO_T}$cf_cv_wint_t" >&6
8746
8747 if test "$cf_cv_wint_t" = yes ; then
8748         cat >>confdefs.h <<\EOF
8749 #define NEED_WCHAR_H 1
8750 EOF
8751
8752         NEED_WCHAR_H=1
8753 fi
8754
8755 # if we do not find wint_t in either place, use substitution to provide a fallback.
8756 if test "$cf_cv_wint_t" = unknown ; then
8757         NCURSES_WINT_T=1
8758 fi
8759
8760 # if we find wint_t in either place, use substitution to provide a fallback.
8761 if test "$cf_cv_wint_t" != unknown ; then
8762         NCURSES_OK_WINT_T=1
8763 fi
8764
8765         if test "$NCURSES_MBSTATE_T" != 0; then
8766                 cat >>confdefs.h <<\EOF
8767 #define NEED_MBSTATE_T_DEF 1
8768 EOF
8769
8770         fi
8771 fi
8772
8773 ###   use option --disable-lp64 to allow long chtype
8774 case $cf_cv_abi_version in
8775 [345]*)
8776         default_with_lp64=no
8777         ;;
8778 *)
8779         default_with_lp64=yes
8780         ;;
8781 esac
8782
8783 echo "$as_me:8783: checking whether to enable _LP64 definition in curses.h" >&5
8784 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8785
8786 # Check whether --enable-lp64 or --disable-lp64 was given.
8787 if test "${enable_lp64+set}" = set; then
8788   enableval="$enable_lp64"
8789   with_lp64=$enableval
8790 else
8791   with_lp64=$default_with_lp64
8792 fi;
8793 echo "$as_me:8793: result: $with_lp64" >&5
8794 echo "${ECHO_T}$with_lp64" >&6
8795
8796 if test "$with_lp64" = yes ; then
8797         cf_cv_enable_lp64=1
8798 else
8799         cf_cv_enable_lp64=0
8800 fi
8801
8802 # Check whether --enable-largefile or --disable-largefile was given.
8803 if test "${enable_largefile+set}" = set; then
8804   enableval="$enable_largefile"
8805
8806 fi;
8807 if test "$enable_largefile" != no; then
8808
8809   echo "$as_me:8809: checking for special C compiler options needed for large files" >&5
8810 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8811 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8812   echo $ECHO_N "(cached) $ECHO_C" >&6
8813 else
8814   ac_cv_sys_largefile_CC=no
8815      if test "$GCC" != yes; then
8816        ac_save_CC=$CC
8817        while :; do
8818          # IRIX 6.2 and later do not support large files by default,
8819          # so use the C compiler's -n32 option if that helps.
8820          cat >conftest.$ac_ext <<_ACEOF
8821 #line 8821 "configure"
8822 #include "confdefs.h"
8823 #include <sys/types.h>
8824  /* Check that off_t can represent 2**63 - 1 correctly.
8825     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8826     since some C++ compilers masquerading as C compilers
8827     incorrectly reject 9223372036854775807.  */
8828 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8829   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8830                        && LARGE_OFF_T % 2147483647 == 1)
8831                       ? 1 : -1];
8832 int
8833 main ()
8834 {
8835
8836   ;
8837   return 0;
8838 }
8839 _ACEOF
8840          rm -f conftest.$ac_objext
8841 if { (eval echo "$as_me:8841: \"$ac_compile\"") >&5
8842   (eval $ac_compile) 2>&5
8843   ac_status=$?
8844   echo "$as_me:8844: \$? = $ac_status" >&5
8845   (exit $ac_status); } &&
8846          { ac_try='test -s conftest.$ac_objext'
8847   { (eval echo "$as_me:8847: \"$ac_try\"") >&5
8848   (eval $ac_try) 2>&5
8849   ac_status=$?
8850   echo "$as_me:8850: \$? = $ac_status" >&5
8851   (exit $ac_status); }; }; then
8852   break
8853 else
8854   echo "$as_me: failed program was:" >&5
8855 cat conftest.$ac_ext >&5
8856 fi
8857 rm -f conftest.$ac_objext
8858          CC="$CC -n32"
8859          rm -f conftest.$ac_objext
8860 if { (eval echo "$as_me:8860: \"$ac_compile\"") >&5
8861   (eval $ac_compile) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); } &&
8865          { ac_try='test -s conftest.$ac_objext'
8866   { (eval echo "$as_me:8866: \"$ac_try\"") >&5
8867   (eval $ac_try) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); }; }; then
8871   ac_cv_sys_largefile_CC=' -n32'; break
8872 else
8873   echo "$as_me: failed program was:" >&5
8874 cat conftest.$ac_ext >&5
8875 fi
8876 rm -f conftest.$ac_objext
8877          break
8878        done
8879        CC=$ac_save_CC
8880        rm -f conftest.$ac_ext
8881     fi
8882 fi
8883 echo "$as_me:8883: result: $ac_cv_sys_largefile_CC" >&5
8884 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8885   if test "$ac_cv_sys_largefile_CC" != no; then
8886     CC=$CC$ac_cv_sys_largefile_CC
8887   fi
8888
8889   echo "$as_me:8889: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8890 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8891 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 else
8894   while :; do
8895   ac_cv_sys_file_offset_bits=no
8896   cat >conftest.$ac_ext <<_ACEOF
8897 #line 8897 "configure"
8898 #include "confdefs.h"
8899 #include <sys/types.h>
8900  /* Check that off_t can represent 2**63 - 1 correctly.
8901     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8902     since some C++ compilers masquerading as C compilers
8903     incorrectly reject 9223372036854775807.  */
8904 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8905   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8906                        && LARGE_OFF_T % 2147483647 == 1)
8907                       ? 1 : -1];
8908 int
8909 main ()
8910 {
8911
8912   ;
8913   return 0;
8914 }
8915 _ACEOF
8916 rm -f conftest.$ac_objext
8917 if { (eval echo "$as_me:8917: \"$ac_compile\"") >&5
8918   (eval $ac_compile) 2>&5
8919   ac_status=$?
8920   echo "$as_me:8920: \$? = $ac_status" >&5
8921   (exit $ac_status); } &&
8922          { ac_try='test -s conftest.$ac_objext'
8923   { (eval echo "$as_me:8923: \"$ac_try\"") >&5
8924   (eval $ac_try) 2>&5
8925   ac_status=$?
8926   echo "$as_me:8926: \$? = $ac_status" >&5
8927   (exit $ac_status); }; }; then
8928   break
8929 else
8930   echo "$as_me: failed program was:" >&5
8931 cat conftest.$ac_ext >&5
8932 fi
8933 rm -f conftest.$ac_objext conftest.$ac_ext
8934   cat >conftest.$ac_ext <<_ACEOF
8935 #line 8935 "configure"
8936 #include "confdefs.h"
8937 #define _FILE_OFFSET_BITS 64
8938 #include <sys/types.h>
8939  /* Check that off_t can represent 2**63 - 1 correctly.
8940     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8941     since some C++ compilers masquerading as C compilers
8942     incorrectly reject 9223372036854775807.  */
8943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8944   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8945                        && LARGE_OFF_T % 2147483647 == 1)
8946                       ? 1 : -1];
8947 int
8948 main ()
8949 {
8950
8951   ;
8952   return 0;
8953 }
8954 _ACEOF
8955 rm -f conftest.$ac_objext
8956 if { (eval echo "$as_me:8956: \"$ac_compile\"") >&5
8957   (eval $ac_compile) 2>&5
8958   ac_status=$?
8959   echo "$as_me:8959: \$? = $ac_status" >&5
8960   (exit $ac_status); } &&
8961          { ac_try='test -s conftest.$ac_objext'
8962   { (eval echo "$as_me:8962: \"$ac_try\"") >&5
8963   (eval $ac_try) 2>&5
8964   ac_status=$?
8965   echo "$as_me:8965: \$? = $ac_status" >&5
8966   (exit $ac_status); }; }; then
8967   ac_cv_sys_file_offset_bits=64; break
8968 else
8969   echo "$as_me: failed program was:" >&5
8970 cat conftest.$ac_ext >&5
8971 fi
8972 rm -f conftest.$ac_objext conftest.$ac_ext
8973   break
8974 done
8975 fi
8976 echo "$as_me:8976: result: $ac_cv_sys_file_offset_bits" >&5
8977 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8978 if test "$ac_cv_sys_file_offset_bits" != no; then
8979
8980 cat >>confdefs.h <<EOF
8981 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8982 EOF
8983
8984 fi
8985 rm -f conftest*
8986   echo "$as_me:8986: checking for _LARGE_FILES value needed for large files" >&5
8987 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8988 if test "${ac_cv_sys_large_files+set}" = set; then
8989   echo $ECHO_N "(cached) $ECHO_C" >&6
8990 else
8991   while :; do
8992   ac_cv_sys_large_files=no
8993   cat >conftest.$ac_ext <<_ACEOF
8994 #line 8994 "configure"
8995 #include "confdefs.h"
8996 #include <sys/types.h>
8997  /* Check that off_t can represent 2**63 - 1 correctly.
8998     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8999     since some C++ compilers masquerading as C compilers
9000     incorrectly reject 9223372036854775807.  */
9001 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9002   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9003                        && LARGE_OFF_T % 2147483647 == 1)
9004                       ? 1 : -1];
9005 int
9006 main ()
9007 {
9008
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext
9014 if { (eval echo "$as_me:9014: \"$ac_compile\"") >&5
9015   (eval $ac_compile) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest.$ac_objext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   break
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 fi
9030 rm -f conftest.$ac_objext conftest.$ac_ext
9031   cat >conftest.$ac_ext <<_ACEOF
9032 #line 9032 "configure"
9033 #include "confdefs.h"
9034 #define _LARGE_FILES 1
9035 #include <sys/types.h>
9036  /* Check that off_t can represent 2**63 - 1 correctly.
9037     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9038     since some C++ compilers masquerading as C compilers
9039     incorrectly reject 9223372036854775807.  */
9040 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9041   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9042                        && LARGE_OFF_T % 2147483647 == 1)
9043                       ? 1 : -1];
9044 int
9045 main ()
9046 {
9047
9048   ;
9049   return 0;
9050 }
9051 _ACEOF
9052 rm -f conftest.$ac_objext
9053 if { (eval echo "$as_me:9053: \"$ac_compile\"") >&5
9054   (eval $ac_compile) 2>&5
9055   ac_status=$?
9056   echo "$as_me:9056: \$? = $ac_status" >&5
9057   (exit $ac_status); } &&
9058          { ac_try='test -s conftest.$ac_objext'
9059   { (eval echo "$as_me:9059: \"$ac_try\"") >&5
9060   (eval $ac_try) 2>&5
9061   ac_status=$?
9062   echo "$as_me:9062: \$? = $ac_status" >&5
9063   (exit $ac_status); }; }; then
9064   ac_cv_sys_large_files=1; break
9065 else
9066   echo "$as_me: failed program was:" >&5
9067 cat conftest.$ac_ext >&5
9068 fi
9069 rm -f conftest.$ac_objext conftest.$ac_ext
9070   break
9071 done
9072 fi
9073 echo "$as_me:9073: result: $ac_cv_sys_large_files" >&5
9074 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9075 if test "$ac_cv_sys_large_files" != no; then
9076
9077 cat >>confdefs.h <<EOF
9078 #define _LARGE_FILES $ac_cv_sys_large_files
9079 EOF
9080
9081 fi
9082 rm -f conftest*
9083 fi
9084
9085     if test "$enable_largefile" != no ; then
9086         echo "$as_me:9086: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9087 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9088 if test "${ac_cv_sys_largefile_source+set}" = set; then
9089   echo $ECHO_N "(cached) $ECHO_C" >&6
9090 else
9091   while :; do
9092   ac_cv_sys_largefile_source=no
9093   cat >conftest.$ac_ext <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096 #include <stdio.h>
9097 int
9098 main ()
9099 {
9100 return !fseeko;
9101   ;
9102   return 0;
9103 }
9104 _ACEOF
9105 rm -f conftest.$ac_objext
9106 if { (eval echo "$as_me:9106: \"$ac_compile\"") >&5
9107   (eval $ac_compile) 2>&5
9108   ac_status=$?
9109   echo "$as_me:9109: \$? = $ac_status" >&5
9110   (exit $ac_status); } &&
9111          { ac_try='test -s conftest.$ac_objext'
9112   { (eval echo "$as_me:9112: \"$ac_try\"") >&5
9113   (eval $ac_try) 2>&5
9114   ac_status=$?
9115   echo "$as_me:9115: \$? = $ac_status" >&5
9116   (exit $ac_status); }; }; then
9117   break
9118 else
9119   echo "$as_me: failed program was:" >&5
9120 cat conftest.$ac_ext >&5
9121 fi
9122 rm -f conftest.$ac_objext conftest.$ac_ext
9123   cat >conftest.$ac_ext <<_ACEOF
9124 #line 9124 "configure"
9125 #include "confdefs.h"
9126 #define _LARGEFILE_SOURCE 1
9127 #include <stdio.h>
9128 int
9129 main ()
9130 {
9131 return !fseeko;
9132   ;
9133   return 0;
9134 }
9135 _ACEOF
9136 rm -f conftest.$ac_objext
9137 if { (eval echo "$as_me:9137: \"$ac_compile\"") >&5
9138   (eval $ac_compile) 2>&5
9139   ac_status=$?
9140   echo "$as_me:9140: \$? = $ac_status" >&5
9141   (exit $ac_status); } &&
9142          { ac_try='test -s conftest.$ac_objext'
9143   { (eval echo "$as_me:9143: \"$ac_try\"") >&5
9144   (eval $ac_try) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); }; }; then
9148   ac_cv_sys_largefile_source=1; break
9149 else
9150   echo "$as_me: failed program was:" >&5
9151 cat conftest.$ac_ext >&5
9152 fi
9153 rm -f conftest.$ac_objext conftest.$ac_ext
9154   break
9155 done
9156 fi
9157 echo "$as_me:9157: result: $ac_cv_sys_largefile_source" >&5
9158 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9159 if test "$ac_cv_sys_largefile_source" != no; then
9160
9161 cat >>confdefs.h <<EOF
9162 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9163 EOF
9164
9165 fi
9166 rm -f conftest*
9167
9168 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9169 # in glibc 2.1.3, but that breaks too many other things.
9170 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9171 echo "$as_me:9171: checking for fseeko" >&5
9172 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9173 if test "${ac_cv_func_fseeko+set}" = set; then
9174   echo $ECHO_N "(cached) $ECHO_C" >&6
9175 else
9176   cat >conftest.$ac_ext <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179 #include <stdio.h>
9180 int
9181 main ()
9182 {
9183 return fseeko && fseeko (stdin, 0, 0);
9184   ;
9185   return 0;
9186 }
9187 _ACEOF
9188 rm -f conftest.$ac_objext conftest$ac_exeext
9189 if { (eval echo "$as_me:9189: \"$ac_link\"") >&5
9190   (eval $ac_link) 2>&5
9191   ac_status=$?
9192   echo "$as_me:9192: \$? = $ac_status" >&5
9193   (exit $ac_status); } &&
9194          { ac_try='test -s conftest$ac_exeext'
9195   { (eval echo "$as_me:9195: \"$ac_try\"") >&5
9196   (eval $ac_try) 2>&5
9197   ac_status=$?
9198   echo "$as_me:9198: \$? = $ac_status" >&5
9199   (exit $ac_status); }; }; then
9200   ac_cv_func_fseeko=yes
9201 else
9202   echo "$as_me: failed program was:" >&5
9203 cat conftest.$ac_ext >&5
9204 ac_cv_func_fseeko=no
9205 fi
9206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9207 fi
9208 echo "$as_me:9208: result: $ac_cv_func_fseeko" >&5
9209 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9210 if test $ac_cv_func_fseeko = yes; then
9211
9212 cat >>confdefs.h <<\EOF
9213 #define HAVE_FSEEKO 1
9214 EOF
9215
9216 fi
9217
9218         # Normally we would collect these definitions in the config.h,
9219         # but (like _XOPEN_SOURCE), some environments rely on having these
9220         # defined before any of the system headers are included.  Another
9221         # case comes up with C++, e.g., on AIX the compiler compiles the
9222         # header files by themselves before looking at the body files it is
9223         # told to compile.  For ncurses, those header files do not include
9224         # the config.h
9225         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9226         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9227         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9228
9229         echo "$as_me:9229: checking whether to use struct dirent64" >&5
9230 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9231 if test "${cf_cv_struct_dirent64+set}" = set; then
9232   echo $ECHO_N "(cached) $ECHO_C" >&6
9233 else
9234
9235                 cat >conftest.$ac_ext <<_ACEOF
9236 #line 9236 "configure"
9237 #include "confdefs.h"
9238
9239 #include <sys/types.h>
9240 #include <dirent.h>
9241
9242 int
9243 main ()
9244 {
9245
9246                 /* if transitional largefile support is setup, this is true */
9247                 extern struct dirent64 * readdir(DIR *);
9248                 struct dirent64 *x = readdir((DIR *)0);
9249                 struct dirent *y = readdir((DIR *)0);
9250                 int z = x - y;
9251
9252   ;
9253   return 0;
9254 }
9255 _ACEOF
9256 rm -f conftest.$ac_objext
9257 if { (eval echo "$as_me:9257: \"$ac_compile\"") >&5
9258   (eval $ac_compile) 2>&5
9259   ac_status=$?
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); } &&
9262          { ac_try='test -s conftest.$ac_objext'
9263   { (eval echo "$as_me:9263: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:9266: \$? = $ac_status" >&5
9267   (exit $ac_status); }; }; then
9268   cf_cv_struct_dirent64=yes
9269 else
9270   echo "$as_me: failed program was:" >&5
9271 cat conftest.$ac_ext >&5
9272 cf_cv_struct_dirent64=no
9273 fi
9274 rm -f conftest.$ac_objext conftest.$ac_ext
9275
9276 fi
9277 echo "$as_me:9277: result: $cf_cv_struct_dirent64" >&5
9278 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9279         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9280 #define HAVE_STRUCT_DIRENT64 1
9281 EOF
9282
9283     fi
9284
9285 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9286 echo "$as_me:9286: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9287 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9288
9289 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9290 if test "${enable_tparm_varargs+set}" = set; then
9291   enableval="$enable_tparm_varargs"
9292   with_tparm_varargs=$enableval
9293 else
9294   with_tparm_varargs=yes
9295 fi;
9296 echo "$as_me:9296: result: $with_tparm_varargs" >&5
9297 echo "${ECHO_T}$with_tparm_varargs" >&6
9298 NCURSES_TPARM_VARARGS=0
9299 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9300
9301 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9302 if test "$with_ticlib" != no ; then
9303 echo "$as_me:9303: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9304 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9305
9306 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9307 if test "${enable_tic_depends+set}" = set; then
9308   enableval="$enable_tic_depends"
9309   with_tic_depends=$enableval
9310 else
9311   with_tic_depends=yes
9312 fi;
9313 echo "$as_me:9313: result: $with_tic_depends" >&5
9314 echo "${ECHO_T}$with_tic_depends" >&6
9315 else
9316         with_tic_depends=no
9317 fi
9318
9319 ###   use option --with-bool to override bool's type
9320 echo "$as_me:9320: checking for type of bool" >&5
9321 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9322
9323 # Check whether --with-bool or --without-bool was given.
9324 if test "${with_bool+set}" = set; then
9325   withval="$with_bool"
9326   NCURSES_BOOL="$withval"
9327 else
9328   NCURSES_BOOL=auto
9329 fi;
9330 echo "$as_me:9330: result: $NCURSES_BOOL" >&5
9331 echo "${ECHO_T}$NCURSES_BOOL" >&6
9332
9333 echo "$as_me:9333: checking for alternate terminal capabilities file" >&5
9334 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9335
9336 # Check whether --with-caps or --without-caps was given.
9337 if test "${with_caps+set}" = set; then
9338   withval="$with_caps"
9339   TERMINFO_CAPS=Caps.$withval
9340 else
9341   TERMINFO_CAPS=Caps
9342 fi;
9343 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9344 echo "$as_me:9344: result: $TERMINFO_CAPS" >&5
9345 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9346
9347 ###   use option --with-chtype to override chtype's type
9348 echo "$as_me:9348: checking for type of chtype" >&5
9349 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9350
9351 # Check whether --with-chtype or --without-chtype was given.
9352 if test "${with_chtype+set}" = set; then
9353   withval="$with_chtype"
9354   NCURSES_CHTYPE="$withval"
9355 else
9356   NCURSES_CHTYPE=auto
9357 fi;
9358 echo "$as_me:9358: result: $NCURSES_CHTYPE" >&5
9359 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9360
9361 ###   use option --with-ospeed to override ospeed's type
9362 echo "$as_me:9362: checking for type of ospeed" >&5
9363 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9364
9365 # Check whether --with-ospeed or --without-ospeed was given.
9366 if test "${with_ospeed+set}" = set; then
9367   withval="$with_ospeed"
9368   NCURSES_OSPEED="$withval"
9369 else
9370   NCURSES_OSPEED=short
9371 fi;
9372 echo "$as_me:9372: result: $NCURSES_OSPEED" >&5
9373 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9374
9375 ###   use option --with-mmask-t to override mmask_t's type
9376 echo "$as_me:9376: checking for type of mmask_t" >&5
9377 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9378
9379 # Check whether --with-mmask-t or --without-mmask-t was given.
9380 if test "${with_mmask_t+set}" = set; then
9381   withval="$with_mmask_t"
9382   NCURSES_MMASK_T="$withval"
9383 else
9384   NCURSES_MMASK_T=auto
9385 fi;
9386 echo "$as_me:9386: result: $NCURSES_MMASK_T" >&5
9387 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9388
9389 ###   use option --with-ccharw-max to override CCHARW_MAX size
9390 echo "$as_me:9390: checking for size CCHARW_MAX" >&5
9391 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9392
9393 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9394 if test "${with_ccharw_max+set}" = set; then
9395   withval="$with_ccharw_max"
9396   NCURSES_CCHARW_MAX="$withval"
9397 else
9398   NCURSES_CCHARW_MAX=5
9399 fi;
9400 echo "$as_me:9400: result: $NCURSES_CCHARW_MAX" >&5
9401 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9402
9403 ### Enable compiling-in rcs id's
9404 echo "$as_me:9404: checking if RCS identifiers should be compiled-in" >&5
9405 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9406
9407 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9408 if test "${with_rcs_ids+set}" = set; then
9409   withval="$with_rcs_ids"
9410   with_rcs_ids=$withval
9411 else
9412   with_rcs_ids=no
9413 fi;
9414 echo "$as_me:9414: result: $with_rcs_ids" >&5
9415 echo "${ECHO_T}$with_rcs_ids" >&6
9416 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9417 #define USE_RCS_IDS 1
9418 EOF
9419
9420 ###############################################################################
9421
9422 echo "$as_me:9422: checking format of man-pages" >&5
9423 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9424
9425 # Check whether --with-manpage-format or --without-manpage-format was given.
9426 if test "${with_manpage_format+set}" = set; then
9427   withval="$with_manpage_format"
9428   MANPAGE_FORMAT=$withval
9429 else
9430   MANPAGE_FORMAT=unknown
9431 fi;
9432
9433 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9434 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9435
9436 cf_unknown=
9437
9438 case $MANPAGE_FORMAT in
9439 unknown)
9440   if test -z "$MANPATH" ; then
9441     MANPATH="/usr/man:/usr/share/man"
9442   fi
9443
9444   # look for the 'date' man-page (it's most likely to be installed!)
9445   MANPAGE_FORMAT=
9446   cf_preform=no
9447   cf_catonly=yes
9448   cf_example=date
9449
9450   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9451   for cf_dir in $MANPATH; do
9452     test -z "$cf_dir" && cf_dir=/usr/man
9453     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
9454     do
9455       cf_test=`echo $cf_name | sed -e 's/*//'`
9456       if test "x$cf_test" = "x$cf_name" ; then
9457
9458         case "$cf_name" in
9459         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9460         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9461         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9462         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9463         esac
9464
9465         case "$cf_name" in
9466         $cf_dir/man*)
9467           cf_catonly=no
9468           ;;
9469         $cf_dir/cat*)
9470           cf_preform=yes
9471           ;;
9472         esac
9473         break
9474       fi
9475
9476       # if we found a match in either man* or cat*, stop looking
9477       if test -n "$MANPAGE_FORMAT" ; then
9478         cf_found=no
9479         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9480         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9481         case "$cf_name" in
9482         $cf_dir/cat*)
9483           cf_found=yes
9484           ;;
9485         esac
9486         test $cf_found=yes && break
9487       fi
9488     done
9489     # only check the first directory in $MANPATH where we find manpages
9490     if test -n "$MANPAGE_FORMAT" ; then
9491        break
9492     fi
9493   done
9494   # if we did not find the example, just assume it is normal
9495   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9496   IFS="$ac_save_ifs"
9497   ;;
9498 *)
9499   for cf_option in $MANPAGE_FORMAT; do
9500      case $cf_option in #(vi
9501      gzip|compress|BSDI|normal|formatted|catonly)
9502        ;;
9503      *)
9504        cf_unknown="$cf_unknown $cf_option"
9505        ;;
9506      esac
9507   done
9508   ;;
9509 esac
9510
9511 echo "$as_me:9511: result: $MANPAGE_FORMAT" >&5
9512 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9513 if test -n "$cf_unknown" ; then
9514   { echo "$as_me:9514: WARNING: Unexpected manpage-format $cf_unknown" >&5
9515 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9516 fi
9517
9518 echo "$as_me:9518: checking for manpage renaming" >&5
9519 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9520
9521 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9522 if test "${with_manpage_renames+set}" = set; then
9523   withval="$with_manpage_renames"
9524   MANPAGE_RENAMES=$withval
9525 else
9526   MANPAGE_RENAMES=yes
9527 fi;
9528
9529 case ".$MANPAGE_RENAMES" in #(vi
9530 .no) #(vi
9531   ;;
9532 .|.yes)
9533   # Debian 'man' program?
9534   if test -f /etc/debian_version ; then
9535     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9536   else
9537     MANPAGE_RENAMES=no
9538   fi
9539   ;;
9540 esac
9541
9542 if test "$MANPAGE_RENAMES" != no ; then
9543   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9544     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9545   elif test ! -f $MANPAGE_RENAMES ; then
9546     { { echo "$as_me:9546: error: not a filename: $MANPAGE_RENAMES" >&5
9547 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9548    { (exit 1); exit 1; }; }
9549   fi
9550
9551   test ! -d man && mkdir man
9552
9553   # Construct a sed-script to perform renaming within man-pages
9554   if test -n "$MANPAGE_RENAMES" ; then
9555     test ! -d man && mkdir man
9556     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9557   fi
9558 fi
9559
9560 echo "$as_me:9560: result: $MANPAGE_RENAMES" >&5
9561 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9562
9563 echo "$as_me:9563: checking if manpage aliases will be installed" >&5
9564 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9565
9566 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9567 if test "${with_manpage_aliases+set}" = set; then
9568   withval="$with_manpage_aliases"
9569   MANPAGE_ALIASES=$withval
9570 else
9571   MANPAGE_ALIASES=yes
9572 fi;
9573
9574 echo "$as_me:9574: result: $MANPAGE_ALIASES" >&5
9575 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9576
9577 if test "$LN_S" = "ln -s"; then
9578         cf_use_symlinks=yes
9579 else
9580         cf_use_symlinks=no
9581 fi
9582
9583 MANPAGE_SYMLINKS=no
9584 if test "$MANPAGE_ALIASES" = yes ; then
9585 echo "$as_me:9585: checking if manpage symlinks should be used" >&5
9586 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9587
9588 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9589 if test "${with_manpage_symlinks+set}" = set; then
9590   withval="$with_manpage_symlinks"
9591   MANPAGE_SYMLINKS=$withval
9592 else
9593   MANPAGE_SYMLINKS=$cf_use_symlinks
9594 fi;
9595
9596 if test "$$cf_use_symlinks" = no; then
9597 if test "$MANPAGE_SYMLINKS" = yes ; then
9598         { echo "$as_me:9598: WARNING: cannot make symlinks" >&5
9599 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9600         MANPAGE_SYMLINKS=no
9601 fi
9602 fi
9603
9604 echo "$as_me:9604: result: $MANPAGE_SYMLINKS" >&5
9605 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9606 fi
9607
9608 echo "$as_me:9608: checking for manpage tbl" >&5
9609 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9610
9611 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9612 if test "${with_manpage_tbl+set}" = set; then
9613   withval="$with_manpage_tbl"
9614   MANPAGE_TBL=$withval
9615 else
9616   MANPAGE_TBL=no
9617 fi;
9618
9619 echo "$as_me:9619: result: $MANPAGE_TBL" >&5
9620 echo "${ECHO_T}$MANPAGE_TBL" >&6
9621
9622   if test "$prefix" = "NONE" ; then
9623      cf_prefix="$ac_default_prefix"
9624   else
9625      cf_prefix="$prefix"
9626   fi
9627
9628   case "$MANPAGE_FORMAT" in # (vi
9629   *catonly*) # (vi
9630     cf_format=yes
9631     cf_inboth=no
9632     ;;
9633   *formatted*) # (vi
9634     cf_format=yes
9635     cf_inboth=yes
9636     ;;
9637   *)
9638     cf_format=no
9639     cf_inboth=no
9640     ;;
9641   esac
9642
9643 test ! -d man && mkdir man
9644
9645 cf_so_strip=
9646 cf_compress=
9647 case "$MANPAGE_FORMAT" in #(vi
9648 *compress*) #(vi
9649         cf_so_strip="Z"
9650         cf_compress=compress
9651   ;;
9652 *gzip*) #(vi
9653         cf_so_strip="gz"
9654         cf_compress=gzip
9655   ;;
9656 esac
9657
9658 cf_edit_man=./edit_man.sh
9659 cf_man_alias=`pwd`/man_alias.sed
9660
9661 cat >$cf_edit_man <<CF_EOF
9662 #! /bin/sh
9663 # this script is generated by the configure-script CF_MAN_PAGES macro.
9664
9665 prefix="$cf_prefix"
9666 datadir="$datadir"
9667
9668 NCURSES_MAJOR="$NCURSES_MAJOR"
9669 NCURSES_MINOR="$NCURSES_MINOR"
9670 NCURSES_PATCH="$NCURSES_PATCH"
9671
9672 NCURSES_OSPEED="$NCURSES_OSPEED"
9673 TERMINFO="$TERMINFO"
9674
9675 INSTALL="$INSTALL"
9676 INSTALL_DATA="$INSTALL_DATA"
9677
9678 transform="$program_transform_name"
9679
9680 TMP=\${TMPDIR-/tmp}/man\$\$
9681 trap "rm -f \$TMP" 0 1 2 5 15
9682
9683 form=\$1
9684 shift || exit 1
9685
9686 verb=\$1
9687 shift || exit 1
9688
9689 mandir=\$1
9690 shift || exit 1
9691
9692 srcdir=\$1
9693 top_srcdir=\$srcdir/..
9694 shift || exit 1
9695
9696 if test "\$form" = normal ; then
9697         if test "$cf_format" = yes ; then
9698         if test "$cf_inboth" = no ; then
9699                 sh \$0 format \$verb \$mandir \$srcdir \$*
9700                 exit $?
9701         fi
9702         fi
9703         cf_subdir=\$mandir/man
9704         cf_tables=$MANPAGE_TBL
9705 else
9706         cf_subdir=\$mandir/cat
9707         cf_tables=yes
9708 fi
9709
9710 # process the list of source-files
9711 for i in \$* ; do
9712 case \$i in #(vi
9713 *.orig|*.rej) ;; #(vi
9714 *.[0-9]*)
9715         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9716         if test \$verb = installing ; then
9717         if test ! -d \$cf_subdir\${section} ; then
9718                 mkdir -p \$cf_subdir\$section
9719         fi
9720         fi
9721
9722         # replace variables in man page
9723         if test ! -f $cf_man_alias ; then
9724 cat >>$cf_man_alias <<-CF_EOF2
9725                 s,@DATADIR@,\$datadir,g
9726                 s,@TERMINFO@,\$TERMINFO,g
9727                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9728                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9729                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9730                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9731 CF_EOF
9732
9733         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9734         do
9735                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9736                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9737 cat >>$cf_edit_man <<-CF_EOF
9738                 s,@$cf_NAME@,$cf_name,g
9739 CF_EOF
9740         done
9741
9742 cat >>$cf_edit_man <<CF_EOF
9743 CF_EOF2
9744                 echo "...made $cf_man_alias"
9745         fi
9746
9747         aliases=
9748         cf_source=\`basename \$i\`
9749         inalias=\$cf_source
9750         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9751         if test ! -f \$inalias ; then
9752                 echo .. skipped \$cf_source
9753                 continue
9754         fi
9755 CF_EOF
9756
9757 if test "$MANPAGE_ALIASES" != no ; then
9758 cat >>$cf_edit_man <<CF_EOF
9759         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9760 CF_EOF
9761 fi
9762
9763 if test "$MANPAGE_RENAMES" = no ; then
9764 cat >>$cf_edit_man <<CF_EOF
9765         # perform program transformations for section 1 man pages
9766         if test \$section = 1 ; then
9767                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9768         else
9769                 cf_target=\$cf_subdir\${section}/\$cf_source
9770         fi
9771 CF_EOF
9772 else
9773 cat >>$cf_edit_man <<CF_EOF
9774         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9775         if test -z "\$cf_target" ; then
9776                 echo '? missing rename for '\$cf_source
9777                 cf_target="\$cf_source"
9778         fi
9779         cf_target="\$cf_subdir\${section}/\${cf_target}"
9780
9781 CF_EOF
9782 fi
9783
9784 cat >>$cf_edit_man <<CF_EOF
9785         sed     -f $cf_man_alias \\
9786 CF_EOF
9787
9788 if test -f $MANPAGE_RENAMES ; then
9789 cat >>$cf_edit_man <<CF_EOF
9790                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9791 CF_EOF
9792 else
9793 cat >>$cf_edit_man <<CF_EOF
9794                 < \$i >\$TMP
9795 CF_EOF
9796 fi
9797
9798 cat >>$cf_edit_man <<CF_EOF
9799 if test \$cf_tables = yes ; then
9800         tbl \$TMP >\$TMP.out
9801         mv \$TMP.out \$TMP
9802 fi
9803 CF_EOF
9804
9805 if test $with_curses_h != yes ; then
9806 cat >>$cf_edit_man <<CF_EOF
9807         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9808         mv \$TMP.out \$TMP
9809 CF_EOF
9810 fi
9811
9812 cat >>$cf_edit_man <<CF_EOF
9813         if test \$form = format ; then
9814                 nroff -man \$TMP >\$TMP.out
9815                 mv \$TMP.out \$TMP
9816         fi
9817 CF_EOF
9818
9819 if test -n "$cf_compress" ; then
9820 cat >>$cf_edit_man <<CF_EOF
9821         if test \$verb = installing ; then
9822         if ( $cf_compress -f \$TMP )
9823         then
9824                 mv \$TMP.$cf_so_strip \$TMP
9825         fi
9826         fi
9827         cf_target="\$cf_target.$cf_so_strip"
9828 CF_EOF
9829 fi
9830
9831 case "$MANPAGE_FORMAT" in #(vi
9832 *BSDI*)
9833 cat >>$cf_edit_man <<CF_EOF
9834         if test \$form = format ; then
9835                 # BSDI installs only .0 suffixes in the cat directories
9836                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9837         fi
9838 CF_EOF
9839   ;;
9840 esac
9841
9842 cat >>$cf_edit_man <<CF_EOF
9843         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9844         if test \$verb = installing ; then
9845                 echo \$verb \$cf_target
9846                 \$INSTALL_DATA \$TMP \$cf_target
9847                 test -d \$cf_subdir\${section} &&
9848                 test -n "\$aliases" && (
9849                         cd \$cf_subdir\${section} && (
9850                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9851                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9852                                 cf_target=\`basename \$cf_target\`
9853                                 for cf_alias in \$aliases
9854                                 do
9855                                         if test \$section = 1 ; then
9856                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9857                                         fi
9858
9859                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9860                                                 if test -f \$cf_alias\${suffix} ; then
9861                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9862                                                         then
9863                                                                 continue
9864                                                         fi
9865                                                 fi
9866                                                 echo .. \$verb alias \$cf_alias\${suffix}
9867                                                 rm -f \$cf_alias\${suffix}
9868                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9869                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9870                                                 echo ".so \$cf_source" >\$TMP
9871 CF_EOF
9872 if test -n "$cf_compress" ; then
9873 cat >>$cf_edit_man <<CF_EOF
9874                                                 if test -n "$cf_so_strip" ; then
9875                                                         $cf_compress -f \$TMP
9876                                                         mv \$TMP.$cf_so_strip \$TMP
9877                                                 fi
9878 CF_EOF
9879 fi
9880 cat >>$cf_edit_man <<CF_EOF
9881                                                 echo .. \$verb alias \$cf_alias\${suffix}
9882                                                 rm -f \$cf_alias\${suffix}
9883                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9884                                         fi
9885                                 done
9886                         )
9887                 )
9888         elif test \$verb = removing ; then
9889                 test -f \$cf_target && (
9890                         echo \$verb \$cf_target
9891                         rm -f \$cf_target
9892                 )
9893                 test -d \$cf_subdir\${section} &&
9894                 test -n "\$aliases" && (
9895                         cd \$cf_subdir\${section} && (
9896                                 for cf_alias in \$aliases
9897                                 do
9898                                         if test \$section = 1 ; then
9899                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9900                                         fi
9901
9902                                         echo .. \$verb alias \$cf_alias\${suffix}
9903                                         rm -f \$cf_alias\${suffix}
9904                                 done
9905                         )
9906                 )
9907         else
9908 #               echo ".hy 0"
9909                 cat \$TMP
9910         fi
9911         ;;
9912 esac
9913 done
9914
9915 if test $cf_inboth = yes ; then
9916 if test \$form != format ; then
9917         sh \$0 format \$verb \$mandir \$srcdir \$*
9918 fi
9919 fi
9920
9921 exit 0
9922 CF_EOF
9923 chmod 755 $cf_edit_man
9924
9925 ###############################################################################
9926
9927 ### Note that some functions (such as const) are normally disabled anyway.
9928 echo "$as_me:9928: checking if you want to build with function extensions" >&5
9929 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9930
9931 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9932 if test "${enable_ext_funcs+set}" = set; then
9933   enableval="$enable_ext_funcs"
9934   with_ext_funcs=$enableval
9935 else
9936   with_ext_funcs=yes
9937 fi;
9938 echo "$as_me:9938: result: $with_ext_funcs" >&5
9939 echo "${ECHO_T}$with_ext_funcs" >&6
9940 if test "$with_ext_funcs" = yes ; then
9941         NCURSES_EXT_FUNCS=1
9942         cat >>confdefs.h <<\EOF
9943 #define HAVE_CURSES_VERSION 1
9944 EOF
9945
9946         cat >>confdefs.h <<\EOF
9947 #define HAVE_HAS_KEY 1
9948 EOF
9949
9950         cat >>confdefs.h <<\EOF
9951 #define HAVE_RESIZETERM 1
9952 EOF
9953
9954         cat >>confdefs.h <<\EOF
9955 #define HAVE_RESIZE_TERM 1
9956 EOF
9957
9958         cat >>confdefs.h <<\EOF
9959 #define HAVE_USE_DEFAULT_COLORS 1
9960 EOF
9961
9962         cat >>confdefs.h <<\EOF
9963 #define HAVE_WRESIZE 1
9964 EOF
9965
9966         cat >>confdefs.h <<\EOF
9967 #define NCURSES_EXT_FUNCS 1
9968 EOF
9969
9970         GENERATED_EXT_FUNCS=generated
9971 else
9972         NCURSES_EXT_FUNCS=0
9973         GENERATED_EXT_FUNCS=
9974 fi
9975
9976 echo "$as_me:9976: checking if you want to build with experimental SCREEN extensions" >&5
9977 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9978
9979 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9980 if test "${enable_sp_funcs+set}" = set; then
9981   enableval="$enable_sp_funcs"
9982   with_sp_funcs=$enableval
9983 else
9984   with_sp_funcs=no
9985 fi;
9986 echo "$as_me:9986: result: $with_sp_funcs" >&5
9987 echo "${ECHO_T}$with_sp_funcs" >&6
9988 if test "$with_sp_funcs" = yes ; then
9989         NCURSES_SP_FUNCS=1
9990         cat >>confdefs.h <<\EOF
9991 #define NCURSES_SP_FUNCS 1
9992 EOF
9993
9994         GENERATED_SP_FUNCS=generated
9995 else
9996         NCURSES_SP_FUNCS=0
9997         GENERATED_SP_FUNCS=
9998 fi
9999
10000 echo "$as_me:10000: checking if you want to build with experimental terminal-driver" >&5
10001 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10002
10003 # Check whether --enable-term-driver or --disable-term-driver was given.
10004 if test "${enable_term_driver+set}" = set; then
10005   enableval="$enable_term_driver"
10006   with_term_driver=$enableval
10007 else
10008   with_term_driver=no
10009 fi;
10010 echo "$as_me:10010: result: $with_term_driver" >&5
10011 echo "${ECHO_T}$with_term_driver" >&6
10012 if test "$with_term_driver" = yes ; then
10013         cat >>confdefs.h <<\EOF
10014 #define USE_TERM_DRIVER 1
10015 EOF
10016
10017         if test "$with_sp_funcs" != yes ; then
10018                 { { echo "$as_me:10018: error: The term-driver option relies upon sp-funcs" >&5
10019 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10020    { (exit 1); exit 1; }; }
10021         fi
10022 fi
10023
10024 ###   use option --enable-const to turn on use of const beyond that in XSI.
10025 echo "$as_me:10025: checking for extended use of const keyword" >&5
10026 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10027
10028 # Check whether --enable-const or --disable-const was given.
10029 if test "${enable_const+set}" = set; then
10030   enableval="$enable_const"
10031   with_ext_const=$enableval
10032 else
10033   with_ext_const=no
10034 fi;
10035 echo "$as_me:10035: result: $with_ext_const" >&5
10036 echo "${ECHO_T}$with_ext_const" >&6
10037 NCURSES_CONST='/*nothing*/'
10038 if test "$with_ext_const" = yes ; then
10039         NCURSES_CONST=const
10040 fi
10041
10042 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10043 echo "$as_me:10043: checking if you want to use extended colors" >&5
10044 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10045
10046 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10047 if test "${enable_ext_colors+set}" = set; then
10048   enableval="$enable_ext_colors"
10049   with_ext_colors=$enableval
10050 else
10051   with_ext_colors=no
10052 fi;
10053 echo "$as_me:10053: result: $with_ext_colors" >&5
10054 echo "${ECHO_T}$with_ext_colors" >&6
10055 NCURSES_EXT_COLORS=0
10056 if test "$with_ext_colors" = yes ; then
10057         if test "$with_widec" != yes ; then
10058                 { { echo "$as_me:10058: error: This option applies only to wide-character library" >&5
10059 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10060    { (exit 1); exit 1; }; }
10061         else
10062                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10063
10064 if test "${with_abi_version+set}" != set; then
10065         case $cf_cv_rel_version in
10066         5.*)
10067                 cf_cv_rel_version=6.0
10068                 cf_cv_abi_version=6
10069                 { echo "$as_me:10069: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10070 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10071                 ;;
10072         esac
10073 fi
10074
10075         fi
10076         NCURSES_EXT_COLORS=1
10077         cat >>confdefs.h <<\EOF
10078 #define NCURSES_EXT_COLORS 1
10079 EOF
10080
10081 fi
10082
10083 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10084 echo "$as_me:10084: checking if you want to use extended mouse encoding" >&5
10085 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10086
10087 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10088 if test "${enable_ext_mouse+set}" = set; then
10089   enableval="$enable_ext_mouse"
10090   with_ext_mouse=$enableval
10091 else
10092   with_ext_mouse=no
10093 fi;
10094 echo "$as_me:10094: result: $with_ext_mouse" >&5
10095 echo "${ECHO_T}$with_ext_mouse" >&6
10096 NCURSES_MOUSE_VERSION=1
10097 if test "$with_ext_mouse" = yes ; then
10098         NCURSES_MOUSE_VERSION=2
10099
10100 if test "${with_abi_version+set}" != set; then
10101         case $cf_cv_rel_version in
10102         5.*)
10103                 cf_cv_rel_version=6.0
10104                 cf_cv_abi_version=6
10105                 { echo "$as_me:10105: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10106 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10107                 ;;
10108         esac
10109 fi
10110
10111 fi
10112
10113 echo "$as_me:10113: checking if you want \$NCURSES_NO_PADDING code" >&5
10114 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10115
10116 # Check whether --enable-no-padding or --disable-no-padding was given.
10117 if test "${enable_no_padding+set}" = set; then
10118   enableval="$enable_no_padding"
10119   with_no_padding=$enableval
10120 else
10121   with_no_padding=$with_ext_funcs
10122 fi;
10123 echo "$as_me:10123: result: $with_no_padding" >&5
10124 echo "${ECHO_T}$with_no_padding" >&6
10125 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10126 #define NCURSES_NO_PADDING 1
10127 EOF
10128
10129 echo "$as_me:10129: checking for ANSI C header files" >&5
10130 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10131 if test "${ac_cv_header_stdc+set}" = set; then
10132   echo $ECHO_N "(cached) $ECHO_C" >&6
10133 else
10134   cat >conftest.$ac_ext <<_ACEOF
10135 #line 10135 "configure"
10136 #include "confdefs.h"
10137 #include <stdlib.h>
10138 #include <stdarg.h>
10139 #include <string.h>
10140 #include <float.h>
10141
10142 _ACEOF
10143 if { (eval echo "$as_me:10143: \"$ac_cpp conftest.$ac_ext\"") >&5
10144   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10145   ac_status=$?
10146   egrep -v '^ *\+' conftest.er1 >conftest.err
10147   rm -f conftest.er1
10148   cat conftest.err >&5
10149   echo "$as_me:10149: \$? = $ac_status" >&5
10150   (exit $ac_status); } >/dev/null; then
10151   if test -s conftest.err; then
10152     ac_cpp_err=$ac_c_preproc_warn_flag
10153   else
10154     ac_cpp_err=
10155   fi
10156 else
10157   ac_cpp_err=yes
10158 fi
10159 if test -z "$ac_cpp_err"; then
10160   ac_cv_header_stdc=yes
10161 else
10162   echo "$as_me: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   ac_cv_header_stdc=no
10165 fi
10166 rm -f conftest.err conftest.$ac_ext
10167
10168 if test $ac_cv_header_stdc = yes; then
10169   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10170   cat >conftest.$ac_ext <<_ACEOF
10171 #line 10171 "configure"
10172 #include "confdefs.h"
10173 #include <string.h>
10174
10175 _ACEOF
10176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10177   egrep "memchr" >/dev/null 2>&1; then
10178   :
10179 else
10180   ac_cv_header_stdc=no
10181 fi
10182 rm -f conftest*
10183
10184 fi
10185
10186 if test $ac_cv_header_stdc = yes; then
10187   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10188   cat >conftest.$ac_ext <<_ACEOF
10189 #line 10189 "configure"
10190 #include "confdefs.h"
10191 #include <stdlib.h>
10192
10193 _ACEOF
10194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10195   egrep "free" >/dev/null 2>&1; then
10196   :
10197 else
10198   ac_cv_header_stdc=no
10199 fi
10200 rm -f conftest*
10201
10202 fi
10203
10204 if test $ac_cv_header_stdc = yes; then
10205   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10206   if test "$cross_compiling" = yes; then
10207   :
10208 else
10209   cat >conftest.$ac_ext <<_ACEOF
10210 #line 10210 "configure"
10211 #include "confdefs.h"
10212 #include <ctype.h>
10213 #if ((' ' & 0x0FF) == 0x020)
10214 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10215 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10216 #else
10217 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10218                      || ('j' <= (c) && (c) <= 'r') \
10219                      || ('s' <= (c) && (c) <= 'z'))
10220 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10221 #endif
10222
10223 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10224 int
10225 main ()
10226 {
10227   int i;
10228   for (i = 0; i < 256; i++)
10229     if (XOR (islower (i), ISLOWER (i))
10230         || toupper (i) != TOUPPER (i))
10231       $ac_main_return(2);
10232   $ac_main_return (0);
10233 }
10234 _ACEOF
10235 rm -f conftest$ac_exeext
10236 if { (eval echo "$as_me:10236: \"$ac_link\"") >&5
10237   (eval $ac_link) 2>&5
10238   ac_status=$?
10239   echo "$as_me:10239: \$? = $ac_status" >&5
10240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10241   { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242   (eval $ac_try) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); }; }; then
10246   :
10247 else
10248   echo "$as_me: program exited with status $ac_status" >&5
10249 echo "$as_me: failed program was:" >&5
10250 cat conftest.$ac_ext >&5
10251 ac_cv_header_stdc=no
10252 fi
10253 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10254 fi
10255 fi
10256 fi
10257 echo "$as_me:10257: result: $ac_cv_header_stdc" >&5
10258 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10259 if test $ac_cv_header_stdc = yes; then
10260
10261 cat >>confdefs.h <<\EOF
10262 #define STDC_HEADERS 1
10263 EOF
10264
10265 fi
10266
10267 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10268
10269 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10270                   inttypes.h stdint.h unistd.h
10271 do
10272 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10273 echo "$as_me:10273: checking for $ac_header" >&5
10274 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10275 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10276   echo $ECHO_N "(cached) $ECHO_C" >&6
10277 else
10278   cat >conftest.$ac_ext <<_ACEOF
10279 #line 10279 "configure"
10280 #include "confdefs.h"
10281 $ac_includes_default
10282 #include <$ac_header>
10283 _ACEOF
10284 rm -f conftest.$ac_objext
10285 if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
10286   (eval $ac_compile) 2>&5
10287   ac_status=$?
10288   echo "$as_me:10288: \$? = $ac_status" >&5
10289   (exit $ac_status); } &&
10290          { ac_try='test -s conftest.$ac_objext'
10291   { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292   (eval $ac_try) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); }; }; then
10296   eval "$as_ac_Header=yes"
10297 else
10298   echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10300 eval "$as_ac_Header=no"
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 echo "$as_me:10304: result: `eval echo '${'$as_ac_Header'}'`" >&5
10305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10307   cat >>confdefs.h <<EOF
10308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10309 EOF
10310
10311 fi
10312 done
10313
10314 echo "$as_me:10314: checking for signed char" >&5
10315 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10316 if test "${ac_cv_type_signed_char+set}" = set; then
10317   echo $ECHO_N "(cached) $ECHO_C" >&6
10318 else
10319   cat >conftest.$ac_ext <<_ACEOF
10320 #line 10320 "configure"
10321 #include "confdefs.h"
10322 $ac_includes_default
10323 int
10324 main ()
10325 {
10326 if ((signed char *) 0)
10327   return 0;
10328 if (sizeof (signed char))
10329   return 0;
10330   ;
10331   return 0;
10332 }
10333 _ACEOF
10334 rm -f conftest.$ac_objext
10335 if { (eval echo "$as_me:10335: \"$ac_compile\"") >&5
10336   (eval $ac_compile) 2>&5
10337   ac_status=$?
10338   echo "$as_me:10338: \$? = $ac_status" >&5
10339   (exit $ac_status); } &&
10340          { ac_try='test -s conftest.$ac_objext'
10341   { (eval echo "$as_me:10341: \"$ac_try\"") >&5
10342   (eval $ac_try) 2>&5
10343   ac_status=$?
10344   echo "$as_me:10344: \$? = $ac_status" >&5
10345   (exit $ac_status); }; }; then
10346   ac_cv_type_signed_char=yes
10347 else
10348   echo "$as_me: failed program was:" >&5
10349 cat conftest.$ac_ext >&5
10350 ac_cv_type_signed_char=no
10351 fi
10352 rm -f conftest.$ac_objext conftest.$ac_ext
10353 fi
10354 echo "$as_me:10354: result: $ac_cv_type_signed_char" >&5
10355 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10356
10357 echo "$as_me:10357: checking size of signed char" >&5
10358 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10359 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10360   echo $ECHO_N "(cached) $ECHO_C" >&6
10361 else
10362   if test "$ac_cv_type_signed_char" = yes; then
10363   if test "$cross_compiling" = yes; then
10364   # Depending upon the size, compute the lo and hi bounds.
10365 cat >conftest.$ac_ext <<_ACEOF
10366 #line 10366 "configure"
10367 #include "confdefs.h"
10368 $ac_includes_default
10369 int
10370 main ()
10371 {
10372 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10373   ;
10374   return 0;
10375 }
10376 _ACEOF
10377 rm -f conftest.$ac_objext
10378 if { (eval echo "$as_me:10378: \"$ac_compile\"") >&5
10379   (eval $ac_compile) 2>&5
10380   ac_status=$?
10381   echo "$as_me:10381: \$? = $ac_status" >&5
10382   (exit $ac_status); } &&
10383          { ac_try='test -s conftest.$ac_objext'
10384   { (eval echo "$as_me:10384: \"$ac_try\"") >&5
10385   (eval $ac_try) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit $ac_status); }; }; then
10389   ac_lo=0 ac_mid=0
10390   while :; do
10391     cat >conftest.$ac_ext <<_ACEOF
10392 #line 10392 "configure"
10393 #include "confdefs.h"
10394 $ac_includes_default
10395 int
10396 main ()
10397 {
10398 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10399   ;
10400   return 0;
10401 }
10402 _ACEOF
10403 rm -f conftest.$ac_objext
10404 if { (eval echo "$as_me:10404: \"$ac_compile\"") >&5
10405   (eval $ac_compile) 2>&5
10406   ac_status=$?
10407   echo "$as_me:10407: \$? = $ac_status" >&5
10408   (exit $ac_status); } &&
10409          { ac_try='test -s conftest.$ac_objext'
10410   { (eval echo "$as_me:10410: \"$ac_try\"") >&5
10411   (eval $ac_try) 2>&5
10412   ac_status=$?
10413   echo "$as_me:10413: \$? = $ac_status" >&5
10414   (exit $ac_status); }; }; then
10415   ac_hi=$ac_mid; break
10416 else
10417   echo "$as_me: failed program was:" >&5
10418 cat conftest.$ac_ext >&5
10419 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10420 fi
10421 rm -f conftest.$ac_objext conftest.$ac_ext
10422   done
10423 else
10424   echo "$as_me: failed program was:" >&5
10425 cat conftest.$ac_ext >&5
10426 ac_hi=-1 ac_mid=-1
10427   while :; do
10428     cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431 $ac_includes_default
10432 int
10433 main ()
10434 {
10435 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10436   ;
10437   return 0;
10438 }
10439 _ACEOF
10440 rm -f conftest.$ac_objext
10441 if { (eval echo "$as_me:10441: \"$ac_compile\"") >&5
10442   (eval $ac_compile) 2>&5
10443   ac_status=$?
10444   echo "$as_me:10444: \$? = $ac_status" >&5
10445   (exit $ac_status); } &&
10446          { ac_try='test -s conftest.$ac_objext'
10447   { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448   (eval $ac_try) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit $ac_status); }; }; then
10452   ac_lo=$ac_mid; break
10453 else
10454   echo "$as_me: failed program was:" >&5
10455 cat conftest.$ac_ext >&5
10456 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10457 fi
10458 rm -f conftest.$ac_objext conftest.$ac_ext
10459   done
10460 fi
10461 rm -f conftest.$ac_objext conftest.$ac_ext
10462 # Binary search between lo and hi bounds.
10463 while test "x$ac_lo" != "x$ac_hi"; do
10464   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10465   cat >conftest.$ac_ext <<_ACEOF
10466 #line 10466 "configure"
10467 #include "confdefs.h"
10468 $ac_includes_default
10469 int
10470 main ()
10471 {
10472 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10473   ;
10474   return 0;
10475 }
10476 _ACEOF
10477 rm -f conftest.$ac_objext
10478 if { (eval echo "$as_me:10478: \"$ac_compile\"") >&5
10479   (eval $ac_compile) 2>&5
10480   ac_status=$?
10481   echo "$as_me:10481: \$? = $ac_status" >&5
10482   (exit $ac_status); } &&
10483          { ac_try='test -s conftest.$ac_objext'
10484   { (eval echo "$as_me:10484: \"$ac_try\"") >&5
10485   (eval $ac_try) 2>&5
10486   ac_status=$?
10487   echo "$as_me:10487: \$? = $ac_status" >&5
10488   (exit $ac_status); }; }; then
10489   ac_hi=$ac_mid
10490 else
10491   echo "$as_me: failed program was:" >&5
10492 cat conftest.$ac_ext >&5
10493 ac_lo=`expr $ac_mid + 1`
10494 fi
10495 rm -f conftest.$ac_objext conftest.$ac_ext
10496 done
10497 ac_cv_sizeof_signed_char=$ac_lo
10498 else
10499   if test "$cross_compiling" = yes; then
10500   { { echo "$as_me:10500: error: cannot run test program while cross compiling" >&5
10501 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10502    { (exit 1); exit 1; }; }
10503 else
10504   cat >conftest.$ac_ext <<_ACEOF
10505 #line 10505 "configure"
10506 #include "confdefs.h"
10507 $ac_includes_default
10508 int
10509 main ()
10510 {
10511 FILE *f = fopen ("conftest.val", "w");
10512 if (!f)
10513   $ac_main_return (1);
10514 fprintf (f, "%d", (sizeof (signed char)));
10515 fclose (f);
10516   ;
10517   return 0;
10518 }
10519 _ACEOF
10520 rm -f conftest$ac_exeext
10521 if { (eval echo "$as_me:10521: \"$ac_link\"") >&5
10522   (eval $ac_link) 2>&5
10523   ac_status=$?
10524   echo "$as_me:10524: \$? = $ac_status" >&5
10525   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10526   { (eval echo "$as_me:10526: \"$ac_try\"") >&5
10527   (eval $ac_try) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit $ac_status); }; }; then
10531   ac_cv_sizeof_signed_char=`cat conftest.val`
10532 else
10533   echo "$as_me: program exited with status $ac_status" >&5
10534 echo "$as_me: failed program was:" >&5
10535 cat conftest.$ac_ext >&5
10536 fi
10537 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10538 fi
10539 fi
10540 rm -f conftest.val
10541 else
10542   ac_cv_sizeof_signed_char=0
10543 fi
10544 fi
10545 echo "$as_me:10545: result: $ac_cv_sizeof_signed_char" >&5
10546 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10547 cat >>confdefs.h <<EOF
10548 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10549 EOF
10550
10551 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10552         NCURSES_SBOOL="signed char"
10553 else
10554         NCURSES_SBOOL="char"
10555 fi
10556 echo "$as_me:10556: checking if you want to use signed Boolean array in term.h" >&5
10557 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10558
10559 # Check whether --enable-signed-char or --disable-signed-char was given.
10560 if test "${enable_signed_char+set}" = set; then
10561   enableval="$enable_signed_char"
10562   with_signed_char=$enableval
10563 else
10564   with_signed_char=no
10565 fi;
10566 echo "$as_me:10566: result: $with_signed_char" >&5
10567 echo "${ECHO_T}$with_signed_char" >&6
10568 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10569
10570 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10571 echo "$as_me:10571: checking if you want SIGWINCH handler" >&5
10572 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10573
10574 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10575 if test "${enable_sigwinch+set}" = set; then
10576   enableval="$enable_sigwinch"
10577   with_sigwinch=$enableval
10578 else
10579   with_sigwinch=$with_ext_funcs
10580 fi;
10581 echo "$as_me:10581: result: $with_sigwinch" >&5
10582 echo "${ECHO_T}$with_sigwinch" >&6
10583 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10584 #define USE_SIGWINCH 1
10585 EOF
10586
10587 ###   use option --enable-tcap-names to allow user to define new capabilities
10588 echo "$as_me:10588: checking if you want user-definable terminal capabilities like termcap" >&5
10589 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10590
10591 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10592 if test "${enable_tcap_names+set}" = set; then
10593   enableval="$enable_tcap_names"
10594   with_tcap_names=$enableval
10595 else
10596   with_tcap_names=$with_ext_funcs
10597 fi;
10598 echo "$as_me:10598: result: $with_tcap_names" >&5
10599 echo "${ECHO_T}$with_tcap_names" >&6
10600 NCURSES_XNAMES=0
10601 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10602
10603 ###############################################################################
10604 # These options are relatively safe to experiment with.
10605
10606 echo "$as_me:10606: checking if you want all development code" >&5
10607 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10608
10609 # Check whether --with-develop or --without-develop was given.
10610 if test "${with_develop+set}" = set; then
10611   withval="$with_develop"
10612   with_develop=$withval
10613 else
10614   with_develop=no
10615 fi;
10616 echo "$as_me:10616: result: $with_develop" >&5
10617 echo "${ECHO_T}$with_develop" >&6
10618
10619 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10620 echo "$as_me:10620: checking if you want hard-tabs code" >&5
10621 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10622
10623 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10624 if test "${enable_hard_tabs+set}" = set; then
10625   enableval="$enable_hard_tabs"
10626
10627 else
10628   enable_hard_tabs=$with_develop
10629 fi;
10630 echo "$as_me:10630: result: $enable_hard_tabs" >&5
10631 echo "${ECHO_T}$enable_hard_tabs" >&6
10632 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10633 #define USE_HARD_TABS 1
10634 EOF
10635
10636 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10637 echo "$as_me:10637: checking if you want limited support for xmc" >&5
10638 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10639
10640 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10641 if test "${enable_xmc_glitch+set}" = set; then
10642   enableval="$enable_xmc_glitch"
10643
10644 else
10645   enable_xmc_glitch=$with_develop
10646 fi;
10647 echo "$as_me:10647: result: $enable_xmc_glitch" >&5
10648 echo "${ECHO_T}$enable_xmc_glitch" >&6
10649 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10650 #define USE_XMC_SUPPORT 1
10651 EOF
10652
10653 ###############################################################################
10654 # These are just experimental, probably should not be in a package:
10655
10656 echo "$as_me:10656: checking if you do not want to assume colors are white-on-black" >&5
10657 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10658
10659 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10660 if test "${enable_assumed_color+set}" = set; then
10661   enableval="$enable_assumed_color"
10662   with_assumed_color=$enableval
10663 else
10664   with_assumed_color=yes
10665 fi;
10666 echo "$as_me:10666: result: $with_assumed_color" >&5
10667 echo "${ECHO_T}$with_assumed_color" >&6
10668 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10669 #define USE_ASSUMED_COLOR 1
10670 EOF
10671
10672 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10673 echo "$as_me:10673: checking if you want hashmap scrolling-optimization code" >&5
10674 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10675
10676 # Check whether --enable-hashmap or --disable-hashmap was given.
10677 if test "${enable_hashmap+set}" = set; then
10678   enableval="$enable_hashmap"
10679   with_hashmap=$enableval
10680 else
10681   with_hashmap=yes
10682 fi;
10683 echo "$as_me:10683: result: $with_hashmap" >&5
10684 echo "${ECHO_T}$with_hashmap" >&6
10685 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10686 #define USE_HASHMAP 1
10687 EOF
10688
10689 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10690 echo "$as_me:10690: checking if you want colorfgbg code" >&5
10691 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10692
10693 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10694 if test "${enable_colorfgbg+set}" = set; then
10695   enableval="$enable_colorfgbg"
10696   with_colorfgbg=$enableval
10697 else
10698   with_colorfgbg=no
10699 fi;
10700 echo "$as_me:10700: result: $with_colorfgbg" >&5
10701 echo "${ECHO_T}$with_colorfgbg" >&6
10702 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10703 #define USE_COLORFGBG 1
10704 EOF
10705
10706 ###   use option --enable-interop to turn on use of bindings used for interop
10707 echo "$as_me:10707: checking if you want interop bindings" >&5
10708 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10709
10710 # Check whether --enable-interop or --disable-interop was given.
10711 if test "${enable_interop+set}" = set; then
10712   enableval="$enable_interop"
10713   with_exp_interop=$enableval
10714 else
10715   with_exp_interop=no
10716 fi;
10717 echo "$as_me:10717: result: $with_exp_interop" >&5
10718 echo "${ECHO_T}$with_exp_interop" >&6
10719
10720 NCURSES_INTEROP_FUNCS=0
10721 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10722
10723 # This is still experimental (20080329), but should ultimately be moved to
10724 # the script-block --with-normal, etc.
10725
10726 echo "$as_me:10726: checking if you want to link with the pthread library" >&5
10727 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10728
10729 # Check whether --with-pthread or --without-pthread was given.
10730 if test "${with_pthread+set}" = set; then
10731   withval="$with_pthread"
10732   with_pthread=$withval
10733 else
10734   with_pthread=no
10735 fi;
10736 echo "$as_me:10736: result: $with_pthread" >&5
10737 echo "${ECHO_T}$with_pthread" >&6
10738
10739 if test "$with_pthread" != no ; then
10740     echo "$as_me:10740: checking for pthread.h" >&5
10741 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10742 if test "${ac_cv_header_pthread_h+set}" = set; then
10743   echo $ECHO_N "(cached) $ECHO_C" >&6
10744 else
10745   cat >conftest.$ac_ext <<_ACEOF
10746 #line 10746 "configure"
10747 #include "confdefs.h"
10748 #include <pthread.h>
10749 _ACEOF
10750 if { (eval echo "$as_me:10750: \"$ac_cpp conftest.$ac_ext\"") >&5
10751   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10752   ac_status=$?
10753   egrep -v '^ *\+' conftest.er1 >conftest.err
10754   rm -f conftest.er1
10755   cat conftest.err >&5
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit $ac_status); } >/dev/null; then
10758   if test -s conftest.err; then
10759     ac_cpp_err=$ac_c_preproc_warn_flag
10760   else
10761     ac_cpp_err=
10762   fi
10763 else
10764   ac_cpp_err=yes
10765 fi
10766 if test -z "$ac_cpp_err"; then
10767   ac_cv_header_pthread_h=yes
10768 else
10769   echo "$as_me: failed program was:" >&5
10770   cat conftest.$ac_ext >&5
10771   ac_cv_header_pthread_h=no
10772 fi
10773 rm -f conftest.err conftest.$ac_ext
10774 fi
10775 echo "$as_me:10775: result: $ac_cv_header_pthread_h" >&5
10776 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10777 if test $ac_cv_header_pthread_h = yes; then
10778
10779         cat >>confdefs.h <<\EOF
10780 #define HAVE_PTHREADS_H 1
10781 EOF
10782
10783         echo "$as_me:10783: checking if we can link with the pthread library" >&5
10784 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10785         cf_save_LIBS="$LIBS"
10786         LIBS="-lpthread $LIBS"
10787         cat >conftest.$ac_ext <<_ACEOF
10788 #line 10788 "configure"
10789 #include "confdefs.h"
10790
10791 #include <pthread.h>
10792
10793 int
10794 main ()
10795 {
10796
10797         int rc = pthread_create(0,0,0,0);
10798
10799   ;
10800   return 0;
10801 }
10802 _ACEOF
10803 rm -f conftest.$ac_objext conftest$ac_exeext
10804 if { (eval echo "$as_me:10804: \"$ac_link\"") >&5
10805   (eval $ac_link) 2>&5
10806   ac_status=$?
10807   echo "$as_me:10807: \$? = $ac_status" >&5
10808   (exit $ac_status); } &&
10809          { ac_try='test -s conftest$ac_exeext'
10810   { (eval echo "$as_me:10810: \"$ac_try\"") >&5
10811   (eval $ac_try) 2>&5
10812   ac_status=$?
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); }; }; then
10815   with_pthread=yes
10816 else
10817   echo "$as_me: failed program was:" >&5
10818 cat conftest.$ac_ext >&5
10819 with_pthread=no
10820 fi
10821 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10822         LIBS="$cf_save_LIBS"
10823         echo "$as_me:10823: result: $with_pthread" >&5
10824 echo "${ECHO_T}$with_pthread" >&6
10825
10826         if test "$with_pthread" = yes ; then
10827             LIBS="-lpthread $LIBS"
10828             cat >>confdefs.h <<\EOF
10829 #define HAVE_LIBPTHREADS 1
10830 EOF
10831
10832         else
10833             { { echo "$as_me:10833: error: Cannot link with pthread library" >&5
10834 echo "$as_me: error: Cannot link with pthread library" >&2;}
10835    { (exit 1); exit 1; }; }
10836         fi
10837
10838 fi
10839
10840 fi
10841
10842 echo "$as_me:10842: checking if you want to allow EINTR in wgetch with pthreads" >&5
10843 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10844
10845 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10846 if test "${enable_pthreads_eintr+set}" = set; then
10847   enableval="$enable_pthreads_eintr"
10848   use_pthreads_eintr=$enableval
10849 else
10850   use_pthreads_eintr=no
10851 fi;
10852 echo "$as_me:10852: result: $use_pthreads_eintr" >&5
10853 echo "${ECHO_T}$use_pthreads_eintr" >&6
10854 if test $use_pthreads_eintr = yes ; then
10855     cat >>confdefs.h <<\EOF
10856 #define USE_PTHREADS_EINTR 1
10857 EOF
10858
10859 fi
10860
10861 echo "$as_me:10861: checking if you want to use weak-symbols for pthreads" >&5
10862 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10863
10864 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10865 if test "${enable_weak_symbols+set}" = set; then
10866   enableval="$enable_weak_symbols"
10867   use_weak_symbols=$enableval
10868 else
10869   use_weak_symbols=no
10870 fi;
10871 echo "$as_me:10871: result: $use_weak_symbols" >&5
10872 echo "${ECHO_T}$use_weak_symbols" >&6
10873 if test "$use_weak_symbols" = yes ; then
10874
10875 echo "$as_me:10875: checking if $CC supports weak symbols" >&5
10876 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10877 if test "${cf_cv_weak_symbols+set}" = set; then
10878   echo $ECHO_N "(cached) $ECHO_C" >&6
10879 else
10880
10881 cat >conftest.$ac_ext <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884
10885 #include <stdio.h>
10886 int
10887 main ()
10888 {
10889
10890 #if defined(__GNUC__)
10891 #  if defined __USE_ISOC99
10892 #    define _cat_pragma(exp)    _Pragma(#exp)
10893 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10894 #  else
10895 #    define _weak_pragma(exp)
10896 #  endif
10897 #  define _declare(name)        __extension__ extern __typeof__(name) name
10898 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10899 #endif
10900
10901 weak_symbol(fopen);
10902
10903   ;
10904   return 0;
10905 }
10906 _ACEOF
10907 rm -f conftest.$ac_objext
10908 if { (eval echo "$as_me:10908: \"$ac_compile\"") >&5
10909   (eval $ac_compile) 2>&5
10910   ac_status=$?
10911   echo "$as_me:10911: \$? = $ac_status" >&5
10912   (exit $ac_status); } &&
10913          { ac_try='test -s conftest.$ac_objext'
10914   { (eval echo "$as_me:10914: \"$ac_try\"") >&5
10915   (eval $ac_try) 2>&5
10916   ac_status=$?
10917   echo "$as_me:10917: \$? = $ac_status" >&5
10918   (exit $ac_status); }; }; then
10919   cf_cv_weak_symbols=yes
10920 else
10921   echo "$as_me: failed program was:" >&5
10922 cat conftest.$ac_ext >&5
10923 cf_cv_weak_symbols=no
10924 fi
10925 rm -f conftest.$ac_objext conftest.$ac_ext
10926
10927 fi
10928 echo "$as_me:10928: result: $cf_cv_weak_symbols" >&5
10929 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10930
10931 else
10932     cf_cv_weak_symbols=no
10933 fi
10934
10935 if test $cf_cv_weak_symbols = yes ; then
10936     cat >>confdefs.h <<\EOF
10937 #define USE_WEAK_SYMBOLS 1
10938 EOF
10939
10940 fi
10941
10942 PTHREAD=
10943 if test "$with_pthread" = "yes" ; then
10944     cat >>confdefs.h <<\EOF
10945 #define USE_PTHREADS 1
10946 EOF
10947
10948     enable_reentrant=yes
10949     if test $cf_cv_weak_symbols = yes ; then
10950         PTHREAD=-lpthread
10951     fi
10952 fi
10953
10954 # Reentrant code has to be opaque; there's little advantage to making ncurses
10955 # opaque outside of that, so there is no --enable-opaque option.  We can use
10956 # this option without --with-pthreads, but this will be always set for
10957 # pthreads.
10958 echo "$as_me:10958: checking if you want experimental reentrant code" >&5
10959 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10960
10961 # Check whether --enable-reentrant or --disable-reentrant was given.
10962 if test "${enable_reentrant+set}" = set; then
10963   enableval="$enable_reentrant"
10964   with_reentrant=$enableval
10965 else
10966   with_reentrant=no
10967 fi;
10968 echo "$as_me:10968: result: $with_reentrant" >&5
10969 echo "${ECHO_T}$with_reentrant" >&6
10970 if test "$with_reentrant" = yes ; then
10971         cf_cv_enable_reentrant=1
10972         cf_cv_enable_opaque="NCURSES_INTERNALS"
10973         NCURSES_OPAQUE=1
10974         NCURSES_SIZE_T=int
10975         if test $cf_cv_weak_symbols = yes ; then
10976
10977 # remove pthread library from $LIBS
10978 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10979
10980                 TEST_LIBS="-lpthread $TEST_LIBS"
10981                 TEST_LIBS2="-lpthread $TEST_LIBS2"
10982         fi
10983         LIB_SUFFIX="t${LIB_SUFFIX}"
10984         cat >>confdefs.h <<\EOF
10985 #define USE_REENTRANT 1
10986 EOF
10987
10988 if test "${with_abi_version+set}" != set; then
10989         case $cf_cv_rel_version in
10990         5.*)
10991                 cf_cv_rel_version=6.0
10992                 cf_cv_abi_version=6
10993                 { echo "$as_me:10993: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10994 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10995                 ;;
10996         esac
10997 fi
10998
10999 else
11000         cf_cv_enable_reentrant=0
11001         cf_cv_enable_opaque="NCURSES_OPAQUE"
11002         NCURSES_OPAQUE=0
11003         NCURSES_SIZE_T=short
11004 fi
11005
11006 ### Allow using a different wrap-prefix
11007 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11008         echo "$as_me:11008: checking for prefix used to wrap public variables" >&5
11009 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11010
11011 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11012 if test "${with_wrap_prefix+set}" = set; then
11013   withval="$with_wrap_prefix"
11014   NCURSES_WRAP_PREFIX=$withval
11015 else
11016   NCURSES_WRAP_PREFIX=_nc_
11017 fi;
11018         echo "$as_me:11018: result: $NCURSES_WRAP_PREFIX" >&5
11019 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11020 else
11021         NCURSES_WRAP_PREFIX=_nc_
11022 fi
11023
11024 cat >>confdefs.h <<EOF
11025 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11026 EOF
11027
11028 echo "$as_me:11028: checking if you want experimental safe-sprintf code" >&5
11029 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11030
11031 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11032 if test "${enable_safe_sprintf+set}" = set; then
11033   enableval="$enable_safe_sprintf"
11034   with_safe_sprintf=$enableval
11035 else
11036   with_safe_sprintf=no
11037 fi;
11038 echo "$as_me:11038: result: $with_safe_sprintf" >&5
11039 echo "${ECHO_T}$with_safe_sprintf" >&6
11040 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11041 #define USE_SAFE_SPRINTF 1
11042 EOF
11043
11044 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11045 # when hashmap is used scroll hints are useless
11046 if test "$with_hashmap" = no ; then
11047 echo "$as_me:11047: checking if you want to experiment without scrolling-hints code" >&5
11048 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11049
11050 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11051 if test "${enable_scroll_hints+set}" = set; then
11052   enableval="$enable_scroll_hints"
11053   with_scroll_hints=$enableval
11054 else
11055   with_scroll_hints=yes
11056 fi;
11057 echo "$as_me:11057: result: $with_scroll_hints" >&5
11058 echo "${ECHO_T}$with_scroll_hints" >&6
11059 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11060 #define USE_SCROLL_HINTS 1
11061 EOF
11062
11063 fi
11064
11065 echo "$as_me:11065: checking if you want experimental wgetch-events code" >&5
11066 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11067
11068 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11069 if test "${enable_wgetch_events+set}" = set; then
11070   enableval="$enable_wgetch_events"
11071   with_wgetch_events=$enableval
11072 else
11073   with_wgetch_events=no
11074 fi;
11075 echo "$as_me:11075: result: $with_wgetch_events" >&5
11076 echo "${ECHO_T}$with_wgetch_events" >&6
11077 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11078 #define NCURSES_WGETCH_EVENTS 1
11079 EOF
11080
11081 ###############################################################################
11082
11083 ###     use option --disable-echo to suppress full display compiling commands
11084 echo "$as_me:11084: checking if you want to display full commands during build" >&5
11085 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11086
11087 # Check whether --enable-echo or --disable-echo was given.
11088 if test "${enable_echo+set}" = set; then
11089   enableval="$enable_echo"
11090   with_echo=$enableval
11091 else
11092   with_echo=yes
11093 fi;
11094 if test "$with_echo" = yes; then
11095         ECHO_LINK=
11096 else
11097         ECHO_LINK='@ echo linking $@ ... ;'
11098         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11099         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11100 fi
11101 echo "$as_me:11101: result: $with_echo" >&5
11102 echo "${ECHO_T}$with_echo" >&6
11103
11104 ###     use option --enable-warnings to turn on all gcc warnings
11105 echo "$as_me:11105: checking if you want to see compiler warnings" >&5
11106 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11107
11108 # Check whether --enable-warnings or --disable-warnings was given.
11109 if test "${enable_warnings+set}" = set; then
11110   enableval="$enable_warnings"
11111   with_warnings=$enableval
11112 fi;
11113 echo "$as_me:11113: result: $with_warnings" >&5
11114 echo "${ECHO_T}$with_warnings" >&6
11115
11116 if test "x$with_warnings" = "xyes"; then
11117
11118         ADAFLAGS="$ADAFLAGS -gnatg"
11119
11120 INTEL_COMPILER=no
11121
11122 if test "$GCC" = yes ; then
11123         case $host_os in
11124         linux*|gnu*)
11125                 echo "$as_me:11125: checking if this is really Intel C compiler" >&5
11126 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11127                 cf_save_CFLAGS="$CFLAGS"
11128                 CFLAGS="$CFLAGS -no-gcc"
11129                 cat >conftest.$ac_ext <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132
11133 int
11134 main ()
11135 {
11136
11137 #ifdef __INTEL_COMPILER
11138 #else
11139 make an error
11140 #endif
11141
11142   ;
11143   return 0;
11144 }
11145 _ACEOF
11146 rm -f conftest.$ac_objext
11147 if { (eval echo "$as_me:11147: \"$ac_compile\"") >&5
11148   (eval $ac_compile) 2>&5
11149   ac_status=$?
11150   echo "$as_me:11150: \$? = $ac_status" >&5
11151   (exit $ac_status); } &&
11152          { ac_try='test -s conftest.$ac_objext'
11153   { (eval echo "$as_me:11153: \"$ac_try\"") >&5
11154   (eval $ac_try) 2>&5
11155   ac_status=$?
11156   echo "$as_me:11156: \$? = $ac_status" >&5
11157   (exit $ac_status); }; }; then
11158   INTEL_COMPILER=yes
11159 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11160
11161 else
11162   echo "$as_me: failed program was:" >&5
11163 cat conftest.$ac_ext >&5
11164 fi
11165 rm -f conftest.$ac_objext conftest.$ac_ext
11166                 CFLAGS="$cf_save_CFLAGS"
11167                 echo "$as_me:11167: result: $INTEL_COMPILER" >&5
11168 echo "${ECHO_T}$INTEL_COMPILER" >&6
11169                 ;;
11170         esac
11171 fi
11172
11173 cat > conftest.$ac_ext <<EOF
11174 #line 11174 "${as_me-configure}"
11175 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11176 EOF
11177
11178 if test "$INTEL_COMPILER" = yes
11179 then
11180 # The "-wdXXX" options suppress warnings:
11181 # remark #1419: external declaration in primary source file
11182 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11183 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11184 # remark #193: zero used for undefined preprocessing identifier
11185 # remark #593: variable "curs_sb_left_arrow" was set but never used
11186 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11187 # remark #869: parameter "tw" was never referenced
11188 # remark #981: operands are evaluated in unspecified order
11189 # warning #279: controlling expression is constant
11190
11191         { echo "$as_me:11191: checking for $CC warning options..." >&5
11192 echo "$as_me: checking for $CC warning options..." >&6;}
11193         cf_save_CFLAGS="$CFLAGS"
11194         EXTRA_CFLAGS="-Wall"
11195         for cf_opt in \
11196                 wd1419 \
11197                 wd1683 \
11198                 wd1684 \
11199                 wd193 \
11200                 wd593 \
11201                 wd279 \
11202                 wd810 \
11203                 wd869 \
11204                 wd981
11205         do
11206                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11207                 if { (eval echo "$as_me:11207: \"$ac_compile\"") >&5
11208   (eval $ac_compile) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; then
11212                         test -n "$verbose" && echo "$as_me:11212: result: ... -$cf_opt" >&5
11213 echo "${ECHO_T}... -$cf_opt" >&6
11214                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11215                 fi
11216         done
11217         CFLAGS="$cf_save_CFLAGS"
11218
11219 elif test "$GCC" = yes
11220 then
11221         { echo "$as_me:11221: checking for $CC warning options..." >&5
11222 echo "$as_me: checking for $CC warning options..." >&6;}
11223         cf_save_CFLAGS="$CFLAGS"
11224         EXTRA_CFLAGS=
11225         cf_warn_CONST=""
11226         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11227         for cf_opt in W Wall \
11228                 Wbad-function-cast \
11229                 Wcast-align \
11230                 Wcast-qual \
11231                 Winline \
11232                 Wmissing-declarations \
11233                 Wmissing-prototypes \
11234                 Wnested-externs \
11235                 Wpointer-arith \
11236                 Wshadow \
11237                 Wstrict-prototypes \
11238                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11239         do
11240                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11241                 if { (eval echo "$as_me:11241: \"$ac_compile\"") >&5
11242   (eval $ac_compile) 2>&5
11243   ac_status=$?
11244   echo "$as_me:11244: \$? = $ac_status" >&5
11245   (exit $ac_status); }; then
11246                         test -n "$verbose" && echo "$as_me:11246: result: ... -$cf_opt" >&5
11247 echo "${ECHO_T}... -$cf_opt" >&6
11248                         case $cf_opt in #(vi
11249                         Wcast-qual) #(vi
11250                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11251                                 ;;
11252                         Winline) #(vi
11253                                 case $GCC_VERSION in
11254                                 [34].*)
11255                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11256
11257 echo "${as_me-configure}:11257: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11258
11259                                         continue;;
11260                                 esac
11261                                 ;;
11262                         esac
11263                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11264                 fi
11265         done
11266         CFLAGS="$cf_save_CFLAGS"
11267 fi
11268 rm -f conftest*
11269
11270         if test "$cf_with_cxx" = yes ; then
11271
11272 INTEL_CPLUSPLUS=no
11273
11274 if test "$GCC" = yes ; then
11275         case $host_os in
11276         linux*|gnu*)
11277                 echo "$as_me:11277: checking if this is really Intel C++ compiler" >&5
11278 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11279                 cf_save_CFLAGS="$CXXFLAGS"
11280                 CXXFLAGS="$CXXFLAGS -no-gcc"
11281                 cat >conftest.$ac_ext <<_ACEOF
11282 #line 11282 "configure"
11283 #include "confdefs.h"
11284
11285 int
11286 main ()
11287 {
11288
11289 #ifdef __INTEL_COMPILER
11290 #else
11291 make an error
11292 #endif
11293
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f conftest.$ac_objext
11299 if { (eval echo "$as_me:11299: \"$ac_compile\"") >&5
11300   (eval $ac_compile) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); } &&
11304          { ac_try='test -s conftest.$ac_objext'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); }; }; then
11310   INTEL_CPLUSPLUS=yes
11311 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11312
11313 else
11314   echo "$as_me: failed program was:" >&5
11315 cat conftest.$ac_ext >&5
11316 fi
11317 rm -f conftest.$ac_objext conftest.$ac_ext
11318                 CXXFLAGS="$cf_save_CFLAGS"
11319                 echo "$as_me:11319: result: $INTEL_CPLUSPLUS" >&5
11320 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11321                 ;;
11322         esac
11323 fi
11324
11325 ac_ext=cc
11326 ac_cpp='$CXXCPP $CPPFLAGS'
11327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11330 ac_main_return=return
11331
11332 cat > conftest.$ac_ext <<EOF
11333 #line 11333 "configure"
11334 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11335 EOF
11336
11337 if test "$INTEL_CPLUSPLUS" = yes
11338 then
11339 # The "-wdXXX" options suppress warnings:
11340 # remark #1419: external declaration in primary source file
11341 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11342 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11343 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11344 # remark #193: zero used for undefined preprocessing identifier
11345 # remark #593: variable "curs_sb_left_arrow" was set but never used
11346 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11347 # remark #869: parameter "tw" was never referenced
11348 # remark #981: operands are evaluated in unspecified order
11349 # warning #269: invalid format string conversion
11350
11351         { echo "$as_me:11351: checking for $CC warning options..." >&5
11352 echo "$as_me: checking for $CC warning options..." >&6;}
11353         cf_save_CXXFLAGS="$CXXFLAGS"
11354         EXTRA_CXXFLAGS="-Wall"
11355         for cf_opt in \
11356                 wd1419 \
11357                 wd1682 \
11358                 wd1683 \
11359                 wd1684 \
11360                 wd193 \
11361                 wd279 \
11362                 wd593 \
11363                 wd810 \
11364                 wd869 \
11365                 wd981
11366         do
11367                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11368                 if { (eval echo "$as_me:11368: \"$ac_compile\"") >&5
11369   (eval $ac_compile) 2>&5
11370   ac_status=$?
11371   echo "$as_me:11371: \$? = $ac_status" >&5
11372   (exit $ac_status); }; then
11373                         test -n "$verbose" && echo "$as_me:11373: result: ... -$cf_opt" >&5
11374 echo "${ECHO_T}... -$cf_opt" >&6
11375                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11376                 fi
11377         done
11378         CXXFLAGS="$cf_save_CXXFLAGS"
11379
11380 elif test "$GXX" = yes
11381 then
11382         { echo "$as_me:11382: checking for $CXX warning options..." >&5
11383 echo "$as_me: checking for $CXX warning options..." >&6;}
11384         cf_save_CXXFLAGS="$CXXFLAGS"
11385         EXTRA_CXXFLAGS="-W -Wall"
11386         cf_gxx_extra_warnings=""
11387         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11388         case "$GCC_VERSION" in
11389         [1-2].*)
11390                 ;;
11391         *)
11392                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11393                 ;;
11394         esac
11395         for cf_opt in \
11396                 Wabi \
11397                 fabi-version=0 \
11398                 Woverloaded-virtual \
11399                 Wsign-promo \
11400                 Wsynth \
11401                 Wold-style-cast \
11402                 Wcast-align \
11403                 Wcast-qual \
11404                 Wmissing-prototypes \
11405                 Wpointer-arith \
11406                 Wshadow \
11407                 Wstrict-prototypes \
11408                 Wundef $cf_gxx_extra_warnings Wno-unused
11409         do
11410                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11411                 if { (eval echo "$as_me:11411: \"$ac_compile\"") >&5
11412   (eval $ac_compile) 2>&5
11413   ac_status=$?
11414   echo "$as_me:11414: \$? = $ac_status" >&5
11415   (exit $ac_status); }; then
11416                         test -n "$verbose" && echo "$as_me:11416: result: ... -$cf_opt" >&5
11417 echo "${ECHO_T}... -$cf_opt" >&6
11418                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11419                 else
11420                         test -n "$verbose" && echo "$as_me:11420: result: ... no -$cf_opt" >&5
11421 echo "${ECHO_T}... no -$cf_opt" >&6
11422                 fi
11423         done
11424         CXXFLAGS="$cf_save_CXXFLAGS"
11425 fi
11426
11427 rm -f conftest*
11428 ac_ext=c
11429 ac_cpp='$CPP $CPPFLAGS'
11430 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11431 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11432 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11433 ac_main_return=return
11434
11435         fi
11436 fi
11437
11438 if test "$GCC" = yes
11439 then
11440 cat > conftest.i <<EOF
11441 #ifndef GCC_PRINTF
11442 #define GCC_PRINTF 0
11443 #endif
11444 #ifndef GCC_SCANF
11445 #define GCC_SCANF 0
11446 #endif
11447 #ifndef GCC_NORETURN
11448 #define GCC_NORETURN /* nothing */
11449 #endif
11450 #ifndef GCC_UNUSED
11451 #define GCC_UNUSED /* nothing */
11452 #endif
11453 EOF
11454 if test "$GCC" = yes
11455 then
11456         { echo "$as_me:11456: checking for $CC __attribute__ directives..." >&5
11457 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11458 cat > conftest.$ac_ext <<EOF
11459 #line 11459 "${as_me-configure}"
11460 #include "confdefs.h"
11461 #include "conftest.h"
11462 #include "conftest.i"
11463 #if     GCC_PRINTF
11464 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11465 #else
11466 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11467 #endif
11468 #if     GCC_SCANF
11469 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11470 #else
11471 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11472 #endif
11473 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11474 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11475 extern void foo(void) GCC_NORETURN;
11476 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11477 EOF
11478         cf_printf_attribute=no
11479         cf_scanf_attribute=no
11480         for cf_attribute in scanf printf unused noreturn
11481         do
11482
11483 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11484
11485                 cf_directive="__attribute__(($cf_attribute))"
11486                 echo "checking for $CC $cf_directive" 1>&5
11487
11488                 case $cf_attribute in #(vi
11489                 printf) #(vi
11490                         cf_printf_attribute=yes
11491                         cat >conftest.h <<EOF
11492 #define GCC_$cf_ATTRIBUTE 1
11493 EOF
11494                         ;;
11495                 scanf) #(vi
11496                         cf_scanf_attribute=yes
11497                         cat >conftest.h <<EOF
11498 #define GCC_$cf_ATTRIBUTE 1
11499 EOF
11500                         ;;
11501                 *) #(vi
11502                         cat >conftest.h <<EOF
11503 #define GCC_$cf_ATTRIBUTE $cf_directive
11504 EOF
11505                         ;;
11506                 esac
11507
11508                 if { (eval echo "$as_me:11508: \"$ac_compile\"") >&5
11509   (eval $ac_compile) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); }; then
11513                         test -n "$verbose" && echo "$as_me:11513: result: ... $cf_attribute" >&5
11514 echo "${ECHO_T}... $cf_attribute" >&6
11515                         cat conftest.h >>confdefs.h
11516                         case $cf_attribute in #(vi
11517                         printf) #(vi
11518                                 if test "$cf_printf_attribute" = no ; then
11519                                         cat >>confdefs.h <<EOF
11520 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11521 EOF
11522                                 else
11523                                         cat >>confdefs.h <<EOF
11524 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11525 EOF
11526                                 fi
11527                                 ;;
11528                         scanf) #(vi
11529                                 if test "$cf_scanf_attribute" = no ; then
11530                                         cat >>confdefs.h <<EOF
11531 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11532 EOF
11533                                 else
11534                                         cat >>confdefs.h <<EOF
11535 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11536 EOF
11537                                 fi
11538                                 ;;
11539                         esac
11540                 fi
11541         done
11542 else
11543         fgrep define conftest.i >>confdefs.h
11544 fi
11545 rm -rf conftest*
11546 fi
11547
11548 ###     use option --enable-assertions to turn on generation of assertion code
11549 echo "$as_me:11549: checking if you want to enable runtime assertions" >&5
11550 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11551
11552 # Check whether --enable-assertions or --disable-assertions was given.
11553 if test "${enable_assertions+set}" = set; then
11554   enableval="$enable_assertions"
11555   with_assertions=$enableval
11556 else
11557   with_assertions=no
11558 fi;
11559 echo "$as_me:11559: result: $with_assertions" >&5
11560 echo "${ECHO_T}$with_assertions" >&6
11561 if test -n "$GCC"
11562 then
11563         if test "$with_assertions" = no
11564         then
11565                 cat >>confdefs.h <<\EOF
11566 #define NDEBUG 1
11567 EOF
11568
11569                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11570         else
11571
11572         ADAFLAGS="$ADAFLAGS -gnata"
11573
11574         fi
11575 fi
11576
11577 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11578
11579 echo "$as_me:11579: checking if you want to use dmalloc for testing" >&5
11580 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11581
11582 # Check whether --with-dmalloc or --without-dmalloc was given.
11583 if test "${with_dmalloc+set}" = set; then
11584   withval="$with_dmalloc"
11585   cat >>confdefs.h <<\EOF
11586 #define USE_DMALLOC 1
11587 EOF
11588
11589         : ${with_cflags:=-g}
11590         : ${with_no_leaks:=yes}
11591          with_dmalloc=yes
11592 else
11593   with_dmalloc=
11594 fi;
11595 echo "$as_me:11595: result: ${with_dmalloc:-no}" >&5
11596 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11597
11598 case .$with_cflags in #(vi
11599 .*-g*)
11600         case .$CFLAGS in #(vi
11601         .*-g*) #(vi
11602                 ;;
11603         *)
11604
11605 cf_fix_cppflags=no
11606 cf_new_cflags=
11607 cf_new_cppflags=
11608 cf_new_extra_cppflags=
11609
11610 for cf_add_cflags in -g
11611 do
11612 case $cf_fix_cppflags in
11613 no)
11614         case $cf_add_cflags in #(vi
11615         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11616                 case $cf_add_cflags in
11617                 -D*)
11618                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11619
11620                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11621                                 && test -z "${cf_tst_cflags}" \
11622                                 && cf_fix_cppflags=yes
11623
11624                         if test $cf_fix_cppflags = yes ; then
11625                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11626                                 continue
11627                         elif test "${cf_tst_cflags}" = "\"'" ; then
11628                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11629                                 continue
11630                         fi
11631                         ;;
11632                 esac
11633                 case "$CPPFLAGS" in
11634                 *$cf_add_cflags) #(vi
11635                         ;;
11636                 *) #(vi
11637                         case $cf_add_cflags in #(vi
11638                         -D*)
11639                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11640
11641 CPPFLAGS=`echo "$CPPFLAGS" | \
11642         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11643                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11644
11645                                 ;;
11646                         esac
11647                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11648                         ;;
11649                 esac
11650                 ;;
11651         *)
11652                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11653                 ;;
11654         esac
11655         ;;
11656 yes)
11657         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11658
11659         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11660
11661         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11662                 && test -z "${cf_tst_cflags}" \
11663                 && cf_fix_cppflags=no
11664         ;;
11665 esac
11666 done
11667
11668 if test -n "$cf_new_cflags" ; then
11669
11670         CFLAGS="$CFLAGS $cf_new_cflags"
11671 fi
11672
11673 if test -n "$cf_new_cppflags" ; then
11674
11675         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11676 fi
11677
11678 if test -n "$cf_new_extra_cppflags" ; then
11679
11680         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11681 fi
11682
11683                 ;;
11684         esac
11685         ;;
11686 esac
11687
11688 if test "$with_dmalloc" = yes ; then
11689         echo "$as_me:11689: checking for dmalloc.h" >&5
11690 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11691 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11692   echo $ECHO_N "(cached) $ECHO_C" >&6
11693 else
11694   cat >conftest.$ac_ext <<_ACEOF
11695 #line 11695 "configure"
11696 #include "confdefs.h"
11697 #include <dmalloc.h>
11698 _ACEOF
11699 if { (eval echo "$as_me:11699: \"$ac_cpp conftest.$ac_ext\"") >&5
11700   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11701   ac_status=$?
11702   egrep -v '^ *\+' conftest.er1 >conftest.err
11703   rm -f conftest.er1
11704   cat conftest.err >&5
11705   echo "$as_me:11705: \$? = $ac_status" >&5
11706   (exit $ac_status); } >/dev/null; then
11707   if test -s conftest.err; then
11708     ac_cpp_err=$ac_c_preproc_warn_flag
11709   else
11710     ac_cpp_err=
11711   fi
11712 else
11713   ac_cpp_err=yes
11714 fi
11715 if test -z "$ac_cpp_err"; then
11716   ac_cv_header_dmalloc_h=yes
11717 else
11718   echo "$as_me: failed program was:" >&5
11719   cat conftest.$ac_ext >&5
11720   ac_cv_header_dmalloc_h=no
11721 fi
11722 rm -f conftest.err conftest.$ac_ext
11723 fi
11724 echo "$as_me:11724: result: $ac_cv_header_dmalloc_h" >&5
11725 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11726 if test $ac_cv_header_dmalloc_h = yes; then
11727
11728 echo "$as_me:11728: checking for dmalloc_debug in -ldmalloc" >&5
11729 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11730 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11731   echo $ECHO_N "(cached) $ECHO_C" >&6
11732 else
11733   ac_check_lib_save_LIBS=$LIBS
11734 LIBS="-ldmalloc  $LIBS"
11735 cat >conftest.$ac_ext <<_ACEOF
11736 #line 11736 "configure"
11737 #include "confdefs.h"
11738
11739 /* Override any gcc2 internal prototype to avoid an error.  */
11740 #ifdef __cplusplus
11741 extern "C"
11742 #endif
11743 /* We use char because int might match the return type of a gcc2
11744    builtin and then its argument prototype would still apply.  */
11745 char dmalloc_debug ();
11746 int
11747 main ()
11748 {
11749 dmalloc_debug ();
11750   ;
11751   return 0;
11752 }
11753 _ACEOF
11754 rm -f conftest.$ac_objext conftest$ac_exeext
11755 if { (eval echo "$as_me:11755: \"$ac_link\"") >&5
11756   (eval $ac_link) 2>&5
11757   ac_status=$?
11758   echo "$as_me:11758: \$? = $ac_status" >&5
11759   (exit $ac_status); } &&
11760          { ac_try='test -s conftest$ac_exeext'
11761   { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762   (eval $ac_try) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit $ac_status); }; }; then
11766   ac_cv_lib_dmalloc_dmalloc_debug=yes
11767 else
11768   echo "$as_me: failed program was:" >&5
11769 cat conftest.$ac_ext >&5
11770 ac_cv_lib_dmalloc_dmalloc_debug=no
11771 fi
11772 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11773 LIBS=$ac_check_lib_save_LIBS
11774 fi
11775 echo "$as_me:11775: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11776 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11777 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11778   cat >>confdefs.h <<EOF
11779 #define HAVE_LIBDMALLOC 1
11780 EOF
11781
11782   LIBS="-ldmalloc $LIBS"
11783
11784 fi
11785
11786 fi
11787
11788 fi
11789
11790 echo "$as_me:11790: checking if you want to use dbmalloc for testing" >&5
11791 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11792
11793 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11794 if test "${with_dbmalloc+set}" = set; then
11795   withval="$with_dbmalloc"
11796   cat >>confdefs.h <<\EOF
11797 #define USE_DBMALLOC 1
11798 EOF
11799
11800         : ${with_cflags:=-g}
11801         : ${with_no_leaks:=yes}
11802          with_dbmalloc=yes
11803 else
11804   with_dbmalloc=
11805 fi;
11806 echo "$as_me:11806: result: ${with_dbmalloc:-no}" >&5
11807 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11808
11809 case .$with_cflags in #(vi
11810 .*-g*)
11811         case .$CFLAGS in #(vi
11812         .*-g*) #(vi
11813                 ;;
11814         *)
11815
11816 cf_fix_cppflags=no
11817 cf_new_cflags=
11818 cf_new_cppflags=
11819 cf_new_extra_cppflags=
11820
11821 for cf_add_cflags in -g
11822 do
11823 case $cf_fix_cppflags in
11824 no)
11825         case $cf_add_cflags in #(vi
11826         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11827                 case $cf_add_cflags in
11828                 -D*)
11829                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11830
11831                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11832                                 && test -z "${cf_tst_cflags}" \
11833                                 && cf_fix_cppflags=yes
11834
11835                         if test $cf_fix_cppflags = yes ; then
11836                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11837                                 continue
11838                         elif test "${cf_tst_cflags}" = "\"'" ; then
11839                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11840                                 continue
11841                         fi
11842                         ;;
11843                 esac
11844                 case "$CPPFLAGS" in
11845                 *$cf_add_cflags) #(vi
11846                         ;;
11847                 *) #(vi
11848                         case $cf_add_cflags in #(vi
11849                         -D*)
11850                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11851
11852 CPPFLAGS=`echo "$CPPFLAGS" | \
11853         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11854                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11855
11856                                 ;;
11857                         esac
11858                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11859                         ;;
11860                 esac
11861                 ;;
11862         *)
11863                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11864                 ;;
11865         esac
11866         ;;
11867 yes)
11868         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11869
11870         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11871
11872         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11873                 && test -z "${cf_tst_cflags}" \
11874                 && cf_fix_cppflags=no
11875         ;;
11876 esac
11877 done
11878
11879 if test -n "$cf_new_cflags" ; then
11880
11881         CFLAGS="$CFLAGS $cf_new_cflags"
11882 fi
11883
11884 if test -n "$cf_new_cppflags" ; then
11885
11886         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11887 fi
11888
11889 if test -n "$cf_new_extra_cppflags" ; then
11890
11891         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11892 fi
11893
11894                 ;;
11895         esac
11896         ;;
11897 esac
11898
11899 if test "$with_dbmalloc" = yes ; then
11900         echo "$as_me:11900: checking for dbmalloc.h" >&5
11901 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11902 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11903   echo $ECHO_N "(cached) $ECHO_C" >&6
11904 else
11905   cat >conftest.$ac_ext <<_ACEOF
11906 #line 11906 "configure"
11907 #include "confdefs.h"
11908 #include <dbmalloc.h>
11909 _ACEOF
11910 if { (eval echo "$as_me:11910: \"$ac_cpp conftest.$ac_ext\"") >&5
11911   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11912   ac_status=$?
11913   egrep -v '^ *\+' conftest.er1 >conftest.err
11914   rm -f conftest.er1
11915   cat conftest.err >&5
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); } >/dev/null; then
11918   if test -s conftest.err; then
11919     ac_cpp_err=$ac_c_preproc_warn_flag
11920   else
11921     ac_cpp_err=
11922   fi
11923 else
11924   ac_cpp_err=yes
11925 fi
11926 if test -z "$ac_cpp_err"; then
11927   ac_cv_header_dbmalloc_h=yes
11928 else
11929   echo "$as_me: failed program was:" >&5
11930   cat conftest.$ac_ext >&5
11931   ac_cv_header_dbmalloc_h=no
11932 fi
11933 rm -f conftest.err conftest.$ac_ext
11934 fi
11935 echo "$as_me:11935: result: $ac_cv_header_dbmalloc_h" >&5
11936 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11937 if test $ac_cv_header_dbmalloc_h = yes; then
11938
11939 echo "$as_me:11939: checking for debug_malloc in -ldbmalloc" >&5
11940 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11941 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11942   echo $ECHO_N "(cached) $ECHO_C" >&6
11943 else
11944   ac_check_lib_save_LIBS=$LIBS
11945 LIBS="-ldbmalloc  $LIBS"
11946 cat >conftest.$ac_ext <<_ACEOF
11947 #line 11947 "configure"
11948 #include "confdefs.h"
11949
11950 /* Override any gcc2 internal prototype to avoid an error.  */
11951 #ifdef __cplusplus
11952 extern "C"
11953 #endif
11954 /* We use char because int might match the return type of a gcc2
11955    builtin and then its argument prototype would still apply.  */
11956 char debug_malloc ();
11957 int
11958 main ()
11959 {
11960 debug_malloc ();
11961   ;
11962   return 0;
11963 }
11964 _ACEOF
11965 rm -f conftest.$ac_objext conftest$ac_exeext
11966 if { (eval echo "$as_me:11966: \"$ac_link\"") >&5
11967   (eval $ac_link) 2>&5
11968   ac_status=$?
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit $ac_status); } &&
11971          { ac_try='test -s conftest$ac_exeext'
11972   { (eval echo "$as_me:11972: \"$ac_try\"") >&5
11973   (eval $ac_try) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); }; }; then
11977   ac_cv_lib_dbmalloc_debug_malloc=yes
11978 else
11979   echo "$as_me: failed program was:" >&5
11980 cat conftest.$ac_ext >&5
11981 ac_cv_lib_dbmalloc_debug_malloc=no
11982 fi
11983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11984 LIBS=$ac_check_lib_save_LIBS
11985 fi
11986 echo "$as_me:11986: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11987 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11988 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11989   cat >>confdefs.h <<EOF
11990 #define HAVE_LIBDBMALLOC 1
11991 EOF
11992
11993   LIBS="-ldbmalloc $LIBS"
11994
11995 fi
11996
11997 fi
11998
11999 fi
12000
12001 echo "$as_me:12001: checking if you want to use valgrind for testing" >&5
12002 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12003
12004 # Check whether --with-valgrind or --without-valgrind was given.
12005 if test "${with_valgrind+set}" = set; then
12006   withval="$with_valgrind"
12007   cat >>confdefs.h <<\EOF
12008 #define USE_VALGRIND 1
12009 EOF
12010
12011         : ${with_cflags:=-g}
12012         : ${with_no_leaks:=yes}
12013          with_valgrind=yes
12014 else
12015   with_valgrind=
12016 fi;
12017 echo "$as_me:12017: result: ${with_valgrind:-no}" >&5
12018 echo "${ECHO_T}${with_valgrind:-no}" >&6
12019
12020 case .$with_cflags in #(vi
12021 .*-g*)
12022         case .$CFLAGS in #(vi
12023         .*-g*) #(vi
12024                 ;;
12025         *)
12026
12027 cf_fix_cppflags=no
12028 cf_new_cflags=
12029 cf_new_cppflags=
12030 cf_new_extra_cppflags=
12031
12032 for cf_add_cflags in -g
12033 do
12034 case $cf_fix_cppflags in
12035 no)
12036         case $cf_add_cflags in #(vi
12037         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12038                 case $cf_add_cflags in
12039                 -D*)
12040                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12041
12042                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12043                                 && test -z "${cf_tst_cflags}" \
12044                                 && cf_fix_cppflags=yes
12045
12046                         if test $cf_fix_cppflags = yes ; then
12047                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12048                                 continue
12049                         elif test "${cf_tst_cflags}" = "\"'" ; then
12050                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12051                                 continue
12052                         fi
12053                         ;;
12054                 esac
12055                 case "$CPPFLAGS" in
12056                 *$cf_add_cflags) #(vi
12057                         ;;
12058                 *) #(vi
12059                         case $cf_add_cflags in #(vi
12060                         -D*)
12061                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12062
12063 CPPFLAGS=`echo "$CPPFLAGS" | \
12064         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12065                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12066
12067                                 ;;
12068                         esac
12069                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12070                         ;;
12071                 esac
12072                 ;;
12073         *)
12074                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12075                 ;;
12076         esac
12077         ;;
12078 yes)
12079         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12080
12081         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12082
12083         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12084                 && test -z "${cf_tst_cflags}" \
12085                 && cf_fix_cppflags=no
12086         ;;
12087 esac
12088 done
12089
12090 if test -n "$cf_new_cflags" ; then
12091
12092         CFLAGS="$CFLAGS $cf_new_cflags"
12093 fi
12094
12095 if test -n "$cf_new_cppflags" ; then
12096
12097         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12098 fi
12099
12100 if test -n "$cf_new_extra_cppflags" ; then
12101
12102         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12103 fi
12104
12105                 ;;
12106         esac
12107         ;;
12108 esac
12109
12110 echo "$as_me:12110: checking if you want to perform memory-leak testing" >&5
12111 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12112
12113 # Check whether --enable-leaks or --disable-leaks was given.
12114 if test "${enable_leaks+set}" = set; then
12115   enableval="$enable_leaks"
12116   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12117 else
12118   : ${with_no_leaks:=no}
12119 fi;
12120 echo "$as_me:12120: result: $with_no_leaks" >&5
12121 echo "${ECHO_T}$with_no_leaks" >&6
12122
12123 if test "$with_no_leaks" = yes ; then
12124         cat >>confdefs.h <<\EOF
12125 #define NO_LEAKS 1
12126 EOF
12127
12128 fi
12129
12130 cat >>confdefs.h <<\EOF
12131 #define HAVE_NC_ALLOC_H 1
12132 EOF
12133
12134 ###     use option --enable-expanded to generate certain macros as functions
12135
12136 # Check whether --enable-expanded or --disable-expanded was given.
12137 if test "${enable_expanded+set}" = set; then
12138   enableval="$enable_expanded"
12139   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12140 #define NCURSES_EXPANDED 1
12141 EOF
12142
12143 fi;
12144
12145 ###     use option --disable-macros to suppress macros in favor of functions
12146
12147 # Check whether --enable-macros or --disable-macros was given.
12148 if test "${enable_macros+set}" = set; then
12149   enableval="$enable_macros"
12150   test "$enableval" = no && cat >>confdefs.h <<\EOF
12151 #define NCURSES_NOMACROS 1
12152 EOF
12153
12154 fi;
12155
12156 # Normally we only add trace() to the debug-library.  Allow this to be
12157 # extended to all models of the ncurses library:
12158 cf_all_traces=no
12159 case "$CFLAGS $CPPFLAGS" in
12160 *-DTRACE*)
12161         cf_all_traces=yes
12162         ;;
12163 esac
12164
12165 echo "$as_me:12165: checking whether to add trace feature to all models" >&5
12166 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12167
12168 # Check whether --with-trace or --without-trace was given.
12169 if test "${with_trace+set}" = set; then
12170   withval="$with_trace"
12171   cf_with_trace=$withval
12172 else
12173   cf_with_trace=$cf_all_traces
12174 fi;
12175 echo "$as_me:12175: result: $cf_with_trace" >&5
12176 echo "${ECHO_T}$cf_with_trace" >&6
12177
12178 if test "$cf_with_trace" = yes ; then
12179         LIB_TRACING=all
12180         ADA_TRACE=TRUE
12181
12182 cf_fix_cppflags=no
12183 cf_new_cflags=
12184 cf_new_cppflags=
12185 cf_new_extra_cppflags=
12186
12187 for cf_add_cflags in -DTRACE
12188 do
12189 case $cf_fix_cppflags in
12190 no)
12191         case $cf_add_cflags in #(vi
12192         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12193                 case $cf_add_cflags in
12194                 -D*)
12195                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12196
12197                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12198                                 && test -z "${cf_tst_cflags}" \
12199                                 && cf_fix_cppflags=yes
12200
12201                         if test $cf_fix_cppflags = yes ; then
12202                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12203                                 continue
12204                         elif test "${cf_tst_cflags}" = "\"'" ; then
12205                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12206                                 continue
12207                         fi
12208                         ;;
12209                 esac
12210                 case "$CPPFLAGS" in
12211                 *$cf_add_cflags) #(vi
12212                         ;;
12213                 *) #(vi
12214                         case $cf_add_cflags in #(vi
12215                         -D*)
12216                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12217
12218 CPPFLAGS=`echo "$CPPFLAGS" | \
12219         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12220                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12221
12222                                 ;;
12223                         esac
12224                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12225                         ;;
12226                 esac
12227                 ;;
12228         *)
12229                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12230                 ;;
12231         esac
12232         ;;
12233 yes)
12234         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12235
12236         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12237
12238         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12239                 && test -z "${cf_tst_cflags}" \
12240                 && cf_fix_cppflags=no
12241         ;;
12242 esac
12243 done
12244
12245 if test -n "$cf_new_cflags" ; then
12246
12247         CFLAGS="$CFLAGS $cf_new_cflags"
12248 fi
12249
12250 if test -n "$cf_new_cppflags" ; then
12251
12252         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12253 fi
12254
12255 if test -n "$cf_new_extra_cppflags" ; then
12256
12257         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12258 fi
12259
12260 else
12261         LIB_TRACING=DEBUG
12262         ADA_TRACE=FALSE
12263 fi
12264
12265 ###     Checks for libraries.
12266 case $cf_cv_system_name in #(vi
12267 *mingw32*) #(vi
12268         ;;
12269 *)
12270 echo "$as_me:12270: checking for gettimeofday" >&5
12271 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12272 if test "${ac_cv_func_gettimeofday+set}" = set; then
12273   echo $ECHO_N "(cached) $ECHO_C" >&6
12274 else
12275   cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278 /* System header to define __stub macros and hopefully few prototypes,
12279     which can conflict with char gettimeofday (); below.  */
12280 #include <assert.h>
12281 /* Override any gcc2 internal prototype to avoid an error.  */
12282 #ifdef __cplusplus
12283 extern "C"
12284 #endif
12285 /* We use char because int might match the return type of a gcc2
12286    builtin and then its argument prototype would still apply.  */
12287 char gettimeofday ();
12288 char (*f) ();
12289
12290 int
12291 main ()
12292 {
12293 /* The GNU C library defines this for functions which it implements
12294     to always fail with ENOSYS.  Some functions are actually named
12295     something starting with __ and the normal name is an alias.  */
12296 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12297 choke me
12298 #else
12299 f = gettimeofday;
12300 #endif
12301
12302   ;
12303   return 0;
12304 }
12305 _ACEOF
12306 rm -f conftest.$ac_objext conftest$ac_exeext
12307 if { (eval echo "$as_me:12307: \"$ac_link\"") >&5
12308   (eval $ac_link) 2>&5
12309   ac_status=$?
12310   echo "$as_me:12310: \$? = $ac_status" >&5
12311   (exit $ac_status); } &&
12312          { ac_try='test -s conftest$ac_exeext'
12313   { (eval echo "$as_me:12313: \"$ac_try\"") >&5
12314   (eval $ac_try) 2>&5
12315   ac_status=$?
12316   echo "$as_me:12316: \$? = $ac_status" >&5
12317   (exit $ac_status); }; }; then
12318   ac_cv_func_gettimeofday=yes
12319 else
12320   echo "$as_me: failed program was:" >&5
12321 cat conftest.$ac_ext >&5
12322 ac_cv_func_gettimeofday=no
12323 fi
12324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12325 fi
12326 echo "$as_me:12326: result: $ac_cv_func_gettimeofday" >&5
12327 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12328 if test $ac_cv_func_gettimeofday = yes; then
12329   cat >>confdefs.h <<\EOF
12330 #define HAVE_GETTIMEOFDAY 1
12331 EOF
12332
12333 else
12334
12335 echo "$as_me:12335: checking for gettimeofday in -lbsd" >&5
12336 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12337 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12338   echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340   ac_check_lib_save_LIBS=$LIBS
12341 LIBS="-lbsd  $LIBS"
12342 cat >conftest.$ac_ext <<_ACEOF
12343 #line 12343 "configure"
12344 #include "confdefs.h"
12345
12346 /* Override any gcc2 internal prototype to avoid an error.  */
12347 #ifdef __cplusplus
12348 extern "C"
12349 #endif
12350 /* We use char because int might match the return type of a gcc2
12351    builtin and then its argument prototype would still apply.  */
12352 char gettimeofday ();
12353 int
12354 main ()
12355 {
12356 gettimeofday ();
12357   ;
12358   return 0;
12359 }
12360 _ACEOF
12361 rm -f conftest.$ac_objext conftest$ac_exeext
12362 if { (eval echo "$as_me:12362: \"$ac_link\"") >&5
12363   (eval $ac_link) 2>&5
12364   ac_status=$?
12365   echo "$as_me:12365: \$? = $ac_status" >&5
12366   (exit $ac_status); } &&
12367          { ac_try='test -s conftest$ac_exeext'
12368   { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369   (eval $ac_try) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); }; }; then
12373   ac_cv_lib_bsd_gettimeofday=yes
12374 else
12375   echo "$as_me: failed program was:" >&5
12376 cat conftest.$ac_ext >&5
12377 ac_cv_lib_bsd_gettimeofday=no
12378 fi
12379 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12380 LIBS=$ac_check_lib_save_LIBS
12381 fi
12382 echo "$as_me:12382: result: $ac_cv_lib_bsd_gettimeofday" >&5
12383 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12384 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12385   cat >>confdefs.h <<\EOF
12386 #define HAVE_GETTIMEOFDAY 1
12387 EOF
12388
12389         LIBS="-lbsd $LIBS"
12390 fi
12391
12392 fi
12393         ;;
12394 esac
12395
12396 echo "$as_me:12396: checking if -lm needed for math functions" >&5
12397 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12398 if test "${cf_cv_need_libm+set}" = set; then
12399   echo $ECHO_N "(cached) $ECHO_C" >&6
12400 else
12401
12402         cat >conftest.$ac_ext <<_ACEOF
12403 #line 12403 "configure"
12404 #include "confdefs.h"
12405
12406         #include <stdio.h>
12407         #include <math.h>
12408
12409 int
12410 main ()
12411 {
12412 double x = rand(); printf("result = %g\n", sin(x))
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 rm -f conftest.$ac_objext conftest$ac_exeext
12418 if { (eval echo "$as_me:12418: \"$ac_link\"") >&5
12419   (eval $ac_link) 2>&5
12420   ac_status=$?
12421   echo "$as_me:12421: \$? = $ac_status" >&5
12422   (exit $ac_status); } &&
12423          { ac_try='test -s conftest$ac_exeext'
12424   { (eval echo "$as_me:12424: \"$ac_try\"") >&5
12425   (eval $ac_try) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit $ac_status); }; }; then
12429   cf_cv_need_libm=no
12430 else
12431   echo "$as_me: failed program was:" >&5
12432 cat conftest.$ac_ext >&5
12433 cf_cv_need_libm=yes
12434 fi
12435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12436 fi
12437 echo "$as_me:12437: result: $cf_cv_need_libm" >&5
12438 echo "${ECHO_T}$cf_cv_need_libm" >&6
12439 if test "$cf_cv_need_libm" = yes
12440 then
12441 MATH_LIB=-lm
12442 fi
12443
12444 ###     Checks for header files.
12445 echo "$as_me:12445: checking for ANSI C header files" >&5
12446 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12447 if test "${ac_cv_header_stdc+set}" = set; then
12448   echo $ECHO_N "(cached) $ECHO_C" >&6
12449 else
12450   cat >conftest.$ac_ext <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453 #include <stdlib.h>
12454 #include <stdarg.h>
12455 #include <string.h>
12456 #include <float.h>
12457
12458 _ACEOF
12459 if { (eval echo "$as_me:12459: \"$ac_cpp conftest.$ac_ext\"") >&5
12460   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12461   ac_status=$?
12462   egrep -v '^ *\+' conftest.er1 >conftest.err
12463   rm -f conftest.er1
12464   cat conftest.err >&5
12465   echo "$as_me:12465: \$? = $ac_status" >&5
12466   (exit $ac_status); } >/dev/null; then
12467   if test -s conftest.err; then
12468     ac_cpp_err=$ac_c_preproc_warn_flag
12469   else
12470     ac_cpp_err=
12471   fi
12472 else
12473   ac_cpp_err=yes
12474 fi
12475 if test -z "$ac_cpp_err"; then
12476   ac_cv_header_stdc=yes
12477 else
12478   echo "$as_me: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   ac_cv_header_stdc=no
12481 fi
12482 rm -f conftest.err conftest.$ac_ext
12483
12484 if test $ac_cv_header_stdc = yes; then
12485   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12486   cat >conftest.$ac_ext <<_ACEOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12489 #include <string.h>
12490
12491 _ACEOF
12492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12493   egrep "memchr" >/dev/null 2>&1; then
12494   :
12495 else
12496   ac_cv_header_stdc=no
12497 fi
12498 rm -f conftest*
12499
12500 fi
12501
12502 if test $ac_cv_header_stdc = yes; then
12503   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12504   cat >conftest.$ac_ext <<_ACEOF
12505 #line 12505 "configure"
12506 #include "confdefs.h"
12507 #include <stdlib.h>
12508
12509 _ACEOF
12510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12511   egrep "free" >/dev/null 2>&1; then
12512   :
12513 else
12514   ac_cv_header_stdc=no
12515 fi
12516 rm -f conftest*
12517
12518 fi
12519
12520 if test $ac_cv_header_stdc = yes; then
12521   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12522   if test "$cross_compiling" = yes; then
12523   :
12524 else
12525   cat >conftest.$ac_ext <<_ACEOF
12526 #line 12526 "configure"
12527 #include "confdefs.h"
12528 #include <ctype.h>
12529 #if ((' ' & 0x0FF) == 0x020)
12530 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12531 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12532 #else
12533 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12534                      || ('j' <= (c) && (c) <= 'r') \
12535                      || ('s' <= (c) && (c) <= 'z'))
12536 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12537 #endif
12538
12539 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12540 int
12541 main ()
12542 {
12543   int i;
12544   for (i = 0; i < 256; i++)
12545     if (XOR (islower (i), ISLOWER (i))
12546         || toupper (i) != TOUPPER (i))
12547       $ac_main_return(2);
12548   $ac_main_return (0);
12549 }
12550 _ACEOF
12551 rm -f conftest$ac_exeext
12552 if { (eval echo "$as_me:12552: \"$ac_link\"") >&5
12553   (eval $ac_link) 2>&5
12554   ac_status=$?
12555   echo "$as_me:12555: \$? = $ac_status" >&5
12556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12557   { (eval echo "$as_me:12557: \"$ac_try\"") >&5
12558   (eval $ac_try) 2>&5
12559   ac_status=$?
12560   echo "$as_me:12560: \$? = $ac_status" >&5
12561   (exit $ac_status); }; }; then
12562   :
12563 else
12564   echo "$as_me: program exited with status $ac_status" >&5
12565 echo "$as_me: failed program was:" >&5
12566 cat conftest.$ac_ext >&5
12567 ac_cv_header_stdc=no
12568 fi
12569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12570 fi
12571 fi
12572 fi
12573 echo "$as_me:12573: result: $ac_cv_header_stdc" >&5
12574 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12575 if test $ac_cv_header_stdc = yes; then
12576
12577 cat >>confdefs.h <<\EOF
12578 #define STDC_HEADERS 1
12579 EOF
12580
12581 fi
12582
12583 ac_header_dirent=no
12584 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12585   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12586 echo "$as_me:12586: checking for $ac_hdr that defines DIR" >&5
12587 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12589   echo $ECHO_N "(cached) $ECHO_C" >&6
12590 else
12591   cat >conftest.$ac_ext <<_ACEOF
12592 #line 12592 "configure"
12593 #include "confdefs.h"
12594 #include <sys/types.h>
12595 #include <$ac_hdr>
12596
12597 int
12598 main ()
12599 {
12600 if ((DIR *) 0)
12601 return 0;
12602   ;
12603   return 0;
12604 }
12605 _ACEOF
12606 rm -f conftest.$ac_objext
12607 if { (eval echo "$as_me:12607: \"$ac_compile\"") >&5
12608   (eval $ac_compile) 2>&5
12609   ac_status=$?
12610   echo "$as_me:12610: \$? = $ac_status" >&5
12611   (exit $ac_status); } &&
12612          { ac_try='test -s conftest.$ac_objext'
12613   { (eval echo "$as_me:12613: \"$ac_try\"") >&5
12614   (eval $ac_try) 2>&5
12615   ac_status=$?
12616   echo "$as_me:12616: \$? = $ac_status" >&5
12617   (exit $ac_status); }; }; then
12618   eval "$as_ac_Header=yes"
12619 else
12620   echo "$as_me: failed program was:" >&5
12621 cat conftest.$ac_ext >&5
12622 eval "$as_ac_Header=no"
12623 fi
12624 rm -f conftest.$ac_objext conftest.$ac_ext
12625 fi
12626 echo "$as_me:12626: result: `eval echo '${'$as_ac_Header'}'`" >&5
12627 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12628 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12629   cat >>confdefs.h <<EOF
12630 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12631 EOF
12632
12633 ac_header_dirent=$ac_hdr; break
12634 fi
12635
12636 done
12637 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12638 if test $ac_header_dirent = dirent.h; then
12639   echo "$as_me:12639: checking for opendir in -ldir" >&5
12640 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12641 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12642   echo $ECHO_N "(cached) $ECHO_C" >&6
12643 else
12644   ac_check_lib_save_LIBS=$LIBS
12645 LIBS="-ldir  $LIBS"
12646 cat >conftest.$ac_ext <<_ACEOF
12647 #line 12647 "configure"
12648 #include "confdefs.h"
12649
12650 /* Override any gcc2 internal prototype to avoid an error.  */
12651 #ifdef __cplusplus
12652 extern "C"
12653 #endif
12654 /* We use char because int might match the return type of a gcc2
12655    builtin and then its argument prototype would still apply.  */
12656 char opendir ();
12657 int
12658 main ()
12659 {
12660 opendir ();
12661   ;
12662   return 0;
12663 }
12664 _ACEOF
12665 rm -f conftest.$ac_objext conftest$ac_exeext
12666 if { (eval echo "$as_me:12666: \"$ac_link\"") >&5
12667   (eval $ac_link) 2>&5
12668   ac_status=$?
12669   echo "$as_me:12669: \$? = $ac_status" >&5
12670   (exit $ac_status); } &&
12671          { ac_try='test -s conftest$ac_exeext'
12672   { (eval echo "$as_me:12672: \"$ac_try\"") >&5
12673   (eval $ac_try) 2>&5
12674   ac_status=$?
12675   echo "$as_me:12675: \$? = $ac_status" >&5
12676   (exit $ac_status); }; }; then
12677   ac_cv_lib_dir_opendir=yes
12678 else
12679   echo "$as_me: failed program was:" >&5
12680 cat conftest.$ac_ext >&5
12681 ac_cv_lib_dir_opendir=no
12682 fi
12683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12684 LIBS=$ac_check_lib_save_LIBS
12685 fi
12686 echo "$as_me:12686: result: $ac_cv_lib_dir_opendir" >&5
12687 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12688 if test $ac_cv_lib_dir_opendir = yes; then
12689   LIBS="$LIBS -ldir"
12690 fi
12691
12692 else
12693   echo "$as_me:12693: checking for opendir in -lx" >&5
12694 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12695 if test "${ac_cv_lib_x_opendir+set}" = set; then
12696   echo $ECHO_N "(cached) $ECHO_C" >&6
12697 else
12698   ac_check_lib_save_LIBS=$LIBS
12699 LIBS="-lx  $LIBS"
12700 cat >conftest.$ac_ext <<_ACEOF
12701 #line 12701 "configure"
12702 #include "confdefs.h"
12703
12704 /* Override any gcc2 internal prototype to avoid an error.  */
12705 #ifdef __cplusplus
12706 extern "C"
12707 #endif
12708 /* We use char because int might match the return type of a gcc2
12709    builtin and then its argument prototype would still apply.  */
12710 char opendir ();
12711 int
12712 main ()
12713 {
12714 opendir ();
12715   ;
12716   return 0;
12717 }
12718 _ACEOF
12719 rm -f conftest.$ac_objext conftest$ac_exeext
12720 if { (eval echo "$as_me:12720: \"$ac_link\"") >&5
12721   (eval $ac_link) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); } &&
12725          { ac_try='test -s conftest$ac_exeext'
12726   { (eval echo "$as_me:12726: \"$ac_try\"") >&5
12727   (eval $ac_try) 2>&5
12728   ac_status=$?
12729   echo "$as_me:12729: \$? = $ac_status" >&5
12730   (exit $ac_status); }; }; then
12731   ac_cv_lib_x_opendir=yes
12732 else
12733   echo "$as_me: failed program was:" >&5
12734 cat conftest.$ac_ext >&5
12735 ac_cv_lib_x_opendir=no
12736 fi
12737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12738 LIBS=$ac_check_lib_save_LIBS
12739 fi
12740 echo "$as_me:12740: result: $ac_cv_lib_x_opendir" >&5
12741 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12742 if test $ac_cv_lib_x_opendir = yes; then
12743   LIBS="$LIBS -lx"
12744 fi
12745
12746 fi
12747
12748 echo "$as_me:12748: checking whether time.h and sys/time.h may both be included" >&5
12749 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12750 if test "${ac_cv_header_time+set}" = set; then
12751   echo $ECHO_N "(cached) $ECHO_C" >&6
12752 else
12753   cat >conftest.$ac_ext <<_ACEOF
12754 #line 12754 "configure"
12755 #include "confdefs.h"
12756 #include <sys/types.h>
12757 #include <sys/time.h>
12758 #include <time.h>
12759
12760 int
12761 main ()
12762 {
12763 if ((struct tm *) 0)
12764 return 0;
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext
12770 if { (eval echo "$as_me:12770: \"$ac_compile\"") >&5
12771   (eval $ac_compile) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); } &&
12775          { ac_try='test -s conftest.$ac_objext'
12776   { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); }; }; then
12781   ac_cv_header_time=yes
12782 else
12783   echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12785 ac_cv_header_time=no
12786 fi
12787 rm -f conftest.$ac_objext conftest.$ac_ext
12788 fi
12789 echo "$as_me:12789: result: $ac_cv_header_time" >&5
12790 echo "${ECHO_T}$ac_cv_header_time" >&6
12791 if test $ac_cv_header_time = yes; then
12792
12793 cat >>confdefs.h <<\EOF
12794 #define TIME_WITH_SYS_TIME 1
12795 EOF
12796
12797 fi
12798
12799 cf_regex_func=no
12800
12801 echo "$as_me:12801: checking for regcomp" >&5
12802 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12803 if test "${ac_cv_func_regcomp+set}" = set; then
12804   echo $ECHO_N "(cached) $ECHO_C" >&6
12805 else
12806   cat >conftest.$ac_ext <<_ACEOF
12807 #line 12807 "configure"
12808 #include "confdefs.h"
12809 /* System header to define __stub macros and hopefully few prototypes,
12810     which can conflict with char regcomp (); below.  */
12811 #include <assert.h>
12812 /* Override any gcc2 internal prototype to avoid an error.  */
12813 #ifdef __cplusplus
12814 extern "C"
12815 #endif
12816 /* We use char because int might match the return type of a gcc2
12817    builtin and then its argument prototype would still apply.  */
12818 char regcomp ();
12819 char (*f) ();
12820
12821 int
12822 main ()
12823 {
12824 /* The GNU C library defines this for functions which it implements
12825     to always fail with ENOSYS.  Some functions are actually named
12826     something starting with __ and the normal name is an alias.  */
12827 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12828 choke me
12829 #else
12830 f = regcomp;
12831 #endif
12832
12833   ;
12834   return 0;
12835 }
12836 _ACEOF
12837 rm -f conftest.$ac_objext conftest$ac_exeext
12838 if { (eval echo "$as_me:12838: \"$ac_link\"") >&5
12839   (eval $ac_link) 2>&5
12840   ac_status=$?
12841   echo "$as_me:12841: \$? = $ac_status" >&5
12842   (exit $ac_status); } &&
12843          { ac_try='test -s conftest$ac_exeext'
12844   { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845   (eval $ac_try) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); }; }; then
12849   ac_cv_func_regcomp=yes
12850 else
12851   echo "$as_me: failed program was:" >&5
12852 cat conftest.$ac_ext >&5
12853 ac_cv_func_regcomp=no
12854 fi
12855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12856 fi
12857 echo "$as_me:12857: result: $ac_cv_func_regcomp" >&5
12858 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12859 if test $ac_cv_func_regcomp = yes; then
12860   cf_regex_func=regcomp
12861 else
12862
12863         for cf_regex_lib in regex re
12864         do
12865                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12866 echo "$as_me:12866: checking for regcomp in -l$cf_regex_lib" >&5
12867 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12868 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12869   echo $ECHO_N "(cached) $ECHO_C" >&6
12870 else
12871   ac_check_lib_save_LIBS=$LIBS
12872 LIBS="-l$cf_regex_lib  $LIBS"
12873 cat >conftest.$ac_ext <<_ACEOF
12874 #line 12874 "configure"
12875 #include "confdefs.h"
12876
12877 /* Override any gcc2 internal prototype to avoid an error.  */
12878 #ifdef __cplusplus
12879 extern "C"
12880 #endif
12881 /* We use char because int might match the return type of a gcc2
12882    builtin and then its argument prototype would still apply.  */
12883 char regcomp ();
12884 int
12885 main ()
12886 {
12887 regcomp ();
12888   ;
12889   return 0;
12890 }
12891 _ACEOF
12892 rm -f conftest.$ac_objext conftest$ac_exeext
12893 if { (eval echo "$as_me:12893: \"$ac_link\"") >&5
12894   (eval $ac_link) 2>&5
12895   ac_status=$?
12896   echo "$as_me:12896: \$? = $ac_status" >&5
12897   (exit $ac_status); } &&
12898          { ac_try='test -s conftest$ac_exeext'
12899   { (eval echo "$as_me:12899: \"$ac_try\"") >&5
12900   (eval $ac_try) 2>&5
12901   ac_status=$?
12902   echo "$as_me:12902: \$? = $ac_status" >&5
12903   (exit $ac_status); }; }; then
12904   eval "$as_ac_Lib=yes"
12905 else
12906   echo "$as_me: failed program was:" >&5
12907 cat conftest.$ac_ext >&5
12908 eval "$as_ac_Lib=no"
12909 fi
12910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12911 LIBS=$ac_check_lib_save_LIBS
12912 fi
12913 echo "$as_me:12913: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12914 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12915 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12916
12917                                 LIBS="-l$cf_regex_lib $LIBS"
12918                                 cf_regex_func=regcomp
12919                                 break
12920 fi
12921
12922         done
12923
12924 fi
12925
12926 if test "$cf_regex_func" = no ; then
12927         echo "$as_me:12927: checking for compile" >&5
12928 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12929 if test "${ac_cv_func_compile+set}" = set; then
12930   echo $ECHO_N "(cached) $ECHO_C" >&6
12931 else
12932   cat >conftest.$ac_ext <<_ACEOF
12933 #line 12933 "configure"
12934 #include "confdefs.h"
12935 /* System header to define __stub macros and hopefully few prototypes,
12936     which can conflict with char compile (); below.  */
12937 #include <assert.h>
12938 /* Override any gcc2 internal prototype to avoid an error.  */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 /* We use char because int might match the return type of a gcc2
12943    builtin and then its argument prototype would still apply.  */
12944 char compile ();
12945 char (*f) ();
12946
12947 int
12948 main ()
12949 {
12950 /* The GNU C library defines this for functions which it implements
12951     to always fail with ENOSYS.  Some functions are actually named
12952     something starting with __ and the normal name is an alias.  */
12953 #if defined (__stub_compile) || defined (__stub___compile)
12954 choke me
12955 #else
12956 f = compile;
12957 #endif
12958
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext conftest$ac_exeext
12964 if { (eval echo "$as_me:12964: \"$ac_link\"") >&5
12965   (eval $ac_link) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); } &&
12969          { ac_try='test -s conftest$ac_exeext'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   ac_cv_func_compile=yes
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 ac_cv_func_compile=no
12980 fi
12981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12982 fi
12983 echo "$as_me:12983: result: $ac_cv_func_compile" >&5
12984 echo "${ECHO_T}$ac_cv_func_compile" >&6
12985 if test $ac_cv_func_compile = yes; then
12986   cf_regex_func=compile
12987 else
12988
12989                 echo "$as_me:12989: checking for compile in -lgen" >&5
12990 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12991 if test "${ac_cv_lib_gen_compile+set}" = set; then
12992   echo $ECHO_N "(cached) $ECHO_C" >&6
12993 else
12994   ac_check_lib_save_LIBS=$LIBS
12995 LIBS="-lgen  $LIBS"
12996 cat >conftest.$ac_ext <<_ACEOF
12997 #line 12997 "configure"
12998 #include "confdefs.h"
12999
13000 /* Override any gcc2 internal prototype to avoid an error.  */
13001 #ifdef __cplusplus
13002 extern "C"
13003 #endif
13004 /* We use char because int might match the return type of a gcc2
13005    builtin and then its argument prototype would still apply.  */
13006 char compile ();
13007 int
13008 main ()
13009 {
13010 compile ();
13011   ;
13012   return 0;
13013 }
13014 _ACEOF
13015 rm -f conftest.$ac_objext conftest$ac_exeext
13016 if { (eval echo "$as_me:13016: \"$ac_link\"") >&5
13017   (eval $ac_link) 2>&5
13018   ac_status=$?
13019   echo "$as_me:13019: \$? = $ac_status" >&5
13020   (exit $ac_status); } &&
13021          { ac_try='test -s conftest$ac_exeext'
13022   { (eval echo "$as_me:13022: \"$ac_try\"") >&5
13023   (eval $ac_try) 2>&5
13024   ac_status=$?
13025   echo "$as_me:13025: \$? = $ac_status" >&5
13026   (exit $ac_status); }; }; then
13027   ac_cv_lib_gen_compile=yes
13028 else
13029   echo "$as_me: failed program was:" >&5
13030 cat conftest.$ac_ext >&5
13031 ac_cv_lib_gen_compile=no
13032 fi
13033 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13034 LIBS=$ac_check_lib_save_LIBS
13035 fi
13036 echo "$as_me:13036: result: $ac_cv_lib_gen_compile" >&5
13037 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13038 if test $ac_cv_lib_gen_compile = yes; then
13039
13040                                 LIBS="-lgen $LIBS"
13041                                 cf_regex_func=compile
13042 fi
13043
13044 fi
13045
13046 fi
13047
13048 if test "$cf_regex_func" = no ; then
13049         { echo "$as_me:13049: WARNING: cannot find regular expression library" >&5
13050 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13051 fi
13052
13053 echo "$as_me:13053: checking for regular-expression headers" >&5
13054 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13055 if test "${cf_cv_regex_hdrs+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058
13059 cf_cv_regex_hdrs=no
13060 case $cf_regex_func in #(vi
13061 compile) #(vi
13062         for cf_regex_hdr in regexp.h regexpr.h
13063         do
13064                 cat >conftest.$ac_ext <<_ACEOF
13065 #line 13065 "configure"
13066 #include "confdefs.h"
13067 #include <$cf_regex_hdr>
13068 int
13069 main ()
13070 {
13071
13072                         char *p = compile("", "", "", 0);
13073                         int x = step("", "");
13074
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext conftest$ac_exeext
13080 if { (eval echo "$as_me:13080: \"$ac_link\"") >&5
13081   (eval $ac_link) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } &&
13085          { ac_try='test -s conftest$ac_exeext'
13086   { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091
13092                         cf_cv_regex_hdrs=$cf_regex_hdr
13093                         break
13094
13095 else
13096   echo "$as_me: failed program was:" >&5
13097 cat conftest.$ac_ext >&5
13098 fi
13099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13100         done
13101         ;;
13102 *)
13103         for cf_regex_hdr in regex.h
13104         do
13105                 cat >conftest.$ac_ext <<_ACEOF
13106 #line 13106 "configure"
13107 #include "confdefs.h"
13108 #include <sys/types.h>
13109 #include <$cf_regex_hdr>
13110 int
13111 main ()
13112 {
13113
13114                         regex_t *p;
13115                         int x = regcomp(p, "", 0);
13116                         int y = regexec(p, "", 0, 0, 0);
13117                         regfree(p);
13118
13119   ;
13120   return 0;
13121 }
13122 _ACEOF
13123 rm -f conftest.$ac_objext conftest$ac_exeext
13124 if { (eval echo "$as_me:13124: \"$ac_link\"") >&5
13125   (eval $ac_link) 2>&5
13126   ac_status=$?
13127   echo "$as_me:13127: \$? = $ac_status" >&5
13128   (exit $ac_status); } &&
13129          { ac_try='test -s conftest$ac_exeext'
13130   { (eval echo "$as_me:13130: \"$ac_try\"") >&5
13131   (eval $ac_try) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); }; }; then
13135
13136                         cf_cv_regex_hdrs=$cf_regex_hdr
13137                         break
13138
13139 else
13140   echo "$as_me: failed program was:" >&5
13141 cat conftest.$ac_ext >&5
13142 fi
13143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13144         done
13145         ;;
13146 esac
13147
13148 fi
13149 echo "$as_me:13149: result: $cf_cv_regex_hdrs" >&5
13150 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13151
13152 case $cf_cv_regex_hdrs in #(vi
13153     no)        { echo "$as_me:13153: WARNING: no regular expression header found" >&5
13154 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13155     regex.h)   cat >>confdefs.h <<\EOF
13156 #define HAVE_REGEX_H_FUNCS 1
13157 EOF
13158  ;; #(vi
13159     regexp.h)  cat >>confdefs.h <<\EOF
13160 #define HAVE_REGEXP_H_FUNCS 1
13161 EOF
13162  ;; #(vi
13163     regexpr.h) cat >>confdefs.h <<\EOF
13164 #define HAVE_REGEXPR_H_FUNCS 1
13165 EOF
13166  ;;
13167 esac
13168
13169 for ac_header in \
13170 fcntl.h \
13171 getopt.h \
13172 limits.h \
13173 locale.h \
13174 poll.h \
13175 sys/bsdtypes.h \
13176 sys/ioctl.h \
13177 sys/param.h \
13178 sys/poll.h \
13179 sys/select.h \
13180 sys/time.h \
13181 sys/times.h \
13182 ttyent.h \
13183 unistd.h \
13184 wctype.h \
13185
13186 do
13187 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13188 echo "$as_me:13188: checking for $ac_header" >&5
13189 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13190 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13191   echo $ECHO_N "(cached) $ECHO_C" >&6
13192 else
13193   cat >conftest.$ac_ext <<_ACEOF
13194 #line 13194 "configure"
13195 #include "confdefs.h"
13196 #include <$ac_header>
13197 _ACEOF
13198 if { (eval echo "$as_me:13198: \"$ac_cpp conftest.$ac_ext\"") >&5
13199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13200   ac_status=$?
13201   egrep -v '^ *\+' conftest.er1 >conftest.err
13202   rm -f conftest.er1
13203   cat conftest.err >&5
13204   echo "$as_me:13204: \$? = $ac_status" >&5
13205   (exit $ac_status); } >/dev/null; then
13206   if test -s conftest.err; then
13207     ac_cpp_err=$ac_c_preproc_warn_flag
13208   else
13209     ac_cpp_err=
13210   fi
13211 else
13212   ac_cpp_err=yes
13213 fi
13214 if test -z "$ac_cpp_err"; then
13215   eval "$as_ac_Header=yes"
13216 else
13217   echo "$as_me: failed program was:" >&5
13218   cat conftest.$ac_ext >&5
13219   eval "$as_ac_Header=no"
13220 fi
13221 rm -f conftest.err conftest.$ac_ext
13222 fi
13223 echo "$as_me:13223: result: `eval echo '${'$as_ac_Header'}'`" >&5
13224 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13225 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13226   cat >>confdefs.h <<EOF
13227 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13228 EOF
13229
13230 fi
13231 done
13232
13233 # check for ISC (this may also define _POSIX_SOURCE)
13234 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13235 if test "$ISC" = yes ; then
13236
13237 echo "$as_me:13237: checking for main in -lcposix" >&5
13238 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13239 if test "${ac_cv_lib_cposix_main+set}" = set; then
13240   echo $ECHO_N "(cached) $ECHO_C" >&6
13241 else
13242   ac_check_lib_save_LIBS=$LIBS
13243 LIBS="-lcposix  $LIBS"
13244 cat >conftest.$ac_ext <<_ACEOF
13245 #line 13245 "configure"
13246 #include "confdefs.h"
13247
13248 int
13249 main ()
13250 {
13251 main ();
13252   ;
13253   return 0;
13254 }
13255 _ACEOF
13256 rm -f conftest.$ac_objext conftest$ac_exeext
13257 if { (eval echo "$as_me:13257: \"$ac_link\"") >&5
13258   (eval $ac_link) 2>&5
13259   ac_status=$?
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit $ac_status); } &&
13262          { ac_try='test -s conftest$ac_exeext'
13263   { (eval echo "$as_me:13263: \"$ac_try\"") >&5
13264   (eval $ac_try) 2>&5
13265   ac_status=$?
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); }; }; then
13268   ac_cv_lib_cposix_main=yes
13269 else
13270   echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 ac_cv_lib_cposix_main=no
13273 fi
13274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13275 LIBS=$ac_check_lib_save_LIBS
13276 fi
13277 echo "$as_me:13277: result: $ac_cv_lib_cposix_main" >&5
13278 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13279 if test $ac_cv_lib_cposix_main = yes; then
13280   cat >>confdefs.h <<EOF
13281 #define HAVE_LIBCPOSIX 1
13282 EOF
13283
13284   LIBS="-lcposix $LIBS"
13285
13286 fi
13287
13288         echo "$as_me:13288: checking for bzero in -linet" >&5
13289 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13290 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13291   echo $ECHO_N "(cached) $ECHO_C" >&6
13292 else
13293   ac_check_lib_save_LIBS=$LIBS
13294 LIBS="-linet  $LIBS"
13295 cat >conftest.$ac_ext <<_ACEOF
13296 #line 13296 "configure"
13297 #include "confdefs.h"
13298
13299 /* Override any gcc2 internal prototype to avoid an error.  */
13300 #ifdef __cplusplus
13301 extern "C"
13302 #endif
13303 /* We use char because int might match the return type of a gcc2
13304    builtin and then its argument prototype would still apply.  */
13305 char bzero ();
13306 int
13307 main ()
13308 {
13309 bzero ();
13310   ;
13311   return 0;
13312 }
13313 _ACEOF
13314 rm -f conftest.$ac_objext conftest$ac_exeext
13315 if { (eval echo "$as_me:13315: \"$ac_link\"") >&5
13316   (eval $ac_link) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit $ac_status); } &&
13320          { ac_try='test -s conftest$ac_exeext'
13321   { (eval echo "$as_me:13321: \"$ac_try\"") >&5
13322   (eval $ac_try) 2>&5
13323   ac_status=$?
13324   echo "$as_me:13324: \$? = $ac_status" >&5
13325   (exit $ac_status); }; }; then
13326   ac_cv_lib_inet_bzero=yes
13327 else
13328   echo "$as_me: failed program was:" >&5
13329 cat conftest.$ac_ext >&5
13330 ac_cv_lib_inet_bzero=no
13331 fi
13332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13333 LIBS=$ac_check_lib_save_LIBS
13334 fi
13335 echo "$as_me:13335: result: $ac_cv_lib_inet_bzero" >&5
13336 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13337 if test $ac_cv_lib_inet_bzero = yes; then
13338   LIBS="-linet $LIBS"
13339 fi
13340 fi
13341
13342 echo "$as_me:13342: checking if sys/time.h works with sys/select.h" >&5
13343 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13344 if test "${cf_cv_sys_time_select+set}" = set; then
13345   echo $ECHO_N "(cached) $ECHO_C" >&6
13346 else
13347
13348 cat >conftest.$ac_ext <<_ACEOF
13349 #line 13349 "configure"
13350 #include "confdefs.h"
13351
13352 #include <sys/types.h>
13353 #ifdef HAVE_SYS_TIME_H
13354 #include <sys/time.h>
13355 #endif
13356 #ifdef HAVE_SYS_SELECT_H
13357 #include <sys/select.h>
13358 #endif
13359
13360 int
13361 main ()
13362 {
13363
13364   ;
13365   return 0;
13366 }
13367 _ACEOF
13368 rm -f conftest.$ac_objext
13369 if { (eval echo "$as_me:13369: \"$ac_compile\"") >&5
13370   (eval $ac_compile) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit $ac_status); } &&
13374          { ac_try='test -s conftest.$ac_objext'
13375   { (eval echo "$as_me:13375: \"$ac_try\"") >&5
13376   (eval $ac_try) 2>&5
13377   ac_status=$?
13378   echo "$as_me:13378: \$? = $ac_status" >&5
13379   (exit $ac_status); }; }; then
13380   cf_cv_sys_time_select=yes
13381 else
13382   echo "$as_me: failed program was:" >&5
13383 cat conftest.$ac_ext >&5
13384 cf_cv_sys_time_select=no
13385 fi
13386 rm -f conftest.$ac_objext conftest.$ac_ext
13387
13388 fi
13389
13390 echo "$as_me:13390: result: $cf_cv_sys_time_select" >&5
13391 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13392 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13393 #define HAVE_SYS_TIME_SELECT 1
13394 EOF
13395
13396 ###     checks for compiler characteristics
13397 ac_ext=c
13398 ac_cpp='$CPP $CPPFLAGS'
13399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13402 ac_main_return=return
13403
13404 echo "$as_me:13404: checking for $CC option to accept ANSI C" >&5
13405 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13406 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13407   echo $ECHO_N "(cached) $ECHO_C" >&6
13408 else
13409   ac_cv_prog_cc_stdc=no
13410 ac_save_CC=$CC
13411 cat >conftest.$ac_ext <<_ACEOF
13412 #line 13412 "configure"
13413 #include "confdefs.h"
13414 #include <stdarg.h>
13415 #include <stdio.h>
13416 #include <sys/types.h>
13417 #include <sys/stat.h>
13418 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13419 struct buf { int x; };
13420 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13421 static char *e (p, i)
13422      char **p;
13423      int i;
13424 {
13425   return p[i];
13426 }
13427 static char *f (char * (*g) (char **, int), char **p, ...)
13428 {
13429   char *s;
13430   va_list v;
13431   va_start (v,p);
13432   s = g (p, va_arg (v,int));
13433   va_end (v);
13434   return s;
13435 }
13436 int test (int i, double x);
13437 struct s1 {int (*f) (int a);};
13438 struct s2 {int (*f) (double a);};
13439 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13440 int argc;
13441 char **argv;
13442 int
13443 main ()
13444 {
13445 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13446   ;
13447   return 0;
13448 }
13449 _ACEOF
13450 # Don't try gcc -ansi; that turns off useful extensions and
13451 # breaks some systems' header files.
13452 # AIX                   -qlanglvl=ansi
13453 # Ultrix and OSF/1      -std1
13454 # HP-UX 10.20 and later -Ae
13455 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13456 # SVR4                  -Xc -D__EXTENSIONS__
13457 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13458 do
13459   CC="$ac_save_CC $ac_arg"
13460   rm -f conftest.$ac_objext
13461 if { (eval echo "$as_me:13461: \"$ac_compile\"") >&5
13462   (eval $ac_compile) 2>&5
13463   ac_status=$?
13464   echo "$as_me:13464: \$? = $ac_status" >&5
13465   (exit $ac_status); } &&
13466          { ac_try='test -s conftest.$ac_objext'
13467   { (eval echo "$as_me:13467: \"$ac_try\"") >&5
13468   (eval $ac_try) 2>&5
13469   ac_status=$?
13470   echo "$as_me:13470: \$? = $ac_status" >&5
13471   (exit $ac_status); }; }; then
13472   ac_cv_prog_cc_stdc=$ac_arg
13473 break
13474 else
13475   echo "$as_me: failed program was:" >&5
13476 cat conftest.$ac_ext >&5
13477 fi
13478 rm -f conftest.$ac_objext
13479 done
13480 rm -f conftest.$ac_ext conftest.$ac_objext
13481 CC=$ac_save_CC
13482
13483 fi
13484
13485 case "x$ac_cv_prog_cc_stdc" in
13486   x|xno)
13487     echo "$as_me:13487: result: none needed" >&5
13488 echo "${ECHO_T}none needed" >&6 ;;
13489   *)
13490     echo "$as_me:13490: result: $ac_cv_prog_cc_stdc" >&5
13491 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13492     CC="$CC $ac_cv_prog_cc_stdc" ;;
13493 esac
13494
13495 echo "$as_me:13495: checking for an ANSI C-conforming const" >&5
13496 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13497 if test "${ac_cv_c_const+set}" = set; then
13498   echo $ECHO_N "(cached) $ECHO_C" >&6
13499 else
13500   cat >conftest.$ac_ext <<_ACEOF
13501 #line 13501 "configure"
13502 #include "confdefs.h"
13503
13504 int
13505 main ()
13506 {
13507 /* FIXME: Include the comments suggested by Paul. */
13508 #ifndef __cplusplus
13509   /* Ultrix mips cc rejects this.  */
13510   typedef int charset[2];
13511   const charset x;
13512   /* SunOS 4.1.1 cc rejects this.  */
13513   char const *const *ccp;
13514   char **p;
13515   /* NEC SVR4.0.2 mips cc rejects this.  */
13516   struct point {int x, y;};
13517   static struct point const zero = {0,0};
13518   /* AIX XL C 1.02.0.0 rejects this.
13519      It does not let you subtract one const X* pointer from another in
13520      an arm of an if-expression whose if-part is not a constant
13521      expression */
13522   const char *g = "string";
13523   ccp = &g + (g ? g-g : 0);
13524   /* HPUX 7.0 cc rejects these. */
13525   ++ccp;
13526   p = (char**) ccp;
13527   ccp = (char const *const *) p;
13528   { /* SCO 3.2v4 cc rejects this.  */
13529     char *t;
13530     char const *s = 0 ? (char *) 0 : (char const *) 0;
13531
13532     *t++ = 0;
13533   }
13534   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13535     int x[] = {25, 17};
13536     const int *foo = &x[0];
13537     ++foo;
13538   }
13539   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13540     typedef const int *iptr;
13541     iptr p = 0;
13542     ++p;
13543   }
13544   { /* AIX XL C 1.02.0.0 rejects this saying
13545        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13546     struct s { int j; const int *ap[3]; };
13547     struct s *b; b->j = 5;
13548   }
13549   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13550     const int foo = 10;
13551   }
13552 #endif
13553
13554   ;
13555   return 0;
13556 }
13557 _ACEOF
13558 rm -f conftest.$ac_objext
13559 if { (eval echo "$as_me:13559: \"$ac_compile\"") >&5
13560   (eval $ac_compile) 2>&5
13561   ac_status=$?
13562   echo "$as_me:13562: \$? = $ac_status" >&5
13563   (exit $ac_status); } &&
13564          { ac_try='test -s conftest.$ac_objext'
13565   { (eval echo "$as_me:13565: \"$ac_try\"") >&5
13566   (eval $ac_try) 2>&5
13567   ac_status=$?
13568   echo "$as_me:13568: \$? = $ac_status" >&5
13569   (exit $ac_status); }; }; then
13570   ac_cv_c_const=yes
13571 else
13572   echo "$as_me: failed program was:" >&5
13573 cat conftest.$ac_ext >&5
13574 ac_cv_c_const=no
13575 fi
13576 rm -f conftest.$ac_objext conftest.$ac_ext
13577 fi
13578 echo "$as_me:13578: result: $ac_cv_c_const" >&5
13579 echo "${ECHO_T}$ac_cv_c_const" >&6
13580 if test $ac_cv_c_const = no; then
13581
13582 cat >>confdefs.h <<\EOF
13583 #define const
13584 EOF
13585
13586 fi
13587
13588 echo "$as_me:13588: checking for inline" >&5
13589 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13590 if test "${ac_cv_c_inline+set}" = set; then
13591   echo $ECHO_N "(cached) $ECHO_C" >&6
13592 else
13593   ac_cv_c_inline=no
13594 for ac_kw in inline __inline__ __inline; do
13595   cat >conftest.$ac_ext <<_ACEOF
13596 #line 13596 "configure"
13597 #include "confdefs.h"
13598 #ifndef __cplusplus
13599 static $ac_kw int static_foo () {return 0; }
13600 $ac_kw int foo () {return 0; }
13601 #endif
13602
13603 _ACEOF
13604 rm -f conftest.$ac_objext
13605 if { (eval echo "$as_me:13605: \"$ac_compile\"") >&5
13606   (eval $ac_compile) 2>&5
13607   ac_status=$?
13608   echo "$as_me:13608: \$? = $ac_status" >&5
13609   (exit $ac_status); } &&
13610          { ac_try='test -s conftest.$ac_objext'
13611   { (eval echo "$as_me:13611: \"$ac_try\"") >&5
13612   (eval $ac_try) 2>&5
13613   ac_status=$?
13614   echo "$as_me:13614: \$? = $ac_status" >&5
13615   (exit $ac_status); }; }; then
13616   ac_cv_c_inline=$ac_kw; break
13617 else
13618   echo "$as_me: failed program was:" >&5
13619 cat conftest.$ac_ext >&5
13620 fi
13621 rm -f conftest.$ac_objext conftest.$ac_ext
13622 done
13623
13624 fi
13625 echo "$as_me:13625: result: $ac_cv_c_inline" >&5
13626 echo "${ECHO_T}$ac_cv_c_inline" >&6
13627 case $ac_cv_c_inline in
13628   inline | yes) ;;
13629   no)
13630 cat >>confdefs.h <<\EOF
13631 #define inline
13632 EOF
13633  ;;
13634   *)  cat >>confdefs.h <<EOF
13635 #define inline $ac_cv_c_inline
13636 EOF
13637  ;;
13638 esac
13639
13640 NCURSES_INLINE=
13641 if test "$ac_cv_c_inline" != no ; then
13642   NCURSES_INLINE=inline
13643   if test "$INTEL_COMPILER" = yes
13644   then
13645     :
13646   elif test "$GCC" = yes
13647   then
13648     echo "$as_me:13648: checking if $CC supports options to tune inlining" >&5
13649 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13650 if test "${cf_cv_gcc_inline+set}" = set; then
13651   echo $ECHO_N "(cached) $ECHO_C" >&6
13652 else
13653
13654       cf_save_CFLAGS=$CFLAGS
13655       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13656       cat >conftest.$ac_ext <<_ACEOF
13657 #line 13657 "configure"
13658 #include "confdefs.h"
13659 inline int foo(void) { return 1; }
13660 int
13661 main ()
13662 {
13663 ${cf_cv_main_return:-return} foo()
13664   ;
13665   return 0;
13666 }
13667 _ACEOF
13668 rm -f conftest.$ac_objext
13669 if { (eval echo "$as_me:13669: \"$ac_compile\"") >&5
13670   (eval $ac_compile) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); } &&
13674          { ac_try='test -s conftest.$ac_objext'
13675   { (eval echo "$as_me:13675: \"$ac_try\"") >&5
13676   (eval $ac_try) 2>&5
13677   ac_status=$?
13678   echo "$as_me:13678: \$? = $ac_status" >&5
13679   (exit $ac_status); }; }; then
13680   cf_cv_gcc_inline=yes
13681 else
13682   echo "$as_me: failed program was:" >&5
13683 cat conftest.$ac_ext >&5
13684 cf_cv_gcc_inline=no
13685 fi
13686 rm -f conftest.$ac_objext conftest.$ac_ext
13687       CFLAGS=$cf_save_CFLAGS
13688
13689 fi
13690 echo "$as_me:13690: result: $cf_cv_gcc_inline" >&5
13691 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13692     if test "$cf_cv_gcc_inline" = yes ; then
13693
13694 cf_fix_cppflags=no
13695 cf_new_cflags=
13696 cf_new_cppflags=
13697 cf_new_extra_cppflags=
13698
13699 for cf_add_cflags in --param max-inline-insns-single=1200
13700 do
13701 case $cf_fix_cppflags in
13702 no)
13703         case $cf_add_cflags in #(vi
13704         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13705                 case $cf_add_cflags in
13706                 -D*)
13707                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13708
13709                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13710                                 && test -z "${cf_tst_cflags}" \
13711                                 && cf_fix_cppflags=yes
13712
13713                         if test $cf_fix_cppflags = yes ; then
13714                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13715                                 continue
13716                         elif test "${cf_tst_cflags}" = "\"'" ; then
13717                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13718                                 continue
13719                         fi
13720                         ;;
13721                 esac
13722                 case "$CPPFLAGS" in
13723                 *$cf_add_cflags) #(vi
13724                         ;;
13725                 *) #(vi
13726                         case $cf_add_cflags in #(vi
13727                         -D*)
13728                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13729
13730 CPPFLAGS=`echo "$CPPFLAGS" | \
13731         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13732                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13733
13734                                 ;;
13735                         esac
13736                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13737                         ;;
13738                 esac
13739                 ;;
13740         *)
13741                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13742                 ;;
13743         esac
13744         ;;
13745 yes)
13746         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13747
13748         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13749
13750         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13751                 && test -z "${cf_tst_cflags}" \
13752                 && cf_fix_cppflags=no
13753         ;;
13754 esac
13755 done
13756
13757 if test -n "$cf_new_cflags" ; then
13758
13759         CFLAGS="$CFLAGS $cf_new_cflags"
13760 fi
13761
13762 if test -n "$cf_new_cppflags" ; then
13763
13764         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13765 fi
13766
13767 if test -n "$cf_new_extra_cppflags" ; then
13768
13769         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13770 fi
13771
13772     fi
13773   fi
13774 fi
13775
13776 echo "$as_me:13776: checking for signal global datatype" >&5
13777 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13778 if test "${cf_cv_sig_atomic_t+set}" = set; then
13779   echo $ECHO_N "(cached) $ECHO_C" >&6
13780 else
13781
13782         for cf_type in \
13783                 "volatile sig_atomic_t" \
13784                 "sig_atomic_t" \
13785                 "int"
13786         do
13787         cat >conftest.$ac_ext <<_ACEOF
13788 #line 13788 "configure"
13789 #include "confdefs.h"
13790
13791 #include <sys/types.h>
13792 #include <signal.h>
13793 #include <stdio.h>
13794
13795 extern $cf_type x;
13796 $cf_type x;
13797 static void handler(int sig)
13798 {
13799         x = 5;
13800 }
13801 int
13802 main ()
13803 {
13804 signal(SIGINT, handler);
13805                  x = 1
13806   ;
13807   return 0;
13808 }
13809 _ACEOF
13810 rm -f conftest.$ac_objext
13811 if { (eval echo "$as_me:13811: \"$ac_compile\"") >&5
13812   (eval $ac_compile) 2>&5
13813   ac_status=$?
13814   echo "$as_me:13814: \$? = $ac_status" >&5
13815   (exit $ac_status); } &&
13816          { ac_try='test -s conftest.$ac_objext'
13817   { (eval echo "$as_me:13817: \"$ac_try\"") >&5
13818   (eval $ac_try) 2>&5
13819   ac_status=$?
13820   echo "$as_me:13820: \$? = $ac_status" >&5
13821   (exit $ac_status); }; }; then
13822   cf_cv_sig_atomic_t=$cf_type
13823 else
13824   echo "$as_me: failed program was:" >&5
13825 cat conftest.$ac_ext >&5
13826 cf_cv_sig_atomic_t=no
13827 fi
13828 rm -f conftest.$ac_objext conftest.$ac_ext
13829                 test "$cf_cv_sig_atomic_t" != no && break
13830         done
13831
13832 fi
13833
13834 echo "$as_me:13834: result: $cf_cv_sig_atomic_t" >&5
13835 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13836 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13837 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13838 EOF
13839
13840 if test $NCURSES_CHTYPE = auto ; then
13841
13842 echo "$as_me:13842: checking for type of chtype" >&5
13843 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13844 if test "${cf_cv_typeof_chtype+set}" = set; then
13845   echo $ECHO_N "(cached) $ECHO_C" >&6
13846 else
13847
13848                 if test "$cross_compiling" = yes; then
13849   cf_cv_typeof_chtype=long
13850 else
13851   cat >conftest.$ac_ext <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13854
13855 #define WANT_BITS 31
13856 #include <stdio.h>
13857 int main()
13858 {
13859         FILE *fp = fopen("cf_test.out", "w");
13860         if (fp != 0) {
13861                 char *result = "long";
13862                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13863                         int n;
13864                         unsigned int x, y;
13865                         for (n = 0; n < WANT_BITS; n++) {
13866                                 x = (1 << n);
13867                                 y = (x >> n);
13868                                 if (y != 1 || x == 0) {
13869                                         x = 0;
13870                                         break;
13871                                 }
13872                         }
13873                         /*
13874                          * If x is nonzero, an int is big enough for the bits
13875                          * that we want.
13876                          */
13877                         result = (x != 0) ? "int" : "long";
13878                 }
13879                 fputs(result, fp);
13880                 fclose(fp);
13881         }
13882         ${cf_cv_main_return:-return}(0);
13883 }
13884
13885 _ACEOF
13886 rm -f conftest$ac_exeext
13887 if { (eval echo "$as_me:13887: \"$ac_link\"") >&5
13888   (eval $ac_link) 2>&5
13889   ac_status=$?
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13892   { (eval echo "$as_me:13892: \"$ac_try\"") >&5
13893   (eval $ac_try) 2>&5
13894   ac_status=$?
13895   echo "$as_me:13895: \$? = $ac_status" >&5
13896   (exit $ac_status); }; }; then
13897   cf_cv_typeof_chtype=`cat cf_test.out`
13898 else
13899   echo "$as_me: program exited with status $ac_status" >&5
13900 echo "$as_me: failed program was:" >&5
13901 cat conftest.$ac_ext >&5
13902 cf_cv_typeof_chtype=long
13903 fi
13904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13905 fi
13906                 rm -f cf_test.out
13907
13908 fi
13909
13910 echo "$as_me:13910: result: $cf_cv_typeof_chtype" >&5
13911 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13912
13913 cat >>confdefs.h <<EOF
13914 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13915 EOF
13916
13917 else
13918         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13919 fi
13920 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13921
13922 echo "$as_me:13922: checking if unsigned literals are legal" >&5
13923 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13924 if test "${cf_cv_unsigned_literals+set}" = set; then
13925   echo $ECHO_N "(cached) $ECHO_C" >&6
13926 else
13927
13928         cat >conftest.$ac_ext <<_ACEOF
13929 #line 13929 "configure"
13930 #include "confdefs.h"
13931
13932 int
13933 main ()
13934 {
13935 long x = 1L + 1UL + 1U + 1
13936   ;
13937   return 0;
13938 }
13939 _ACEOF
13940 rm -f conftest.$ac_objext
13941 if { (eval echo "$as_me:13941: \"$ac_compile\"") >&5
13942   (eval $ac_compile) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); } &&
13946          { ac_try='test -s conftest.$ac_objext'
13947   { (eval echo "$as_me:13947: \"$ac_try\"") >&5
13948   (eval $ac_try) 2>&5
13949   ac_status=$?
13950   echo "$as_me:13950: \$? = $ac_status" >&5
13951   (exit $ac_status); }; }; then
13952   cf_cv_unsigned_literals=yes
13953 else
13954   echo "$as_me: failed program was:" >&5
13955 cat conftest.$ac_ext >&5
13956 cf_cv_unsigned_literals=no
13957 fi
13958 rm -f conftest.$ac_objext conftest.$ac_ext
13959
13960 fi
13961
13962 echo "$as_me:13962: result: $cf_cv_unsigned_literals" >&5
13963 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13964
13965 cf_cv_1UL="1"
13966 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13967 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13968
13969 if test $NCURSES_MMASK_T = auto ; then
13970         cf_cv_typeof_mmask_t=long
13971 else
13972         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13973 fi
13974 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13975
13976 ###     Checks for external-data
13977
13978 echo "$as_me:13978: checking if external errno is declared" >&5
13979 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13980 if test "${cf_cv_dcl_errno+set}" = set; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983
13984     cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 #ifdef HAVE_STDLIB_H
13989 #include <stdlib.h>
13990 #endif
13991 #include <stdio.h>
13992 #include <sys/types.h>
13993 #include <errno.h>
13994 int
13995 main ()
13996 {
13997 int x = (int) errno
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 rm -f conftest.$ac_objext
14003 if { (eval echo "$as_me:14003: \"$ac_compile\"") >&5
14004   (eval $ac_compile) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit $ac_status); } &&
14008          { ac_try='test -s conftest.$ac_objext'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   cf_cv_dcl_errno=yes
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 cat conftest.$ac_ext >&5
14018 cf_cv_dcl_errno=no
14019 fi
14020 rm -f conftest.$ac_objext conftest.$ac_ext
14021
14022 fi
14023 echo "$as_me:14023: result: $cf_cv_dcl_errno" >&5
14024 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14025
14026 if test "$cf_cv_dcl_errno" = no ; then
14027
14028 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14029
14030     cat >>confdefs.h <<EOF
14031 #define $cf_result 1
14032 EOF
14033
14034 fi
14035
14036 # It's possible (for near-UNIX clones) that the data doesn't exist
14037
14038 echo "$as_me:14038: checking if external errno exists" >&5
14039 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14040 if test "${cf_cv_have_errno+set}" = set; then
14041   echo $ECHO_N "(cached) $ECHO_C" >&6
14042 else
14043
14044     cat >conftest.$ac_ext <<_ACEOF
14045 #line 14045 "configure"
14046 #include "confdefs.h"
14047
14048 #undef errno
14049 extern int errno;
14050
14051 int
14052 main ()
14053 {
14054 errno = 2
14055   ;
14056   return 0;
14057 }
14058 _ACEOF
14059 rm -f conftest.$ac_objext conftest$ac_exeext
14060 if { (eval echo "$as_me:14060: \"$ac_link\"") >&5
14061   (eval $ac_link) 2>&5
14062   ac_status=$?
14063   echo "$as_me:14063: \$? = $ac_status" >&5
14064   (exit $ac_status); } &&
14065          { ac_try='test -s conftest$ac_exeext'
14066   { (eval echo "$as_me:14066: \"$ac_try\"") >&5
14067   (eval $ac_try) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit $ac_status); }; }; then
14071   cf_cv_have_errno=yes
14072 else
14073   echo "$as_me: failed program was:" >&5
14074 cat conftest.$ac_ext >&5
14075 cf_cv_have_errno=no
14076 fi
14077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14078
14079 fi
14080 echo "$as_me:14080: result: $cf_cv_have_errno" >&5
14081 echo "${ECHO_T}$cf_cv_have_errno" >&6
14082
14083 if test "$cf_cv_have_errno" = yes ; then
14084
14085 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14086
14087     cat >>confdefs.h <<EOF
14088 #define $cf_result 1
14089 EOF
14090
14091 fi
14092
14093 echo "$as_me:14093: checking if data-only library module links" >&5
14094 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14095 if test "${cf_cv_link_dataonly+set}" = set; then
14096   echo $ECHO_N "(cached) $ECHO_C" >&6
14097 else
14098
14099         rm -f conftest.a
14100         cat >conftest.$ac_ext <<EOF
14101 #line 14101 "configure"
14102 int     testdata[3] = { 123, 456, 789 };
14103 EOF
14104         if { (eval echo "$as_me:14104: \"$ac_compile\"") >&5
14105   (eval $ac_compile) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); } ; then
14109                 mv conftest.o data.o && \
14110                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14111         fi
14112         rm -f conftest.$ac_ext data.o
14113         cat >conftest.$ac_ext <<EOF
14114 #line 14114 "configure"
14115 int     testfunc()
14116 {
14117 #if defined(NeXT)
14118         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14119 #else
14120         extern int testdata[3];
14121         return testdata[0] == 123
14122            &&  testdata[1] == 456
14123            &&  testdata[2] == 789;
14124 #endif
14125 }
14126 EOF
14127         if { (eval echo "$as_me:14127: \"$ac_compile\"") >&5
14128   (eval $ac_compile) 2>&5
14129   ac_status=$?
14130   echo "$as_me:14130: \$? = $ac_status" >&5
14131   (exit $ac_status); }; then
14132                 mv conftest.o func.o && \
14133                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14134         fi
14135         rm -f conftest.$ac_ext func.o
14136         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14137         cf_saveLIBS="$LIBS"
14138         LIBS="conftest.a $LIBS"
14139         if test "$cross_compiling" = yes; then
14140   cf_cv_link_dataonly=unknown
14141 else
14142   cat >conftest.$ac_ext <<_ACEOF
14143 #line 14143 "configure"
14144 #include "confdefs.h"
14145
14146         int main()
14147         {
14148                 extern int testfunc();
14149                 ${cf_cv_main_return:-return} (!testfunc());
14150         }
14151
14152 _ACEOF
14153 rm -f conftest$ac_exeext
14154 if { (eval echo "$as_me:14154: \"$ac_link\"") >&5
14155   (eval $ac_link) 2>&5
14156   ac_status=$?
14157   echo "$as_me:14157: \$? = $ac_status" >&5
14158   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14159   { (eval echo "$as_me:14159: \"$ac_try\"") >&5
14160   (eval $ac_try) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit $ac_status); }; }; then
14164   cf_cv_link_dataonly=yes
14165 else
14166   echo "$as_me: program exited with status $ac_status" >&5
14167 echo "$as_me: failed program was:" >&5
14168 cat conftest.$ac_ext >&5
14169 cf_cv_link_dataonly=no
14170 fi
14171 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14172 fi
14173         LIBS="$cf_saveLIBS"
14174
14175 fi
14176
14177 echo "$as_me:14177: result: $cf_cv_link_dataonly" >&5
14178 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14179
14180 if test "$cf_cv_link_dataonly" = no ; then
14181         cat >>confdefs.h <<\EOF
14182 #define BROKEN_LINKER 1
14183 EOF
14184
14185         BROKEN_LINKER=1
14186 fi
14187
14188 ###     Checks for library functions.
14189
14190 for ac_func in \
14191 getcwd \
14192 getegid \
14193 geteuid \
14194 getttynam \
14195 issetugid \
14196 poll \
14197 remove \
14198 select \
14199 setbuf \
14200 setbuffer \
14201 setvbuf \
14202 sigaction \
14203 sigvec \
14204 strdup \
14205 strstr \
14206 tcgetpgrp \
14207 times \
14208 vsnprintf \
14209
14210 do
14211 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14212 echo "$as_me:14212: checking for $ac_func" >&5
14213 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14214 if eval "test \"\${$as_ac_var+set}\" = set"; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220 /* System header to define __stub macros and hopefully few prototypes,
14221     which can conflict with char $ac_func (); below.  */
14222 #include <assert.h>
14223 /* Override any gcc2 internal prototype to avoid an error.  */
14224 #ifdef __cplusplus
14225 extern "C"
14226 #endif
14227 /* We use char because int might match the return type of a gcc2
14228    builtin and then its argument prototype would still apply.  */
14229 char $ac_func ();
14230 char (*f) ();
14231
14232 int
14233 main ()
14234 {
14235 /* The GNU C library defines this for functions which it implements
14236     to always fail with ENOSYS.  Some functions are actually named
14237     something starting with __ and the normal name is an alias.  */
14238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14239 choke me
14240 #else
14241 f = $ac_func;
14242 #endif
14243
14244   ;
14245   return 0;
14246 }
14247 _ACEOF
14248 rm -f conftest.$ac_objext conftest$ac_exeext
14249 if { (eval echo "$as_me:14249: \"$ac_link\"") >&5
14250   (eval $ac_link) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit $ac_status); } &&
14254          { ac_try='test -s conftest$ac_exeext'
14255   { (eval echo "$as_me:14255: \"$ac_try\"") >&5
14256   (eval $ac_try) 2>&5
14257   ac_status=$?
14258   echo "$as_me:14258: \$? = $ac_status" >&5
14259   (exit $ac_status); }; }; then
14260   eval "$as_ac_var=yes"
14261 else
14262   echo "$as_me: failed program was:" >&5
14263 cat conftest.$ac_ext >&5
14264 eval "$as_ac_var=no"
14265 fi
14266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14267 fi
14268 echo "$as_me:14268: result: `eval echo '${'$as_ac_var'}'`" >&5
14269 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14270 if test `eval echo '${'$as_ac_var'}'` = yes; then
14271   cat >>confdefs.h <<EOF
14272 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14273 EOF
14274
14275 fi
14276 done
14277
14278 if test "$with_getcap" = "yes" ; then
14279
14280 echo "$as_me:14280: checking for terminal-capability database functions" >&5
14281 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14282 if test "${cf_cv_cgetent+set}" = set; then
14283   echo $ECHO_N "(cached) $ECHO_C" >&6
14284 else
14285
14286 cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289
14290 #include <stdlib.h>
14291 int
14292 main ()
14293 {
14294
14295         char temp[128];
14296         char *buf = temp;
14297         char *db_array = temp;
14298         cgetent(&buf, /* int *, */ &db_array, "vt100");
14299         cgetcap(buf, "tc", '=');
14300         cgetmatch(buf, "tc");
14301
14302   ;
14303   return 0;
14304 }
14305 _ACEOF
14306 rm -f conftest.$ac_objext conftest$ac_exeext
14307 if { (eval echo "$as_me:14307: \"$ac_link\"") >&5
14308   (eval $ac_link) 2>&5
14309   ac_status=$?
14310   echo "$as_me:14310: \$? = $ac_status" >&5
14311   (exit $ac_status); } &&
14312          { ac_try='test -s conftest$ac_exeext'
14313   { (eval echo "$as_me:14313: \"$ac_try\"") >&5
14314   (eval $ac_try) 2>&5
14315   ac_status=$?
14316   echo "$as_me:14316: \$? = $ac_status" >&5
14317   (exit $ac_status); }; }; then
14318   cf_cv_cgetent=yes
14319 else
14320   echo "$as_me: failed program was:" >&5
14321 cat conftest.$ac_ext >&5
14322 cf_cv_cgetent=no
14323 fi
14324 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14325
14326 fi
14327
14328 echo "$as_me:14328: result: $cf_cv_cgetent" >&5
14329 echo "${ECHO_T}$cf_cv_cgetent" >&6
14330 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14331 #define HAVE_BSD_CGETENT 1
14332 EOF
14333
14334 fi
14335
14336 echo "$as_me:14336: checking for isascii" >&5
14337 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14338 if test "${cf_cv_have_isascii+set}" = set; then
14339   echo $ECHO_N "(cached) $ECHO_C" >&6
14340 else
14341
14342         cat >conftest.$ac_ext <<_ACEOF
14343 #line 14343 "configure"
14344 #include "confdefs.h"
14345 #include <ctype.h>
14346 int
14347 main ()
14348 {
14349 int x = isascii(' ')
14350   ;
14351   return 0;
14352 }
14353 _ACEOF
14354 rm -f conftest.$ac_objext conftest$ac_exeext
14355 if { (eval echo "$as_me:14355: \"$ac_link\"") >&5
14356   (eval $ac_link) 2>&5
14357   ac_status=$?
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit $ac_status); } &&
14360          { ac_try='test -s conftest$ac_exeext'
14361   { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); }; }; then
14366   cf_cv_have_isascii=yes
14367 else
14368   echo "$as_me: failed program was:" >&5
14369 cat conftest.$ac_ext >&5
14370 cf_cv_have_isascii=no
14371 fi
14372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14373
14374 fi
14375 echo "$as_me:14375: result: $cf_cv_have_isascii" >&5
14376 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14377 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14378 #define HAVE_ISASCII 1
14379 EOF
14380
14381 if test "$ac_cv_func_sigaction" = yes; then
14382 echo "$as_me:14382: checking whether sigaction needs _POSIX_SOURCE" >&5
14383 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14384 cat >conftest.$ac_ext <<_ACEOF
14385 #line 14385 "configure"
14386 #include "confdefs.h"
14387
14388 #include <sys/types.h>
14389 #include <signal.h>
14390 int
14391 main ()
14392 {
14393 struct sigaction act
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext
14399 if { (eval echo "$as_me:14399: \"$ac_compile\"") >&5
14400   (eval $ac_compile) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest.$ac_objext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   sigact_bad=no
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414
14415 cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418
14419 #define _POSIX_SOURCE
14420 #include <sys/types.h>
14421 #include <signal.h>
14422 int
14423 main ()
14424 {
14425 struct sigaction act
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f conftest.$ac_objext
14431 if { (eval echo "$as_me:14431: \"$ac_compile\"") >&5
14432   (eval $ac_compile) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); } &&
14436          { ac_try='test -s conftest.$ac_objext'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   sigact_bad=yes
14443          cat >>confdefs.h <<\EOF
14444 #define SVR4_ACTION 1
14445 EOF
14446
14447 else
14448   echo "$as_me: failed program was:" >&5
14449 cat conftest.$ac_ext >&5
14450 sigact_bad=unknown
14451 fi
14452 rm -f conftest.$ac_objext conftest.$ac_ext
14453 fi
14454 rm -f conftest.$ac_objext conftest.$ac_ext
14455 echo "$as_me:14455: result: $sigact_bad" >&5
14456 echo "${ECHO_T}$sigact_bad" >&6
14457 fi
14458
14459 echo "$as_me:14459: checking if nanosleep really works" >&5
14460 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14461 if test "${cf_cv_func_nanosleep+set}" = set; then
14462   echo $ECHO_N "(cached) $ECHO_C" >&6
14463 else
14464
14465 if test "$cross_compiling" = yes; then
14466   cf_cv_func_nanosleep=unknown
14467 else
14468   cat >conftest.$ac_ext <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14471
14472 #include <stdio.h>
14473 #include <errno.h>
14474 #include <time.h>
14475
14476 #ifdef HAVE_SYS_TIME_H
14477 #include <sys/time.h>
14478 #endif
14479
14480 int main() {
14481         struct timespec ts1, ts2;
14482         int code;
14483         ts1.tv_sec  = 0;
14484         ts1.tv_nsec = 750000000;
14485         ts2.tv_sec  = 0;
14486         ts2.tv_nsec = 0;
14487         errno = 0;
14488         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14489         ${cf_cv_main_return:-return}(code != 0);
14490 }
14491
14492 _ACEOF
14493 rm -f conftest$ac_exeext
14494 if { (eval echo "$as_me:14494: \"$ac_link\"") >&5
14495   (eval $ac_link) 2>&5
14496   ac_status=$?
14497   echo "$as_me:14497: \$? = $ac_status" >&5
14498   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14499   { (eval echo "$as_me:14499: \"$ac_try\"") >&5
14500   (eval $ac_try) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); }; }; then
14504   cf_cv_func_nanosleep=yes
14505 else
14506   echo "$as_me: program exited with status $ac_status" >&5
14507 echo "$as_me: failed program was:" >&5
14508 cat conftest.$ac_ext >&5
14509 cf_cv_func_nanosleep=no
14510 fi
14511 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14512 fi
14513 fi
14514 echo "$as_me:14514: result: $cf_cv_func_nanosleep" >&5
14515 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14516
14517 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14518 #define HAVE_NANOSLEEP 1
14519 EOF
14520
14521 for ac_header in \
14522 termio.h \
14523 termios.h \
14524 unistd.h \
14525
14526 do
14527 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14528 echo "$as_me:14528: checking for $ac_header" >&5
14529 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14530 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14531   echo $ECHO_N "(cached) $ECHO_C" >&6
14532 else
14533   cat >conftest.$ac_ext <<_ACEOF
14534 #line 14534 "configure"
14535 #include "confdefs.h"
14536 #include <$ac_header>
14537 _ACEOF
14538 if { (eval echo "$as_me:14538: \"$ac_cpp conftest.$ac_ext\"") >&5
14539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14540   ac_status=$?
14541   egrep -v '^ *\+' conftest.er1 >conftest.err
14542   rm -f conftest.er1
14543   cat conftest.err >&5
14544   echo "$as_me:14544: \$? = $ac_status" >&5
14545   (exit $ac_status); } >/dev/null; then
14546   if test -s conftest.err; then
14547     ac_cpp_err=$ac_c_preproc_warn_flag
14548   else
14549     ac_cpp_err=
14550   fi
14551 else
14552   ac_cpp_err=yes
14553 fi
14554 if test -z "$ac_cpp_err"; then
14555   eval "$as_ac_Header=yes"
14556 else
14557   echo "$as_me: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   eval "$as_ac_Header=no"
14560 fi
14561 rm -f conftest.err conftest.$ac_ext
14562 fi
14563 echo "$as_me:14563: result: `eval echo '${'$as_ac_Header'}'`" >&5
14564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14566   cat >>confdefs.h <<EOF
14567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14568 EOF
14569
14570 fi
14571 done
14572
14573 if test "$ISC" = yes ; then
14574
14575 for ac_header in sys/termio.h
14576 do
14577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14578 echo "$as_me:14578: checking for $ac_header" >&5
14579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14581   echo $ECHO_N "(cached) $ECHO_C" >&6
14582 else
14583   cat >conftest.$ac_ext <<_ACEOF
14584 #line 14584 "configure"
14585 #include "confdefs.h"
14586 #include <$ac_header>
14587 _ACEOF
14588 if { (eval echo "$as_me:14588: \"$ac_cpp conftest.$ac_ext\"") >&5
14589   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14590   ac_status=$?
14591   egrep -v '^ *\+' conftest.er1 >conftest.err
14592   rm -f conftest.er1
14593   cat conftest.err >&5
14594   echo "$as_me:14594: \$? = $ac_status" >&5
14595   (exit $ac_status); } >/dev/null; then
14596   if test -s conftest.err; then
14597     ac_cpp_err=$ac_c_preproc_warn_flag
14598   else
14599     ac_cpp_err=
14600   fi
14601 else
14602   ac_cpp_err=yes
14603 fi
14604 if test -z "$ac_cpp_err"; then
14605   eval "$as_ac_Header=yes"
14606 else
14607   echo "$as_me: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   eval "$as_ac_Header=no"
14610 fi
14611 rm -f conftest.err conftest.$ac_ext
14612 fi
14613 echo "$as_me:14613: result: `eval echo '${'$as_ac_Header'}'`" >&5
14614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14616   cat >>confdefs.h <<EOF
14617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14618 EOF
14619
14620 fi
14621 done
14622
14623 fi
14624 if test "$ac_cv_header_termios_h" = yes ; then
14625         case "$CFLAGS $CPPFLAGS" in
14626         *-D_POSIX_SOURCE*)
14627                 termios_bad=dunno ;;
14628         *)      termios_bad=maybe ;;
14629         esac
14630         if test "$termios_bad" = maybe ; then
14631         echo "$as_me:14631: checking whether termios.h needs _POSIX_SOURCE" >&5
14632 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14633         cat >conftest.$ac_ext <<_ACEOF
14634 #line 14634 "configure"
14635 #include "confdefs.h"
14636 #include <termios.h>
14637 int
14638 main ()
14639 {
14640 struct termios foo; int x = foo.c_iflag
14641   ;
14642   return 0;
14643 }
14644 _ACEOF
14645 rm -f conftest.$ac_objext
14646 if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
14647   (eval $ac_compile) 2>&5
14648   ac_status=$?
14649   echo "$as_me:14649: \$? = $ac_status" >&5
14650   (exit $ac_status); } &&
14651          { ac_try='test -s conftest.$ac_objext'
14652   { (eval echo "$as_me:14652: \"$ac_try\"") >&5
14653   (eval $ac_try) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); }; }; then
14657   termios_bad=no
14658 else
14659   echo "$as_me: failed program was:" >&5
14660 cat conftest.$ac_ext >&5
14661
14662                 cat >conftest.$ac_ext <<_ACEOF
14663 #line 14663 "configure"
14664 #include "confdefs.h"
14665
14666 #define _POSIX_SOURCE
14667 #include <termios.h>
14668 int
14669 main ()
14670 {
14671 struct termios foo; int x = foo.c_iflag
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   termios_bad=unknown
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat conftest.$ac_ext >&5
14692 termios_bad=yes cat >>confdefs.h <<\EOF
14693 #define SVR4_TERMIO 1
14694 EOF
14695
14696 fi
14697 rm -f conftest.$ac_objext conftest.$ac_ext
14698
14699 fi
14700 rm -f conftest.$ac_objext conftest.$ac_ext
14701         echo "$as_me:14701: result: $termios_bad" >&5
14702 echo "${ECHO_T}$termios_bad" >&6
14703         fi
14704 fi
14705
14706 echo "$as_me:14706: checking for tcgetattr" >&5
14707 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14708 if test "${cf_cv_have_tcgetattr+set}" = set; then
14709   echo $ECHO_N "(cached) $ECHO_C" >&6
14710 else
14711
14712 cat >conftest.$ac_ext <<_ACEOF
14713 #line 14713 "configure"
14714 #include "confdefs.h"
14715
14716 #include <sys/types.h>
14717 #ifdef HAVE_UNISTD_H
14718 #include <unistd.h>
14719 #endif
14720 #ifdef HAVE_TERMIOS_H
14721 #include <termios.h>
14722 #define TTY struct termios
14723 #else
14724 #ifdef HAVE_TERMIO_H
14725 #include <termio.h>
14726 #define TTY struct termio
14727 #endif
14728 #endif
14729
14730 int
14731 main ()
14732 {
14733
14734 TTY foo;
14735 tcgetattr(1, &foo);
14736   ;
14737   return 0;
14738 }
14739 _ACEOF
14740 rm -f conftest.$ac_objext conftest$ac_exeext
14741 if { (eval echo "$as_me:14741: \"$ac_link\"") >&5
14742   (eval $ac_link) 2>&5
14743   ac_status=$?
14744   echo "$as_me:14744: \$? = $ac_status" >&5
14745   (exit $ac_status); } &&
14746          { ac_try='test -s conftest$ac_exeext'
14747   { (eval echo "$as_me:14747: \"$ac_try\"") >&5
14748   (eval $ac_try) 2>&5
14749   ac_status=$?
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit $ac_status); }; }; then
14752   cf_cv_have_tcgetattr=yes
14753 else
14754   echo "$as_me: failed program was:" >&5
14755 cat conftest.$ac_ext >&5
14756 cf_cv_have_tcgetattr=no
14757 fi
14758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14759 fi
14760 echo "$as_me:14760: result: $cf_cv_have_tcgetattr" >&5
14761 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14762 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14763 #define HAVE_TCGETATTR 1
14764 EOF
14765
14766 echo "$as_me:14766: checking for vsscanf function or workaround" >&5
14767 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14768 if test "${cf_cv_func_vsscanf+set}" = set; then
14769   echo $ECHO_N "(cached) $ECHO_C" >&6
14770 else
14771
14772 cat >conftest.$ac_ext <<_ACEOF
14773 #line 14773 "configure"
14774 #include "confdefs.h"
14775
14776 #include <stdarg.h>
14777 #include <stdio.h>
14778 int
14779 main ()
14780 {
14781
14782         va_list ap;
14783         vsscanf("from", "%d", ap)
14784   ;
14785   return 0;
14786 }
14787 _ACEOF
14788 rm -f conftest.$ac_objext conftest$ac_exeext
14789 if { (eval echo "$as_me:14789: \"$ac_link\"") >&5
14790   (eval $ac_link) 2>&5
14791   ac_status=$?
14792   echo "$as_me:14792: \$? = $ac_status" >&5
14793   (exit $ac_status); } &&
14794          { ac_try='test -s conftest$ac_exeext'
14795   { (eval echo "$as_me:14795: \"$ac_try\"") >&5
14796   (eval $ac_try) 2>&5
14797   ac_status=$?
14798   echo "$as_me:14798: \$? = $ac_status" >&5
14799   (exit $ac_status); }; }; then
14800   cf_cv_func_vsscanf=vsscanf
14801 else
14802   echo "$as_me: failed program was:" >&5
14803 cat conftest.$ac_ext >&5
14804
14805 cat >conftest.$ac_ext <<_ACEOF
14806 #line 14806 "configure"
14807 #include "confdefs.h"
14808
14809 #include <stdarg.h>
14810 #include <stdio.h>
14811 int
14812 main ()
14813 {
14814
14815     FILE strbuf;
14816     char *str = "from";
14817
14818     strbuf._flag = _IOREAD;
14819     strbuf._ptr = strbuf._base = (unsigned char *) str;
14820     strbuf._cnt = strlen(str);
14821     strbuf._file = _NFILE;
14822     return (vfscanf(&strbuf, "%d", ap))
14823   ;
14824   return 0;
14825 }
14826 _ACEOF
14827 rm -f conftest.$ac_objext conftest$ac_exeext
14828 if { (eval echo "$as_me:14828: \"$ac_link\"") >&5
14829   (eval $ac_link) 2>&5
14830   ac_status=$?
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); } &&
14833          { ac_try='test -s conftest$ac_exeext'
14834   { (eval echo "$as_me:14834: \"$ac_try\"") >&5
14835   (eval $ac_try) 2>&5
14836   ac_status=$?
14837   echo "$as_me:14837: \$? = $ac_status" >&5
14838   (exit $ac_status); }; }; then
14839   cf_cv_func_vsscanf=vfscanf
14840 else
14841   echo "$as_me: failed program was:" >&5
14842 cat conftest.$ac_ext >&5
14843
14844 cat >conftest.$ac_ext <<_ACEOF
14845 #line 14845 "configure"
14846 #include "confdefs.h"
14847
14848 #include <stdarg.h>
14849 #include <stdio.h>
14850 int
14851 main ()
14852 {
14853
14854     FILE strbuf;
14855     char *str = "from";
14856
14857     strbuf._flag = _IOREAD;
14858     strbuf._ptr = strbuf._base = (unsigned char *) str;
14859     strbuf._cnt = strlen(str);
14860     strbuf._file = _NFILE;
14861     return (_doscan(&strbuf, "%d", ap))
14862   ;
14863   return 0;
14864 }
14865 _ACEOF
14866 rm -f conftest.$ac_objext conftest$ac_exeext
14867 if { (eval echo "$as_me:14867: \"$ac_link\"") >&5
14868   (eval $ac_link) 2>&5
14869   ac_status=$?
14870   echo "$as_me:14870: \$? = $ac_status" >&5
14871   (exit $ac_status); } &&
14872          { ac_try='test -s conftest$ac_exeext'
14873   { (eval echo "$as_me:14873: \"$ac_try\"") >&5
14874   (eval $ac_try) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); }; }; then
14878   cf_cv_func_vsscanf=_doscan
14879 else
14880   echo "$as_me: failed program was:" >&5
14881 cat conftest.$ac_ext >&5
14882
14883 cf_cv_func_vsscanf=no
14884 fi
14885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14886 fi
14887 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14888 fi
14889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14890 fi
14891 echo "$as_me:14891: result: $cf_cv_func_vsscanf" >&5
14892 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14893
14894 case $cf_cv_func_vsscanf in #(vi
14895 vsscanf) cat >>confdefs.h <<\EOF
14896 #define HAVE_VSSCANF 1
14897 EOF
14898 ;; #(vi
14899 vfscanf) cat >>confdefs.h <<\EOF
14900 #define HAVE_VFSCANF 1
14901 EOF
14902 ;; #(vi
14903 _doscan) cat >>confdefs.h <<\EOF
14904 #define HAVE__DOSCAN 1
14905 EOF
14906 ;;
14907 esac
14908
14909 echo "$as_me:14909: checking for working mkstemp" >&5
14910 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14911 if test "${cf_cv_func_mkstemp+set}" = set; then
14912   echo $ECHO_N "(cached) $ECHO_C" >&6
14913 else
14914
14915 rm -f conftest*
14916 if test "$cross_compiling" = yes; then
14917   echo "$as_me:14917: checking for mkstemp" >&5
14918 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14919 if test "${ac_cv_func_mkstemp+set}" = set; then
14920   echo $ECHO_N "(cached) $ECHO_C" >&6
14921 else
14922   cat >conftest.$ac_ext <<_ACEOF
14923 #line 14923 "configure"
14924 #include "confdefs.h"
14925 /* System header to define __stub macros and hopefully few prototypes,
14926     which can conflict with char mkstemp (); below.  */
14927 #include <assert.h>
14928 /* Override any gcc2 internal prototype to avoid an error.  */
14929 #ifdef __cplusplus
14930 extern "C"
14931 #endif
14932 /* We use char because int might match the return type of a gcc2
14933    builtin and then its argument prototype would still apply.  */
14934 char mkstemp ();
14935 char (*f) ();
14936
14937 int
14938 main ()
14939 {
14940 /* The GNU C library defines this for functions which it implements
14941     to always fail with ENOSYS.  Some functions are actually named
14942     something starting with __ and the normal name is an alias.  */
14943 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14944 choke me
14945 #else
14946 f = mkstemp;
14947 #endif
14948
14949   ;
14950   return 0;
14951 }
14952 _ACEOF
14953 rm -f conftest.$ac_objext conftest$ac_exeext
14954 if { (eval echo "$as_me:14954: \"$ac_link\"") >&5
14955   (eval $ac_link) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); } &&
14959          { ac_try='test -s conftest$ac_exeext'
14960   { (eval echo "$as_me:14960: \"$ac_try\"") >&5
14961   (eval $ac_try) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit $ac_status); }; }; then
14965   ac_cv_func_mkstemp=yes
14966 else
14967   echo "$as_me: failed program was:" >&5
14968 cat conftest.$ac_ext >&5
14969 ac_cv_func_mkstemp=no
14970 fi
14971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14972 fi
14973 echo "$as_me:14973: result: $ac_cv_func_mkstemp" >&5
14974 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14975
14976 else
14977   cat >conftest.$ac_ext <<_ACEOF
14978 #line 14978 "configure"
14979 #include "confdefs.h"
14980
14981 #include <sys/types.h>
14982 #include <stdlib.h>
14983 #include <stdio.h>
14984 #include <string.h>
14985 #include <sys/stat.h>
14986 int main()
14987 {
14988         char *tmpl = "conftestXXXXXX";
14989         char name[2][80];
14990         int n;
14991         int result = 0;
14992         int fd;
14993         struct stat sb;
14994
14995         umask(077);
14996         for (n = 0; n < 2; ++n) {
14997                 strcpy(name[n], tmpl);
14998                 if ((fd = mkstemp(name[n])) >= 0) {
14999                         if (!strcmp(name[n], tmpl)
15000                          || stat(name[n], &sb) != 0
15001                          || (sb.st_mode & S_IFMT) != S_IFREG
15002                          || (sb.st_mode & 077) != 0) {
15003                                 result = 1;
15004                         }
15005                         close(fd);
15006                 }
15007         }
15008         if (result == 0
15009          && !strcmp(name[0], name[1]))
15010                 result = 1;
15011         ${cf_cv_main_return:-return}(result);
15012 }
15013
15014 _ACEOF
15015 rm -f conftest$ac_exeext
15016 if { (eval echo "$as_me:15016: \"$ac_link\"") >&5
15017   (eval $ac_link) 2>&5
15018   ac_status=$?
15019   echo "$as_me:15019: \$? = $ac_status" >&5
15020   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15021   { (eval echo "$as_me:15021: \"$ac_try\"") >&5
15022   (eval $ac_try) 2>&5
15023   ac_status=$?
15024   echo "$as_me:15024: \$? = $ac_status" >&5
15025   (exit $ac_status); }; }; then
15026   cf_cv_func_mkstemp=yes
15027
15028 else
15029   echo "$as_me: program exited with status $ac_status" >&5
15030 echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 cf_cv_func_mkstemp=no
15033
15034 fi
15035 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15036 fi
15037
15038 fi
15039 echo "$as_me:15039: result: $cf_cv_func_mkstemp" >&5
15040 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15041 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15042         cat >>confdefs.h <<\EOF
15043 #define HAVE_MKSTEMP 1
15044 EOF
15045
15046 fi
15047
15048 # setup for prototype of fallback for vsscanf()
15049
15050 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15051         HAVE_VSSCANF=1
15052 else
15053         HAVE_VSSCANF=0
15054 fi
15055
15056 if test "$cross_compiling" = yes ; then
15057         { echo "$as_me:15057: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15058 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15059 else
15060         echo "$as_me:15060: checking whether setvbuf arguments are reversed" >&5
15061 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15062 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15063   echo $ECHO_N "(cached) $ECHO_C" >&6
15064 else
15065   if test "$cross_compiling" = yes; then
15066   { { echo "$as_me:15066: error: cannot run test program while cross compiling" >&5
15067 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15068    { (exit 1); exit 1; }; }
15069 else
15070   cat >conftest.$ac_ext <<_ACEOF
15071 #line 15071 "configure"
15072 #include "confdefs.h"
15073 #include <stdio.h>
15074 /* If setvbuf has the reversed format, exit 0. */
15075 int
15076 main ()
15077 {
15078   /* This call has the arguments reversed.
15079      A reversed system may check and see that the address of main
15080      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15081   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15082     $ac_main_return(1);
15083   putc('\r', stdout);
15084   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15085 }
15086 _ACEOF
15087 rm -f conftest$ac_exeext
15088 if { (eval echo "$as_me:15088: \"$ac_link\"") >&5
15089   (eval $ac_link) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15093   { (eval echo "$as_me:15093: \"$ac_try\"") >&5
15094   (eval $ac_try) 2>&5
15095   ac_status=$?
15096   echo "$as_me:15096: \$? = $ac_status" >&5
15097   (exit $ac_status); }; }; then
15098   ac_cv_func_setvbuf_reversed=yes
15099 else
15100   echo "$as_me: program exited with status $ac_status" >&5
15101 echo "$as_me: failed program was:" >&5
15102 cat conftest.$ac_ext >&5
15103 ac_cv_func_setvbuf_reversed=no
15104 fi
15105 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15106 fi
15107 rm -f core core.* *.core
15108 fi
15109 echo "$as_me:15109: result: $ac_cv_func_setvbuf_reversed" >&5
15110 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15111 if test $ac_cv_func_setvbuf_reversed = yes; then
15112
15113 cat >>confdefs.h <<\EOF
15114 #define SETVBUF_REVERSED 1
15115 EOF
15116
15117 fi
15118
15119 fi
15120 echo "$as_me:15120: checking return type of signal handlers" >&5
15121 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15122 if test "${ac_cv_type_signal+set}" = set; then
15123   echo $ECHO_N "(cached) $ECHO_C" >&6
15124 else
15125   cat >conftest.$ac_ext <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15128 #include <sys/types.h>
15129 #include <signal.h>
15130 #ifdef signal
15131 # undef signal
15132 #endif
15133 #ifdef __cplusplus
15134 extern "C" void (*signal (int, void (*)(int)))(int);
15135 #else
15136 void (*signal ()) ();
15137 #endif
15138
15139 int
15140 main ()
15141 {
15142 int i;
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f conftest.$ac_objext
15148 if { (eval echo "$as_me:15148: \"$ac_compile\"") >&5
15149   (eval $ac_compile) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } &&
15153          { ac_try='test -s conftest.$ac_objext'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); }; }; then
15159   ac_cv_type_signal=void
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15163 ac_cv_type_signal=int
15164 fi
15165 rm -f conftest.$ac_objext conftest.$ac_ext
15166 fi
15167 echo "$as_me:15167: result: $ac_cv_type_signal" >&5
15168 echo "${ECHO_T}$ac_cv_type_signal" >&6
15169
15170 cat >>confdefs.h <<EOF
15171 #define RETSIGTYPE $ac_cv_type_signal
15172 EOF
15173
15174 echo "$as_me:15174: checking for type sigaction_t" >&5
15175 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15176 if test "${cf_cv_type_sigaction+set}" = set; then
15177   echo $ECHO_N "(cached) $ECHO_C" >&6
15178 else
15179
15180         cat >conftest.$ac_ext <<_ACEOF
15181 #line 15181 "configure"
15182 #include "confdefs.h"
15183
15184 #include <signal.h>
15185 int
15186 main ()
15187 {
15188 sigaction_t x
15189   ;
15190   return 0;
15191 }
15192 _ACEOF
15193 rm -f conftest.$ac_objext
15194 if { (eval echo "$as_me:15194: \"$ac_compile\"") >&5
15195   (eval $ac_compile) 2>&5
15196   ac_status=$?
15197   echo "$as_me:15197: \$? = $ac_status" >&5
15198   (exit $ac_status); } &&
15199          { ac_try='test -s conftest.$ac_objext'
15200   { (eval echo "$as_me:15200: \"$ac_try\"") >&5
15201   (eval $ac_try) 2>&5
15202   ac_status=$?
15203   echo "$as_me:15203: \$? = $ac_status" >&5
15204   (exit $ac_status); }; }; then
15205   cf_cv_type_sigaction=yes
15206 else
15207   echo "$as_me: failed program was:" >&5
15208 cat conftest.$ac_ext >&5
15209 cf_cv_type_sigaction=no
15210 fi
15211 rm -f conftest.$ac_objext conftest.$ac_ext
15212 fi
15213
15214 echo "$as_me:15214: result: $cf_cv_type_sigaction" >&5
15215 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15216 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15217 #define HAVE_TYPE_SIGACTION 1
15218 EOF
15219
15220 echo "$as_me:15220: checking declaration of size-change" >&5
15221 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15222 if test "${cf_cv_sizechange+set}" = set; then
15223   echo $ECHO_N "(cached) $ECHO_C" >&6
15224 else
15225
15226     cf_cv_sizechange=unknown
15227     cf_save_CPPFLAGS="$CPPFLAGS"
15228
15229 for cf_opts in "" "NEED_PTEM_H"
15230 do
15231
15232     CPPFLAGS="$cf_save_CPPFLAGS"
15233     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15234     cat >conftest.$ac_ext <<_ACEOF
15235 #line 15235 "configure"
15236 #include "confdefs.h"
15237 #include <sys/types.h>
15238 #ifdef HAVE_TERMIOS_H
15239 #include <termios.h>
15240 #else
15241 #ifdef HAVE_TERMIO_H
15242 #include <termio.h>
15243 #endif
15244 #endif
15245 #ifdef NEED_PTEM_H
15246 /* This is a workaround for SCO:  they neglected to define struct winsize in
15247  * termios.h -- it's only in termio.h and ptem.h
15248  */
15249 #include        <sys/stream.h>
15250 #include        <sys/ptem.h>
15251 #endif
15252 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15253 #include <sys/ioctl.h>
15254 #endif
15255
15256 int
15257 main ()
15258 {
15259
15260 #ifdef TIOCGSIZE
15261         struct ttysize win;     /* FIXME: what system is this? */
15262         int y = win.ts_lines;
15263         int x = win.ts_cols;
15264 #else
15265 #ifdef TIOCGWINSZ
15266         struct winsize win;
15267         int y = win.ws_row;
15268         int x = win.ws_col;
15269 #else
15270         no TIOCGSIZE or TIOCGWINSZ
15271 #endif /* TIOCGWINSZ */
15272 #endif /* TIOCGSIZE */
15273
15274   ;
15275   return 0;
15276 }
15277 _ACEOF
15278 rm -f conftest.$ac_objext
15279 if { (eval echo "$as_me:15279: \"$ac_compile\"") >&5
15280   (eval $ac_compile) 2>&5
15281   ac_status=$?
15282   echo "$as_me:15282: \$? = $ac_status" >&5
15283   (exit $ac_status); } &&
15284          { ac_try='test -s conftest.$ac_objext'
15285   { (eval echo "$as_me:15285: \"$ac_try\"") >&5
15286   (eval $ac_try) 2>&5
15287   ac_status=$?
15288   echo "$as_me:15288: \$? = $ac_status" >&5
15289   (exit $ac_status); }; }; then
15290   cf_cv_sizechange=yes
15291 else
15292   echo "$as_me: failed program was:" >&5
15293 cat conftest.$ac_ext >&5
15294 cf_cv_sizechange=no
15295 fi
15296 rm -f conftest.$ac_objext conftest.$ac_ext
15297
15298         CPPFLAGS="$cf_save_CPPFLAGS"
15299         if test "$cf_cv_sizechange" = yes ; then
15300                 echo "size-change succeeded ($cf_opts)" >&5
15301                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15302                 break
15303         fi
15304 done
15305
15306 fi
15307 echo "$as_me:15307: result: $cf_cv_sizechange" >&5
15308 echo "${ECHO_T}$cf_cv_sizechange" >&6
15309 if test "$cf_cv_sizechange" != no ; then
15310         cat >>confdefs.h <<\EOF
15311 #define HAVE_SIZECHANGE 1
15312 EOF
15313
15314         case $cf_cv_sizechange in #(vi
15315         NEED*)
15316                 cat >>confdefs.h <<EOF
15317 #define $cf_cv_sizechange  1
15318 EOF
15319
15320                 ;;
15321         esac
15322 fi
15323
15324 echo "$as_me:15324: checking for memmove" >&5
15325 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15326 if test "${ac_cv_func_memmove+set}" = set; then
15327   echo $ECHO_N "(cached) $ECHO_C" >&6
15328 else
15329   cat >conftest.$ac_ext <<_ACEOF
15330 #line 15330 "configure"
15331 #include "confdefs.h"
15332 /* System header to define __stub macros and hopefully few prototypes,
15333     which can conflict with char memmove (); below.  */
15334 #include <assert.h>
15335 /* Override any gcc2 internal prototype to avoid an error.  */
15336 #ifdef __cplusplus
15337 extern "C"
15338 #endif
15339 /* We use char because int might match the return type of a gcc2
15340    builtin and then its argument prototype would still apply.  */
15341 char memmove ();
15342 char (*f) ();
15343
15344 int
15345 main ()
15346 {
15347 /* The GNU C library defines this for functions which it implements
15348     to always fail with ENOSYS.  Some functions are actually named
15349     something starting with __ and the normal name is an alias.  */
15350 #if defined (__stub_memmove) || defined (__stub___memmove)
15351 choke me
15352 #else
15353 f = memmove;
15354 #endif
15355
15356   ;
15357   return 0;
15358 }
15359 _ACEOF
15360 rm -f conftest.$ac_objext conftest$ac_exeext
15361 if { (eval echo "$as_me:15361: \"$ac_link\"") >&5
15362   (eval $ac_link) 2>&5
15363   ac_status=$?
15364   echo "$as_me:15364: \$? = $ac_status" >&5
15365   (exit $ac_status); } &&
15366          { ac_try='test -s conftest$ac_exeext'
15367   { (eval echo "$as_me:15367: \"$ac_try\"") >&5
15368   (eval $ac_try) 2>&5
15369   ac_status=$?
15370   echo "$as_me:15370: \$? = $ac_status" >&5
15371   (exit $ac_status); }; }; then
15372   ac_cv_func_memmove=yes
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 ac_cv_func_memmove=no
15377 fi
15378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15379 fi
15380 echo "$as_me:15380: result: $ac_cv_func_memmove" >&5
15381 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15382 if test $ac_cv_func_memmove = yes; then
15383   :
15384 else
15385
15386 echo "$as_me:15386: checking for bcopy" >&5
15387 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15388 if test "${ac_cv_func_bcopy+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   cat >conftest.$ac_ext <<_ACEOF
15392 #line 15392 "configure"
15393 #include "confdefs.h"
15394 /* System header to define __stub macros and hopefully few prototypes,
15395     which can conflict with char bcopy (); below.  */
15396 #include <assert.h>
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 #ifdef __cplusplus
15399 extern "C"
15400 #endif
15401 /* We use char because int might match the return type of a gcc2
15402    builtin and then its argument prototype would still apply.  */
15403 char bcopy ();
15404 char (*f) ();
15405
15406 int
15407 main ()
15408 {
15409 /* The GNU C library defines this for functions which it implements
15410     to always fail with ENOSYS.  Some functions are actually named
15411     something starting with __ and the normal name is an alias.  */
15412 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15413 choke me
15414 #else
15415 f = bcopy;
15416 #endif
15417
15418   ;
15419   return 0;
15420 }
15421 _ACEOF
15422 rm -f conftest.$ac_objext conftest$ac_exeext
15423 if { (eval echo "$as_me:15423: \"$ac_link\"") >&5
15424   (eval $ac_link) 2>&5
15425   ac_status=$?
15426   echo "$as_me:15426: \$? = $ac_status" >&5
15427   (exit $ac_status); } &&
15428          { ac_try='test -s conftest$ac_exeext'
15429   { (eval echo "$as_me:15429: \"$ac_try\"") >&5
15430   (eval $ac_try) 2>&5
15431   ac_status=$?
15432   echo "$as_me:15432: \$? = $ac_status" >&5
15433   (exit $ac_status); }; }; then
15434   ac_cv_func_bcopy=yes
15435 else
15436   echo "$as_me: failed program was:" >&5
15437 cat conftest.$ac_ext >&5
15438 ac_cv_func_bcopy=no
15439 fi
15440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15441 fi
15442 echo "$as_me:15442: result: $ac_cv_func_bcopy" >&5
15443 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15444 if test $ac_cv_func_bcopy = yes; then
15445
15446         echo "$as_me:15446: checking if bcopy does overlapping moves" >&5
15447 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15448 if test "${cf_cv_good_bcopy+set}" = set; then
15449   echo $ECHO_N "(cached) $ECHO_C" >&6
15450 else
15451
15452                 if test "$cross_compiling" = yes; then
15453   cf_cv_good_bcopy=unknown
15454 else
15455   cat >conftest.$ac_ext <<_ACEOF
15456 #line 15456 "configure"
15457 #include "confdefs.h"
15458
15459 int main() {
15460         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15461         char temp[40];
15462         bcopy(data, temp, sizeof(data));
15463         bcopy(temp+10, temp, 15);
15464         bcopy(temp+5, temp+15, 10);
15465         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15466 }
15467
15468 _ACEOF
15469 rm -f conftest$ac_exeext
15470 if { (eval echo "$as_me:15470: \"$ac_link\"") >&5
15471   (eval $ac_link) 2>&5
15472   ac_status=$?
15473   echo "$as_me:15473: \$? = $ac_status" >&5
15474   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15475   { (eval echo "$as_me:15475: \"$ac_try\"") >&5
15476   (eval $ac_try) 2>&5
15477   ac_status=$?
15478   echo "$as_me:15478: \$? = $ac_status" >&5
15479   (exit $ac_status); }; }; then
15480   cf_cv_good_bcopy=yes
15481 else
15482   echo "$as_me: program exited with status $ac_status" >&5
15483 echo "$as_me: failed program was:" >&5
15484 cat conftest.$ac_ext >&5
15485 cf_cv_good_bcopy=no
15486 fi
15487 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15488 fi
15489
15490 fi
15491 echo "$as_me:15491: result: $cf_cv_good_bcopy" >&5
15492 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15493
15494 else
15495   cf_cv_good_bcopy=no
15496 fi
15497
15498         if test "$cf_cv_good_bcopy" = yes ; then
15499                 cat >>confdefs.h <<\EOF
15500 #define USE_OK_BCOPY 1
15501 EOF
15502
15503         else
15504                 cat >>confdefs.h <<\EOF
15505 #define USE_MY_MEMMOVE 1
15506 EOF
15507
15508         fi
15509
15510 fi
15511
15512 echo "$as_me:15512: checking if poll really works" >&5
15513 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15514 if test "${cf_cv_working_poll+set}" = set; then
15515   echo $ECHO_N "(cached) $ECHO_C" >&6
15516 else
15517
15518 if test "$cross_compiling" = yes; then
15519   cf_cv_working_poll=unknown
15520 else
15521   cat >conftest.$ac_ext <<_ACEOF
15522 #line 15522 "configure"
15523 #include "confdefs.h"
15524
15525 #include <stdio.h>
15526 #ifdef HAVE_POLL_H
15527 #include <poll.h>
15528 #else
15529 #include <sys/poll.h>
15530 #endif
15531 int main() {
15532         struct pollfd myfds;
15533         int ret;
15534
15535         myfds.fd = 0;
15536         myfds.events = POLLIN;
15537
15538         ret = poll(&myfds, 1, 100);
15539         ${cf_cv_main_return:-return}(ret != 0);
15540 }
15541 _ACEOF
15542 rm -f conftest$ac_exeext
15543 if { (eval echo "$as_me:15543: \"$ac_link\"") >&5
15544   (eval $ac_link) 2>&5
15545   ac_status=$?
15546   echo "$as_me:15546: \$? = $ac_status" >&5
15547   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15548   { (eval echo "$as_me:15548: \"$ac_try\"") >&5
15549   (eval $ac_try) 2>&5
15550   ac_status=$?
15551   echo "$as_me:15551: \$? = $ac_status" >&5
15552   (exit $ac_status); }; }; then
15553   cf_cv_working_poll=yes
15554 else
15555   echo "$as_me: program exited with status $ac_status" >&5
15556 echo "$as_me: failed program was:" >&5
15557 cat conftest.$ac_ext >&5
15558 cf_cv_working_poll=no
15559 fi
15560 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15561 fi
15562 fi
15563 echo "$as_me:15563: result: $cf_cv_working_poll" >&5
15564 echo "${ECHO_T}$cf_cv_working_poll" >&6
15565 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15566 #define HAVE_WORKING_POLL 1
15567 EOF
15568
15569 echo "$as_me:15569: checking for va_copy" >&5
15570 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15571 if test "${cf_cv_have_va_copy+set}" = set; then
15572   echo $ECHO_N "(cached) $ECHO_C" >&6
15573 else
15574
15575 cat >conftest.$ac_ext <<_ACEOF
15576 #line 15576 "configure"
15577 #include "confdefs.h"
15578
15579 #include <stdarg.h>
15580
15581 int
15582 main ()
15583 {
15584
15585         static va_list dst;
15586         static va_list src;
15587         va_copy(dst, src)
15588   ;
15589   return 0;
15590 }
15591 _ACEOF
15592 rm -f conftest.$ac_objext conftest$ac_exeext
15593 if { (eval echo "$as_me:15593: \"$ac_link\"") >&5
15594   (eval $ac_link) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit $ac_status); } &&
15598          { ac_try='test -s conftest$ac_exeext'
15599   { (eval echo "$as_me:15599: \"$ac_try\"") >&5
15600   (eval $ac_try) 2>&5
15601   ac_status=$?
15602   echo "$as_me:15602: \$? = $ac_status" >&5
15603   (exit $ac_status); }; }; then
15604   cf_cv_have_va_copy=yes
15605 else
15606   echo "$as_me: failed program was:" >&5
15607 cat conftest.$ac_ext >&5
15608 cf_cv_have_va_copy=no
15609 fi
15610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15611 fi
15612 echo "$as_me:15612: result: $cf_cv_have_va_copy" >&5
15613 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15614
15615 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15616 #define HAVE_VA_COPY 1
15617 EOF
15618
15619 echo "$as_me:15619: checking for __va_copy" >&5
15620 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15621 if test "${cf_cv_have___va_copy+set}" = set; then
15622   echo $ECHO_N "(cached) $ECHO_C" >&6
15623 else
15624
15625 cat >conftest.$ac_ext <<_ACEOF
15626 #line 15626 "configure"
15627 #include "confdefs.h"
15628
15629 #include <stdarg.h>
15630
15631 int
15632 main ()
15633 {
15634
15635         static va_list dst;
15636         static va_list src;
15637         __va_copy(dst, src)
15638   ;
15639   return 0;
15640 }
15641 _ACEOF
15642 rm -f conftest.$ac_objext conftest$ac_exeext
15643 if { (eval echo "$as_me:15643: \"$ac_link\"") >&5
15644   (eval $ac_link) 2>&5
15645   ac_status=$?
15646   echo "$as_me:15646: \$? = $ac_status" >&5
15647   (exit $ac_status); } &&
15648          { ac_try='test -s conftest$ac_exeext'
15649   { (eval echo "$as_me:15649: \"$ac_try\"") >&5
15650   (eval $ac_try) 2>&5
15651   ac_status=$?
15652   echo "$as_me:15652: \$? = $ac_status" >&5
15653   (exit $ac_status); }; }; then
15654   cf_cv_have___va_copy=yes
15655 else
15656   echo "$as_me: failed program was:" >&5
15657 cat conftest.$ac_ext >&5
15658 cf_cv_have___va_copy=no
15659 fi
15660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15661 fi
15662 echo "$as_me:15662: result: $cf_cv_have___va_copy" >&5
15663 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15664
15665 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15666 #define HAVE___VA_COPY 1
15667 EOF
15668
15669 echo "$as_me:15669: checking for pid_t" >&5
15670 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15671 if test "${ac_cv_type_pid_t+set}" = set; then
15672   echo $ECHO_N "(cached) $ECHO_C" >&6
15673 else
15674   cat >conftest.$ac_ext <<_ACEOF
15675 #line 15675 "configure"
15676 #include "confdefs.h"
15677 $ac_includes_default
15678 int
15679 main ()
15680 {
15681 if ((pid_t *) 0)
15682   return 0;
15683 if (sizeof (pid_t))
15684   return 0;
15685   ;
15686   return 0;
15687 }
15688 _ACEOF
15689 rm -f conftest.$ac_objext
15690 if { (eval echo "$as_me:15690: \"$ac_compile\"") >&5
15691   (eval $ac_compile) 2>&5
15692   ac_status=$?
15693   echo "$as_me:15693: \$? = $ac_status" >&5
15694   (exit $ac_status); } &&
15695          { ac_try='test -s conftest.$ac_objext'
15696   { (eval echo "$as_me:15696: \"$ac_try\"") >&5
15697   (eval $ac_try) 2>&5
15698   ac_status=$?
15699   echo "$as_me:15699: \$? = $ac_status" >&5
15700   (exit $ac_status); }; }; then
15701   ac_cv_type_pid_t=yes
15702 else
15703   echo "$as_me: failed program was:" >&5
15704 cat conftest.$ac_ext >&5
15705 ac_cv_type_pid_t=no
15706 fi
15707 rm -f conftest.$ac_objext conftest.$ac_ext
15708 fi
15709 echo "$as_me:15709: result: $ac_cv_type_pid_t" >&5
15710 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15711 if test $ac_cv_type_pid_t = yes; then
15712   :
15713 else
15714
15715 cat >>confdefs.h <<EOF
15716 #define pid_t int
15717 EOF
15718
15719 fi
15720
15721 for ac_header in unistd.h vfork.h
15722 do
15723 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15724 echo "$as_me:15724: checking for $ac_header" >&5
15725 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15727   echo $ECHO_N "(cached) $ECHO_C" >&6
15728 else
15729   cat >conftest.$ac_ext <<_ACEOF
15730 #line 15730 "configure"
15731 #include "confdefs.h"
15732 #include <$ac_header>
15733 _ACEOF
15734 if { (eval echo "$as_me:15734: \"$ac_cpp conftest.$ac_ext\"") >&5
15735   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15736   ac_status=$?
15737   egrep -v '^ *\+' conftest.er1 >conftest.err
15738   rm -f conftest.er1
15739   cat conftest.err >&5
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); } >/dev/null; then
15742   if test -s conftest.err; then
15743     ac_cpp_err=$ac_c_preproc_warn_flag
15744   else
15745     ac_cpp_err=
15746   fi
15747 else
15748   ac_cpp_err=yes
15749 fi
15750 if test -z "$ac_cpp_err"; then
15751   eval "$as_ac_Header=yes"
15752 else
15753   echo "$as_me: failed program was:" >&5
15754   cat conftest.$ac_ext >&5
15755   eval "$as_ac_Header=no"
15756 fi
15757 rm -f conftest.err conftest.$ac_ext
15758 fi
15759 echo "$as_me:15759: result: `eval echo '${'$as_ac_Header'}'`" >&5
15760 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15761 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15762   cat >>confdefs.h <<EOF
15763 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15764 EOF
15765
15766 fi
15767 done
15768
15769 for ac_func in fork vfork
15770 do
15771 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15772 echo "$as_me:15772: checking for $ac_func" >&5
15773 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15774 if eval "test \"\${$as_ac_var+set}\" = set"; then
15775   echo $ECHO_N "(cached) $ECHO_C" >&6
15776 else
15777   cat >conftest.$ac_ext <<_ACEOF
15778 #line 15778 "configure"
15779 #include "confdefs.h"
15780 /* System header to define __stub macros and hopefully few prototypes,
15781     which can conflict with char $ac_func (); below.  */
15782 #include <assert.h>
15783 /* Override any gcc2 internal prototype to avoid an error.  */
15784 #ifdef __cplusplus
15785 extern "C"
15786 #endif
15787 /* We use char because int might match the return type of a gcc2
15788    builtin and then its argument prototype would still apply.  */
15789 char $ac_func ();
15790 char (*f) ();
15791
15792 int
15793 main ()
15794 {
15795 /* The GNU C library defines this for functions which it implements
15796     to always fail with ENOSYS.  Some functions are actually named
15797     something starting with __ and the normal name is an alias.  */
15798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15799 choke me
15800 #else
15801 f = $ac_func;
15802 #endif
15803
15804   ;
15805   return 0;
15806 }
15807 _ACEOF
15808 rm -f conftest.$ac_objext conftest$ac_exeext
15809 if { (eval echo "$as_me:15809: \"$ac_link\"") >&5
15810   (eval $ac_link) 2>&5
15811   ac_status=$?
15812   echo "$as_me:15812: \$? = $ac_status" >&5
15813   (exit $ac_status); } &&
15814          { ac_try='test -s conftest$ac_exeext'
15815   { (eval echo "$as_me:15815: \"$ac_try\"") >&5
15816   (eval $ac_try) 2>&5
15817   ac_status=$?
15818   echo "$as_me:15818: \$? = $ac_status" >&5
15819   (exit $ac_status); }; }; then
15820   eval "$as_ac_var=yes"
15821 else
15822   echo "$as_me: failed program was:" >&5
15823 cat conftest.$ac_ext >&5
15824 eval "$as_ac_var=no"
15825 fi
15826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15827 fi
15828 echo "$as_me:15828: result: `eval echo '${'$as_ac_var'}'`" >&5
15829 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15830 if test `eval echo '${'$as_ac_var'}'` = yes; then
15831   cat >>confdefs.h <<EOF
15832 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15833 EOF
15834
15835 fi
15836 done
15837
15838 ac_cv_func_fork_works=$ac_cv_func_fork
15839 if test "x$ac_cv_func_fork" = xyes; then
15840   echo "$as_me:15840: checking for working fork" >&5
15841 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15842 if test "${ac_cv_func_fork_works+set}" = set; then
15843   echo $ECHO_N "(cached) $ECHO_C" >&6
15844 else
15845   if test "$cross_compiling" = yes; then
15846   ac_cv_func_fork_works=cross
15847 else
15848   cat >conftest.$ac_ext <<_ACEOF
15849 /* By Rüdiger Kuhlmann. */
15850       #include <sys/types.h>
15851       #if HAVE_UNISTD_H
15852       # include <unistd.h>
15853       #endif
15854       /* Some systems only have a dummy stub for fork() */
15855       int main ()
15856       {
15857         if (fork() < 0)
15858           $ac_main_return (1);
15859         $ac_main_return (0);
15860       }
15861 _ACEOF
15862 rm -f conftest$ac_exeext
15863 if { (eval echo "$as_me:15863: \"$ac_link\"") >&5
15864   (eval $ac_link) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15868   { (eval echo "$as_me:15868: \"$ac_try\"") >&5
15869   (eval $ac_try) 2>&5
15870   ac_status=$?
15871   echo "$as_me:15871: \$? = $ac_status" >&5
15872   (exit $ac_status); }; }; then
15873   ac_cv_func_fork_works=yes
15874 else
15875   echo "$as_me: program exited with status $ac_status" >&5
15876 echo "$as_me: failed program was:" >&5
15877 cat conftest.$ac_ext >&5
15878 ac_cv_func_fork_works=no
15879 fi
15880 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15881 fi
15882 fi
15883 echo "$as_me:15883: result: $ac_cv_func_fork_works" >&5
15884 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15885
15886 fi
15887 if test "x$ac_cv_func_fork_works" = xcross; then
15888   case $host in
15889     *-*-amigaos* | *-*-msdosdjgpp*)
15890       # Override, as these systems have only a dummy fork() stub
15891       ac_cv_func_fork_works=no
15892       ;;
15893     *)
15894       ac_cv_func_fork_works=yes
15895       ;;
15896   esac
15897   { echo "$as_me:15897: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15898 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15899 fi
15900 ac_cv_func_vfork_works=$ac_cv_func_vfork
15901 if test "x$ac_cv_func_vfork" = xyes; then
15902   echo "$as_me:15902: checking for working vfork" >&5
15903 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15904 if test "${ac_cv_func_vfork_works+set}" = set; then
15905   echo $ECHO_N "(cached) $ECHO_C" >&6
15906 else
15907   if test "$cross_compiling" = yes; then
15908   ac_cv_func_vfork_works=cross
15909 else
15910   cat >conftest.$ac_ext <<_ACEOF
15911 #line 15911 "configure"
15912 #include "confdefs.h"
15913 /* Thanks to Paul Eggert for this test.  */
15914 #include <stdio.h>
15915 #include <sys/types.h>
15916 #include <sys/stat.h>
15917 #if HAVE_UNISTD_H
15918 # include <unistd.h>
15919 #endif
15920 #if HAVE_VFORK_H
15921 # include <vfork.h>
15922 #endif
15923 /* On some sparc systems, changes by the child to local and incoming
15924    argument registers are propagated back to the parent.  The compiler
15925    is told about this with #include <vfork.h>, but some compilers
15926    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15927    static variable whose address is put into a register that is
15928    clobbered by the vfork.  */
15929 static
15930 #ifdef __cplusplus
15931 sparc_address_test (int arg)
15932 # else
15933 sparc_address_test (arg) int arg;
15934 #endif
15935 {
15936   static pid_t child;
15937   if (!child) {
15938     child = vfork ();
15939     if (child < 0) {
15940       perror ("vfork");
15941       _exit(2);
15942     }
15943     if (!child) {
15944       arg = getpid();
15945       write(-1, "", 0);
15946       _exit (arg);
15947     }
15948   }
15949 }
15950
15951 int
15952 main ()
15953 {
15954   pid_t parent = getpid ();
15955   pid_t child;
15956
15957   sparc_address_test ();
15958
15959   child = vfork ();
15960
15961   if (child == 0) {
15962     /* Here is another test for sparc vfork register problems.  This
15963        test uses lots of local variables, at least as many local
15964        variables as main has allocated so far including compiler
15965        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15966        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15967        reuse the register of parent for one of the local variables,
15968        since it will think that parent can't possibly be used any more
15969        in this routine.  Assigning to the local variable will thus
15970        munge parent in the parent process.  */
15971     pid_t
15972       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15973       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15974     /* Convince the compiler that p..p7 are live; otherwise, it might
15975        use the same hardware register for all 8 local variables.  */
15976     if (p != p1 || p != p2 || p != p3 || p != p4
15977         || p != p5 || p != p6 || p != p7)
15978       _exit(1);
15979
15980     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15981        from child file descriptors.  If the child closes a descriptor
15982        before it execs or exits, this munges the parent's descriptor
15983        as well.  Test for this by closing stdout in the child.  */
15984     _exit(close(fileno(stdout)) != 0);
15985   } else {
15986     int status;
15987     struct stat st;
15988
15989     while (wait(&status) != child)
15990       ;
15991     $ac_main_return(
15992          /* Was there some problem with vforking?  */
15993          child < 0
15994
15995          /* Did the child fail?  (This shouldn't happen.)  */
15996          || status
15997
15998          /* Did the vfork/compiler bug occur?  */
15999          || parent != getpid()
16000
16001          /* Did the file descriptor bug occur?  */
16002          || fstat(fileno(stdout), &st) != 0
16003          );
16004   }
16005 }
16006 _ACEOF
16007 rm -f 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); } && { ac_try='./conftest$ac_exeext'
16013   { (eval echo "$as_me:16013: \"$ac_try\"") >&5
16014   (eval $ac_try) 2>&5
16015   ac_status=$?
16016   echo "$as_me:16016: \$? = $ac_status" >&5
16017   (exit $ac_status); }; }; then
16018   ac_cv_func_vfork_works=yes
16019 else
16020   echo "$as_me: program exited with status $ac_status" >&5
16021 echo "$as_me: failed program was:" >&5
16022 cat conftest.$ac_ext >&5
16023 ac_cv_func_vfork_works=no
16024 fi
16025 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16026 fi
16027 fi
16028 echo "$as_me:16028: result: $ac_cv_func_vfork_works" >&5
16029 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16030
16031 fi;
16032 if test "x$ac_cv_func_fork_works" = xcross; then
16033   ac_cv_func_vfork_works=ac_cv_func_vfork
16034   { echo "$as_me:16034: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16035 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16036 fi
16037
16038 if test "x$ac_cv_func_vfork_works" = xyes; then
16039
16040 cat >>confdefs.h <<\EOF
16041 #define HAVE_WORKING_VFORK 1
16042 EOF
16043
16044 else
16045
16046 cat >>confdefs.h <<\EOF
16047 #define vfork fork
16048 EOF
16049
16050 fi
16051 if test "x$ac_cv_func_fork_works" = xyes; then
16052
16053 cat >>confdefs.h <<\EOF
16054 #define HAVE_WORKING_FORK 1
16055 EOF
16056
16057 fi
16058
16059 # special check for test/ditto.c
16060
16061 echo "$as_me:16061: checking for openpty in -lutil" >&5
16062 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16063 if test "${ac_cv_lib_util_openpty+set}" = set; then
16064   echo $ECHO_N "(cached) $ECHO_C" >&6
16065 else
16066   ac_check_lib_save_LIBS=$LIBS
16067 LIBS="-lutil  $LIBS"
16068 cat >conftest.$ac_ext <<_ACEOF
16069 #line 16069 "configure"
16070 #include "confdefs.h"
16071
16072 /* Override any gcc2 internal prototype to avoid an error.  */
16073 #ifdef __cplusplus
16074 extern "C"
16075 #endif
16076 /* We use char because int might match the return type of a gcc2
16077    builtin and then its argument prototype would still apply.  */
16078 char openpty ();
16079 int
16080 main ()
16081 {
16082 openpty ();
16083   ;
16084   return 0;
16085 }
16086 _ACEOF
16087 rm -f conftest.$ac_objext conftest$ac_exeext
16088 if { (eval echo "$as_me:16088: \"$ac_link\"") >&5
16089   (eval $ac_link) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); } &&
16093          { ac_try='test -s conftest$ac_exeext'
16094   { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095   (eval $ac_try) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); }; }; then
16099   ac_cv_lib_util_openpty=yes
16100 else
16101   echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16103 ac_cv_lib_util_openpty=no
16104 fi
16105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16106 LIBS=$ac_check_lib_save_LIBS
16107 fi
16108 echo "$as_me:16108: result: $ac_cv_lib_util_openpty" >&5
16109 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16110 if test $ac_cv_lib_util_openpty = yes; then
16111   cf_cv_lib_util=yes
16112 else
16113   cf_cv_lib_util=no
16114 fi
16115
16116 echo "$as_me:16116: checking for openpty header" >&5
16117 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16118 if test "${cf_cv_func_openpty+set}" = set; then
16119   echo $ECHO_N "(cached) $ECHO_C" >&6
16120 else
16121
16122     cf_save_LIBS="$LIBS"
16123     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16124     for cf_header in pty.h libutil.h util.h
16125     do
16126     cat >conftest.$ac_ext <<_ACEOF
16127 #line 16127 "configure"
16128 #include "confdefs.h"
16129
16130 #include <$cf_header>
16131
16132 int
16133 main ()
16134 {
16135
16136     int x = openpty((int *)0, (int *)0, (char *)0,
16137                    (struct termios *)0, (struct winsize *)0);
16138
16139   ;
16140   return 0;
16141 }
16142 _ACEOF
16143 rm -f conftest.$ac_objext conftest$ac_exeext
16144 if { (eval echo "$as_me:16144: \"$ac_link\"") >&5
16145   (eval $ac_link) 2>&5
16146   ac_status=$?
16147   echo "$as_me:16147: \$? = $ac_status" >&5
16148   (exit $ac_status); } &&
16149          { ac_try='test -s conftest$ac_exeext'
16150   { (eval echo "$as_me:16150: \"$ac_try\"") >&5
16151   (eval $ac_try) 2>&5
16152   ac_status=$?
16153   echo "$as_me:16153: \$? = $ac_status" >&5
16154   (exit $ac_status); }; }; then
16155
16156         cf_cv_func_openpty=$cf_header
16157         break
16158
16159 else
16160   echo "$as_me: failed program was:" >&5
16161 cat conftest.$ac_ext >&5
16162
16163         cf_cv_func_openpty=no
16164
16165 fi
16166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16167     done
16168     LIBS="$cf_save_LIBS"
16169
16170 fi
16171 echo "$as_me:16171: result: $cf_cv_func_openpty" >&5
16172 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16173
16174 if test "$cf_cv_func_openpty" != no ; then
16175     cat >>confdefs.h <<EOF
16176 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16177 EOF
16178
16179     cat >>confdefs.h <<\EOF
16180 #define USE_XTERM_PTY 1
16181 EOF
16182
16183     if test "$cf_cv_lib_util" = yes ; then
16184         TEST_LIBS="-lutil $TEST_LIBS"
16185     fi
16186 fi
16187
16188 if test "$with_hashed_db" != no ; then
16189         cat >>confdefs.h <<\EOF
16190 #define USE_HASHED_DB 1
16191 EOF
16192
16193 case $with_hashed_db in #(vi
16194 yes|*able*) #(vi
16195     ;;
16196 *)
16197     if test -d "$with_hashed_db" ; then
16198
16199 if test -n "$with_hashed_db/include" ; then
16200   for cf_add_incdir in $with_hashed_db/include
16201   do
16202         while test $cf_add_incdir != /usr/include
16203         do
16204           if test -d $cf_add_incdir
16205           then
16206                 cf_have_incdir=no
16207                 if test -n "$CFLAGS$CPPFLAGS" ; then
16208                   # a loop is needed to ensure we can add subdirs of existing dirs
16209                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16210                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16211                           cf_have_incdir=yes; break
16212                         fi
16213                   done
16214                 fi
16215
16216                 if test "$cf_have_incdir" = no ; then
16217                   if test "$cf_add_incdir" = /usr/local/include ; then
16218                         if test "$GCC" = yes
16219                         then
16220                           cf_save_CPPFLAGS=$CPPFLAGS
16221                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16222                           cat >conftest.$ac_ext <<_ACEOF
16223 #line 16223 "configure"
16224 #include "confdefs.h"
16225 #include <stdio.h>
16226 int
16227 main ()
16228 {
16229 printf("Hello")
16230   ;
16231   return 0;
16232 }
16233 _ACEOF
16234 rm -f conftest.$ac_objext
16235 if { (eval echo "$as_me:16235: \"$ac_compile\"") >&5
16236   (eval $ac_compile) 2>&5
16237   ac_status=$?
16238   echo "$as_me:16238: \$? = $ac_status" >&5
16239   (exit $ac_status); } &&
16240          { ac_try='test -s conftest.$ac_objext'
16241   { (eval echo "$as_me:16241: \"$ac_try\"") >&5
16242   (eval $ac_try) 2>&5
16243   ac_status=$?
16244   echo "$as_me:16244: \$? = $ac_status" >&5
16245   (exit $ac_status); }; }; then
16246   :
16247 else
16248   echo "$as_me: failed program was:" >&5
16249 cat conftest.$ac_ext >&5
16250 cf_have_incdir=yes
16251 fi
16252 rm -f conftest.$ac_objext conftest.$ac_ext
16253                           CPPFLAGS=$cf_save_CPPFLAGS
16254                         fi
16255                   fi
16256                 fi
16257
16258                 if test "$cf_have_incdir" = no ; then
16259                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16260
16261 echo "${as_me-configure}:16261: testing adding $cf_add_incdir to include-path ..." 1>&5
16262
16263                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16264
16265                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16266                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16267                   cf_add_incdir="$cf_top_incdir"
16268                 else
16269                   break
16270                 fi
16271           fi
16272         done
16273   done
16274 fi
16275
16276 if test -n "$with_hashed_db/lib" ; then
16277   for cf_add_libdir in $with_hashed_db/lib
16278   do
16279     if test $cf_add_libdir = /usr/lib ; then
16280       :
16281     elif test -d $cf_add_libdir
16282     then
16283       cf_have_libdir=no
16284       if test -n "$LDFLAGS$LIBS" ; then
16285         # a loop is needed to ensure we can add subdirs of existing dirs
16286         for cf_test_libdir in $LDFLAGS $LIBS ; do
16287           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16288             cf_have_libdir=yes; break
16289           fi
16290         done
16291       fi
16292       if test "$cf_have_libdir" = no ; then
16293         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16294
16295 echo "${as_me-configure}:16295: testing adding $cf_add_libdir to library-path ..." 1>&5
16296
16297         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16298       fi
16299     fi
16300   done
16301 fi
16302
16303     fi
16304 esac
16305
16306 echo "$as_me:16306: checking for db.h" >&5
16307 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16308 if test "${ac_cv_header_db_h+set}" = set; then
16309   echo $ECHO_N "(cached) $ECHO_C" >&6
16310 else
16311   cat >conftest.$ac_ext <<_ACEOF
16312 #line 16312 "configure"
16313 #include "confdefs.h"
16314 #include <db.h>
16315 _ACEOF
16316 if { (eval echo "$as_me:16316: \"$ac_cpp conftest.$ac_ext\"") >&5
16317   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16318   ac_status=$?
16319   egrep -v '^ *\+' conftest.er1 >conftest.err
16320   rm -f conftest.er1
16321   cat conftest.err >&5
16322   echo "$as_me:16322: \$? = $ac_status" >&5
16323   (exit $ac_status); } >/dev/null; then
16324   if test -s conftest.err; then
16325     ac_cpp_err=$ac_c_preproc_warn_flag
16326   else
16327     ac_cpp_err=
16328   fi
16329 else
16330   ac_cpp_err=yes
16331 fi
16332 if test -z "$ac_cpp_err"; then
16333   ac_cv_header_db_h=yes
16334 else
16335   echo "$as_me: failed program was:" >&5
16336   cat conftest.$ac_ext >&5
16337   ac_cv_header_db_h=no
16338 fi
16339 rm -f conftest.err conftest.$ac_ext
16340 fi
16341 echo "$as_me:16341: result: $ac_cv_header_db_h" >&5
16342 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16343 if test $ac_cv_header_db_h = yes; then
16344
16345 echo "$as_me:16345: checking for version of db" >&5
16346 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16347 if test "${cf_cv_hashed_db_version+set}" = set; then
16348   echo $ECHO_N "(cached) $ECHO_C" >&6
16349 else
16350
16351 cf_cv_hashed_db_version=unknown
16352
16353 for cf_db_version in 1 2 3 4 5
16354 do
16355
16356 echo "${as_me-configure}:16356: testing checking for db version $cf_db_version ..." 1>&5
16357
16358         cat >conftest.$ac_ext <<_ACEOF
16359 #line 16359 "configure"
16360 #include "confdefs.h"
16361
16362 $ac_includes_default
16363 #include <db.h>
16364
16365 #ifdef DB_VERSION_MAJOR
16366         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16367 #if $cf_db_version == DB_VERSION_MAJOR
16368         /* ok */
16369 #else
16370         make an error
16371 #endif
16372 #else
16373 #if $cf_db_version == 1
16374         /* ok: assuming this is DB 1.8.5 */
16375 #else
16376         make an error
16377 #endif
16378 #endif
16379
16380 int
16381 main ()
16382 {
16383 DBT *foo = 0
16384   ;
16385   return 0;
16386 }
16387 _ACEOF
16388 rm -f conftest.$ac_objext
16389 if { (eval echo "$as_me:16389: \"$ac_compile\"") >&5
16390   (eval $ac_compile) 2>&5
16391   ac_status=$?
16392   echo "$as_me:16392: \$? = $ac_status" >&5
16393   (exit $ac_status); } &&
16394          { ac_try='test -s conftest.$ac_objext'
16395   { (eval echo "$as_me:16395: \"$ac_try\"") >&5
16396   (eval $ac_try) 2>&5
16397   ac_status=$?
16398   echo "$as_me:16398: \$? = $ac_status" >&5
16399   (exit $ac_status); }; }; then
16400
16401         cf_cv_hashed_db_version=$cf_db_version
16402         break
16403
16404 else
16405   echo "$as_me: failed program was:" >&5
16406 cat conftest.$ac_ext >&5
16407 fi
16408 rm -f conftest.$ac_objext conftest.$ac_ext
16409 done
16410
16411 fi
16412 echo "$as_me:16412: result: $cf_cv_hashed_db_version" >&5
16413 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16414
16415 if test "$cf_cv_hashed_db_version" = unknown ; then
16416         { { echo "$as_me:16416: error: Cannot determine version of db" >&5
16417 echo "$as_me: error: Cannot determine version of db" >&2;}
16418    { (exit 1); exit 1; }; }
16419 else
16420
16421 echo "$as_me:16421: checking for db libraries" >&5
16422 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16423 if test "${cf_cv_hashed_db_libs+set}" = set; then
16424   echo $ECHO_N "(cached) $ECHO_C" >&6
16425 else
16426
16427 cf_cv_hashed_db_libs=unknown
16428 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16429 do
16430         cf_save_libs="$LIBS"
16431         if test -n "$cf_db_libs"; then
16432                 LIBS="-l$cf_db_libs $LIBS"
16433         fi
16434
16435 echo "${as_me-configure}:16435: testing checking for library "$cf_db_libs" ..." 1>&5
16436
16437         cat >conftest.$ac_ext <<_ACEOF
16438 #line 16438 "configure"
16439 #include "confdefs.h"
16440
16441 $ac_includes_default
16442 #include <db.h>
16443
16444 int
16445 main ()
16446 {
16447
16448         char *path = "/tmp/foo";
16449 #ifdef DB_VERSION_MAJOR
16450 #if DB_VERSION_MAJOR >= 4
16451         DB *result = 0;
16452         db_create(&result, NULL, 0);
16453         result->open(result,
16454                 NULL,
16455                 path,
16456                 path,
16457                 DB_HASH,
16458                 DB_CREATE,
16459                 0644);
16460 #elif DB_VERSION_MAJOR >= 3
16461         DB *result = 0;
16462         db_create(&result, NULL, 0);
16463         result->open(result,
16464                 path,
16465                 path,
16466                 DB_HASH,
16467                 DB_CREATE,
16468                 0644);
16469 #elif DB_VERSION_MAJOR >= 2
16470         DB *result = 0;
16471         db_open(path,
16472                 DB_HASH,
16473                 DB_CREATE,
16474                 0644,
16475                 (DB_ENV *) 0,
16476                 (DB_INFO *) 0,
16477                 &result);
16478 #endif /* DB_VERSION_MAJOR */
16479 #else
16480         DB *result = dbopen(path,
16481                      2,
16482                      0644,
16483                      DB_HASH,
16484                      0);
16485 #endif
16486         ${cf_cv_main_return:-return}(result != 0)
16487
16488   ;
16489   return 0;
16490 }
16491 _ACEOF
16492 rm -f conftest.$ac_objext conftest$ac_exeext
16493 if { (eval echo "$as_me:16493: \"$ac_link\"") >&5
16494   (eval $ac_link) 2>&5
16495   ac_status=$?
16496   echo "$as_me:16496: \$? = $ac_status" >&5
16497   (exit $ac_status); } &&
16498          { ac_try='test -s conftest$ac_exeext'
16499   { (eval echo "$as_me:16499: \"$ac_try\"") >&5
16500   (eval $ac_try) 2>&5
16501   ac_status=$?
16502   echo "$as_me:16502: \$? = $ac_status" >&5
16503   (exit $ac_status); }; }; then
16504
16505         if test -n "$cf_db_libs" ; then
16506                 cf_cv_hashed_db_libs=$cf_db_libs
16507         else
16508                 cf_cv_hashed_db_libs=default
16509         fi
16510         LIBS="$cf_save_libs"
16511         break
16512
16513 else
16514   echo "$as_me: failed program was:" >&5
16515 cat conftest.$ac_ext >&5
16516 fi
16517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16518         LIBS="$cf_save_libs"
16519 done
16520
16521 fi
16522 echo "$as_me:16522: result: $cf_cv_hashed_db_libs" >&5
16523 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16524
16525         if test "$cf_cv_hashed_db_libs" = unknown ; then
16526                 { { echo "$as_me:16526: error: Cannot determine library for db" >&5
16527 echo "$as_me: error: Cannot determine library for db" >&2;}
16528    { (exit 1); exit 1; }; }
16529         elif test "$cf_cv_hashed_db_libs" != default ; then
16530                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16531         fi
16532 fi
16533
16534 else
16535
16536         { { echo "$as_me:16536: error: Cannot find db.h" >&5
16537 echo "$as_me: error: Cannot find db.h" >&2;}
16538    { (exit 1); exit 1; }; }
16539
16540 fi
16541
16542 fi
16543
16544 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16545         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16546         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16547 fi
16548
16549 # Just in case, check if the C compiler has a bool type.
16550
16551 echo "$as_me:16551: checking if we should include stdbool.h" >&5
16552 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16553
16554 if test "${cf_cv_header_stdbool_h+set}" = set; then
16555   echo $ECHO_N "(cached) $ECHO_C" >&6
16556 else
16557
16558         cat >conftest.$ac_ext <<_ACEOF
16559 #line 16559 "configure"
16560 #include "confdefs.h"
16561
16562 int
16563 main ()
16564 {
16565 bool foo = false
16566   ;
16567   return 0;
16568 }
16569 _ACEOF
16570 rm -f conftest.$ac_objext
16571 if { (eval echo "$as_me:16571: \"$ac_compile\"") >&5
16572   (eval $ac_compile) 2>&5
16573   ac_status=$?
16574   echo "$as_me:16574: \$? = $ac_status" >&5
16575   (exit $ac_status); } &&
16576          { ac_try='test -s conftest.$ac_objext'
16577   { (eval echo "$as_me:16577: \"$ac_try\"") >&5
16578   (eval $ac_try) 2>&5
16579   ac_status=$?
16580   echo "$as_me:16580: \$? = $ac_status" >&5
16581   (exit $ac_status); }; }; then
16582   cf_cv_header_stdbool_h=0
16583 else
16584   echo "$as_me: failed program was:" >&5
16585 cat conftest.$ac_ext >&5
16586 cat >conftest.$ac_ext <<_ACEOF
16587 #line 16587 "configure"
16588 #include "confdefs.h"
16589
16590 #ifndef __BEOS__
16591 #include <stdbool.h>
16592 #endif
16593
16594 int
16595 main ()
16596 {
16597 bool foo = false
16598   ;
16599   return 0;
16600 }
16601 _ACEOF
16602 rm -f conftest.$ac_objext
16603 if { (eval echo "$as_me:16603: \"$ac_compile\"") >&5
16604   (eval $ac_compile) 2>&5
16605   ac_status=$?
16606   echo "$as_me:16606: \$? = $ac_status" >&5
16607   (exit $ac_status); } &&
16608          { ac_try='test -s conftest.$ac_objext'
16609   { (eval echo "$as_me:16609: \"$ac_try\"") >&5
16610   (eval $ac_try) 2>&5
16611   ac_status=$?
16612   echo "$as_me:16612: \$? = $ac_status" >&5
16613   (exit $ac_status); }; }; then
16614   cf_cv_header_stdbool_h=1
16615 else
16616   echo "$as_me: failed program was:" >&5
16617 cat conftest.$ac_ext >&5
16618 cf_cv_header_stdbool_h=0
16619 fi
16620 rm -f conftest.$ac_objext conftest.$ac_ext
16621 fi
16622 rm -f conftest.$ac_objext conftest.$ac_ext
16623 fi
16624
16625 if test "$cf_cv_header_stdbool_h" = 1
16626 then    echo "$as_me:16626: result: yes" >&5
16627 echo "${ECHO_T}yes" >&6
16628 else    echo "$as_me:16628: result: no" >&5
16629 echo "${ECHO_T}no" >&6
16630 fi
16631
16632 echo "$as_me:16632: checking for builtin bool type" >&5
16633 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16634
16635 if test "${cf_cv_cc_bool_type+set}" = set; then
16636   echo $ECHO_N "(cached) $ECHO_C" >&6
16637 else
16638
16639         cat >conftest.$ac_ext <<_ACEOF
16640 #line 16640 "configure"
16641 #include "confdefs.h"
16642
16643 #include <stdio.h>
16644 #include <sys/types.h>
16645
16646 int
16647 main ()
16648 {
16649 bool x = false
16650   ;
16651   return 0;
16652 }
16653 _ACEOF
16654 rm -f conftest.$ac_objext
16655 if { (eval echo "$as_me:16655: \"$ac_compile\"") >&5
16656   (eval $ac_compile) 2>&5
16657   ac_status=$?
16658   echo "$as_me:16658: \$? = $ac_status" >&5
16659   (exit $ac_status); } &&
16660          { ac_try='test -s conftest.$ac_objext'
16661   { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662   (eval $ac_try) 2>&5
16663   ac_status=$?
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit $ac_status); }; }; then
16666   cf_cv_cc_bool_type=1
16667 else
16668   echo "$as_me: failed program was:" >&5
16669 cat conftest.$ac_ext >&5
16670 cf_cv_cc_bool_type=0
16671 fi
16672 rm -f conftest.$ac_objext conftest.$ac_ext
16673
16674 fi
16675
16676 if test "$cf_cv_cc_bool_type" = 1
16677 then    echo "$as_me:16677: result: yes" >&5
16678 echo "${ECHO_T}yes" >&6
16679 else    echo "$as_me:16679: result: no" >&5
16680 echo "${ECHO_T}no" >&6
16681 fi
16682
16683 # Check for C++ compiler characteristics (and ensure that it's there!)
16684 if test -n "$CXX" ; then
16685         ac_ext=cc
16686 ac_cpp='$CXXCPP $CPPFLAGS'
16687 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16688 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16689 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16690 ac_main_return=return
16691
16692 if test -n "$GXX" ; then
16693 case $cf_cv_system_name in #(vi
16694 os2*) #(vi
16695         cf_stdcpp_libname=stdcpp
16696         ;;
16697 *)
16698         cf_stdcpp_libname=stdc++
16699         ;;
16700 esac
16701 echo "$as_me:16701: checking for library $cf_stdcpp_libname" >&5
16702 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16703 if test "${cf_cv_libstdcpp+set}" = set; then
16704   echo $ECHO_N "(cached) $ECHO_C" >&6
16705 else
16706
16707         cf_save="$LIBS"
16708         LIBS="-l$cf_stdcpp_libname $LIBS"
16709 cat >conftest.$ac_ext <<_ACEOF
16710 #line 16710 "configure"
16711 #include "confdefs.h"
16712
16713 #include <strstream.h>
16714 int
16715 main ()
16716 {
16717
16718 char buf[80];
16719 strstreambuf foo(buf, sizeof(buf))
16720
16721   ;
16722   return 0;
16723 }
16724 _ACEOF
16725 rm -f conftest.$ac_objext conftest$ac_exeext
16726 if { (eval echo "$as_me:16726: \"$ac_link\"") >&5
16727   (eval $ac_link) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); } &&
16731          { ac_try='test -s conftest$ac_exeext'
16732   { (eval echo "$as_me:16732: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:16735: \$? = $ac_status" >&5
16736   (exit $ac_status); }; }; then
16737   cf_cv_libstdcpp=yes
16738 else
16739   echo "$as_me: failed program was:" >&5
16740 cat conftest.$ac_ext >&5
16741 cf_cv_libstdcpp=no
16742 fi
16743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16744         LIBS="$cf_save"
16745
16746 fi
16747 echo "$as_me:16747: result: $cf_cv_libstdcpp" >&5
16748 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16749 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16750 fi
16751
16752         echo "$as_me:16752: checking whether $CXX understands -c and -o together" >&5
16753 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16754 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16755   echo $ECHO_N "(cached) $ECHO_C" >&6
16756 else
16757
16758 cat > conftest.$ac_ext <<CF_EOF
16759 #include <stdio.h>
16760 int main()
16761 {
16762         ${cf_cv_main_return:-return}(0);
16763 }
16764 CF_EOF
16765 # We do the test twice because some compilers refuse to overwrite an
16766 # existing .o file with -o, though they will create one.
16767 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16768 if { (eval echo "$as_me:16768: \"$ac_try\"") >&5
16769   (eval $ac_try) 2>&5
16770   ac_status=$?
16771   echo "$as_me:16771: \$? = $ac_status" >&5
16772   (exit $ac_status); } &&
16773   test -f conftest2.$ac_objext && { (eval echo "$as_me:16773: \"$ac_try\"") >&5
16774   (eval $ac_try) 2>&5
16775   ac_status=$?
16776   echo "$as_me:16776: \$? = $ac_status" >&5
16777   (exit $ac_status); };
16778 then
16779   eval cf_cv_prog_CXX_c_o=yes
16780 else
16781   eval cf_cv_prog_CXX_c_o=no
16782 fi
16783 rm -f conftest*
16784
16785 fi
16786 if test $cf_cv_prog_CXX_c_o = yes; then
16787   echo "$as_me:16787: result: yes" >&5
16788 echo "${ECHO_T}yes" >&6
16789 else
16790   echo "$as_me:16790: result: no" >&5
16791 echo "${ECHO_T}no" >&6
16792 fi
16793
16794         case $GXX_VERSION in
16795         1*|2.0-6*)
16796                 cf_cxx_library=yes
16797                 ;;
16798         *-2.7*|2.7*)
16799
16800 cf_cxx_library=unknown
16801 case $cf_cv_system_name in #(vi
16802 os2*) #(vi
16803         cf_gpp_libname=gpp
16804         ;;
16805 *)
16806         cf_gpp_libname=g++
16807         ;;
16808 esac
16809 if test "$GXX" = yes; then
16810         echo "$as_me:16810: checking for lib$cf_gpp_libname" >&5
16811 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16812         cf_save="$LIBS"
16813         LIBS="-l$cf_gpp_libname $LIBS"
16814         cat >conftest.$ac_ext <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817
16818 #include <$cf_gpp_libname/builtin.h>
16819
16820 int
16821 main ()
16822 {
16823 two_arg_error_handler_t foo2 = lib_error_handler
16824   ;
16825   return 0;
16826 }
16827 _ACEOF
16828 rm -f conftest.$ac_objext conftest$ac_exeext
16829 if { (eval echo "$as_me:16829: \"$ac_link\"") >&5
16830   (eval $ac_link) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); } &&
16834          { ac_try='test -s conftest$ac_exeext'
16835   { (eval echo "$as_me:16835: \"$ac_try\"") >&5
16836   (eval $ac_try) 2>&5
16837   ac_status=$?
16838   echo "$as_me:16838: \$? = $ac_status" >&5
16839   (exit $ac_status); }; }; then
16840   cf_cxx_library=yes
16841          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16842          if test "$cf_gpp_libname" = cpp ; then
16843             cat >>confdefs.h <<\EOF
16844 #define HAVE_GPP_BUILTIN_H 1
16845 EOF
16846
16847          else
16848             cat >>confdefs.h <<\EOF
16849 #define HAVE_GXX_BUILTIN_H 1
16850 EOF
16851
16852          fi
16853 else
16854   echo "$as_me: failed program was:" >&5
16855 cat conftest.$ac_ext >&5
16856 cat >conftest.$ac_ext <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859
16860 #include <builtin.h>
16861
16862 int
16863 main ()
16864 {
16865 two_arg_error_handler_t foo2 = lib_error_handler
16866   ;
16867   return 0;
16868 }
16869 _ACEOF
16870 rm -f conftest.$ac_objext conftest$ac_exeext
16871 if { (eval echo "$as_me:16871: \"$ac_link\"") >&5
16872   (eval $ac_link) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit $ac_status); } &&
16876          { ac_try='test -s conftest$ac_exeext'
16877   { (eval echo "$as_me:16877: \"$ac_try\"") >&5
16878   (eval $ac_try) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit $ac_status); }; }; then
16882   cf_cxx_library=yes
16883          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16884          cat >>confdefs.h <<\EOF
16885 #define HAVE_BUILTIN_H 1
16886 EOF
16887
16888 else
16889   echo "$as_me: failed program was:" >&5
16890 cat conftest.$ac_ext >&5
16891 cf_cxx_library=no
16892 fi
16893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16894 fi
16895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16896         LIBS="$cf_save"
16897         echo "$as_me:16897: result: $cf_cxx_library" >&5
16898 echo "${ECHO_T}$cf_cxx_library" >&6
16899 fi
16900
16901                 ;;
16902         *)
16903                 cf_cxx_library=no
16904                 ;;
16905         esac
16906
16907         ac_ext=cc
16908 ac_cpp='$CXXCPP $CPPFLAGS'
16909 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16910 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16911 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16912 ac_main_return=return
16913 echo "$as_me:16913: checking how to run the C++ preprocessor" >&5
16914 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16915 if test -z "$CXXCPP"; then
16916   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16917   echo $ECHO_N "(cached) $ECHO_C" >&6
16918 else
16919       # Double quotes because CXXCPP needs to be expanded
16920     for CXXCPP in "$CXX -E" "/lib/cpp"
16921     do
16922       ac_preproc_ok=false
16923 for ac_cxx_preproc_warn_flag in '' yes
16924 do
16925   # Use a header file that comes with gcc, so configuring glibc
16926   # with a fresh cross-compiler works.
16927   # On the NeXT, cc -E runs the code through the compiler's parser,
16928   # not just through cpp. "Syntax error" is here to catch this case.
16929   cat >conftest.$ac_ext <<_ACEOF
16930 #line 16930 "configure"
16931 #include "confdefs.h"
16932 #include <assert.h>
16933                      Syntax error
16934 _ACEOF
16935 if { (eval echo "$as_me:16935: \"$ac_cpp conftest.$ac_ext\"") >&5
16936   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16937   ac_status=$?
16938   egrep -v '^ *\+' conftest.er1 >conftest.err
16939   rm -f conftest.er1
16940   cat conftest.err >&5
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); } >/dev/null; then
16943   if test -s conftest.err; then
16944     ac_cpp_err=$ac_cxx_preproc_warn_flag
16945   else
16946     ac_cpp_err=
16947   fi
16948 else
16949   ac_cpp_err=yes
16950 fi
16951 if test -z "$ac_cpp_err"; then
16952   :
16953 else
16954   echo "$as_me: failed program was:" >&5
16955   cat conftest.$ac_ext >&5
16956   # Broken: fails on valid input.
16957 continue
16958 fi
16959 rm -f conftest.err conftest.$ac_ext
16960
16961   # OK, works on sane cases.  Now check whether non-existent headers
16962   # can be detected and how.
16963   cat >conftest.$ac_ext <<_ACEOF
16964 #line 16964 "configure"
16965 #include "confdefs.h"
16966 #include <ac_nonexistent.h>
16967 _ACEOF
16968 if { (eval echo "$as_me:16968: \"$ac_cpp conftest.$ac_ext\"") >&5
16969   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16970   ac_status=$?
16971   egrep -v '^ *\+' conftest.er1 >conftest.err
16972   rm -f conftest.er1
16973   cat conftest.err >&5
16974   echo "$as_me:16974: \$? = $ac_status" >&5
16975   (exit $ac_status); } >/dev/null; then
16976   if test -s conftest.err; then
16977     ac_cpp_err=$ac_cxx_preproc_warn_flag
16978   else
16979     ac_cpp_err=
16980   fi
16981 else
16982   ac_cpp_err=yes
16983 fi
16984 if test -z "$ac_cpp_err"; then
16985   # Broken: success on invalid input.
16986 continue
16987 else
16988   echo "$as_me: failed program was:" >&5
16989   cat conftest.$ac_ext >&5
16990   # Passes both tests.
16991 ac_preproc_ok=:
16992 break
16993 fi
16994 rm -f conftest.err conftest.$ac_ext
16995
16996 done
16997 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16998 rm -f conftest.err conftest.$ac_ext
16999 if $ac_preproc_ok; then
17000   break
17001 fi
17002
17003     done
17004     ac_cv_prog_CXXCPP=$CXXCPP
17005
17006 fi
17007   CXXCPP=$ac_cv_prog_CXXCPP
17008 else
17009   ac_cv_prog_CXXCPP=$CXXCPP
17010 fi
17011 echo "$as_me:17011: result: $CXXCPP" >&5
17012 echo "${ECHO_T}$CXXCPP" >&6
17013 ac_preproc_ok=false
17014 for ac_cxx_preproc_warn_flag in '' yes
17015 do
17016   # Use a header file that comes with gcc, so configuring glibc
17017   # with a fresh cross-compiler works.
17018   # On the NeXT, cc -E runs the code through the compiler's parser,
17019   # not just through cpp. "Syntax error" is here to catch this case.
17020   cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023 #include <assert.h>
17024                      Syntax error
17025 _ACEOF
17026 if { (eval echo "$as_me:17026: \"$ac_cpp conftest.$ac_ext\"") >&5
17027   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17028   ac_status=$?
17029   egrep -v '^ *\+' conftest.er1 >conftest.err
17030   rm -f conftest.er1
17031   cat conftest.err >&5
17032   echo "$as_me:17032: \$? = $ac_status" >&5
17033   (exit $ac_status); } >/dev/null; then
17034   if test -s conftest.err; then
17035     ac_cpp_err=$ac_cxx_preproc_warn_flag
17036   else
17037     ac_cpp_err=
17038   fi
17039 else
17040   ac_cpp_err=yes
17041 fi
17042 if test -z "$ac_cpp_err"; then
17043   :
17044 else
17045   echo "$as_me: failed program was:" >&5
17046   cat conftest.$ac_ext >&5
17047   # Broken: fails on valid input.
17048 continue
17049 fi
17050 rm -f conftest.err conftest.$ac_ext
17051
17052   # OK, works on sane cases.  Now check whether non-existent headers
17053   # can be detected and how.
17054   cat >conftest.$ac_ext <<_ACEOF
17055 #line 17055 "configure"
17056 #include "confdefs.h"
17057 #include <ac_nonexistent.h>
17058 _ACEOF
17059 if { (eval echo "$as_me:17059: \"$ac_cpp conftest.$ac_ext\"") >&5
17060   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17061   ac_status=$?
17062   egrep -v '^ *\+' conftest.er1 >conftest.err
17063   rm -f conftest.er1
17064   cat conftest.err >&5
17065   echo "$as_me:17065: \$? = $ac_status" >&5
17066   (exit $ac_status); } >/dev/null; then
17067   if test -s conftest.err; then
17068     ac_cpp_err=$ac_cxx_preproc_warn_flag
17069   else
17070     ac_cpp_err=
17071   fi
17072 else
17073   ac_cpp_err=yes
17074 fi
17075 if test -z "$ac_cpp_err"; then
17076   # Broken: success on invalid input.
17077 continue
17078 else
17079   echo "$as_me: failed program was:" >&5
17080   cat conftest.$ac_ext >&5
17081   # Passes both tests.
17082 ac_preproc_ok=:
17083 break
17084 fi
17085 rm -f conftest.err conftest.$ac_ext
17086
17087 done
17088 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17089 rm -f conftest.err conftest.$ac_ext
17090 if $ac_preproc_ok; then
17091   :
17092 else
17093   { { echo "$as_me:17093: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17094 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17095    { (exit 1); exit 1; }; }
17096 fi
17097
17098 ac_ext=cc
17099 ac_cpp='$CXXCPP $CPPFLAGS'
17100 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17101 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17102 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17103 ac_main_return=return
17104
17105 for ac_header in iostream typeinfo
17106 do
17107 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17108 echo "$as_me:17108: checking for $ac_header" >&5
17109 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17110 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17111   echo $ECHO_N "(cached) $ECHO_C" >&6
17112 else
17113   cat >conftest.$ac_ext <<_ACEOF
17114 #line 17114 "configure"
17115 #include "confdefs.h"
17116 #include <$ac_header>
17117 _ACEOF
17118 if { (eval echo "$as_me:17118: \"$ac_cpp conftest.$ac_ext\"") >&5
17119   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17120   ac_status=$?
17121   egrep -v '^ *\+' conftest.er1 >conftest.err
17122   rm -f conftest.er1
17123   cat conftest.err >&5
17124   echo "$as_me:17124: \$? = $ac_status" >&5
17125   (exit $ac_status); } >/dev/null; then
17126   if test -s conftest.err; then
17127     ac_cpp_err=$ac_cxx_preproc_warn_flag
17128   else
17129     ac_cpp_err=
17130   fi
17131 else
17132   ac_cpp_err=yes
17133 fi
17134 if test -z "$ac_cpp_err"; then
17135   eval "$as_ac_Header=yes"
17136 else
17137   echo "$as_me: failed program was:" >&5
17138   cat conftest.$ac_ext >&5
17139   eval "$as_ac_Header=no"
17140 fi
17141 rm -f conftest.err conftest.$ac_ext
17142 fi
17143 echo "$as_me:17143: result: `eval echo '${'$as_ac_Header'}'`" >&5
17144 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17145 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17146   cat >>confdefs.h <<EOF
17147 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17148 EOF
17149
17150 fi
17151 done
17152
17153     if test x"$ac_cv_header_iostream" = xyes ; then
17154         echo "$as_me:17154: checking if iostream uses std-namespace" >&5
17155 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17156         cat >conftest.$ac_ext <<_ACEOF
17157 #line 17157 "configure"
17158 #include "confdefs.h"
17159
17160 #include <iostream>
17161 using std::endl;
17162 using std::cerr;
17163 int
17164 main ()
17165 {
17166
17167 cerr << "testing" << endl;
17168
17169   ;
17170   return 0;
17171 }
17172 _ACEOF
17173 rm -f conftest.$ac_objext
17174 if { (eval echo "$as_me:17174: \"$ac_compile\"") >&5
17175   (eval $ac_compile) 2>&5
17176   ac_status=$?
17177   echo "$as_me:17177: \$? = $ac_status" >&5
17178   (exit $ac_status); } &&
17179          { ac_try='test -s conftest.$ac_objext'
17180   { (eval echo "$as_me:17180: \"$ac_try\"") >&5
17181   (eval $ac_try) 2>&5
17182   ac_status=$?
17183   echo "$as_me:17183: \$? = $ac_status" >&5
17184   (exit $ac_status); }; }; then
17185   cf_iostream_namespace=yes
17186 else
17187   echo "$as_me: failed program was:" >&5
17188 cat conftest.$ac_ext >&5
17189 cf_iostream_namespace=no
17190 fi
17191 rm -f conftest.$ac_objext conftest.$ac_ext
17192         echo "$as_me:17192: result: $cf_iostream_namespace" >&5
17193 echo "${ECHO_T}$cf_iostream_namespace" >&6
17194         if test "$cf_iostream_namespace" = yes ; then
17195             cat >>confdefs.h <<\EOF
17196 #define IOSTREAM_NAMESPACE 1
17197 EOF
17198
17199         fi
17200     fi
17201
17202 echo "$as_me:17202: checking if we should include stdbool.h" >&5
17203 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17204
17205 if test "${cf_cv_header_stdbool_h+set}" = set; then
17206   echo $ECHO_N "(cached) $ECHO_C" >&6
17207 else
17208
17209         cat >conftest.$ac_ext <<_ACEOF
17210 #line 17210 "configure"
17211 #include "confdefs.h"
17212
17213 int
17214 main ()
17215 {
17216 bool foo = false
17217   ;
17218   return 0;
17219 }
17220 _ACEOF
17221 rm -f conftest.$ac_objext
17222 if { (eval echo "$as_me:17222: \"$ac_compile\"") >&5
17223   (eval $ac_compile) 2>&5
17224   ac_status=$?
17225   echo "$as_me:17225: \$? = $ac_status" >&5
17226   (exit $ac_status); } &&
17227          { ac_try='test -s conftest.$ac_objext'
17228   { (eval echo "$as_me:17228: \"$ac_try\"") >&5
17229   (eval $ac_try) 2>&5
17230   ac_status=$?
17231   echo "$as_me:17231: \$? = $ac_status" >&5
17232   (exit $ac_status); }; }; then
17233   cf_cv_header_stdbool_h=0
17234 else
17235   echo "$as_me: failed program was:" >&5
17236 cat conftest.$ac_ext >&5
17237 cat >conftest.$ac_ext <<_ACEOF
17238 #line 17238 "configure"
17239 #include "confdefs.h"
17240
17241 #ifndef __BEOS__
17242 #include <stdbool.h>
17243 #endif
17244
17245 int
17246 main ()
17247 {
17248 bool foo = false
17249   ;
17250   return 0;
17251 }
17252 _ACEOF
17253 rm -f conftest.$ac_objext
17254 if { (eval echo "$as_me:17254: \"$ac_compile\"") >&5
17255   (eval $ac_compile) 2>&5
17256   ac_status=$?
17257   echo "$as_me:17257: \$? = $ac_status" >&5
17258   (exit $ac_status); } &&
17259          { ac_try='test -s conftest.$ac_objext'
17260   { (eval echo "$as_me:17260: \"$ac_try\"") >&5
17261   (eval $ac_try) 2>&5
17262   ac_status=$?
17263   echo "$as_me:17263: \$? = $ac_status" >&5
17264   (exit $ac_status); }; }; then
17265   cf_cv_header_stdbool_h=1
17266 else
17267   echo "$as_me: failed program was:" >&5
17268 cat conftest.$ac_ext >&5
17269 cf_cv_header_stdbool_h=0
17270 fi
17271 rm -f conftest.$ac_objext conftest.$ac_ext
17272 fi
17273 rm -f conftest.$ac_objext conftest.$ac_ext
17274 fi
17275
17276 if test "$cf_cv_header_stdbool_h" = 1
17277 then    echo "$as_me:17277: result: yes" >&5
17278 echo "${ECHO_T}yes" >&6
17279 else    echo "$as_me:17279: result: no" >&5
17280 echo "${ECHO_T}no" >&6
17281 fi
17282
17283 echo "$as_me:17283: checking for builtin bool type" >&5
17284 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17285
17286 if test "${cf_cv_builtin_bool+set}" = set; then
17287   echo $ECHO_N "(cached) $ECHO_C" >&6
17288 else
17289
17290         cat >conftest.$ac_ext <<_ACEOF
17291 #line 17291 "configure"
17292 #include "confdefs.h"
17293
17294 #include <stdio.h>
17295 #include <sys/types.h>
17296
17297 int
17298 main ()
17299 {
17300 bool x = false
17301   ;
17302   return 0;
17303 }
17304 _ACEOF
17305 rm -f conftest.$ac_objext
17306 if { (eval echo "$as_me:17306: \"$ac_compile\"") >&5
17307   (eval $ac_compile) 2>&5
17308   ac_status=$?
17309   echo "$as_me:17309: \$? = $ac_status" >&5
17310   (exit $ac_status); } &&
17311          { ac_try='test -s conftest.$ac_objext'
17312   { (eval echo "$as_me:17312: \"$ac_try\"") >&5
17313   (eval $ac_try) 2>&5
17314   ac_status=$?
17315   echo "$as_me:17315: \$? = $ac_status" >&5
17316   (exit $ac_status); }; }; then
17317   cf_cv_builtin_bool=1
17318 else
17319   echo "$as_me: failed program was:" >&5
17320 cat conftest.$ac_ext >&5
17321 cf_cv_builtin_bool=0
17322 fi
17323 rm -f conftest.$ac_objext conftest.$ac_ext
17324
17325 fi
17326
17327 if test "$cf_cv_builtin_bool" = 1
17328 then    echo "$as_me:17328: result: yes" >&5
17329 echo "${ECHO_T}yes" >&6
17330 else    echo "$as_me:17330: result: no" >&5
17331 echo "${ECHO_T}no" >&6
17332 fi
17333
17334 echo "$as_me:17334: checking for size of bool" >&5
17335 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17336 if test "${cf_cv_type_of_bool+set}" = set; then
17337   echo $ECHO_N "(cached) $ECHO_C" >&6
17338 else
17339
17340         rm -f cf_test.out
17341         if test "$cross_compiling" = yes; then
17342   cf_cv_type_of_bool=unknown
17343 else
17344   cat >conftest.$ac_ext <<_ACEOF
17345 #line 17345 "configure"
17346 #include "confdefs.h"
17347
17348 #include <stdlib.h>
17349 #include <stdio.h>
17350
17351 #if defined(__cplusplus)
17352
17353 #ifdef HAVE_GXX_BUILTIN_H
17354 #include <g++/builtin.h>
17355 #elif HAVE_GPP_BUILTIN_H
17356 #include <gpp/builtin.h>
17357 #elif HAVE_BUILTIN_H
17358 #include <builtin.h>
17359 #endif
17360
17361 #else
17362
17363 #if $cf_cv_header_stdbool_h
17364 #include <stdbool.h>
17365 #endif
17366
17367 #endif
17368
17369 main()
17370 {
17371         FILE *fp = fopen("cf_test.out", "w");
17372         if (fp != 0) {
17373                 bool x = true;
17374                 if ((bool)(-x) >= 0)
17375                         fputs("unsigned ", fp);
17376                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17377                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17378                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17379                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17380                 fclose(fp);
17381         }
17382         ${cf_cv_main_return:-return}(0);
17383 }
17384
17385 _ACEOF
17386 rm -f conftest$ac_exeext
17387 if { (eval echo "$as_me:17387: \"$ac_link\"") >&5
17388   (eval $ac_link) 2>&5
17389   ac_status=$?
17390   echo "$as_me:17390: \$? = $ac_status" >&5
17391   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); }; }; then
17397   cf_cv_type_of_bool=`cat cf_test.out`
17398                  if test -z "$cf_cv_type_of_bool"; then
17399                    cf_cv_type_of_bool=unknown
17400                  fi
17401 else
17402   echo "$as_me: program exited with status $ac_status" >&5
17403 echo "$as_me: failed program was:" >&5
17404 cat conftest.$ac_ext >&5
17405 cf_cv_type_of_bool=unknown
17406 fi
17407 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17408 fi
17409
17410 fi
17411
17412         rm -f cf_test.out
17413 echo "$as_me:17413: result: $cf_cv_type_of_bool" >&5
17414 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17415 if test "$cf_cv_type_of_bool" = unknown ; then
17416         case .$NCURSES_BOOL in #(vi
17417         .auto|.) NCURSES_BOOL=unsigned;;
17418         esac
17419         { echo "$as_me:17419: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17420 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17421         cf_cv_type_of_bool=$NCURSES_BOOL
17422 fi
17423
17424 echo "$as_me:17424: checking for special defines needed for etip.h" >&5
17425 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17426 cf_save_CXXFLAGS="$CXXFLAGS"
17427 cf_result="none"
17428 for cf_math in "" MATH_H
17429 do
17430 for cf_excp in "" MATH_EXCEPTION
17431 do
17432         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17433         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17434         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17435 cat >conftest.$ac_ext <<_ACEOF
17436 #line 17436 "configure"
17437 #include "confdefs.h"
17438
17439 #include <etip.h.in>
17440
17441 int
17442 main ()
17443 {
17444
17445   ;
17446   return 0;
17447 }
17448 _ACEOF
17449 rm -f conftest.$ac_objext
17450 if { (eval echo "$as_me:17450: \"$ac_compile\"") >&5
17451   (eval $ac_compile) 2>&5
17452   ac_status=$?
17453   echo "$as_me:17453: \$? = $ac_status" >&5
17454   (exit $ac_status); } &&
17455          { ac_try='test -s conftest.$ac_objext'
17456   { (eval echo "$as_me:17456: \"$ac_try\"") >&5
17457   (eval $ac_try) 2>&5
17458   ac_status=$?
17459   echo "$as_me:17459: \$? = $ac_status" >&5
17460   (exit $ac_status); }; }; then
17461
17462         test -n "$cf_math" && cat >>confdefs.h <<EOF
17463 #define ETIP_NEEDS_${cf_math} 1
17464 EOF
17465
17466         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17467 #define ETIP_NEEDS_${cf_excp} 1
17468 EOF
17469
17470         cf_result="$cf_math $cf_excp"
17471         break
17472
17473 else
17474   echo "$as_me: failed program was:" >&5
17475 cat conftest.$ac_ext >&5
17476 fi
17477 rm -f conftest.$ac_objext conftest.$ac_ext
17478 done
17479 done
17480 echo "$as_me:17480: result: $cf_result" >&5
17481 echo "${ECHO_T}$cf_result" >&6
17482 CXXFLAGS="$cf_save_CXXFLAGS"
17483
17484 if test -n "$CXX"; then
17485 echo "$as_me:17485: checking if $CXX accepts parameter initialization" >&5
17486 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17487 if test "${cf_cv_cpp_param_init+set}" = set; then
17488   echo $ECHO_N "(cached) $ECHO_C" >&6
17489 else
17490
17491         ac_ext=cc
17492 ac_cpp='$CXXCPP $CPPFLAGS'
17493 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17494 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17495 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17496 ac_main_return=return
17497
17498         if test "$cross_compiling" = yes; then
17499   cf_cv_cpp_param_init=unknown
17500 else
17501   cat >conftest.$ac_ext <<_ACEOF
17502 #line 17502 "configure"
17503 #include "confdefs.h"
17504
17505 class TEST {
17506 private:
17507         int value;
17508 public:
17509         TEST(int x = 1);
17510         ~TEST();
17511 };
17512
17513 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17514 {
17515         value = x;
17516 }
17517 void main() { }
17518
17519 _ACEOF
17520 rm -f conftest$ac_exeext
17521 if { (eval echo "$as_me:17521: \"$ac_link\"") >&5
17522   (eval $ac_link) 2>&5
17523   ac_status=$?
17524   echo "$as_me:17524: \$? = $ac_status" >&5
17525   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17526   { (eval echo "$as_me:17526: \"$ac_try\"") >&5
17527   (eval $ac_try) 2>&5
17528   ac_status=$?
17529   echo "$as_me:17529: \$? = $ac_status" >&5
17530   (exit $ac_status); }; }; then
17531   cf_cv_cpp_param_init=yes
17532 else
17533   echo "$as_me: program exited with status $ac_status" >&5
17534 echo "$as_me: failed program was:" >&5
17535 cat conftest.$ac_ext >&5
17536 cf_cv_cpp_param_init=no
17537 fi
17538 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17539 fi
17540         ac_ext=cc
17541 ac_cpp='$CXXCPP $CPPFLAGS'
17542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17545 ac_main_return=return
17546
17547 fi
17548 echo "$as_me:17548: result: $cf_cv_cpp_param_init" >&5
17549 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17550 fi
17551 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17552 #define CPP_HAS_PARAM_INIT 1
17553 EOF
17554
17555 if test -n "$CXX"; then
17556
17557 echo "$as_me:17557: checking if $CXX accepts static_cast" >&5
17558 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17559 if test "${cf_cv_cpp_static_cast+set}" = set; then
17560   echo $ECHO_N "(cached) $ECHO_C" >&6
17561 else
17562
17563         ac_ext=cc
17564 ac_cpp='$CXXCPP $CPPFLAGS'
17565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17568 ac_main_return=return
17569
17570         cat >conftest.$ac_ext <<_ACEOF
17571 #line 17571 "configure"
17572 #include "confdefs.h"
17573
17574 class NCursesPanel
17575 {
17576 public:
17577   NCursesPanel(int nlines,
17578                int ncols,
17579                int begin_y = 0,
17580                int begin_x = 0)
17581   {
17582   }
17583
17584   ~NCursesPanel();
17585 };
17586
17587 template<class T> class NCursesUserPanel : public NCursesPanel
17588 {
17589 public:
17590   NCursesUserPanel (int nlines,
17591                     int ncols,
17592                     int begin_y = 0,
17593                     int begin_x = 0,
17594                     const T* p_UserData = static_cast<T*>(0))
17595     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17596   {
17597   };
17598   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17599   {
17600   };
17601
17602   virtual ~NCursesUserPanel() {};
17603 };
17604
17605 int
17606 main ()
17607 {
17608
17609         const char* p_UserData = static_cast<char*>(0)
17610   ;
17611   return 0;
17612 }
17613 _ACEOF
17614 rm -f conftest.$ac_objext
17615 if { (eval echo "$as_me:17615: \"$ac_compile\"") >&5
17616   (eval $ac_compile) 2>&5
17617   ac_status=$?
17618   echo "$as_me:17618: \$? = $ac_status" >&5
17619   (exit $ac_status); } &&
17620          { ac_try='test -s conftest.$ac_objext'
17621   { (eval echo "$as_me:17621: \"$ac_try\"") >&5
17622   (eval $ac_try) 2>&5
17623   ac_status=$?
17624   echo "$as_me:17624: \$? = $ac_status" >&5
17625   (exit $ac_status); }; }; then
17626   cf_cv_cpp_static_cast=yes
17627 else
17628   echo "$as_me: failed program was:" >&5
17629 cat conftest.$ac_ext >&5
17630 cf_cv_cpp_static_cast=no
17631 fi
17632 rm -f conftest.$ac_objext conftest.$ac_ext
17633
17634         ac_ext=cc
17635 ac_cpp='$CXXCPP $CPPFLAGS'
17636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17637 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17639 ac_main_return=return
17640
17641 fi
17642 echo "$as_me:17642: result: $cf_cv_cpp_static_cast" >&5
17643 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17644
17645 fi
17646
17647 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17648 #define CPP_HAS_STATIC_CAST 1
17649 EOF
17650
17651         CXX_AR='$(AR)'
17652         CXX_ARFLAGS='$(ARFLAGS)'
17653         case $cf_cv_system_name in #(vi
17654         irix*) #(vi
17655             if test "$GXX" != yes ; then
17656                 CXX_AR='$(CXX)'
17657                 CXX_ARFLAGS='-ar -o'
17658             fi
17659             ;;
17660         sco3.2v5*) #(vi
17661             CXXLDFLAGS="-u main"
17662             ;;
17663         solaris2*)
17664             if test "$GXX" != yes ; then
17665                 CXX_AR='$(CXX)'
17666                 CXX_ARFLAGS='-xar -o'
17667             fi
17668             ;;
17669         esac
17670
17671 else
17672         cf_cxx_library=no
17673         cf_cv_builtin_bool=1
17674
17675         # Just because we are not configuring against C++ right now does not
17676         # mean that a user will not want to use C++.  Some distributors disable
17677         # the C++ portion of this configuration as a shortcut (or just to avoid
17678         # compiling the demo in the c++ directory).  So we need a reasonable
17679         # default for the 'bool' type.
17680         #
17681         # Caveat: since the storage of the bool type is not standardized, it
17682         # may change.
17683
17684         if test "$NCURSES_BOOL" != auto ; then
17685                 cf_cv_type_of_bool=$NCURSES_BOOL
17686                 cf_cv_header_stdbool_h=0
17687         else
17688                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17689
17690 echo "$as_me:17690: checking for size of bool" >&5
17691 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17692 if test "${cf_cv_type_of_bool+set}" = set; then
17693   echo $ECHO_N "(cached) $ECHO_C" >&6
17694 else
17695
17696         rm -f cf_test.out
17697         if test "$cross_compiling" = yes; then
17698   cf_cv_type_of_bool=unknown
17699 else
17700   cat >conftest.$ac_ext <<_ACEOF
17701 #line 17701 "configure"
17702 #include "confdefs.h"
17703
17704 #include <stdlib.h>
17705 #include <stdio.h>
17706
17707 #if defined(__cplusplus)
17708
17709 #ifdef HAVE_GXX_BUILTIN_H
17710 #include <g++/builtin.h>
17711 #elif HAVE_GPP_BUILTIN_H
17712 #include <gpp/builtin.h>
17713 #elif HAVE_BUILTIN_H
17714 #include <builtin.h>
17715 #endif
17716
17717 #else
17718
17719 #if $cf_cv_header_stdbool_h
17720 #include <stdbool.h>
17721 #endif
17722
17723 #endif
17724
17725 main()
17726 {
17727         FILE *fp = fopen("cf_test.out", "w");
17728         if (fp != 0) {
17729                 bool x = true;
17730                 if ((bool)(-x) >= 0)
17731                         fputs("unsigned ", fp);
17732                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17733                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17734                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17735                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17736                 fclose(fp);
17737         }
17738         ${cf_cv_main_return:-return}(0);
17739 }
17740
17741 _ACEOF
17742 rm -f conftest$ac_exeext
17743 if { (eval echo "$as_me:17743: \"$ac_link\"") >&5
17744   (eval $ac_link) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17748   { (eval echo "$as_me:17748: \"$ac_try\"") >&5
17749   (eval $ac_try) 2>&5
17750   ac_status=$?
17751   echo "$as_me:17751: \$? = $ac_status" >&5
17752   (exit $ac_status); }; }; then
17753   cf_cv_type_of_bool=`cat cf_test.out`
17754                  if test -z "$cf_cv_type_of_bool"; then
17755                    cf_cv_type_of_bool=unknown
17756                  fi
17757 else
17758   echo "$as_me: program exited with status $ac_status" >&5
17759 echo "$as_me: failed program was:" >&5
17760 cat conftest.$ac_ext >&5
17761 cf_cv_type_of_bool=unknown
17762 fi
17763 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17764 fi
17765
17766 fi
17767
17768         rm -f cf_test.out
17769 echo "$as_me:17769: result: $cf_cv_type_of_bool" >&5
17770 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17771 if test "$cf_cv_type_of_bool" = unknown ; then
17772         case .$NCURSES_BOOL in #(vi
17773         .auto|.) NCURSES_BOOL=unsigned;;
17774         esac
17775         { echo "$as_me:17775: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17776 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17777         cf_cv_type_of_bool=$NCURSES_BOOL
17778 fi
17779
17780                 else
17781                         echo "$as_me:17781: checking for fallback type of bool" >&5
17782 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17783                         case "$host_cpu" in #(vi
17784                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17785                         *)      cf_cv_type_of_bool=int  ;;
17786                         esac
17787                         echo "$as_me:17787: result: $cf_cv_type_of_bool" >&5
17788 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17789                 fi
17790         fi
17791 fi
17792
17793 # If the C compiler did not declare bool, and we did not determine that the C++
17794 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17795 # ncurses library use the same type as C++ bool.  Note that this allows one to
17796 # specify the type of bool in a configure-script option and postpone
17797 # integration with the C++ compiler provided that the types are compatible.
17798 USE_CXX_BOOL=1
17799 if test $cf_cv_cc_bool_type = 1
17800 then
17801         # oops: C has a bool.  Unlikely, but C++ could differ.
17802         USE_CXX_BOOL=0
17803 elif test $cf_cv_builtin_bool = 0
17804 then
17805         # C++ has no bool
17806         USE_CXX_BOOL=0
17807 else
17808         # this is the normal case
17809         USE_CXX_BOOL='defined(__cplusplus)'
17810 fi
17811
17812 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17813
17814         if test "$cf_with_ada" != "no" ; then
17815                 if test "$with_libtool" != "no"; then
17816                         { echo "$as_me:17816: WARNING: libtool does not support Ada - disabling feature" >&5
17817 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17818                         cf_with_ada=no
17819                 fi
17820         fi
17821
17822         if test "$cf_with_ada" != "no" ; then
17823
17824 cf_ada_make=gnatmake
17825 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17826 set dummy $cf_ada_make; ac_word=$2
17827 echo "$as_me:17827: checking for $ac_word" >&5
17828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17829 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17830   echo $ECHO_N "(cached) $ECHO_C" >&6
17831 else
17832   if test -n "$gnat_exists"; then
17833   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17834 else
17835   ac_save_IFS=$IFS; IFS=$ac_path_separator
17836 ac_dummy="$PATH"
17837 for ac_dir in $ac_dummy; do
17838   IFS=$ac_save_IFS
17839   test -z "$ac_dir" && ac_dir=.
17840   $as_executable_p "$ac_dir/$ac_word" || continue
17841 ac_cv_prog_gnat_exists="yes"
17842 echo "$as_me:17842: found $ac_dir/$ac_word" >&5
17843 break
17844 done
17845
17846   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17847 fi
17848 fi
17849 gnat_exists=$ac_cv_prog_gnat_exists
17850 if test -n "$gnat_exists"; then
17851   echo "$as_me:17851: result: $gnat_exists" >&5
17852 echo "${ECHO_T}$gnat_exists" >&6
17853 else
17854   echo "$as_me:17854: result: no" >&5
17855 echo "${ECHO_T}no" >&6
17856 fi
17857
17858 if test "$ac_cv_prog_gnat_exists" = no; then
17859    cf_ada_make=
17860 else
17861
17862 echo "$as_me:17862: checking for gnat version" >&5
17863 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17864 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17865   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17866 echo "$as_me:17866: result: $cf_gnat_version" >&5
17867 echo "${ECHO_T}$cf_gnat_version" >&6
17868
17869 case $cf_gnat_version in
17870   3.1[1-9]*|3.[2-9]*|[4-9].*)
17871     cf_cv_prog_gnat_correct=yes
17872     ;;
17873   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17874      cf_cv_prog_gnat_correct=no
17875      ;;
17876 esac
17877
17878 case $cf_gnat_version in
17879   3.[1-9]*|[4-9].*)
17880       cf_compile_generics=generics
17881       cf_generic_objects="\${GENOBJS}"
17882       ;;
17883   *)  cf_compile_generics=
17884       cf_generic_objects=
17885       ;;
17886 esac
17887
17888 case $cf_gnat_version in
17889   3.[0-9]*)
17890     USE_OLD_MAKERULES=""
17891     USE_GNAT_PROJECTS="#"
17892     ;;
17893   *)
17894     USE_OLD_MAKERULES="#"
17895     USE_GNAT_PROJECTS=""
17896     ;;
17897 esac
17898
17899    # Extract the first word of "m4", so it can be a program name with args.
17900 set dummy m4; ac_word=$2
17901 echo "$as_me:17901: checking for $ac_word" >&5
17902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17903 if test "${ac_cv_prog_M4_exists+set}" = set; then
17904   echo $ECHO_N "(cached) $ECHO_C" >&6
17905 else
17906   if test -n "$M4_exists"; then
17907   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17908 else
17909   ac_save_IFS=$IFS; IFS=$ac_path_separator
17910 ac_dummy="$PATH"
17911 for ac_dir in $ac_dummy; do
17912   IFS=$ac_save_IFS
17913   test -z "$ac_dir" && ac_dir=.
17914   $as_executable_p "$ac_dir/$ac_word" || continue
17915 ac_cv_prog_M4_exists="yes"
17916 echo "$as_me:17916: found $ac_dir/$ac_word" >&5
17917 break
17918 done
17919
17920   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17921 fi
17922 fi
17923 M4_exists=$ac_cv_prog_M4_exists
17924 if test -n "$M4_exists"; then
17925   echo "$as_me:17925: result: $M4_exists" >&5
17926 echo "${ECHO_T}$M4_exists" >&6
17927 else
17928   echo "$as_me:17928: result: no" >&5
17929 echo "${ECHO_T}no" >&6
17930 fi
17931
17932    if test "$ac_cv_prog_M4_exists" = no; then
17933       cf_cv_prog_gnat_correct=no
17934       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17935    fi
17936    if test "$cf_cv_prog_gnat_correct" = yes; then
17937       echo "$as_me:17937: checking if GNAT works" >&5
17938 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17939
17940 rm -f conftest*
17941 cat >>conftest.ads <<CF_EOF
17942 procedure conftest;
17943 CF_EOF
17944 cat >>conftest.adb <<CF_EOF
17945 with Text_IO;
17946 with GNAT.OS_Lib;
17947 procedure conftest is
17948 begin
17949    Text_IO.Put ("Hello World");
17950    Text_IO.New_Line;
17951    GNAT.OS_Lib.OS_Exit (0);
17952 end conftest;
17953 CF_EOF
17954 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17955    if ( ./conftest 1>&5 2>&1 ) ; then
17956       cf_cv_prog_gnat_correct=yes
17957    else
17958       cf_cv_prog_gnat_correct=no
17959    fi
17960 else
17961    cf_cv_prog_gnat_correct=no
17962 fi
17963 rm -f conftest*
17964
17965       echo "$as_me:17965: result: $cf_cv_prog_gnat_correct" >&5
17966 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17967    fi
17968 fi
17969
17970                 if test "$cf_cv_prog_gnat_correct" = yes; then
17971
17972         ADAFLAGS="$ADAFLAGS -O3 -gnatpn"
17973
17974 echo "$as_me:17974: checking if GNAT pragma Unreferenced works" >&5
17975 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17976 if test "${cf_cv_pragma_unreferenced+set}" = set; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979
17980 rm -f conftest*
17981 cat >>conftest.ads <<CF_EOF
17982 procedure conftest;
17983 CF_EOF
17984 cat >>conftest.adb <<CF_EOF
17985 with Text_IO;
17986 with GNAT.OS_Lib;
17987 procedure conftest is
17988    test : Integer;
17989    pragma Unreferenced (test);
17990 begin
17991    test := 1;
17992    Text_IO.Put ("Hello World");
17993    Text_IO.New_Line;
17994    GNAT.OS_Lib.OS_Exit (0);
17995 end conftest;
17996 CF_EOF
17997 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17998       cf_cv_pragma_unreferenced=yes
17999 else
18000    cf_cv_pragma_unreferenced=no
18001 fi
18002 rm -f conftest*
18003
18004 fi
18005 echo "$as_me:18005: result: $cf_cv_pragma_unreferenced" >&5
18006 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18007
18008 # if the pragma is supported, use it (needed in the Trace code).
18009 if test $cf_cv_pragma_unreferenced = yes ; then
18010         PRAGMA_UNREF=TRUE
18011 else
18012         PRAGMA_UNREF=FALSE
18013 fi
18014
18015 echo "$as_me:18015: checking for ada-compiler" >&5
18016 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18017
18018 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18019 if test "${with_ada_compiler+set}" = set; then
18020   withval="$with_ada_compiler"
18021   cf_ada_compiler=$withval
18022 else
18023   cf_ada_compiler=gnatmake
18024 fi;
18025
18026 echo "$as_me:18026: result: $cf_ada_compiler" >&5
18027 echo "${ECHO_T}$cf_ada_compiler" >&6
18028
18029                         cf_ada_package=terminal_interface
18030
18031 echo "$as_me:18031: checking for ada-include" >&5
18032 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18033
18034 # Check whether --with-ada-include or --without-ada-include was given.
18035 if test "${with_ada_include+set}" = set; then
18036   withval="$with_ada_include"
18037
18038 else
18039   withval="${ADA_INCLUDE-$prefix/share/ada/adainclude}"
18040 fi; if test -n "$prefix/share/ada/adainclude" ; then
18041
18042 if test "x$prefix" != xNONE; then
18043   cf_path_syntax="$prefix"
18044 else
18045   cf_path_syntax="$ac_default_prefix"
18046 fi
18047
18048 case ".$withval" in #(vi
18049 .\$\(*\)*|.\'*\'*) #(vi
18050   ;;
18051 ..|./*|.\\*) #(vi
18052   ;;
18053 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18054   ;;
18055 .\${*prefix}*) #(vi
18056   eval withval="$withval"
18057   case ".$withval" in #(vi
18058   .NONE/*)
18059     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18060     ;;
18061   esac
18062   ;; #(vi
18063 .no|.NONE/*)
18064   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18065   ;;
18066 *)
18067   { { echo "$as_me:18067: error: expected a pathname, not \"$withval\"" >&5
18068 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18069    { (exit 1); exit 1; }; }
18070   ;;
18071 esac
18072
18073 fi
18074 ADA_INCLUDE="$withval"
18075
18076 echo "$as_me:18076: result: $ADA_INCLUDE" >&5
18077 echo "${ECHO_T}$ADA_INCLUDE" >&6
18078
18079 echo "$as_me:18079: checking for ada-objects" >&5
18080 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18081
18082 # Check whether --with-ada-objects or --without-ada-objects was given.
18083 if test "${with_ada_objects+set}" = set; then
18084   withval="$with_ada_objects"
18085
18086 else
18087   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
18088 fi; if test -n "$prefix/lib/ada/adalib" ; then
18089
18090 if test "x$prefix" != xNONE; then
18091   cf_path_syntax="$prefix"
18092 else
18093   cf_path_syntax="$ac_default_prefix"
18094 fi
18095
18096 case ".$withval" in #(vi
18097 .\$\(*\)*|.\'*\'*) #(vi
18098   ;;
18099 ..|./*|.\\*) #(vi
18100   ;;
18101 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18102   ;;
18103 .\${*prefix}*) #(vi
18104   eval withval="$withval"
18105   case ".$withval" in #(vi
18106   .NONE/*)
18107     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18108     ;;
18109   esac
18110   ;; #(vi
18111 .no|.NONE/*)
18112   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18113   ;;
18114 *)
18115   { { echo "$as_me:18115: error: expected a pathname, not \"$withval\"" >&5
18116 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18117    { (exit 1); exit 1; }; }
18118   ;;
18119 esac
18120
18121 fi
18122 ADA_OBJECTS="$withval"
18123
18124 echo "$as_me:18124: result: $ADA_OBJECTS" >&5
18125 echo "${ECHO_T}$ADA_OBJECTS" >&6
18126
18127 echo "$as_me:18127: checking if an Ada95 shared-library should be built" >&5
18128 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18129
18130 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18131 if test "${with_ada_sharedlib+set}" = set; then
18132   withval="$with_ada_sharedlib"
18133   with_ada_sharedlib=$withval
18134 else
18135   with_ada_sharedlib=no
18136 fi;
18137 echo "$as_me:18137: result: $with_ada_sharedlib" >&5
18138 echo "${ECHO_T}$with_ada_sharedlib" >&6
18139
18140 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18141 MAKE_ADA_SHAREDLIB="#"
18142
18143 if test "x$with_ada_sharedlib" != xno
18144 then
18145         MAKE_ADA_SHAREDLIB=
18146         if test "x$with_ada_sharedlib" != xyes
18147         then
18148                 ADA_SHAREDLIB="$with_ada_sharedlib"
18149         fi
18150 fi
18151
18152                 fi
18153         fi
18154 else
18155         cf_with_ada=no
18156 fi
18157
18158 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18159 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18160 ###
18161 ### ticlib modules may be a separate library, otherwise contained in termlib.
18162 ### termlib modules may be a separate library, otherwise contained in ncurses.
18163 ###
18164 ### The of "+" or " " between the tokens controls the way the script
18165 ### chooses to split module lists into libraries.
18166 ###
18167 ### (see CF_LIB_RULES).
18168 echo "$as_me:18168: checking for library subsets" >&5
18169 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18170 LIB_SUBSETS=
18171
18172 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18173         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18174         if test "$with_ticlib" != no ; then
18175                 LIB_SUBSETS="${LIB_SUBSETS} "
18176         else
18177                 LIB_SUBSETS="${LIB_SUBSETS}+"
18178         fi
18179 fi
18180
18181 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18182 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18183
18184 if test "$with_termlib" != no ; then
18185         LIB_SUBSETS="${LIB_SUBSETS} "
18186 else
18187         LIB_SUBSETS="${LIB_SUBSETS}+"
18188 fi
18189
18190 LIB_SUBSETS="${LIB_SUBSETS}base"
18191
18192 # Most term-driver calls are to tinfo, but some like init_pair are to the
18193 # base library (so it resides in base).
18194 if test "$with_term_driver" != no ; then
18195         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18196         case $cf_cv_system_name in #(vi
18197         *mingw32*) #(vi
18198                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18199                 ;;
18200         *) #(vi
18201                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18202                 ;;
18203         esac
18204 fi
18205
18206 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18207 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18208
18209 echo "$as_me:18209: result: $LIB_SUBSETS" >&5
18210 echo "${ECHO_T}$LIB_SUBSETS" >&6
18211
18212 ### Construct the list of include-directories to be generated
18213
18214 CPPFLAGS="$CPPFLAGS -I. -I../include"
18215 if test "$srcdir" != "."; then
18216         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18217 fi
18218 if test "$GCC" != yes; then
18219         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18220 elif test "$includedir" != "/usr/include"; then
18221         if test "$includedir" = '${prefix}/include' ; then
18222                 if test $prefix != /usr ; then
18223                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18224                 fi
18225         else
18226                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18227         fi
18228 fi
18229
18230 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18231 if test "$srcdir" != "."; then
18232         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18233 fi
18234 if test "$GCC" != yes; then
18235         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18236 elif test "$includedir" != "/usr/include"; then
18237         if test "$includedir" = '${prefix}/include' ; then
18238                 if test $prefix != /usr ; then
18239                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18240                 fi
18241         else
18242                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18243         fi
18244 fi
18245
18246 ### Build up pieces for makefile rules
18247 echo "$as_me:18247: checking default library suffix" >&5
18248 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18249
18250         case $DFT_LWR_MODEL in
18251         libtool) DFT_ARG_SUFFIX=''   ;;
18252         normal)  DFT_ARG_SUFFIX=''   ;;
18253         debug)   DFT_ARG_SUFFIX='_g' ;;
18254         profile) DFT_ARG_SUFFIX='_p' ;;
18255         shared)  DFT_ARG_SUFFIX=''   ;;
18256         esac
18257         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18258 echo "$as_me:18258: result: $DFT_ARG_SUFFIX" >&5
18259 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18260
18261 echo "$as_me:18261: checking default library-dependency suffix" >&5
18262 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18263
18264         case $DFT_LWR_MODEL in #(vi
18265         libtool) #(vi
18266                 DFT_LIB_SUFFIX='.la'
18267                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18268                 ;;
18269         normal) #(vi
18270                 DFT_LIB_SUFFIX='.a'
18271                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18272                 ;;
18273         debug) #(vi
18274                 DFT_LIB_SUFFIX='_g.a'
18275                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18276                 ;;
18277         profile) #(vi
18278                 DFT_LIB_SUFFIX='_p.a'
18279                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18280                 ;;
18281         shared) #(vi
18282                 case $cf_cv_system_name in
18283                 aix[56]*) #(vi
18284                         DFT_LIB_SUFFIX='.a'
18285                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18286                         ;;
18287                 cygwin*) #(vi
18288                         DFT_LIB_SUFFIX='.dll'
18289                         DFT_DEP_SUFFIX='.dll.a'
18290                         ;;
18291                 darwin*) #(vi
18292                         DFT_LIB_SUFFIX='.dylib'
18293                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18294                         ;;
18295                 hpux*) #(vi
18296                         case $target in
18297                         ia64*) #(vi
18298                                 DFT_LIB_SUFFIX='.so'
18299                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18300                                 ;;
18301                         *) #(vi
18302                                 DFT_LIB_SUFFIX='.sl'
18303                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18304                                 ;;
18305                         esac
18306                         ;;
18307                 *)      DFT_LIB_SUFFIX='.so'
18308                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18309                         ;;
18310                 esac
18311         esac
18312         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18313         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18314 echo "$as_me:18314: result: $DFT_DEP_SUFFIX" >&5
18315 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18316
18317 echo "$as_me:18317: checking default object directory" >&5
18318 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18319
18320         case $DFT_LWR_MODEL in
18321         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18322         normal)  DFT_OBJ_SUBDIR='objects' ;;
18323         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18324         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18325         shared)
18326                 case $cf_cv_system_name in #(vi
18327                 cygwin) #(vi
18328                         DFT_OBJ_SUBDIR='objects' ;;
18329                 *)
18330                         DFT_OBJ_SUBDIR='obj_s' ;;
18331                 esac
18332         esac
18333 echo "$as_me:18333: result: $DFT_OBJ_SUBDIR" >&5
18334 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18335
18336 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18337 if test "$cf_with_cxx" = yes ; then
18338 echo "$as_me:18338: checking c++ library-dependency suffix" >&5
18339 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18340 if test "$with_libtool" != "no"; then
18341         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18342 else
18343
18344         case normal in #(vi
18345         libtool) #(vi
18346                 CXX_LIB_SUFFIX='.la'
18347                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18348                 ;;
18349         normal) #(vi
18350                 CXX_LIB_SUFFIX='.a'
18351                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18352                 ;;
18353         debug) #(vi
18354                 CXX_LIB_SUFFIX='_g.a'
18355                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18356                 ;;
18357         profile) #(vi
18358                 CXX_LIB_SUFFIX='_p.a'
18359                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18360                 ;;
18361         shared) #(vi
18362                 case $cf_cv_system_name in
18363                 aix[56]*) #(vi
18364                         CXX_LIB_SUFFIX='.a'
18365                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18366                         ;;
18367                 cygwin*) #(vi
18368                         CXX_LIB_SUFFIX='.dll'
18369                         CXX_DEP_SUFFIX='.dll.a'
18370                         ;;
18371                 darwin*) #(vi
18372                         CXX_LIB_SUFFIX='.dylib'
18373                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18374                         ;;
18375                 hpux*) #(vi
18376                         case $target in
18377                         ia64*) #(vi
18378                                 CXX_LIB_SUFFIX='.so'
18379                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18380                                 ;;
18381                         *) #(vi
18382                                 CXX_LIB_SUFFIX='.sl'
18383                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18384                                 ;;
18385                         esac
18386                         ;;
18387                 *)      CXX_LIB_SUFFIX='.so'
18388                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18389                         ;;
18390                 esac
18391         esac
18392         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18393         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18394 fi
18395 echo "$as_me:18395: result: $CXX_LIB_SUFFIX" >&5
18396 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18397
18398 fi
18399
18400 # do not want -ldl in build except as needed for -lncurses dependency
18401 if test "$with_dlsym" = yes ; then
18402 if test $DFT_LWR_MODEL = shared || \
18403    test $DFT_LWR_MODEL = libtool ; then
18404
18405 # remove dl library from $LIBS
18406 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18407
18408 fi
18409 fi
18410 ### Set up low-level terminfo dependencies for makefiles.
18411
18412 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18413 # do not need libdl
18414 TICS_LIST=
18415 if test "$with_dlsym" = yes ; then
18416
18417 # remove dl library from $SHLIB_LIST
18418 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18419
18420 fi
18421
18422 if test "$with_ticlib" != no ; then
18423
18424         if test "$with_ticlib" != yes ; then
18425                 TICS_NAME=$with_ticlib
18426                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18427                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18428                 TICS_LIB_SUFFIX="${with_ticlib}"
18429         else
18430                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18431                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18432                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18433         fi
18434         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18435 else
18436         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18437 fi
18438
18439 if test "$with_termlib" != no ; then
18440
18441         if test "$with_termlib" != yes ; then
18442                 TINFO_NAME=$with_termlib
18443                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18444                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18445                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18446                 TINFO_LIB_SUFFIX="${with_termlib}"
18447         else
18448                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18449                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18450                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18451                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18452         fi
18453
18454         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18455         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18456         if test "$DFT_LWR_MODEL" = "libtool"; then
18457                 TEST_ARGS="${TEST_DEPS}"
18458                 TEST_ARG2="${TEST_DEP2}"
18459                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18460                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18461                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18462         else
18463                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18464                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18465                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18466                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18467                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18468         fi
18469 else
18470         # the next lines are needed for linking libtic over libncurses
18471         TINFO_NAME=${LIB_NAME}
18472         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18473         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18474         if test "$with_tic_depends" = yes ; then
18475                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18476         else
18477                 TICS_LIST="$SHLIB_LIST"
18478         fi
18479
18480         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18481 fi
18482
18483 if test "$DFT_LWR_MODEL" = shared ; then
18484         case $cf_cv_system_name in #(vi
18485         cygwin*)
18486                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18487                 TINFO_SUFFIX=.dll
18488                 ;;
18489         esac
18490 fi
18491
18492 if test "$with_dlsym" = yes ; then
18493
18494 # remove dl library from $TICS_LIST
18495 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18496
18497 fi
18498
18499 if test "$DFT_LWR_MODEL" = "libtool"; then
18500     OBJEXT=lo
18501 fi
18502
18503 # needed for Ada95
18504 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18505
18506 case $DFT_LWR_MODEL in
18507 normal|debug|profile)
18508
18509 if test "$GCC" = yes ; then
18510         case $cf_cv_system_name in #(
18511         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18512                 LDFLAGS_STATIC=
18513                 LDFLAGS_SHARED=
18514                 ;;
18515     *)  #( normally, except when broken
18516         LDFLAGS_STATIC=-static
18517         LDFLAGS_SHARED=-dynamic
18518         ;;
18519     esac
18520 else
18521         case $cf_cv_system_name in #(
18522         aix[456]*)      #( from ld manpage
18523                 LDFLAGS_STATIC=-bstatic
18524                 LDFLAGS_SHARED=-bdynamic
18525                 ;;
18526         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18527                 # We could also use just "archive" and "shared".
18528                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18529                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18530                 ;;
18531         irix*)          #( from ld manpage IRIX64
18532                 LDFLAGS_STATIC=-Bstatic
18533                 LDFLAGS_SHARED=-Bdynamic
18534                 ;;
18535         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18536                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18537                 LDFLAGS_STATIC=-noso
18538                 LDFLAGS_SHARED=-so_archive
18539                 ;;
18540         solaris2*)
18541                 LDFLAGS_STATIC=-Bstatic
18542                 LDFLAGS_SHARED=-Bdynamic
18543                 ;;
18544         esac
18545 fi
18546
18547         ;;
18548 esac
18549
18550 echo "$as_me:18550: checking where we will install curses.h" >&5
18551 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18552 test "$with_overwrite" = no && \
18553 test "x$includedir" = 'x${prefix}/include' && \
18554         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18555 echo "$as_me:18555: result: $includedir" >&5
18556 echo "${ECHO_T}$includedir" >&6
18557
18558 ### Resolve a conflict between normal and wide-curses by forcing applications
18559 ### that will need libutf8 to add it to their configure script.
18560 if test "$with_overwrite" != no ; then
18561 if test "$NCURSES_LIBUTF8" = 1 ; then
18562         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18563         { echo "$as_me:18563: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18564 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18565 fi
18566 fi
18567 WITH_OVERWRITE=$with_overwrite
18568
18569 # used to separate tack out of the tree
18570 NCURSES_TREE=
18571
18572 ### predefined stuff for the test programs
18573 cat >>confdefs.h <<\EOF
18574 #define HAVE_SLK_COLOR 1
18575 EOF
18576
18577 ### Construct the list of subdirectories for which we'll customize makefiles
18578 ### with the appropriate compile-rules.
18579
18580 echo "$as_me:18580: checking for src modules" >&5
18581 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18582
18583 # dependencies and linker-arguments for test-programs
18584 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18585 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18586 if test "$DFT_LWR_MODEL" = "libtool"; then
18587         TEST_ARGS="${TEST_DEPS}"
18588         TEST_ARG2="${TEST_DEP2}"
18589 else
18590         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18591         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18592 fi
18593
18594 cf_cv_src_modules=
18595 for cf_dir in $modules_to_build
18596 do
18597         if test -f $srcdir/$cf_dir/modules; then
18598
18599                 # We may/may not have tack in the distribution, though the
18600                 # makefile is.
18601                 if test $cf_dir = tack ; then
18602                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18603                                 continue
18604                         fi
18605                 fi
18606
18607                 if test -z "$cf_cv_src_modules"; then
18608                         cf_cv_src_modules=$cf_dir
18609                 else
18610                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18611                 fi
18612
18613                 # Make the ncurses_cfg.h file record the library interface files as
18614                 # well.  These are header files that are the same name as their
18615                 # directory.  Ncurses is the only library that does not follow
18616                 # that pattern.
18617                 if test $cf_dir = tack ; then
18618                         continue
18619                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18620
18621 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18622
18623                         cat >>confdefs.h <<EOF
18624 #define HAVE_${cf_have_include}_H 1
18625 EOF
18626
18627                         cat >>confdefs.h <<EOF
18628 #define HAVE_LIB${cf_have_include} 1
18629 EOF
18630
18631                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18632                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18633                         if test "$DFT_LWR_MODEL" = "libtool"; then
18634                                 TEST_ARGS="${TEST_DEPS}"
18635                                 TEST_ARG2="${TEST_DEP2}"
18636                         else
18637                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18638                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18639                         fi
18640                 fi
18641         fi
18642 done
18643 echo "$as_me:18643: result: $cf_cv_src_modules" >&5
18644 echo "${ECHO_T}$cf_cv_src_modules" >&6
18645
18646 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18647 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18648
18649 SRC_SUBDIRS=
18650 if test "x$cf_with_manpages" != xno ; then
18651         SRC_SUBDIRS="$SRC_SUBDIRS man"
18652 fi
18653 SRC_SUBDIRS="$SRC_SUBDIRS include"
18654 for cf_dir in $cf_cv_src_modules
18655 do
18656         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18657 done
18658 SRC_SUBDIRS="$SRC_SUBDIRS test"
18659 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18660 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18661
18662 ADA_SUBDIRS=
18663 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18664         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18665         ADA_SUBDIRS="gen src samples"
18666 fi
18667
18668 SUB_MAKEFILES=
18669 for cf_dir in $SRC_SUBDIRS
18670 do
18671         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18672 done
18673
18674 if test -n "$ADA_SUBDIRS"; then
18675         for cf_dir in $ADA_SUBDIRS
18676         do
18677                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18678         done
18679
18680 fi
18681
18682 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18683    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18684    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18685 fi
18686
18687 DIRS_TO_MAKE="lib"
18688 for cf_item in $cf_list_models
18689 do
18690
18691         case $cf_item in
18692         libtool) cf_subdir='obj_lo'  ;;
18693         normal)  cf_subdir='objects' ;;
18694         debug)   cf_subdir='obj_g' ;;
18695         profile) cf_subdir='obj_p' ;;
18696         shared)
18697                 case $cf_cv_system_name in #(vi
18698                 cygwin) #(vi
18699                         cf_subdir='objects' ;;
18700                 *)
18701                         cf_subdir='obj_s' ;;
18702                 esac
18703         esac
18704
18705         for cf_item2 in $DIRS_TO_MAKE
18706         do
18707                 test $cf_item2 = $cf_subdir && break
18708         done
18709         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18710 done
18711 for cf_dir in $DIRS_TO_MAKE
18712 do
18713         test ! -d $cf_dir && mkdir $cf_dir
18714 done
18715
18716 # symbols that differ when compiling Ada95 by itself.
18717 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18718
18719 # values to use as strings
18720 cat >>confdefs.h <<EOF
18721 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18722 EOF
18723
18724 cat >>confdefs.h <<EOF
18725 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18726 EOF
18727
18728 ### Now that we're done running tests, add the compiler-warnings, if any
18729
18730 cf_fix_cppflags=no
18731 cf_new_cflags=
18732 cf_new_cppflags=
18733 cf_new_extra_cppflags=
18734
18735 for cf_add_cflags in $EXTRA_CFLAGS
18736 do
18737 case $cf_fix_cppflags in
18738 no)
18739         case $cf_add_cflags in #(vi
18740         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18741                 case $cf_add_cflags in
18742                 -D*)
18743                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18744
18745                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18746                                 && test -z "${cf_tst_cflags}" \
18747                                 && cf_fix_cppflags=yes
18748
18749                         if test $cf_fix_cppflags = yes ; then
18750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18751                                 continue
18752                         elif test "${cf_tst_cflags}" = "\"'" ; then
18753                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18754                                 continue
18755                         fi
18756                         ;;
18757                 esac
18758                 case "$CPPFLAGS" in
18759                 *$cf_add_cflags) #(vi
18760                         ;;
18761                 *) #(vi
18762                         case $cf_add_cflags in #(vi
18763                         -D*)
18764                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18765
18766 CPPFLAGS=`echo "$CPPFLAGS" | \
18767         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18768                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18769
18770                                 ;;
18771                         esac
18772                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18773                         ;;
18774                 esac
18775                 ;;
18776         *)
18777                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18778                 ;;
18779         esac
18780         ;;
18781 yes)
18782         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18783
18784         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18785
18786         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18787                 && test -z "${cf_tst_cflags}" \
18788                 && cf_fix_cppflags=no
18789         ;;
18790 esac
18791 done
18792
18793 if test -n "$cf_new_cflags" ; then
18794
18795         CFLAGS="$CFLAGS $cf_new_cflags"
18796 fi
18797
18798 if test -n "$cf_new_cppflags" ; then
18799
18800         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18801 fi
18802
18803 if test -n "$cf_new_extra_cppflags" ; then
18804
18805         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18806 fi
18807
18808 ### Define substitutions for header files to avoid name-pollution
18809
18810 if test "$cf_cv_have_tcgetattr" = yes ; then
18811         HAVE_TCGETATTR=1
18812 else
18813         HAVE_TCGETATTR=0
18814 fi
18815
18816 if test "$ac_cv_header_termio_h" = yes ; then
18817         HAVE_TERMIO_H=1
18818 else
18819         HAVE_TERMIO_H=0
18820 fi
18821
18822 if test "$ac_cv_header_termios_h" = yes ; then
18823         HAVE_TERMIOS_H=1
18824 else
18825         HAVE_TERMIOS_H=0
18826 fi
18827
18828 ################################################################################
18829 test "$use_database" = yes && \
18830 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18831
18832 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18833 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18834
18835 if test x"$enable_pc_files" = xyes ; then \
18836 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18837 MAKE_PC_FILES=
18838 else
18839 MAKE_PC_FILES="#"
18840 fi
18841
18842 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_MAKEFILES Makefile"
18843 ac_config_commands="$ac_config_commands default"
18844 cat >confcache <<\_ACEOF
18845 # This file is a shell script that caches the results of configure
18846 # tests run on this system so they can be shared between configure
18847 # scripts and configure runs, see configure's option --config-cache.
18848 # It is not useful on other systems.  If it contains results you don't
18849 # want to keep, you may remove or edit it.
18850 #
18851 # config.status only pays attention to the cache file if you give it
18852 # the --recheck option to rerun configure.
18853 #
18854 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18855 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18856 # following values.
18857
18858 _ACEOF
18859
18860 # The following way of writing the cache mishandles newlines in values,
18861 # but we know of no workaround that is simple, portable, and efficient.
18862 # So, don't put newlines in cache variables' values.
18863 # Ultrix sh set writes to stderr and can't be redirected directly,
18864 # and sets the high bit in the cache file unless we assign to the vars.
18865 {
18866   (set) 2>&1 |
18867     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18868     *ac_space=\ *)
18869       # `set' does not quote correctly, so add quotes (double-quote
18870       # substitution turns \\\\ into \\, and sed turns \\ into \).
18871       sed -n \
18872         "s/'/'\\\\''/g;
18873           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18874       ;;
18875     *)
18876       # `set' quotes correctly as required by POSIX, so do not add quotes.
18877       sed -n \
18878         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18879       ;;
18880     esac;
18881 } |
18882   sed '
18883      t clear
18884      : clear
18885      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18886      t end
18887      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18888      : end' >>confcache
18889 if cmp -s $cache_file confcache; then :; else
18890   if test -w $cache_file; then
18891     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18892     cat confcache >$cache_file
18893   else
18894     echo "not updating unwritable cache $cache_file"
18895   fi
18896 fi
18897 rm -f confcache
18898
18899 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18900 # Let make expand exec_prefix.
18901 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18902
18903 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18904 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18905 # trailing colons and then remove the whole line if VPATH becomes empty
18906 # (actually we leave an empty line to preserve line numbers).
18907 if test "x$srcdir" = x.; then
18908   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18909 s/:*\$(srcdir):*/:/;
18910 s/:*\${srcdir}:*/:/;
18911 s/:*@srcdir@:*/:/;
18912 s/^\([^=]*=[    ]*\):*/\1/;
18913 s/:*$//;
18914 s/^[^=]*=[      ]*$//;
18915 }'
18916 fi
18917
18918 DEFS=-DHAVE_CONFIG_H
18919
18920 : ${CONFIG_STATUS=./config.status}
18921 ac_clean_files_save=$ac_clean_files
18922 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18923 { echo "$as_me:18923: creating $CONFIG_STATUS" >&5
18924 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18925 cat >$CONFIG_STATUS <<_ACEOF
18926 #! $SHELL
18927 # Generated automatically by configure.
18928 # Run this file to recreate the current configuration.
18929 # Compiler output produced by configure, useful for debugging
18930 # configure, is in config.log if it exists.
18931
18932 debug=false
18933 SHELL=\${CONFIG_SHELL-$SHELL}
18934 ac_cs_invocation="\$0 \$@"
18935
18936 _ACEOF
18937
18938 cat >>$CONFIG_STATUS <<\_ACEOF
18939 # Be Bourne compatible
18940 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18941   emulate sh
18942   NULLCMD=:
18943 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18944   set -o posix
18945 fi
18946
18947 # Name of the executable.
18948 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18949
18950 if expr a : '\(a\)' >/dev/null 2>&1; then
18951   as_expr=expr
18952 else
18953   as_expr=false
18954 fi
18955
18956 rm -f conf$$ conf$$.exe conf$$.file
18957 echo >conf$$.file
18958 if ln -s conf$$.file conf$$ 2>/dev/null; then
18959   # We could just check for DJGPP; but this test a) works b) is more generic
18960   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18961   if test -f conf$$.exe; then
18962     # Don't use ln at all; we don't have any links
18963     as_ln_s='cp -p'
18964   else
18965     as_ln_s='ln -s'
18966   fi
18967 elif ln conf$$.file conf$$ 2>/dev/null; then
18968   as_ln_s=ln
18969 else
18970   as_ln_s='cp -p'
18971 fi
18972 rm -f conf$$ conf$$.exe conf$$.file
18973
18974 as_executable_p="test -f"
18975
18976 # Support unset when possible.
18977 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18978   as_unset=unset
18979 else
18980   as_unset=false
18981 fi
18982
18983 # NLS nuisances.
18984 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18985 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18986 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18987 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18988 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18989 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18990 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18991 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18992
18993 # IFS
18994 # We need space, tab and new line, in precisely that order.
18995 as_nl='
18996 '
18997 IFS="   $as_nl"
18998
18999 # CDPATH.
19000 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19001
19002 exec 6>&1
19003
19004 _ACEOF
19005
19006 # Files that config.status was made for.
19007 if test -n "$ac_config_files"; then
19008   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19009 fi
19010
19011 if test -n "$ac_config_headers"; then
19012   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19013 fi
19014
19015 if test -n "$ac_config_links"; then
19016   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19017 fi
19018
19019 if test -n "$ac_config_commands"; then
19020   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19021 fi
19022
19023 cat >>$CONFIG_STATUS <<\EOF
19024
19025 ac_cs_usage="\
19026 \`$as_me' instantiates files from templates according to the
19027 current configuration.
19028
19029 Usage: $0 [OPTIONS] [FILE]...
19030
19031   -h, --help       print this help, then exit
19032   -V, --version    print version number, then exit
19033   -d, --debug      don't remove temporary files
19034       --recheck    update $as_me by reconfiguring in the same conditions
19035   --file=FILE[:TEMPLATE]
19036                    instantiate the configuration file FILE
19037   --header=FILE[:TEMPLATE]
19038                    instantiate the configuration header FILE
19039
19040 Configuration files:
19041 $config_files
19042
19043 Configuration headers:
19044 $config_headers
19045
19046 Configuration commands:
19047 $config_commands
19048
19049 Report bugs to <bug-autoconf@gnu.org>."
19050 EOF
19051
19052 cat >>$CONFIG_STATUS <<EOF
19053 ac_cs_version="\\
19054 config.status
19055 configured by $0, generated by GNU Autoconf 2.52.20100530,
19056   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19057
19058 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19059 Free Software Foundation, Inc.
19060 This config.status script is free software; the Free Software Foundation
19061 gives unlimited permission to copy, distribute and modify it."
19062 srcdir=$srcdir
19063 INSTALL="$INSTALL"
19064 EOF
19065
19066 cat >>$CONFIG_STATUS <<\EOF
19067 # If no file are specified by the user, then we need to provide default
19068 # value.  By we need to know if files were specified by the user.
19069 ac_need_defaults=:
19070 while test $# != 0
19071 do
19072   case $1 in
19073   --*=*)
19074     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19075     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19076     shift
19077     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19078     shift
19079     ;;
19080   -*);;
19081   *) # This is not an option, so the user has probably given explicit
19082      # arguments.
19083      ac_need_defaults=false;;
19084   esac
19085
19086   case $1 in
19087   # Handling of the options.
19088 EOF
19089 cat >>$CONFIG_STATUS <<EOF
19090   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19091     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19092     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19093 EOF
19094 cat >>$CONFIG_STATUS <<\EOF
19095   --version | --vers* | -V )
19096     echo "$ac_cs_version"; exit 0 ;;
19097   --he | --h)
19098     # Conflict between --help and --header
19099     { { echo "$as_me:19099: error: ambiguous option: $1
19100 Try \`$0 --help' for more information." >&5
19101 echo "$as_me: error: ambiguous option: $1
19102 Try \`$0 --help' for more information." >&2;}
19103    { (exit 1); exit 1; }; };;
19104   --help | --hel | -h )
19105     echo "$ac_cs_usage"; exit 0 ;;
19106   --debug | --d* | -d )
19107     debug=: ;;
19108   --file | --fil | --fi | --f )
19109     shift
19110     CONFIG_FILES="$CONFIG_FILES $1"
19111     ac_need_defaults=false;;
19112   --header | --heade | --head | --hea )
19113     shift
19114     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19115     ac_need_defaults=false;;
19116
19117   # This is an error.
19118   -*) { { echo "$as_me:19118: error: unrecognized option: $1
19119 Try \`$0 --help' for more information." >&5
19120 echo "$as_me: error: unrecognized option: $1
19121 Try \`$0 --help' for more information." >&2;}
19122    { (exit 1); exit 1; }; } ;;
19123
19124   *) ac_config_targets="$ac_config_targets $1" ;;
19125
19126   esac
19127   shift
19128 done
19129
19130 exec 5>>config.log
19131 cat >&5 << _ACEOF
19132
19133 ## ----------------------- ##
19134 ## Running config.status.  ##
19135 ## ----------------------- ##
19136
19137 This file was extended by $as_me 2.52.20100530, executed with
19138   CONFIG_FILES    = $CONFIG_FILES
19139   CONFIG_HEADERS  = $CONFIG_HEADERS
19140   CONFIG_LINKS    = $CONFIG_LINKS
19141   CONFIG_COMMANDS = $CONFIG_COMMANDS
19142   > $ac_cs_invocation
19143 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19144
19145 _ACEOF
19146 EOF
19147
19148 cat >>$CONFIG_STATUS <<EOF
19149 #
19150 # INIT-COMMANDS section.
19151 #
19152
19153 ### Special initialization commands, used to pass information from the
19154 ### configuration-run into config.status
19155
19156 AWK="$AWK"
19157 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19158 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19159 ECHO_LINK="$ECHO_LINK"
19160 LDCONFIG="$LDCONFIG"
19161 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19162 LIB_NAME="$LIB_NAME"
19163 LIB_SUBSETS="$LIB_SUBSETS"
19164 LIB_SUFFIX="$LIB_SUFFIX"
19165 LIB_TRACING="$LIB_TRACING"
19166 MAKE_TERMINFO="$MAKE_TERMINFO"
19167 NCURSES_MAJOR="$NCURSES_MAJOR"
19168 NCURSES_MINOR="$NCURSES_MINOR"
19169 NCURSES_OSPEED="$NCURSES_OSPEED"
19170 NCURSES_PATCH="$NCURSES_PATCH"
19171 SRC_SUBDIRS="$SRC_SUBDIRS"
19172 TERMINFO="$TERMINFO"
19173 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19174 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19175 TICS_NAME="$TICS_NAME"
19176 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19177 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19178 TINFO_NAME="$TINFO_NAME"
19179 TINFO_SUFFIX="$TINFO_SUFFIX"
19180 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19181 WITH_CURSES_H="$with_curses_h"
19182 WITH_ECHO="$with_echo"
19183 WITH_OVERWRITE="$with_overwrite"
19184 cf_LIST_MODELS="$cf_list_models"
19185 cf_cv_abi_version="$cf_cv_abi_version"
19186 cf_cv_do_relink="$cf_cv_do_relink"
19187 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19188 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19189 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19190 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19191 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19192 cf_cv_rel_version="$cf_cv_rel_version"
19193 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19194 cf_cv_shared_soname='$cf_cv_shared_soname'
19195 cf_cv_shlib_version="$cf_cv_shlib_version"
19196 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19197 cf_cv_system_name="$cf_cv_system_name"
19198 cf_with_ada="$cf_with_ada"
19199 cf_with_cxx_binding="$cf_with_cxx_binding"
19200 cf_with_manpages="$cf_with_manpages"
19201 host="$host"
19202 target="$target"
19203
19204 EOF
19205
19206 cat >>$CONFIG_STATUS <<\EOF
19207 for ac_config_target in $ac_config_targets
19208 do
19209   case "$ac_config_target" in
19210   # Handling of arguments.
19211   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19212   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19213   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19214   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19215   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19216   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19217   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19218   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19219   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19220   *) { { echo "$as_me:19220: error: invalid argument: $ac_config_target" >&5
19221 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19222    { (exit 1); exit 1; }; };;
19223   esac
19224 done
19225
19226 # If the user did not use the arguments to specify the items to instantiate,
19227 # then the envvar interface is used.  Set only those that are not.
19228 # We use the long form for the default assignment because of an extremely
19229 # bizarre bug on SunOS 4.1.3.
19230 if $ac_need_defaults; then
19231   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19232   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19233   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19234 fi
19235
19236 # Create a temporary directory, and hook for its removal unless debugging.
19237 $debug ||
19238 {
19239   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19240   trap '{ (exit 1); exit 1; }' 1 2 13 15
19241 }
19242
19243 # Create a (secure) tmp directory for tmp files.
19244 : ${TMPDIR=/tmp}
19245 {
19246   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19247   test -n "$tmp" && test -d "$tmp"
19248 }  ||
19249 {
19250   tmp=$TMPDIR/cs$$-$RANDOM
19251   (umask 077 && mkdir $tmp)
19252 } ||
19253 {
19254    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19255    { (exit 1); exit 1; }
19256 }
19257
19258 EOF
19259
19260 cat >>$CONFIG_STATUS <<EOF
19261
19262 #
19263 # CONFIG_FILES section.
19264 #
19265
19266 # No need to generate the scripts if there are no CONFIG_FILES.
19267 # This happens for instance when ./config.status config.h
19268 if test -n "\$CONFIG_FILES"; then
19269   # Protect against being on the right side of a sed subst in config.status.
19270   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19271    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19272 s,@SHELL@,$SHELL,;t t
19273 s,@exec_prefix@,$exec_prefix,;t t
19274 s,@prefix@,$prefix,;t t
19275 s,@program_transform_name@,$program_transform_name,;t t
19276 s,@bindir@,$bindir,;t t
19277 s,@sbindir@,$sbindir,;t t
19278 s,@libexecdir@,$libexecdir,;t t
19279 s,@datadir@,$datadir,;t t
19280 s,@sysconfdir@,$sysconfdir,;t t
19281 s,@sharedstatedir@,$sharedstatedir,;t t
19282 s,@localstatedir@,$localstatedir,;t t
19283 s,@libdir@,$libdir,;t t
19284 s,@includedir@,$includedir,;t t
19285 s,@oldincludedir@,$oldincludedir,;t t
19286 s,@infodir@,$infodir,;t t
19287 s,@mandir@,$mandir,;t t
19288 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19289 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19290 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19291 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19292 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19293 s,@build_alias@,$build_alias,;t t
19294 s,@host_alias@,$host_alias,;t t
19295 s,@target_alias@,$target_alias,;t t
19296 s,@ECHO_C@,$ECHO_C,;t t
19297 s,@ECHO_N@,$ECHO_N,;t t
19298 s,@ECHO_T@,$ECHO_T,;t t
19299 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19300 s,@DEFS@,$DEFS,;t t
19301 s,@LIBS@,$LIBS,;t t
19302 s,@top_builddir@,$top_builddir,;t t
19303 s,@EGREP@,$EGREP,;t t
19304 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19305 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19306 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19307 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19308 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19309 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19310 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19311 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19312 s,@build@,$build,;t t
19313 s,@build_cpu@,$build_cpu,;t t
19314 s,@build_vendor@,$build_vendor,;t t
19315 s,@build_os@,$build_os,;t t
19316 s,@host@,$host,;t t
19317 s,@host_cpu@,$host_cpu,;t t
19318 s,@host_vendor@,$host_vendor,;t t
19319 s,@host_os@,$host_os,;t t
19320 s,@target@,$target,;t t
19321 s,@target_cpu@,$target_cpu,;t t
19322 s,@target_vendor@,$target_vendor,;t t
19323 s,@target_os@,$target_os,;t t
19324 s,@CC@,$CC,;t t
19325 s,@CFLAGS@,$CFLAGS,;t t
19326 s,@LDFLAGS@,$LDFLAGS,;t t
19327 s,@CPPFLAGS@,$CPPFLAGS,;t t
19328 s,@ac_ct_CC@,$ac_ct_CC,;t t
19329 s,@EXEEXT@,$EXEEXT,;t t
19330 s,@OBJEXT@,$OBJEXT,;t t
19331 s,@CPP@,$CPP,;t t
19332 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19333 s,@PROG_EXT@,$PROG_EXT,;t t
19334 s,@LDCONFIG@,$LDCONFIG,;t t
19335 s,@CXX@,$CXX,;t t
19336 s,@CXXFLAGS@,$CXXFLAGS,;t t
19337 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19338 s,@AWK@,$AWK,;t t
19339 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19340 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19341 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19342 s,@LINT@,$LINT,;t t
19343 s,@LINT_OPTS@,$LINT_OPTS,;t t
19344 s,@LN_S@,$LN_S,;t t
19345 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19346 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19347 s,@SET_MAKE@,$SET_MAKE,;t t
19348 s,@CTAGS@,$CTAGS,;t t
19349 s,@ETAGS@,$ETAGS,;t t
19350 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19351 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19352 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19353 s,@RANLIB@,$RANLIB,;t t
19354 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19355 s,@LD@,$LD,;t t
19356 s,@ac_ct_LD@,$ac_ct_LD,;t t
19357 s,@AR@,$AR,;t t
19358 s,@ac_ct_AR@,$ac_ct_AR,;t t
19359 s,@ARFLAGS@,$ARFLAGS,;t t
19360 s,@DESTDIR@,$DESTDIR,;t t
19361 s,@BUILD_CC@,$BUILD_CC,;t t
19362 s,@BUILD_CPP@,$BUILD_CPP,;t t
19363 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19364 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19365 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19366 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19367 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19368 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19369 s,@cf_list_models@,$cf_list_models,;t t
19370 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19371 s,@LIBTOOL@,$LIBTOOL,;t t
19372 s,@LT_UNDEF@,$LT_UNDEF,;t t
19373 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19374 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19375 s,@LIB_CREATE@,$LIB_CREATE,;t t
19376 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19377 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19378 s,@LIB_PREP@,$LIB_PREP,;t t
19379 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19380 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19381 s,@LIB_LINK@,$LIB_LINK,;t t
19382 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19383 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19384 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19385 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19386 s,@TICS_NAME@,$TICS_NAME,;t t
19387 s,@TINFO_NAME@,$TINFO_NAME,;t t
19388 s,@LIB_NAME@,$LIB_NAME,;t t
19389 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19390 s,@CC_G_OPT@,$CC_G_OPT,;t t
19391 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19392 s,@LD_MODEL@,$LD_MODEL,;t t
19393 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19394 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19395 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19396 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19397 s,@LINK_PROGS@,$LINK_PROGS,;t t
19398 s,@LINK_TESTS@,$LINK_TESTS,;t t
19399 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19400 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19401 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19402 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19403 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19404 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19405 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19406 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19407 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19408 s,@TERMINFO@,$TERMINFO,;t t
19409 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19410 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19411 s,@TERMPATH@,$TERMPATH,;t t
19412 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19413 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19414 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19415 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19416 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19417 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19418 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19419 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19420 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19421 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19422 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19423 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19424 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19425 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19426 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19427 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19428 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19429 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19430 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19431 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19432 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19433 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19434 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19435 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19436 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19437 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19438 s,@PTHREAD@,$PTHREAD,;t t
19439 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19440 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19441 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19442 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19443 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19444 s,@ECHO_LINK@,$ECHO_LINK,;t t
19445 s,@ADAFLAGS@,$ADAFLAGS,;t t
19446 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19447 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19448 s,@ADA_TRACE@,$ADA_TRACE,;t t
19449 s,@MATH_LIB@,$MATH_LIB,;t t
19450 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19451 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19452 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19453 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19454 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19455 s,@TEST_LIBS@,$TEST_LIBS,;t t
19456 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19457 s,@CXXCPP@,$CXXCPP,;t t
19458 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19459 s,@CXX_AR@,$CXX_AR,;t t
19460 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19461 s,@CXXLIBS@,$CXXLIBS,;t t
19462 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19463 s,@gnat_exists@,$gnat_exists,;t t
19464 s,@cf_compile_generics@,$cf_compile_generics,;t t
19465 s,@cf_generic_objects@,$cf_generic_objects,;t t
19466 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
19467 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
19468 s,@M4_exists@,$M4_exists,;t t
19469 s,@cf_ada_make@,$cf_ada_make,;t t
19470 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19471 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19472 s,@cf_ada_package@,$cf_ada_package,;t t
19473 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19474 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19475 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
19476 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
19477 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19478 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19479 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19480 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19481 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19482 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19483 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19484 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19485 s,@TICS_ARGS@,$TICS_ARGS,;t t
19486 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19487 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19488 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19489 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19490 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19491 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19492 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19493 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19494 s,@TICS_LIST@,$TICS_LIST,;t t
19495 s,@TINFO_LIST@,$TINFO_LIST,;t t
19496 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19497 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19498 s,@TEST_ARGS@,$TEST_ARGS,;t t
19499 s,@TEST_DEPS@,$TEST_DEPS,;t t
19500 s,@TEST_ARG2@,$TEST_ARG2,;t t
19501 s,@TEST_DEP2@,$TEST_DEP2,;t t
19502 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19503 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19504 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19505 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19506 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19507 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19508 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19509 s,@cross_compiling@,$cross_compiling,;t t
19510 CEOF
19511
19512 EOF
19513
19514   cat >>$CONFIG_STATUS <<\EOF
19515   # Split the substitutions into bite-sized pieces for seds with
19516   # small command number limits, like on Digital OSF/1 and HP-UX.
19517   ac_max_sed_lines=48
19518   ac_sed_frag=1 # Number of current file.
19519   ac_beg=1 # First line for current file.
19520   ac_end=$ac_max_sed_lines # Line after last line for current file.
19521   ac_more_lines=:
19522   ac_sed_cmds=
19523   while $ac_more_lines; do
19524     if test $ac_beg -gt 1; then
19525       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19526     else
19527       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19528     fi
19529     if test ! -s $tmp/subs.frag; then
19530       ac_more_lines=false
19531     else
19532       # The purpose of the label and of the branching condition is to
19533       # speed up the sed processing (if there are no `@' at all, there
19534       # is no need to browse any of the substitutions).
19535       # These are the two extra sed commands mentioned above.
19536       (echo ':t
19537   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19538       if test -z "$ac_sed_cmds"; then
19539         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19540       else
19541         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19542       fi
19543       ac_sed_frag=`expr $ac_sed_frag + 1`
19544       ac_beg=$ac_end
19545       ac_end=`expr $ac_end + $ac_max_sed_lines`
19546     fi
19547   done
19548   if test -z "$ac_sed_cmds"; then
19549     ac_sed_cmds=cat
19550   fi
19551 fi # test -n "$CONFIG_FILES"
19552
19553 EOF
19554 cat >>$CONFIG_STATUS <<\EOF
19555 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19556   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19557   case $ac_file in
19558   - | *:- | *:-:* ) # input from stdin
19559         cat >$tmp/stdin
19560         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19561         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19562   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19563         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19564   * )   ac_file_in=$ac_file.in ;;
19565   esac
19566
19567   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19568   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19569          X"$ac_file" : 'X\(//\)[^/]' \| \
19570          X"$ac_file" : 'X\(//\)$' \| \
19571          X"$ac_file" : 'X\(/\)' \| \
19572          .     : '\(.\)' 2>/dev/null ||
19573 echo X"$ac_file" |
19574     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19575           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19576           /^X\(\/\/\)$/{ s//\1/; q; }
19577           /^X\(\/\).*/{ s//\1/; q; }
19578           s/.*/./; q'`
19579   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19580     { case "$ac_dir" in
19581   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19582   *)                      as_incr_dir=.;;
19583 esac
19584 as_dummy="$ac_dir"
19585 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19586   case $as_mkdir_dir in
19587     # Skip DOS drivespec
19588     ?:) as_incr_dir=$as_mkdir_dir ;;
19589     *)
19590       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19591       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19592     ;;
19593   esac
19594 done; }
19595
19596     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19597     # A "../" for each directory in $ac_dir_suffix.
19598     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19599   else
19600     ac_dir_suffix= ac_dots=
19601   fi
19602
19603   case $srcdir in
19604   .)  ac_srcdir=.
19605       if test -z "$ac_dots"; then
19606          ac_top_srcdir=.
19607       else
19608          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19609       fi ;;
19610   [\\/]* | ?:[\\/]* )
19611       ac_srcdir=$srcdir$ac_dir_suffix;
19612       ac_top_srcdir=$srcdir ;;
19613   *) # Relative path.
19614     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19615     ac_top_srcdir=$ac_dots$srcdir ;;
19616   esac
19617
19618   case $INSTALL in
19619   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19620   *) ac_INSTALL=$ac_dots$INSTALL ;;
19621   esac
19622
19623   if test x"$ac_file" != x-; then
19624     { echo "$as_me:19624: creating $ac_file" >&5
19625 echo "$as_me: creating $ac_file" >&6;}
19626     rm -f "$ac_file"
19627   fi
19628   # Let's still pretend it is `configure' which instantiates (i.e., don't
19629   # use $as_me), people would be surprised to read:
19630   #    /* config.h.  Generated automatically by config.status.  */
19631   configure_input="Generated automatically from `echo $ac_file_in |
19632                                                  sed 's,.*/,,'` by configure."
19633
19634   # First look for the input files in the build tree, otherwise in the
19635   # src tree.
19636   ac_file_inputs=`IFS=:
19637     for f in $ac_file_in; do
19638       case $f in
19639       -) echo $tmp/stdin ;;
19640       [\\/$]*)
19641          # Absolute (can't be DOS-style, as IFS=:)
19642          test -f "$f" || { { echo "$as_me:19642: error: cannot find input file: $f" >&5
19643 echo "$as_me: error: cannot find input file: $f" >&2;}
19644    { (exit 1); exit 1; }; }
19645          echo $f;;
19646       *) # Relative
19647          if test -f "$f"; then
19648            # Build tree
19649            echo $f
19650          elif test -f "$srcdir/$f"; then
19651            # Source tree
19652            echo $srcdir/$f
19653          else
19654            # /dev/null tree
19655            { { echo "$as_me:19655: error: cannot find input file: $f" >&5
19656 echo "$as_me: error: cannot find input file: $f" >&2;}
19657    { (exit 1); exit 1; }; }
19658          fi;;
19659       esac
19660     done` || { (exit 1); exit 1; }
19661 EOF
19662 cat >>$CONFIG_STATUS <<EOF
19663   sed "$ac_vpsub
19664 $extrasub
19665 EOF
19666 cat >>$CONFIG_STATUS <<\EOF
19667 :t
19668 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19669 s,@configure_input@,$configure_input,;t t
19670 s,@srcdir@,$ac_srcdir,;t t
19671 s,@top_srcdir@,$ac_top_srcdir,;t t
19672 s,@INSTALL@,$ac_INSTALL,;t t
19673 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19674   rm -f $tmp/stdin
19675   if test x"$ac_file" != x-; then
19676     mv $tmp/out $ac_file
19677   else
19678     cat $tmp/out
19679     rm -f $tmp/out
19680   fi
19681
19682 done
19683 EOF
19684 cat >>$CONFIG_STATUS <<\EOF
19685
19686 #
19687 # CONFIG_HEADER section.
19688 #
19689
19690 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19691 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19692 #
19693 # ac_d sets the value in "#define NAME VALUE" lines.
19694 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19695 ac_dB='[        ].*$,\1#\2'
19696 ac_dC=' '
19697 ac_dD=',;t'
19698 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19699 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19700 ac_iB='\([      ]\),\1#\2define\3'
19701 ac_iC=' '
19702 ac_iD='\4,;t'
19703 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19704 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19705 ac_uB='$,\1#\2define\3'
19706 ac_uC=' '
19707 ac_uD=',;t'
19708
19709 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19710   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19711   case $ac_file in
19712   - | *:- | *:-:* ) # input from stdin
19713         cat >$tmp/stdin
19714         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19715         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19716   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19717         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19718   * )   ac_file_in=$ac_file.in ;;
19719   esac
19720
19721   test x"$ac_file" != x- && { echo "$as_me:19721: creating $ac_file" >&5
19722 echo "$as_me: creating $ac_file" >&6;}
19723
19724   # First look for the input files in the build tree, otherwise in the
19725   # src tree.
19726   ac_file_inputs=`IFS=:
19727     for f in $ac_file_in; do
19728       case $f in
19729       -) echo $tmp/stdin ;;
19730       [\\/$]*)
19731          # Absolute (can't be DOS-style, as IFS=:)
19732          test -f "$f" || { { echo "$as_me:19732: error: cannot find input file: $f" >&5
19733 echo "$as_me: error: cannot find input file: $f" >&2;}
19734    { (exit 1); exit 1; }; }
19735          echo $f;;
19736       *) # Relative
19737          if test -f "$f"; then
19738            # Build tree
19739            echo $f
19740          elif test -f "$srcdir/$f"; then
19741            # Source tree
19742            echo $srcdir/$f
19743          else
19744            # /dev/null tree
19745            { { echo "$as_me:19745: error: cannot find input file: $f" >&5
19746 echo "$as_me: error: cannot find input file: $f" >&2;}
19747    { (exit 1); exit 1; }; }
19748          fi;;
19749       esac
19750     done` || { (exit 1); exit 1; }
19751   # Remove the trailing spaces.
19752   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19753
19754 EOF
19755
19756 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19757 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19758 # be either 'cat' or 'sort'.
19759 cat confdefs.h | uniq >conftest.vals
19760
19761 # Break up conftest.vals because some shells have a limit on
19762 # the size of here documents, and old seds have small limits too.
19763
19764 rm -f conftest.tail
19765 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19766 while grep . conftest.vals >/dev/null
19767 do
19768   # Write chunks of a limited-size here document to conftest.frag.
19769   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19770   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19771   echo 'CEOF' >> $CONFIG_STATUS
19772   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19773   rm -f conftest.vals
19774   mv conftest.tail conftest.vals
19775 done
19776 rm -f conftest.vals
19777
19778 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19779 # marker @DEFS@.
19780 echo '  cat >> conftest.edit <<CEOF
19781 /@DEFS@/r conftest.frag
19782 /@DEFS@/d
19783 CEOF
19784 sed -f conftest.edit $tmp/in > $tmp/out
19785 rm -f $tmp/in
19786 mv $tmp/out $tmp/in
19787 rm -f conftest.edit conftest.frag
19788 ' >> $CONFIG_STATUS
19789
19790 cat >>$CONFIG_STATUS <<\EOF
19791   # Let's still pretend it is `configure' which instantiates (i.e., don't
19792   # use $as_me), people would be surprised to read:
19793   #    /* config.h.  Generated automatically by config.status.  */
19794   if test x"$ac_file" = x-; then
19795     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19796   else
19797     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19798   fi
19799   cat $tmp/in >>$tmp/config.h
19800   rm -f $tmp/in
19801   if test x"$ac_file" != x-; then
19802     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19803       { echo "$as_me:19803: $ac_file is unchanged" >&5
19804 echo "$as_me: $ac_file is unchanged" >&6;}
19805     else
19806       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19807          X"$ac_file" : 'X\(//\)[^/]' \| \
19808          X"$ac_file" : 'X\(//\)$' \| \
19809          X"$ac_file" : 'X\(/\)' \| \
19810          .     : '\(.\)' 2>/dev/null ||
19811 echo X"$ac_file" |
19812     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19813           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19814           /^X\(\/\/\)$/{ s//\1/; q; }
19815           /^X\(\/\).*/{ s//\1/; q; }
19816           s/.*/./; q'`
19817       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19818         { case "$ac_dir" in
19819   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19820   *)                      as_incr_dir=.;;
19821 esac
19822 as_dummy="$ac_dir"
19823 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19824   case $as_mkdir_dir in
19825     # Skip DOS drivespec
19826     ?:) as_incr_dir=$as_mkdir_dir ;;
19827     *)
19828       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19829       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19830     ;;
19831   esac
19832 done; }
19833
19834       fi
19835       rm -f $ac_file
19836       mv $tmp/config.h $ac_file
19837     fi
19838   else
19839     cat $tmp/config.h
19840     rm -f $tmp/config.h
19841   fi
19842 done
19843 EOF
19844 cat >>$CONFIG_STATUS <<\EOF
19845 #
19846 # CONFIG_COMMANDS section.
19847 #
19848 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19849   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19850   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19851
19852   case $ac_dest in
19853     default )
19854
19855 for cf_dir in test
19856 do
19857         if test ! -d $srcdir/$cf_dir; then
19858                 continue
19859         elif test -f $srcdir/$cf_dir/programs; then
19860                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19861         fi
19862 done
19863
19864         case $cf_cv_system_name in #(vi
19865         OS/2*|os2*) #(vi
19866         LIB_PREFIX=''
19867         ;;
19868         *)      LIB_PREFIX='lib'
19869         ;;
19870         esac
19871 cf_prefix=$LIB_PREFIX
19872
19873 if test $cf_cv_shlib_version = cygdll ; then
19874         TINFO_NAME=$TINFO_ARG_SUFFIX
19875         TINFO_SUFFIX=.dll
19876 fi
19877
19878 for cf_dir in $SRC_SUBDIRS
19879 do
19880         if test ! -d $srcdir/$cf_dir ; then
19881                 continue
19882         elif test -f $srcdir/$cf_dir/modules; then
19883
19884                 SHARED_LIB=
19885                 LIBS_TO_MAKE=
19886                 for cf_item in $cf_LIST_MODELS
19887                 do
19888
19889         case $cf_item in #(vi
19890         libtool) #(vi
19891                 cf_suffix='.la'
19892                 cf_depsuf=$cf_suffix
19893                 ;;
19894         normal) #(vi
19895                 cf_suffix='.a'
19896                 cf_depsuf=$cf_suffix
19897                 ;;
19898         debug) #(vi
19899                 cf_suffix='_g.a'
19900                 cf_depsuf=$cf_suffix
19901                 ;;
19902         profile) #(vi
19903                 cf_suffix='_p.a'
19904                 cf_depsuf=$cf_suffix
19905                 ;;
19906         shared) #(vi
19907                 case $cf_cv_system_name in
19908                 aix[56]*) #(vi
19909                         cf_suffix='.a'
19910                         cf_depsuf=$cf_suffix
19911                         ;;
19912                 cygwin*) #(vi
19913                         cf_suffix='.dll'
19914                         cf_depsuf='.dll.a'
19915                         ;;
19916                 darwin*) #(vi
19917                         cf_suffix='.dylib'
19918                         cf_depsuf=$cf_suffix
19919                         ;;
19920                 hpux*) #(vi
19921                         case $target in
19922                         ia64*) #(vi
19923                                 cf_suffix='.so'
19924                                 cf_depsuf=$cf_suffix
19925                                 ;;
19926                         *) #(vi
19927                                 cf_suffix='.sl'
19928                                 cf_depsuf=$cf_suffix
19929                                 ;;
19930                         esac
19931                         ;;
19932                 *)      cf_suffix='.so'
19933                         cf_depsuf=$cf_suffix
19934                         ;;
19935                 esac
19936         esac
19937         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19938         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19939
19940                         if test $cf_item = shared ; then
19941                         if test "$cf_cv_do_symlinks" = yes ; then
19942                                 case "$cf_cv_shlib_version" in #(vi
19943                                 rel) #(vi
19944                                         case "$cf_cv_system_name" in #(vi
19945                                         darwin*)
19946                                         case .${LIB_SUFFIX} in
19947                                         .w*)
19948                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19949                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19950                                                 ;;
19951                                         *)
19952                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19953                                                 ;;
19954                                         esac
19955                                         ;; #(vi
19956                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19957                                         esac
19958                                         ;;
19959                                 abi)
19960                                         case "$cf_cv_system_name" in #(vi
19961                                         darwin*)
19962                                         case .${LIB_SUFFIX} in
19963                                         .w*)
19964                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19965                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19966                                                 ;;
19967                                         *)
19968                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19969                                                 ;;
19970                                         esac
19971                                         ;; #(vi
19972                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19973                                         esac
19974                                         ;;
19975                                 esac
19976                         fi
19977                         # cygwin needs import library, and has unique naming convention
19978                         # use autodetected ${cf_prefix} for import lib and static lib, but
19979                         # use 'cyg' prefix for shared lib.
19980                         if test $cf_cv_shlib_version = cygdll ; then
19981                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19982                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19983                                 continue
19984                         fi
19985                         fi
19986                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19987                 done
19988
19989                 if test $cf_dir = ncurses ; then
19990                         cf_subsets="$LIB_SUBSETS"
19991                         cf_r_parts="$cf_subsets"
19992                         cf_liblist="$LIBS_TO_MAKE"
19993
19994                         while test -n "$cf_r_parts"
19995                         do
19996                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19997                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19998                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19999                                         cf_item=
20000                                         case $cf_l_parts in #(vi
20001                                         *termlib*) #(vi
20002                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20003                                                 ;;
20004                                         *ticlib*)
20005                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20006                                                 ;;
20007                                         *)
20008                                                 break
20009                                                 ;;
20010                                         esac
20011                                         if test -n "$cf_item"; then
20012                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20013                                         fi
20014                                 else
20015                                         break
20016                                 fi
20017                         done
20018                 else
20019                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20020                 fi
20021
20022                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20023                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20024                         $cf_dir/Makefile >$cf_dir/Makefile.out
20025                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20026
20027                 $AWK -f $srcdir/mk-0th.awk \
20028                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20029                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20030
20031                 for cf_subset in $cf_subsets
20032                 do
20033                         cf_subdirs=
20034                         for cf_item in $cf_LIST_MODELS
20035                         do
20036                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20037
20038 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20039
20040         case $cf_item in #(vi
20041         libtool) #(vi
20042                 cf_suffix='.la'
20043                 cf_depsuf=$cf_suffix
20044                 ;;
20045         normal) #(vi
20046                 cf_suffix='.a'
20047                 cf_depsuf=$cf_suffix
20048                 ;;
20049         debug) #(vi
20050                 cf_suffix='_g.a'
20051                 cf_depsuf=$cf_suffix
20052                 ;;
20053         profile) #(vi
20054                 cf_suffix='_p.a'
20055                 cf_depsuf=$cf_suffix
20056                 ;;
20057         shared) #(vi
20058                 case $cf_cv_system_name in
20059                 aix[56]*) #(vi
20060                         cf_suffix='.a'
20061                         cf_depsuf=$cf_suffix
20062                         ;;
20063                 cygwin*) #(vi
20064                         cf_suffix='.dll'
20065                         cf_depsuf='.dll.a'
20066                         ;;
20067                 darwin*) #(vi
20068                         cf_suffix='.dylib'
20069                         cf_depsuf=$cf_suffix
20070                         ;;
20071                 hpux*) #(vi
20072                         case $target in
20073                         ia64*) #(vi
20074                                 cf_suffix='.so'
20075                                 cf_depsuf=$cf_suffix
20076                                 ;;
20077                         *) #(vi
20078                                 cf_suffix='.sl'
20079                                 cf_depsuf=$cf_suffix
20080                                 ;;
20081                         esac
20082                         ;;
20083                 *)      cf_suffix='.so'
20084                         cf_depsuf=$cf_suffix
20085                         ;;
20086                 esac
20087         esac
20088         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20089         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20090
20091         case $cf_item in
20092         libtool) cf_subdir='obj_lo'  ;;
20093         normal)  cf_subdir='objects' ;;
20094         debug)   cf_subdir='obj_g' ;;
20095         profile) cf_subdir='obj_p' ;;
20096         shared)
20097                 case $cf_cv_system_name in #(vi
20098                 cygwin) #(vi
20099                         cf_subdir='objects' ;;
20100                 *)
20101                         cf_subdir='obj_s' ;;
20102                 esac
20103         esac
20104
20105                         # Test for case where we build libtinfo with a different name.
20106                         cf_libname=$cf_dir
20107                         if test $cf_dir = ncurses ; then
20108                                 case $cf_subset in
20109                                 *base*)
20110                                         cf_libname=${cf_libname}$LIB_SUFFIX
20111                                         ;;
20112                                 *termlib*)
20113                                         cf_libname=$TINFO_LIB_SUFFIX
20114                                         ;;
20115                                 ticlib*)
20116                                         cf_libname=$TICS_LIB_SUFFIX
20117                                         ;;
20118                                 esac
20119                         else
20120                                 cf_libname=${cf_libname}$LIB_SUFFIX
20121                         fi
20122                         if test -n "${DFT_ARG_SUFFIX}" ; then
20123                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20124                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20125                         fi
20126
20127                         # These dependencies really are for development, not
20128                         # builds, but they are useful in porting, too.
20129                         cf_depend="../include/ncurses_cfg.h"
20130                         if test "$srcdir" = "."; then
20131                                 cf_reldir="."
20132                         else
20133                                 cf_reldir="\${srcdir}"
20134                         fi
20135
20136                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20137                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20138                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20139                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20140                         fi
20141
20142                         cf_dir_suffix=
20143                         old_cf_suffix="$cf_suffix"
20144                         if test "$cf_cv_shlib_version_infix" = yes ; then
20145                         if test -n "$LIB_SUFFIX" ; then
20146                                 case $LIB_SUFFIX in
20147                                 w*)
20148                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20149                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20150                                         cf_dir_suffix=w
20151                                         ;;
20152                                 esac
20153                         fi
20154                         fi
20155
20156                         $AWK -f $srcdir/mk-1st.awk \
20157                                 name=${cf_libname}${cf_dir_suffix} \
20158                                 traces=$LIB_TRACING \
20159                                 MODEL=$cf_ITEM \
20160                                 model=$cf_subdir \
20161                                 prefix=$cf_prefix \
20162                                 suffix=$cf_suffix \
20163                                 subset=$cf_subset \
20164                                 TermlibRoot=$TINFO_NAME \
20165                                 TermlibSuffix=$TINFO_SUFFIX \
20166                                 ShlibVer=$cf_cv_shlib_version \
20167                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20168                                 ReLink=${cf_cv_do_relink-no} \
20169                                 DoLinks=$cf_cv_do_symlinks \
20170                                 rmSoLocs=$cf_cv_rm_so_locs \
20171                                 ldconfig="$LDCONFIG" \
20172                                 overwrite=$WITH_OVERWRITE \
20173                                 depend="$cf_depend" \
20174                                 host="$host" \
20175                                 libtool_version="$LIBTOOL_VERSION" \
20176                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20177
20178                         cf_suffix="$old_cf_suffix"
20179
20180                         for cf_subdir2 in $cf_subdirs lib
20181                         do
20182                                 test $cf_subdir = $cf_subdir2 && break
20183                         done
20184                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20185                         $AWK -f $srcdir/mk-2nd.awk \
20186                                 name=$cf_dir \
20187                                 traces=$LIB_TRACING \
20188                                 MODEL=$cf_ITEM \
20189                                 model=$cf_subdir \
20190                                 subset=$cf_subset \
20191                                 srcdir=$srcdir \
20192                                 echo=$WITH_ECHO \
20193                                 crenames=$cf_cv_prog_CC_c_o \
20194                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20195                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20196                         cf_subdirs="$cf_subdirs $cf_subdir"
20197                         done
20198                 done
20199         fi
20200
20201         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20202 done
20203
20204 for cf_dir in $SRC_SUBDIRS
20205 do
20206         if test ! -d $srcdir/$cf_dir ; then
20207                 continue
20208         fi
20209
20210         if test -f $cf_dir/Makefile ; then
20211                 case "$cf_dir" in
20212                 Ada95) #(vi
20213                         echo 'libs \' >> Makefile
20214                         echo 'install.libs \' >> Makefile
20215                         echo 'uninstall.libs ::' >> Makefile
20216                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20217                         ;;
20218                 esac
20219         fi
20220
20221         if test -f $srcdir/$cf_dir/modules; then
20222                 echo >> Makefile
20223                 if test -f $srcdir/$cf_dir/headers; then
20224 cat >> Makefile <<CF_EOF
20225 install.includes \\
20226 uninstall.includes \\
20227 CF_EOF
20228                 fi
20229 if test "$cf_dir" != "c++" ; then
20230 echo 'lint \' >> Makefile
20231 fi
20232 cat >> Makefile <<CF_EOF
20233 libs \\
20234 lintlib \\
20235 install.libs \\
20236 uninstall.libs \\
20237 install.$cf_dir \\
20238 uninstall.$cf_dir ::
20239         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20240 CF_EOF
20241         elif test -f $srcdir/$cf_dir/headers; then
20242 cat >> Makefile <<CF_EOF
20243
20244 libs \\
20245 install.libs \\
20246 uninstall.libs \\
20247 install.includes \\
20248 uninstall.includes ::
20249         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20250 CF_EOF
20251 fi
20252 done
20253
20254 cat >> Makefile <<CF_EOF
20255
20256 install.libs uninstall.libs \\
20257 install.data uninstall.data ::
20258 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20259 CF_EOF
20260
20261 if test "x$cf_with_manpages" = xyes; then
20262 cat >> Makefile <<CF_EOF
20263
20264 install.man \\
20265 uninstall.man ::
20266         cd man && \${MAKE} \${CF_MFLAGS} \$@
20267 CF_EOF
20268 fi
20269
20270 cat >> Makefile <<CF_EOF
20271
20272 distclean ::
20273         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20274         rm -f headers.sh headers.sed mk_shared_lib.sh
20275         rm -f edit_man.* man_alias.*
20276         rm -rf \${DIRS_TO_MAKE}
20277 CF_EOF
20278
20279 # Special case: tack's manpage lives in its own directory.
20280 if test "x$cf_with_manpages" = xyes; then
20281 if test -d tack ; then
20282 if test -f $srcdir/$tack.h; then
20283 cat >> Makefile <<CF_EOF
20284
20285 install.man \\
20286 uninstall.man ::
20287         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20288 CF_EOF
20289 fi
20290 fi
20291 fi
20292
20293 rm -f headers.sed headers.sh
20294
20295 echo creating headers.sh
20296 cat >headers.sh <<CF_EOF
20297 #! /bin/sh
20298 # This shell script is generated by the 'configure' script.  It is invoked in a
20299 # subdirectory of the build tree.  It generates a sed-script in the parent
20300 # directory that is used to adjust includes for header files that reside in a
20301 # subdirectory of /usr/include, etc.
20302 PRG=""
20303 while test \$# != 3
20304 do
20305 PRG="\$PRG \$1"; shift
20306 done
20307 DST=\$1
20308 REF=\$2
20309 SRC=\$3
20310 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20311 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20312 echo installing \$SRC in \$DST
20313 CF_EOF
20314
20315 if test $WITH_CURSES_H = yes; then
20316         cat >>headers.sh <<CF_EOF
20317 case \$DST in
20318 /*/include/*)
20319         END=\`basename \$DST\`
20320         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20321         do
20322                 NAME=\`basename \$i\`
20323                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20324         done
20325         ;;
20326 *)
20327         echo "" >> \$TMPSED
20328         ;;
20329 esac
20330 CF_EOF
20331
20332 else
20333         cat >>headers.sh <<CF_EOF
20334 case \$DST in
20335 /*/include/*)
20336         END=\`basename \$DST\`
20337         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20338         do
20339                 NAME=\`basename \$i\`
20340                 if test "\$NAME" = "curses.h"
20341                 then
20342                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20343                         NAME=ncurses.h
20344                 fi
20345                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20346         done
20347         ;;
20348 *)
20349         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20350         ;;
20351 esac
20352 CF_EOF
20353 fi
20354 cat >>headers.sh <<CF_EOF
20355 rm -f \$TMPSRC
20356 sed -f \$TMPSED \$SRC > \$TMPSRC
20357 NAME=\`basename \$SRC\`
20358 CF_EOF
20359 if test $WITH_CURSES_H != yes; then
20360         cat >>headers.sh <<CF_EOF
20361 test "\$NAME" = "curses.h" && NAME=ncurses.h
20362 CF_EOF
20363 fi
20364 cat >>headers.sh <<CF_EOF
20365 # Just in case someone gzip'd manpages, remove the conflicting copy.
20366 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20367
20368 eval \$PRG \$TMPSRC \$DST/\$NAME
20369 rm -f \$TMPSRC \$TMPSED
20370 CF_EOF
20371
20372 chmod 0755 headers.sh
20373
20374 for cf_dir in $SRC_SUBDIRS
20375 do
20376         if test ! -d $srcdir/$cf_dir ; then
20377                 continue
20378         fi
20379
20380         if test -f $srcdir/$cf_dir/headers; then
20381                 $AWK -f $srcdir/mk-hdr.awk \
20382                         subset="$LIB_SUBSETS" \
20383                         compat="$WITH_CURSES_H" \
20384                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20385         fi
20386
20387         if test -f $srcdir/$cf_dir/modules; then
20388                 if test "$cf_dir" != "c++" ; then
20389                         cat >>$cf_dir/Makefile <<"CF_EOF"
20390 depend : ${AUTO_SRC}
20391         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20392
20393 # DO NOT DELETE THIS LINE -- make depend depends on it.
20394 CF_EOF
20395                 fi
20396         fi
20397 done
20398
20399 if test "x$cf_with_ada" != xno ; then
20400 if test -z "$USE_OLD_MAKERULES" ; then
20401         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
20402 fi
20403 fi
20404  ;;
20405   esac
20406 done
20407 EOF
20408
20409 cat >>$CONFIG_STATUS <<\EOF
20410
20411 { (exit 0); exit 0; }
20412 EOF
20413 chmod +x $CONFIG_STATUS
20414 ac_clean_files=$ac_clean_files_save
20415
20416 # configure is writing to config.log, and then calls config.status.
20417 # config.status does its own redirection, appending to config.log.
20418 # Unfortunately, on DOS this fails, as config.log is still kept open
20419 # by configure, so config.status won't be able to write to it; its
20420 # output is simply discarded.  So we exec the FD to /dev/null,
20421 # effectively closing config.log, so it can be properly (re)opened and
20422 # appended to by config.status.  When coming back to configure, we
20423 # need to make the FD available again.
20424 if test "$no_create" != yes; then
20425   ac_cs_success=:
20426   exec 5>/dev/null
20427   $SHELL $CONFIG_STATUS || ac_cs_success=false
20428   exec 5>>config.log
20429   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20430   # would make configure fail if this is the last instruction.
20431   $ac_cs_success || { (exit 1); exit 1; }
20432 fi
20433 ${MAKE-make} preinstall